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
aa087480
Commit
aa087480
authored
Nov 09, 2017
by
Mathias Lüdtke
Committed by
oroulet
Nov 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow passing Node and ua.NodeId as refs
parent
9a8494f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
opcua/common/node.py
opcua/common/node.py
+12
-1
No files found.
opcua/common/node.py
View file @
aa087480
...
...
@@ -13,6 +13,17 @@ def _check_results(results, reqlen = 1):
r
.
check
()
def
_to_nodeid
(
nodeid
):
if
isinstance
(
nodeid
,
int
):
return
ua
.
TwoByteNodeId
(
nodeid
)
elif
isinstance
(
nodeid
,
Node
):
return
nodeid
.
nodeid
elif
isinstance
(
nodeid
,
ua
.
NodeId
):
return
nodeid
elif
type
(
nodeid
)
in
(
str
,
bytes
):
return
ua
.
NodeId
.
from_string
(
nodeid
)
else
:
raise
ua
.
UaError
(
"Could not resolve '{0}' to a type id"
.
format
(
nodeid
))
class
Node
(
object
):
"""
...
...
@@ -331,7 +342,7 @@ class Node(object):
"""
desc
=
ua
.
BrowseDescription
()
desc
.
BrowseDirection
=
direction
desc
.
ReferenceTypeId
=
ua
.
TwoByteNodeI
d
(
refs
)
desc
.
ReferenceTypeId
=
_to_nodei
d
(
refs
)
desc
.
IncludeSubtypes
=
includesubtypes
desc
.
NodeClassMask
=
nodeclassmask
desc
.
ResultMask
=
ua
.
BrowseResultMask
.
All
...
...
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