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
9ea78dae
Commit
9ea78dae
authored
Feb 03, 2023
by
Cooper Bodary
Committed by
oroulet
Feb 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loading a single custom struct
parent
eb80df4d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
asyncua/common/structures104.py
asyncua/common/structures104.py
+2
-2
No files found.
asyncua/common/structures104.py
View file @
9ea78dae
...
...
@@ -360,7 +360,7 @@ async def _get_parent_types(node: Node):
refs = await tmp_node.get_references(refs=ua.ObjectIds.HasSubtype, direction=ua.BrowseDirection.Inverse)
if not refs or refs[0].NodeId.NamespaceIndex == 0 and refs[0].NodeId.Identifier == 22:
return parents
tmp_node = Node(tmp_node.session, refs[0])
tmp_node = Node(tmp_node.session, refs[0]
.NodeId
)
parents.append(tmp_node)
_logger.warning("Went 10 layers up while look of subtype of given node %s, something is wrong: %s", node, parents)
...
...
@@ -370,7 +370,7 @@ async def load_custom_struct(node: Node) -> Any:
name = (await node.read_browse_name()).Name
for parent in await _get_parent_types(node):
parent_sdef = await parent.read_data_type_definition()
for f in reversed(parent_sdef.
f
ields):
for f in reversed(parent_sdef.
F
ields):
sdef.Fields.insert(0, f)
env = await _generate_object(name, sdef, data_type=node.nodeid)
struct = env[name]
...
...
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