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
76b7df45
Commit
76b7df45
authored
Aug 03, 2022
by
brubbel
Committed by
oroulet
Aug 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix generating uaprotocol_auto
parent
0c1660b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
schemas/generate_model_from_nodeset.py
schemas/generate_model_from_nodeset.py
+2
-0
schemas/generate_protocol_python.py
schemas/generate_protocol_python.py
+1
-2
No files found.
schemas/generate_model_from_nodeset.py
View file @
76b7df45
...
...
@@ -106,6 +106,7 @@ class Struct:
parents
:
List
[
Any
]
=
field
(
default_factory
=
list
)
# we splt some structs, they must not be registered as extension objects
do_not_register
:
bool
=
False
is_data_type
:
bool
=
False
def
__hash__
(
self
):
return
hash
(
self
.
name
)
...
...
@@ -327,6 +328,7 @@ class Parser:
if
ref
.
text
==
"i=22"
or
ref
.
text
in
self
.
model
.
known_structs
:
struct
=
self
.
parse_struct
(
name
,
el
)
struct
.
is_data_type
=
True
if
ref
.
text
in
self
.
model
.
known_structs
:
parent
=
self
.
model
.
get_struct_by_nodeid
(
ref
.
text
)
for
sfield
in
reversed
(
parent
.
fields
):
...
...
schemas/generate_protocol_python.py
View file @
76b7df45
...
...
@@ -130,8 +130,7 @@ class CodeGenerator:
self
.
write
(
f':vartype
{
field
.
name
}
:
{
field
.
data_type
}
'
)
self
.
write
(
'"""'
)
# FIXME: next line is a weak way to find out if object is a datatype or not...
if
"Parameter"
not
in
obj
.
name
and
"Result"
not
in
obj
.
name
:
if
obj
.
is_data_type
:
self
.
write
(
''
)
self
.
write
(
f'data_type = NodeId(ObjectIds.
{
obj
.
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