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
Martin Manchev
osie
Commits
ae465954
Commit
ae465954
authored
Oct 28, 2021
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename text representations.
parent
7e67e1f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+12
-12
No files found.
coupler/opc-ua-server/server.c
View file @
ae465954
...
...
@@ -77,24 +77,24 @@ static void addVariable(UA_Server *server) {
// relay 0
UA_VariableAttributes
attr0
=
UA_VariableAttributes_default
;
UA_Variant_setScalar
(
&
attr0
.
value
,
&
myInteger
,
&
UA_TYPES
[
UA_TYPES_INT32
]);
attr0
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 0"
);
attr0
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 0"
);
attr0
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 0"
);
attr0
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 0"
);
attr0
.
dataType
=
UA_TYPES
[
UA_TYPES_INT32
].
typeId
;
attr0
.
accessLevel
=
UA_ACCESSLEVELMASK_READ
|
UA_ACCESSLEVELMASK_WRITE
;
UA_NodeId
myIntegerNodeId0
=
UA_NODEID_STRING
(
1
,
"i2c0.relay0"
);
UA_QualifiedName
myIntegerName0
=
UA_QUALIFIEDNAME
(
1
,
"Relay 0"
);
UA_QualifiedName
myIntegerName0
=
UA_QUALIFIEDNAME
(
1
,
"
I2C0 /
Relay 0"
);
UA_Server_addVariableNode
(
server
,
myIntegerNodeId0
,
parentNodeId
,
parentReferenceNodeId
,
myIntegerName0
,
UA_NODEID_NUMERIC
(
0
,
UA_NS0ID_BASEDATAVARIABLETYPE
),
attr0
,
NULL
,
NULL
);
// relay 1
UA_VariableAttributes
attr1
=
UA_VariableAttributes_default
;
UA_Variant_setScalar
(
&
attr1
.
value
,
&
myInteger
,
&
UA_TYPES
[
UA_TYPES_INT32
]);
attr1
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 1"
);
attr1
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 1"
);
attr1
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 1"
);
attr1
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 1"
);
attr1
.
dataType
=
UA_TYPES
[
UA_TYPES_INT32
].
typeId
;
attr1
.
accessLevel
=
UA_ACCESSLEVELMASK_READ
|
UA_ACCESSLEVELMASK_WRITE
;
UA_NodeId
myIntegerNodeId1
=
UA_NODEID_STRING
(
1
,
"i2c0.relay1"
);
UA_QualifiedName
myIntegerName1
=
UA_QUALIFIEDNAME
(
1
,
"Relay 1"
);
UA_QualifiedName
myIntegerName1
=
UA_QUALIFIEDNAME
(
1
,
"
I2C0 /
Relay 1"
);
UA_Server_addVariableNode
(
server
,
myIntegerNodeId1
,
parentNodeId
,
parentReferenceNodeId
,
myIntegerName1
,
UA_NODEID_NUMERIC
(
0
,
UA_NS0ID_BASEDATAVARIABLETYPE
),
attr1
,
NULL
,
NULL
);
...
...
@@ -102,12 +102,12 @@ static void addVariable(UA_Server *server) {
// relay 2
UA_VariableAttributes
attr2
=
UA_VariableAttributes_default
;
UA_Variant_setScalar
(
&
attr2
.
value
,
&
myInteger
,
&
UA_TYPES
[
UA_TYPES_INT32
]);
attr2
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 2"
);
attr2
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 2"
);
attr2
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 2"
);
attr2
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 2"
);
attr2
.
dataType
=
UA_TYPES
[
UA_TYPES_INT32
].
typeId
;
attr2
.
accessLevel
=
UA_ACCESSLEVELMASK_READ
|
UA_ACCESSLEVELMASK_WRITE
;
UA_NodeId
myIntegerNodeId2
=
UA_NODEID_STRING
(
1
,
"i2c0.relay2"
);
UA_QualifiedName
myIntegerName2
=
UA_QUALIFIEDNAME
(
1
,
"Relay 2"
);
UA_QualifiedName
myIntegerName2
=
UA_QUALIFIEDNAME
(
1
,
"
I2C0 /
Relay 2"
);
UA_Server_addVariableNode
(
server
,
myIntegerNodeId2
,
parentNodeId
,
parentReferenceNodeId
,
myIntegerName2
,
UA_NODEID_NUMERIC
(
0
,
UA_NS0ID_BASEDATAVARIABLETYPE
),
attr2
,
NULL
,
NULL
);
...
...
@@ -115,12 +115,12 @@ static void addVariable(UA_Server *server) {
// relay 3
UA_VariableAttributes
attr3
=
UA_VariableAttributes_default
;
UA_Variant_setScalar
(
&
attr3
.
value
,
&
myInteger
,
&
UA_TYPES
[
UA_TYPES_INT32
]);
attr3
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 3"
);
attr3
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"Relay 3"
);
attr3
.
description
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 3"
);
attr3
.
displayName
=
UA_LOCALIZEDTEXT
(
"en-US"
,
"
I2C0 /
Relay 3"
);
attr3
.
dataType
=
UA_TYPES
[
UA_TYPES_INT32
].
typeId
;
attr3
.
accessLevel
=
UA_ACCESSLEVELMASK_READ
|
UA_ACCESSLEVELMASK_WRITE
;
UA_NodeId
myIntegerNodeId3
=
UA_NODEID_STRING
(
1
,
"i2c0.relay3"
);
UA_QualifiedName
myIntegerName3
=
UA_QUALIFIEDNAME
(
1
,
"Relay 3"
);
UA_QualifiedName
myIntegerName3
=
UA_QUALIFIEDNAME
(
1
,
"
I2C0 /
Relay 3"
);
UA_Server_addVariableNode
(
server
,
myIntegerNodeId3
,
parentNodeId
,
parentReferenceNodeId
,
myIntegerName3
,
UA_NODEID_NUMERIC
(
0
,
UA_NS0ID_BASEDATAVARIABLETYPE
),
attr3
,
NULL
,
NULL
);
...
...
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