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
a43f1d4c
Commit
a43f1d4c
authored
Apr 14, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
2c6d0822
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
coupler/opc-ua-server/build.sh
coupler/opc-ua-server/build.sh
+3
-1
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+4
-4
No files found.
coupler/opc-ua-server/build.sh
View file @
a43f1d4c
#!/bin/bash
#!/bin/bash
rm
-f
server_publish server_subscribe
# build OPC UA server which publishes msgs
# build OPC UA server which publishes msgs
gcc
-I
/usr/local/include/
-std
=
c99 server.c
-o
server_publish
-l
:libopen62541.so
-L
/usr/local/lib
-lmbedcrypto
-lmbedx509
gcc
-o
server_publish
-I
/usr/local/include/
-std
=
c99 server.c
-l
:libopen62541.so
-L
/usr/local/lib
-lmbedcrypto
-lmbedx509
# build OPC Ua server which subscribes to msgs
# 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 @
a43f1d4c
...
@@ -228,8 +228,8 @@ int main(int argc, char **argv)
...
@@ -228,8 +228,8 @@ int main(int argc, char **argv)
#endif
#endif
// enable keep-alive
// enable keep-alive
//
UA_Float defaultFloat = 0;
UA_Float
defaultFloat
=
0
;
//
UA_Double defaultDouble = 0;
UA_Double
defaultDouble
=
0
;
UA_Int64
defaultInt64
=
0
;
UA_Int64
defaultInt64
=
0
;
const
PublishedVariable
publishedVariableArray
[]
=
{
const
PublishedVariable
publishedVariableArray
[]
=
{
{
{
...
@@ -244,7 +244,7 @@ int main(int argc, char **argv)
...
@@ -244,7 +244,7 @@ int main(int argc, char **argv)
UA_STRING
(
"http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp"
);
UA_STRING
(
"http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp"
);
UA_NetworkAddressUrlDataType
networkAddressUrl
=
UA_NetworkAddressUrlDataType
networkAddressUrl
=
{
UA_STRING_NULL
,
UA_STRING
(
"opc.udp://224.0.0.22:4840/"
)};
{
UA_STRING_NULL
,
UA_STRING
(
"opc.udp://224.0.0.22:4840/"
)};
/*
UA_ServerConfig_addPubSubTransportLayer(config, UA_PubSubTransportLayerUDPMP());
UA_ServerConfig_addPubSubTransportLayer(config, UA_PubSubTransportLayerUDPMP());
addPubSubConnection(server, &transportProfile, &networkAddressUrl);
addPubSubConnection(server, &transportProfile, &networkAddressUrl);
...
@@ -256,7 +256,7 @@ int main(int argc, char **argv)
...
@@ -256,7 +256,7 @@ int main(int argc, char **argv)
}
}
addWriterGroup(server);
addWriterGroup(server);
addDataSetWriter(server);
addDataSetWriter(server);
*/
// run server
// run server
UA_StatusCode
retval
=
UA_Server_run
(
server
,
&
running
);
UA_StatusCode
retval
=
UA_Server_run
(
server
,
&
running
);
UA_Server_delete
(
server
);
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