Skip to content

Commit 50b6968

Browse files
committed
add missing ua_types class member to ExtensionObject class
1 parent 86537ce commit 50b6968

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

opcua/ua/uatypes.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,12 @@ class ExtensionObject(FrozenClass):
615615
:vartype Body: bytes
616616
"""
617617

618+
ua_types = {
619+
"TypeId": "NodeId",
620+
"Encoding": "Byte",
621+
"Body": "ByteString"
622+
}
623+
618624
def __init__(self):
619625
self.TypeId = NodeId()
620626
self.Encoding = 0
@@ -624,7 +630,7 @@ def __init__(self):
624630
def to_binary(self):
625631
packet = []
626632
if self.Body:
627-
self.Encoding |= (1 << 0)
633+
self.Encoding = 0x01
628634
packet.append(self.TypeId.to_binary())
629635
packet.append(uabin.Primitives.UInt8.pack(self.Encoding))
630636
if self.Body:

0 commit comments

Comments
 (0)