Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
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
Nikola Balog
opcua-asyncio
Commits
0b650e97
Commit
0b650e97
authored
Feb 25, 2021
by
oroulet
Committed by
oroulet
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix list struct init, fix copyutils
parent
307e321f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
asyncua/common/copy_node_util.py
asyncua/common/copy_node_util.py
+2
-2
asyncua/common/structures104.py
asyncua/common/structures104.py
+1
-1
No files found.
asyncua/common/copy_node_util.py
View file @
0b650e97
...
@@ -13,7 +13,7 @@ async def copy_node(parent, node, nodeid=None, recursive=True):
...
@@ -13,7 +13,7 @@ async def copy_node(parent, node, nodeid=None, recursive=True):
"""
"""
rdesc
=
await
_rdesc_from_node
(
parent
,
node
)
rdesc
=
await
_rdesc_from_node
(
parent
,
node
)
if
nodeid
is
None
:
if
nodeid
is
None
:
nodeid
=
ua
.
NodeId
(
namespaceid
x
=
node
.
nodeid
.
NamespaceIndex
)
nodeid
=
ua
.
NodeId
(
NamespaceInde
x
=
node
.
nodeid
.
NamespaceIndex
)
added_nodeids
=
await
_copy_node
(
parent
.
server
,
parent
.
nodeid
,
rdesc
,
nodeid
,
recursive
)
added_nodeids
=
await
_copy_node
(
parent
.
server
,
parent
.
nodeid
,
rdesc
,
nodeid
,
recursive
)
return
[
make_node
(
parent
.
server
,
nid
)
for
nid
in
added_nodeids
]
return
[
make_node
(
parent
.
server
,
nid
)
for
nid
in
added_nodeids
]
...
@@ -35,7 +35,7 @@ async def _copy_node(server, parent_nodeid, rdesc, nodeid, recursive):
...
@@ -35,7 +35,7 @@ async def _copy_node(server, parent_nodeid, rdesc, nodeid, recursive):
descs
=
await
node_to_copy
.
get_children_descriptions
()
descs
=
await
node_to_copy
.
get_children_descriptions
()
for
desc
in
descs
:
for
desc
in
descs
:
nodes
=
await
_copy_node
(
server
,
res
.
AddedNodeId
,
desc
,
nodes
=
await
_copy_node
(
server
,
res
.
AddedNodeId
,
desc
,
nodeid
=
ua
.
NodeId
(
namespaceid
x
=
desc
.
NodeId
.
NamespaceIndex
),
recursive
=
True
)
nodeid
=
ua
.
NodeId
(
NamespaceInde
x
=
desc
.
NodeId
.
NamespaceIndex
),
recursive
=
True
)
added_nodes
.
extend
(
nodes
)
added_nodes
.
extend
(
nodes
)
return
added_nodes
return
added_nodes
...
...
asyncua/common/structures104.py
View file @
0b650e97
...
@@ -177,7 +177,7 @@ class {struct_name}(ua.FrozenClass):
...
@@ -177,7 +177,7 @@ class {struct_name}(ua.FrozenClass):
raise RuntimeError(f"Unknown datatype for field: {sfield} in structure:{struct_name}, please report")
raise RuntimeError(f"Unknown datatype for field: {sfield} in structure:{struct_name}, please report")
if sfield.ValueRank >= 1:
if sfield.ValueRank >= 1:
default_value = "
[]
"
default_value = "
field(default_factory=list)
"
else:
else:
default_value = get_default_value(uatype)
default_value = get_default_value(uatype)
...
...
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