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
1
Merge Requests
1
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
2d578a7c
Commit
2d578a7c
authored
Apr 25, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup.
parent
3fda7a8e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
coupler/opc-ua-server/keep_alive_publisher.h
coupler/opc-ua-server/keep_alive_publisher.h
+1
-2
coupler/opc-ua-server/keep_alive_subscriber.h
coupler/opc-ua-server/keep_alive_subscriber.h
+1
-2
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+3
-0
No files found.
coupler/opc-ua-server/keep_alive_publisher.h
View file @
2d578a7c
...
...
@@ -166,7 +166,7 @@ void callbackTicHeartBeat()
}
static
void
enablePublishHeartBeat
(
UA_Server
*
erver
,
UA_ServerConfig
*
config
){
static
void
enablePublishHeartBeat
(
UA_Server
*
s
erver
,
UA_ServerConfig
*
config
){
int
i
;
// add a callback which will increment heart beat tics
UA_UInt64
callbackId
=
1
;
...
...
@@ -195,7 +195,6 @@ static void enablePublishHeartBeat(UA_Server *erver, UA_ServerConfig *config){
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
);
for
(
i
=
0
;
i
<
countof
(
publishedVariableArray
);
i
++
)
{
...
...
coupler/opc-ua-server/keep_alive_subscriber.h
View file @
2d578a7c
...
...
@@ -236,9 +236,8 @@ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) {
pMetaData
->
fields
[
1
].
valueRank
=
-
1
;
/* scalar */
}
static
int
enableSubscribeToHeartBeat
(
UA_Server
*
erver
,
UA_ServerConfig
*
config
){
static
int
enableSubscribeToHeartBeat
(
UA_Server
*
s
erver
,
UA_ServerConfig
*
config
){
// enable subscribe to keep-alive messages
UA_ServerConfig_addPubSubTransportLayer
(
config
,
UA_PubSubTransportLayerUDPMP
());
UA_String
transportProfile
=
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/"
)};
addPubSubConnectionXXX
(
server
,
&
transportProfile
,
&
networkAddressUrl
);
...
...
coupler/opc-ua-server/server.c
View file @
2d578a7c
...
...
@@ -257,6 +257,9 @@ int main(int argc, char **argv)
}
#endif
// enable protocol for Pub/Sub
UA_ServerConfig_addPubSubTransportLayer
(
config
,
UA_PubSubTransportLayerUDPMP
());
// enable publish keep-alive messages
if
(
arguments
.
heart_beat
)
{
enablePublishHeartBeat
(
server
,
config
);
...
...
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