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
eb54353c
Commit
eb54353c
authored
Aug 09, 2020
by
oroulet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
data_type should be nodeid and not an int
parent
61e0ad15
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
275 additions
and
268 deletions
+275
-268
asyncua/ua/uaprotocol_auto.py
asyncua/ua/uaprotocol_auto.py
+267
-267
schemas/generate_protocol_python.py
schemas/generate_protocol_python.py
+1
-1
tests/test_common.py
tests/test_common.py
+7
-0
No files found.
asyncua/ua/uaprotocol_auto.py
View file @
eb54353c
This diff is collapsed.
Click to expand it.
schemas/generate_protocol_python.py
View file @
eb54353c
...
...
@@ -118,7 +118,7 @@ class CodeGenerator:
self
.
write
(
''
)
#FIXME: next line is a weak way to find out if object is a datatype or not...
if
not
"Parameter"
in
obj
.
name
and
not
"Result"
in
obj
.
name
:
self
.
write
(
f'data_type =
ObjectIds.
{
obj
.
name
}
'
)
self
.
write
(
f'data_type =
NodeId(ObjectIds.
{
obj
.
name
}
)
'
)
self
.
write
(
''
)
switch_written
=
False
for
field
in
obj
.
fields
:
...
...
tests/test_common.py
View file @
eb54353c
...
...
@@ -1007,3 +1007,10 @@ async def test_import_xml_data_type_definition(opc):
s2
=
await
var
.
read_value
()
assert
s2
.
structs
[
1
].
toto
==
ss
.
structs
[
1
].
toto
==
0.1
async
def
test_struct_data_type
(
opc
):
assert
isinstance
(
ua
.
AddNodesItem
.
data_type
,
ua
.
NodeId
)
node
=
opc
.
opc
.
get_node
(
ua
.
AddNodesItem
.
data_type
)
path
=
await
node
.
get_path
()
assert
opc
.
opc
.
nodes
.
base_structure_type
in
path
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