Skip to content

Commit

Permalink
add missing ua_types class member to ExtensionObject class
Browse files Browse the repository at this point in the history
  • Loading branch information
oroulet committed Jan 9, 2017
1 parent 86537ce commit 50b6968
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion opcua/ua/uatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,12 @@ class ExtensionObject(FrozenClass):
:vartype Body: bytes
"""

ua_types = {
"TypeId": "NodeId",
"Encoding": "Byte",
"Body": "ByteString"
}

def __init__(self):
self.TypeId = NodeId()
self.Encoding = 0
Expand All @@ -624,7 +630,7 @@ def __init__(self):
def to_binary(self):
packet = []
if self.Body:
self.Encoding |= (1 << 0)
self.Encoding = 0x01
packet.append(self.TypeId.to_binary())
packet.append(uabin.Primitives.UInt8.pack(self.Encoding))
if self.Body:
Expand Down

0 comments on commit 50b6968

Please sign in to comment.