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
8fc237fb
Commit
8fc237fb
authored
May 01, 2022
by
Alexander Schrode
Committed by
oroulet
May 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix merge error
parent
fa179106
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
asyncua/ua/ua_binary.py
asyncua/ua/ua_binary.py
+6
-3
No files found.
asyncua/ua/ua_binary.py
View file @
8fc237fb
...
...
@@ -13,7 +13,7 @@ from dataclasses import is_dataclass, fields
from
asyncua
import
ua
from
.uaerrors
import
UaError
from
..common.utils
import
Buffer
from
.uatypes
import
ExtensionObject
,
type_is_list
,
type_is_union
,
type_from_list
,
types_from_union
,
type_allow_subclass
from
.uatypes
import
type_is_list
,
type_is_union
,
type_from_list
,
types_from_union
,
type_allow_subclass
logger
=
logging
.
getLogger
(
'__name__'
)
...
...
@@ -620,13 +620,16 @@ def _create_dataclass_deserializer(objtype):
if
type_is_union
(
field_type
):
optional_enc_bit
=
1
<<
enc_count
enc_count
+=
1
deserialize_field
=
_create_type_deserializer
(
field_type
)
if
subtypes
:
deserialize_field
=
extensionobject_to_binary
else
:
deserialize_field
=
_create_type_deserializer
(
field_type
)
field_deserializers
.
append
((
field
,
optional_enc_bit
,
deserialize_field
))
def
decode
(
data
):
kwargs
=
{}
enc
=
0
for
field
,
optional_enc_bit
,
deserialize_field
,
subtypes
in
field_deserializers
:
for
field
,
optional_enc_bit
,
deserialize_field
in
field_deserializers
:
if
field
.
name
==
"Encoding"
:
enc
=
deserialize_field
(
data
)
elif
optional_enc_bit
==
0
or
enc
&
optional_enc_bit
:
...
...
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