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
ab3176a3
Commit
ab3176a3
authored
Apr 25, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup.
parent
cb9d8d97
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
coupler/opc-ua-server/build.sh
coupler/opc-ua-server/build.sh
+2
-2
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+2
-5
No files found.
coupler/opc-ua-server/build.sh
View file @
ab3176a3
...
...
@@ -2,9 +2,9 @@
rm
-f
server_publish server_subscribe
# build OPC UA server which publishes msgs
gcc
-o
server
_publish
-I
/usr/local/include/
-std
=
c99 server.c
-l
:libopen62541.so
-L
/usr/local/lib
-lmbedcrypto
-lmbedx509
-I
~/open62541/src/pubsub/
-I
~/open62541/deps/
gcc
-o
server
-I
/usr/local/include/
-std
=
c99 server.c
-l
:libopen62541.so
-L
/usr/local/lib
-lmbedcrypto
-lmbedx509
-I
~/open62541/src/pubsub/
-I
~/open62541/deps/
# build OPC Ua server which subscribes to msgs
gcc
-o
server_subscribe
-I
/usr/local/include/
-std
=
c99 server_subscribe.c
-l
:libopen62541.so
-L
/usr/local/lib
-I
~/open62541/src/pubsub/
-I
~/open62541/deps/
#
gcc -o server_subscribe -I /usr/local/include/ -std=c99 server_subscribe.c -l:libopen62541.so -L/usr/local/lib -I ~/open62541/src/pubsub/ -I ~/open62541/deps/
coupler/opc-ua-server/server.c
View file @
ab3176a3
...
...
@@ -257,13 +257,12 @@ int main(int argc, char **argv)
}
#endif
// enable keep-alive
// enable
publish
keep-alive
if
(
arguments
.
heart_beat
)
{
enablePublishHeartBeat
(
server
,
config
);
}
// XXX: subscribe part
/* Add PubSubConnection */
// enable subscribe to keep-alive messages
UA_ServerConfig_addPubSubTransportLayer
(
config
,
UA_PubSubTransportLayerUDPMP
());
UA_StatusCode
return_value
=
UA_STATUSCODE_GOOD
;
UA_String
transportProfile
=
UA_STRING
(
"http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp"
);
...
...
@@ -287,8 +286,6 @@ int main(int argc, char **argv)
if
(
return_value
!=
UA_STATUSCODE_GOOD
)
return
EXIT_FAILURE
;
// EOF: subscribe
// run server
UA_StatusCode
retval
=
UA_Server_run
(
server
,
&
running
);
UA_Server_delete
(
server
);
...
...
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