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
a334d7a3
Commit
a334d7a3
authored
Apr 22, 2022
by
Alexander Schrode
Committed by
oroulet
Apr 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow instantiate methods
parent
8b802fcd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
asyncua/common/instantiate_util.py
asyncua/common/instantiate_util.py
+5
-5
No files found.
asyncua/common/instantiate_util.py
View file @
a334d7a3
...
...
@@ -26,13 +26,13 @@ async def instantiate(parent, node_type, nodeid: ua.NodeId=None, bname: Union[st
If they exists children of the node type, such as components, variables and
properties are also instantiated
"""
rdesc
=
await
_rdesc_from_node
(
parent
,
node_type
)
rdesc
.
TypeDefinition
=
node_type
.
nodeid
if
rdesc
.
NodeClass
in
(
ua
.
NodeClass
.
DataType
,
ua
.
NodeClass
.
ReferenceType
,
ua
.
NodeClass
.
ObjectType
,
ua
.
NodeClass
.
ReferenceType
):
# Only some nodes can be abstract
abstract
=
await
is_abstract
(
node_type
)
if
abstract
:
raise
ua
.
UaError
(
f"InstantiationError NodeId:
{
node_type
.
nodeid
}
is abstract and cant be instantiated!"
)
rdesc
=
await
_rdesc_from_node
(
parent
,
node_type
)
rdesc
.
TypeDefinition
=
node_type
.
nodeid
if
nodeid
is
None
:
nodeid
=
ua
.
NodeId
(
NamespaceIndex
=
idx
)
# will trigger automatic node generation in namespace idx
if
bname
is
None
:
...
...
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