Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qjs-wrapper
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
qjs-wrapper
Commits
a026a9ad
Commit
a026a9ad
authored
May 28, 2022
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Precise the networkInterface
parent
45accab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
pubsub.c
pubsub.c
+19
-14
No files found.
pubsub.c
View file @
a026a9ad
...
...
@@ -366,19 +366,19 @@ int runPubsub(UA_String *transportProfile,
/* Publishing */
addPublishedDataSet
(
global_server
,
id
);
for
(
size_t
i
=
0
;
i
<
nbVariable
;
i
++
)
{
retval
|=
addVariable
(
global_server
,
variableArray
[
i
]);
if
(
retval
!=
UA_STATUSCODE_GOOD
)
return
EXIT_FAILURE
;
addDataSetField
(
global_server
,
variableArray
[
i
]);
}
addWriterGroup
(
global_server
);
retval
|=
addDataSetWriter
(
global_server
);
if
(
retval
!=
UA_STATUSCODE_GOOD
)
return
EXIT_FAILURE
;
//
addPublishedDataSet(global_server, id);
//
for(size_t i = 0; i < nbVariable; i++) {
//
retval |= addVariable(global_server, variableArray[i]);
//
if (retval != UA_STATUSCODE_GOOD)
//
return EXIT_FAILURE;
//
addDataSetField(global_server, variableArray[i]);
//
}
//
//
addWriterGroup(global_server);
//
retval |= addDataSetWriter(global_server);
//
if (retval != UA_STATUSCODE_GOOD)
//
return EXIT_FAILURE;
//
/* Subscribing */
retval
|=
addReaderGroup
(
global_server
);
...
...
@@ -464,7 +464,12 @@ int main(int argc, char **argv) {
return
EXIT_SUCCESS
;
}
else
if
(
strncmp
(
argv
[
1
],
"opc.udp://"
,
10
)
==
0
)
{
networkAddressUrl
.
url
=
UA_STRING
(
argv
[
1
]);
drone_id_index
=
1
;
if
(
argc
<
3
)
{
printf
(
"Error: UDP needs an interface name to know where to listen
\n
"
);
return
EXIT_FAILURE
;
}
networkAddressUrl
.
networkInterface
=
UA_STRING
(
argv
[
2
]);
drone_id_index
=
2
;
}
else
if
(
strncmp
(
argv
[
1
],
"opc.eth://"
,
10
)
==
0
)
{
transportProfile
=
UA_STRING
(
"http://opcfoundation.org/UA-Profile/Transport/pubsub-eth-uadp"
);
...
...
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