Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rt-UA
open62541
Commits
2cbad9e6
Unverified
Commit
2cbad9e6
authored
6 years ago
by
Stefan Profanter
Browse files
Options
Download
Email Patches
Plain Diff
Do not set the value of a variant if the node does not have a value in the nodeset. Fixes #2058
parent
0c7ccfde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/nodeset_compiler/backend_open62541_nodes.py
+3
-8
tools/nodeset_compiler/backend_open62541_nodes.py
with
3 additions
and
8 deletions
+3
-8
tools/nodeset_compiler/backend_open62541_nodes.py
View file @
2cbad9e6
...
...
@@ -302,16 +302,11 @@ def generateValueCodeDummy(dataTypeNode, parentNode, nodeset, bootstrapping=True
typeArr
=
dataTypeNode
.
typesArray
+
"["
+
dataTypeNode
.
typesArray
+
"_"
+
typeBrowseNode
.
upper
()
+
"]"
typeStr
=
"UA_"
+
typeBrowseNode
# This method is only called if parentNode.value is None. Do net set any value for the array, only the type.
if
parentNode
.
valueRank
>
0
:
code
.
append
(
"UA_STACKARRAY("
+
typeStr
+
", "
+
valueName
+
","
+
str
(
parentNode
.
valueRank
)
+
");"
)
for
i
in
range
(
0
,
parentNode
.
valueRank
):
code
.
append
(
"UA_init(&"
+
valueName
+
"["
+
str
(
i
)
+
"], &"
+
typeArr
+
");"
)
code
.
append
(
"UA_Variant_setArray(&attr.value, "
+
valueName
+
", (UA_Int32) "
+
str
(
parentNode
.
valueRank
)
+
", &"
+
typeArr
+
");"
)
code
.
append
(
"UA_Variant_setArray(&attr.value, NULL, (UA_Int32) 0, &"
+
typeArr
+
");"
)
else
:
code
.
append
(
"UA_STACKARRAY("
+
typeStr
+
", "
+
valueName
+
", 1);"
)
code
.
append
(
"UA_init("
+
valueName
+
", &"
+
typeArr
+
");"
)
code
.
append
(
"UA_Variant_setScalar(&attr.value, "
+
valueName
+
", &"
+
typeArr
+
");"
)
code
.
append
(
"UA_Variant_setScalar(&attr.value, NULL, &"
+
typeArr
+
");"
)
return
code
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help