|
@@ 9985-10018 (lines=34) @@
|
| 9982 |
|
('ReleaseContinuationPoints', 'Boolean'), |
| 9983 |
|
('NodesToRead', 'ListOfHistoryReadValueId'), |
| 9984 |
|
) |
| 9985 |
|
|
| 9986 |
|
def __init__(self, binary=None): |
| 9987 |
|
if binary is not None: |
| 9988 |
|
self._binary_init(binary) |
| 9989 |
|
self._freeze = True |
| 9990 |
|
return |
| 9991 |
|
self.HistoryReadDetails = None |
| 9992 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
| 9993 |
|
self.ReleaseContinuationPoints = True |
| 9994 |
|
self.NodesToRead = [] |
| 9995 |
|
self._freeze = True |
| 9996 |
|
|
| 9997 |
|
def to_binary(self): |
| 9998 |
|
packet = [] |
| 9999 |
|
packet.append(extensionobject_to_binary(self.HistoryReadDetails)) |
| 10000 |
|
packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
| 10001 |
|
packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints)) |
| 10002 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead))) |
| 10003 |
|
for fieldname in self.NodesToRead: |
| 10004 |
|
packet.append(fieldname.to_binary()) |
| 10005 |
|
return b''.join(packet) |
| 10006 |
|
|
| 10007 |
|
@staticmethod |
| 10008 |
|
def from_binary(data): |
| 10009 |
|
return HistoryReadParameters(data) |
| 10010 |
|
|
| 10011 |
|
def _binary_init(self, data): |
| 10012 |
|
self.HistoryReadDetails = extensionobject_from_binary(data) |
| 10013 |
|
self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
| 10014 |
|
self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data) |
| 10015 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 10016 |
|
array = [] |
| 10017 |
|
if length != -1: |
| 10018 |
|
for _ in range(0, length): |
| 10019 |
|
array.append(HistoryReadValueId.from_binary(data)) |
| 10020 |
|
self.NodesToRead = array |
| 10021 |
|
|
|
@@ 7978-8011 (lines=34) @@
|
| 7975 |
|
:vartype RelativePath: RelativePath |
| 7976 |
|
:ivar AttributeId: |
| 7977 |
|
:vartype AttributeId: UInt32 |
| 7978 |
|
:ivar IndexRange: |
| 7979 |
|
:vartype IndexRange: String |
| 7980 |
|
''' |
| 7981 |
|
|
| 7982 |
|
ua_types = ( |
| 7983 |
|
|
| 7984 |
|
('RelativePath', 'RelativePath'), |
| 7985 |
|
('AttributeId', 'UInt32'), |
| 7986 |
|
('IndexRange', 'String'), |
| 7987 |
|
) |
| 7988 |
|
|
| 7989 |
|
def __init__(self, binary=None): |
| 7990 |
|
if binary is not None: |
| 7991 |
|
self._binary_init(binary) |
| 7992 |
|
self._freeze = True |
| 7993 |
|
return |
| 7994 |
|
self.RelativePath = RelativePath() |
| 7995 |
|
self.AttributeId = 0 |
| 7996 |
|
self.IndexRange = None |
| 7997 |
|
self._freeze = True |
| 7998 |
|
|
| 7999 |
|
def to_binary(self): |
| 8000 |
|
packet = [] |
| 8001 |
|
packet.append(self.RelativePath.to_binary()) |
| 8002 |
|
packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) |
| 8003 |
|
packet.append(uabin.Primitives.String.pack(self.IndexRange)) |
| 8004 |
|
return b''.join(packet) |
| 8005 |
|
|
| 8006 |
|
@staticmethod |
| 8007 |
|
def from_binary(data): |
| 8008 |
|
return QueryDataDescription(data) |
| 8009 |
|
|
| 8010 |
|
def _binary_init(self, data): |
| 8011 |
|
self.RelativePath = RelativePath.from_binary(data) |
| 8012 |
|
self.AttributeId = uabin.Primitives.UInt32.unpack(data) |
| 8013 |
|
self.IndexRange = uabin.Primitives.String.unpack(data) |
| 8014 |
|
|