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
9cda7eed
Commit
9cda7eed
authored
Apr 23, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Board has only 2 Analon In.
parent
cc96c967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
coupler/mod_io_opc_ua.h
coupler/mod_io_opc_ua.h
+8
-6
No files found.
coupler/mod_io_opc_ua.h
View file @
9cda7eed
...
...
@@ -113,10 +113,12 @@ static void addVariable(UA_Server *server)
sprintf
(
node_id
,
"i2c%d.in%d"
,
i
,
n
);
sprintf
(
node_title
,
"I2C%d / Digital Input %d"
,
i
,
n
);
addBooleanVariableReadNode
(
server
,
node_id
,
node_title
);
// add analog in
sprintf
(
node_id
,
"i2c%d.ain%d"
,
i
,
n
);
sprintf
(
node_title
,
"I2C%d / Analog Input %d"
,
i
,
n
);
addUIntegerVariableReadNode
(
server
,
node_id
,
node_title
);
// add analog in (board has only 2 thus do not all all)
if
(
n
<
2
)
{
sprintf
(
node_id
,
"i2c%d.ain%d"
,
i
,
n
);
sprintf
(
node_title
,
"I2C%d / Analog Input %d"
,
i
,
n
);
addUIntegerVariableReadNode
(
server
,
node_id
,
node_title
);
}
}
}
}
...
...
@@ -517,7 +519,7 @@ static void addValueCallbackToCurrentTimeVariable(UA_Server *server)
int
device_number
,
offset_number
;
char
*
node_id
=
malloc
(
sizeof
(
char
)
*
10
);
// list of relays, digital and analog callbacks for all devices (XXX: for now only 4 outof 127 possible!)
// list of relays, digital and analog callbacks for all devices (XXX: for now only 4 out
of 127 possible!)
static
void
(
*
callables
[
48
])
(
UA_Server
*
server
,
const
UA_NodeId
*
sessionId
,
void
*
sessionContext
,
const
UA_NodeId
*
nodeId
,
void
*
nodeContext
,
const
UA_NumericRange
*
range
,
...
...
@@ -579,7 +581,7 @@ static void addValueCallbackToCurrentTimeVariable(UA_Server *server)
beforeReadTimeI2C3In1
,
beforeReadTimeI2C3In2
,
beforeReadTimeI2C3In3
,
// analog - IC
1
// analog - IC
3
beforeReadTimeI2C3Ain0
,
beforeReadTimeI2C3Ain1
,
beforeReadTimeI2C3Ain2
,
...
...
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