From 50b6968eb1eb5acb81e6d497ce9d8930f9ea4100 Mon Sep 17 00:00:00 2001 From: olivier R-D Date: Mon, 9 Jan 2017 09:53:05 +0100 Subject: [PATCH] add missing ua_types class member to ExtensionObject class --- opcua/ua/uatypes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opcua/ua/uatypes.py b/opcua/ua/uatypes.py index 69b652b07..9f0578857 100644 --- a/opcua/ua/uatypes.py +++ b/opcua/ua/uatypes.py @@ -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 @@ -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: