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
e2989781
Commit
e2989781
authored
Feb 01, 2019
by
oroulet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print what node is giving issues when exporting
parent
6990caea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
opcua/common/structures.py
opcua/common/structures.py
+8
-0
opcua/common/xmlexporter.py
opcua/common/xmlexporter.py
+7
-1
No files found.
opcua/common/structures.py
View file @
e2989781
...
...
@@ -81,6 +81,10 @@ class Struct(object):
self
.
fields
=
[]
self
.
typeid
=
None
def
__str__
(
self
):
return
"Struct(name={}, fields={}"
.
format
(
self
.
name
,
self
.
fields
)
__repr__
=
__str__
def
get_code
(
self
):
code
=
f"""
...
...
@@ -117,6 +121,10 @@ class Field(object):
self
.
value
=
None
self
.
array
=
False
def
__str__
(
self
):
return
"Field(name={}, uatype={}"
.
format
(
self
.
name
,
self
.
uatype
)
__repr__
=
__str__
class
StructGenerator
(
object
):
def
__init__
(
self
):
...
...
opcua/common/xmlexporter.py
View file @
e2989781
...
...
@@ -13,6 +13,7 @@ import base64
from
opcua
import
ua
from
..ua
import
object_ids
as
o_ids
from
.ua_utils
import
get_base_data_type
from
opcua.ua.uaerrors
import
UaError
__all__
=
[
"XmlExporter"
]
...
...
@@ -92,7 +93,12 @@ class XmlExporter:
idxs
=
[]
for
node
in
nodes
:
node_idxs
=
[
node
.
nodeid
.
NamespaceIndex
]
node_idxs
.
append
((
await
node
.
get_browse_name
()).
NamespaceIndex
)
try
:
node_idxs
.
append
((
await
node
.
get_browse_name
()).
NamespaceIndex
)
except
UaError
:
self
.
logger
.
exception
(
"Error retrieving browse name of node %s"
,
node
)
raise
node_idxs
.
extend
(
ref
.
NodeId
.
NamespaceIndex
for
ref
in
await
node
.
get_references
())
node_idxs
=
list
(
set
(
node_idxs
))
# remove duplicates
for
i
in
node_idxs
:
...
...
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