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
Nikola Balog
osie
Commits
81e7c53c
Commit
81e7c53c
authored
Nov 04, 2021
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OPC-Ua nodes only if we have MOd-IOs configured over CLI.
parent
40ca6173
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+15
-10
No files found.
coupler/opc-ua-server/server.c
View file @
81e7c53c
...
...
@@ -89,16 +89,21 @@ static void addVariable(UA_Server *server) {
/*
* Create all variables representing MOD-IO's relays
*/
int
length
=
sizeof
(
I2C_SLAVE_ADDR_LIST
)
/
sizeof
(
int
);
if
(
length
>=
1
)
{
// IC2-0
addIntegerVariableNode
(
server
,
"i2c0.relay0"
,
"I2C0 / Relay 0"
);
addIntegerVariableNode
(
server
,
"i2c0.relay1"
,
"I2C0 / Relay 1"
);
addIntegerVariableNode
(
server
,
"i2c0.relay2"
,
"I2C0 / Relay 2"
);
addIntegerVariableNode
(
server
,
"i2c0.relay3"
,
"I2C0 / Relay 3"
);
}
if
(
length
>=
2
)
{
// IC2-1
addIntegerVariableNode
(
server
,
"i2c1.relay0"
,
"I2C1 / Relay 0"
);
addIntegerVariableNode
(
server
,
"i2c1.relay1"
,
"I2C1 / Relay 1"
);
addIntegerVariableNode
(
server
,
"i2c1.relay2"
,
"I2C1 / Relay 2"
);
addIntegerVariableNode
(
server
,
"i2c1.relay3"
,
"I2C1 / Relay 3"
);
}
}
/* Connect to variables to physical relays
...
...
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