Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
osie
Commits
eb2e5c92
Commit
eb2e5c92
authored
Apr 14, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup.
parent
a43f1d4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
31 deletions
+6
-31
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+1
-3
coupler/opc-ua-server/server_subscribe.c
coupler/opc-ua-server/server_subscribe.c
+5
-28
No files found.
coupler/opc-ua-server/server.c
View file @
eb2e5c92
...
...
@@ -244,9 +244,7 @@ int main(int argc, char **argv)
UA_STRING
(
"http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp"
);
UA_NetworkAddressUrlDataType
networkAddressUrl
=
{
UA_STRING_NULL
,
UA_STRING
(
"opc.udp://224.0.0.22:4840/"
)};
/*
UA_ServerConfig_addPubSubTransportLayer
(
config
,
UA_PubSubTransportLayerUDPMP
());
addPubSubConnection
(
server
,
&
transportProfile
,
&
networkAddressUrl
);
addPublishedDataSet
(
server
);
//addDataSetField(server);
...
...
@@ -256,7 +254,7 @@ int main(int argc, char **argv)
}
addWriterGroup
(
server
);
addDataSetWriter
(
server
);
*/
// run server
UA_StatusCode
retval
=
UA_Server_run
(
server
,
&
running
);
UA_Server_delete
(
server
);
...
...
coupler/opc-ua-server/server_subscribe.c
View file @
eb2e5c92
...
...
@@ -229,46 +229,23 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) {
}
UA_DataSetMetaDataType_init
(
pMetaData
);
pMetaData
->
name
=
UA_STRING
(
"DataSet 1"
);
pMetaData
->
name
=
UA_STRING
(
"DataSet 1
(subscribed)
"
);
/* Static definition of number of fields size to 4 to create four different
* targetVariables of distinct datatype
* Currently the publisher sends only DateTime data type */
pMetaData
->
fieldsSize
=
4
;
pMetaData
->
fieldsSize
=
1
;
pMetaData
->
fields
=
(
UA_FieldMetaData
*
)
UA_Array_new
(
pMetaData
->
fieldsSize
,
&
UA_TYPES
[
UA_TYPES_FIELDMETADATA
]);
/* DateTime DataType */
UA_FieldMetaData_init
(
&
pMetaData
->
fields
[
0
]);
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_
DATETIME
].
typeId
,
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_
INT64
].
typeId
,
&
pMetaData
->
fields
[
0
].
dataType
);
pMetaData
->
fields
[
0
].
builtInType
=
UA_NS0ID_
DATETIME
;
pMetaData
->
fields
[
0
].
name
=
UA_STRING
(
"
DateTime
"
);
pMetaData
->
fields
[
0
].
builtInType
=
UA_NS0ID_
INT64
;
pMetaData
->
fields
[
0
].
name
=
UA_STRING
(
"
Heartbeat (subscribed)
"
);
pMetaData
->
fields
[
0
].
valueRank
=
-
1
;
/* scalar */
/* Int32 DataType */
UA_FieldMetaData_init
(
&
pMetaData
->
fields
[
1
]);
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_INT32
].
typeId
,
&
pMetaData
->
fields
[
1
].
dataType
);
pMetaData
->
fields
[
1
].
builtInType
=
UA_NS0ID_INT32
;
pMetaData
->
fields
[
1
].
name
=
UA_STRING
(
"Int32"
);
pMetaData
->
fields
[
1
].
valueRank
=
-
1
;
/* scalar */
/* Int64 DataType */
UA_FieldMetaData_init
(
&
pMetaData
->
fields
[
2
]);
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_INT64
].
typeId
,
&
pMetaData
->
fields
[
2
].
dataType
);
pMetaData
->
fields
[
2
].
builtInType
=
UA_NS0ID_INT64
;
pMetaData
->
fields
[
2
].
name
=
UA_STRING
(
"Int64"
);
pMetaData
->
fields
[
2
].
valueRank
=
-
1
;
/* scalar */
/* Boolean DataType */
UA_FieldMetaData_init
(
&
pMetaData
->
fields
[
3
]);
UA_NodeId_copy
(
&
UA_TYPES
[
UA_TYPES_BOOLEAN
].
typeId
,
&
pMetaData
->
fields
[
3
].
dataType
);
pMetaData
->
fields
[
3
].
builtInType
=
UA_NS0ID_BOOLEAN
;
pMetaData
->
fields
[
3
].
name
=
UA_STRING
(
"BoolToggle"
);
pMetaData
->
fields
[
3
].
valueRank
=
-
1
;
/* scalar */
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment