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
26b4ac51
Commit
26b4ac51
authored
Jul 20, 2020
by
Andreas Heine
Committed by
GitHub
Jul 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update node.py
parent
a2a2fc98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
asyncua/common/node.py
asyncua/common/node.py
+2
-2
No files found.
asyncua/common/node.py
View file @
26b4ac51
...
...
@@ -645,13 +645,13 @@ class Node:
Add a modelling rule reference to Node.
When creating a new object type, its variable and child nodes will not
be instanciated if they do not have modelling rule
if mandatory is None
or False
, the modelling rule is removed
if mandatory is None, the modelling rule is removed
"""
# remove all existing modelling rule
rules
=
await
self
.
get_references
(
ua
.
ObjectIds
.
HasModellingRule
)
await
self
.
server
.
delete_references
(
list
(
map
(
self
.
_fill_delete_reference_item
,
rules
)))
# add new modelling rule as requested
if
mandatory
is
not
None
and
mandatory
is
not
False
:
if
mandatory
is
not
None
:
rule
=
ua
.
ObjectIds
.
ModellingRule_Mandatory
if
mandatory
else
ua
.
ObjectIds
.
ModellingRule_Optional
await
self
.
add_reference
(
rule
,
ua
.
ObjectIds
.
HasModellingRule
,
True
,
False
)
...
...
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