|
@@ 10092-10153 (lines=62) @@
|
| 10089 |
|
__repr__ = __str__ |
| 10090 |
|
|
| 10091 |
|
|
| 10092 |
|
class UpdateEventDetails(FrozenClass): |
| 10093 |
|
''' |
| 10094 |
|
:ivar NodeId: |
| 10095 |
|
:vartype NodeId: NodeId |
| 10096 |
|
:ivar PerformInsertReplace: |
| 10097 |
|
:vartype PerformInsertReplace: PerformUpdateType |
| 10098 |
|
:ivar Filter: |
| 10099 |
|
:vartype Filter: EventFilter |
| 10100 |
|
:ivar EventData: |
| 10101 |
|
:vartype EventData: HistoryEventFieldList |
| 10102 |
|
''' |
| 10103 |
|
|
| 10104 |
|
ua_types = { |
| 10105 |
|
'NodeId': 'NodeId', |
| 10106 |
|
'PerformInsertReplace': 'PerformUpdateType', |
| 10107 |
|
'Filter': 'EventFilter', |
| 10108 |
|
'EventData': 'HistoryEventFieldList', |
| 10109 |
|
} |
| 10110 |
|
|
| 10111 |
|
def __init__(self, binary=None): |
| 10112 |
|
if binary is not None: |
| 10113 |
|
self._binary_init(binary) |
| 10114 |
|
self._freeze = True |
| 10115 |
|
return |
| 10116 |
|
self.NodeId = NodeId() |
| 10117 |
|
self.PerformInsertReplace = PerformUpdateType(0) |
| 10118 |
|
self.Filter = EventFilter() |
| 10119 |
|
self.EventData = [] |
| 10120 |
|
self._freeze = True |
| 10121 |
|
|
| 10122 |
|
def to_binary(self): |
| 10123 |
|
packet = [] |
| 10124 |
|
packet.append(self.NodeId.to_binary()) |
| 10125 |
|
packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value)) |
| 10126 |
|
packet.append(self.Filter.to_binary()) |
| 10127 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.EventData))) |
| 10128 |
|
for fieldname in self.EventData: |
| 10129 |
|
packet.append(fieldname.to_binary()) |
| 10130 |
|
return b''.join(packet) |
| 10131 |
|
|
| 10132 |
|
@staticmethod |
| 10133 |
|
def from_binary(data): |
| 10134 |
|
return UpdateEventDetails(data) |
| 10135 |
|
|
| 10136 |
|
def _binary_init(self, data): |
| 10137 |
|
self.NodeId = NodeId.from_binary(data) |
| 10138 |
|
self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data)) |
| 10139 |
|
self.Filter = EventFilter.from_binary(data) |
| 10140 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 10141 |
|
array = [] |
| 10142 |
|
if length != -1: |
| 10143 |
|
for _ in range(0, length): |
| 10144 |
|
array.append(HistoryEventFieldList.from_binary(data)) |
| 10145 |
|
self.EventData = array |
| 10146 |
|
|
| 10147 |
|
def __str__(self): |
| 10148 |
|
return 'UpdateEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
| 10149 |
|
'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
| 10150 |
|
'Filter:' + str(self.Filter) + ', ' + \ |
| 10151 |
|
'EventData:' + str(self.EventData) + ')' |
| 10152 |
|
|
| 10153 |
|
__repr__ = __str__ |
| 10154 |
|
|
| 10155 |
|
|
| 10156 |
|
class DeleteRawModifiedDetails(FrozenClass): |
|
@@ 9536-9597 (lines=62) @@
|
| 9533 |
|
__repr__ = __str__ |
| 9534 |
|
|
| 9535 |
|
|
| 9536 |
|
class HistoryReadParameters(FrozenClass): |
| 9537 |
|
''' |
| 9538 |
|
:ivar HistoryReadDetails: |
| 9539 |
|
:vartype HistoryReadDetails: ExtensionObject |
| 9540 |
|
:ivar TimestampsToReturn: |
| 9541 |
|
:vartype TimestampsToReturn: TimestampsToReturn |
| 9542 |
|
:ivar ReleaseContinuationPoints: |
| 9543 |
|
:vartype ReleaseContinuationPoints: Boolean |
| 9544 |
|
:ivar NodesToRead: |
| 9545 |
|
:vartype NodesToRead: HistoryReadValueId |
| 9546 |
|
''' |
| 9547 |
|
|
| 9548 |
|
ua_types = { |
| 9549 |
|
'HistoryReadDetails': 'ExtensionObject', |
| 9550 |
|
'TimestampsToReturn': 'TimestampsToReturn', |
| 9551 |
|
'ReleaseContinuationPoints': 'Boolean', |
| 9552 |
|
'NodesToRead': 'HistoryReadValueId', |
| 9553 |
|
} |
| 9554 |
|
|
| 9555 |
|
def __init__(self, binary=None): |
| 9556 |
|
if binary is not None: |
| 9557 |
|
self._binary_init(binary) |
| 9558 |
|
self._freeze = True |
| 9559 |
|
return |
| 9560 |
|
self.HistoryReadDetails = None |
| 9561 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
| 9562 |
|
self.ReleaseContinuationPoints = True |
| 9563 |
|
self.NodesToRead = [] |
| 9564 |
|
self._freeze = True |
| 9565 |
|
|
| 9566 |
|
def to_binary(self): |
| 9567 |
|
packet = [] |
| 9568 |
|
packet.append(extensionobject_to_binary(self.HistoryReadDetails)) |
| 9569 |
|
packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
| 9570 |
|
packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints)) |
| 9571 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead))) |
| 9572 |
|
for fieldname in self.NodesToRead: |
| 9573 |
|
packet.append(fieldname.to_binary()) |
| 9574 |
|
return b''.join(packet) |
| 9575 |
|
|
| 9576 |
|
@staticmethod |
| 9577 |
|
def from_binary(data): |
| 9578 |
|
return HistoryReadParameters(data) |
| 9579 |
|
|
| 9580 |
|
def _binary_init(self, data): |
| 9581 |
|
self.HistoryReadDetails = extensionobject_from_binary(data) |
| 9582 |
|
self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
| 9583 |
|
self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data) |
| 9584 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 9585 |
|
array = [] |
| 9586 |
|
if length != -1: |
| 9587 |
|
for _ in range(0, length): |
| 9588 |
|
array.append(HistoryReadValueId.from_binary(data)) |
| 9589 |
|
self.NodesToRead = array |
| 9590 |
|
|
| 9591 |
|
def __str__(self): |
| 9592 |
|
return 'HistoryReadParameters(' + 'HistoryReadDetails:' + str(self.HistoryReadDetails) + ', ' + \ |
| 9593 |
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
| 9594 |
|
'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \ |
| 9595 |
|
'NodesToRead:' + str(self.NodesToRead) + ')' |
| 9596 |
|
|
| 9597 |
|
__repr__ = __str__ |
| 9598 |
|
|
| 9599 |
|
|
| 9600 |
|
class HistoryReadRequest(FrozenClass): |
|
@@ 8035-8096 (lines=62) @@
|
| 8032 |
|
__repr__ = __str__ |
| 8033 |
|
|
| 8034 |
|
|
| 8035 |
|
class SimpleAttributeOperand(FrozenClass): |
| 8036 |
|
''' |
| 8037 |
|
:ivar TypeDefinitionId: |
| 8038 |
|
:vartype TypeDefinitionId: NodeId |
| 8039 |
|
:ivar BrowsePath: |
| 8040 |
|
:vartype BrowsePath: QualifiedName |
| 8041 |
|
:ivar AttributeId: |
| 8042 |
|
:vartype AttributeId: UInt32 |
| 8043 |
|
:ivar IndexRange: |
| 8044 |
|
:vartype IndexRange: String |
| 8045 |
|
''' |
| 8046 |
|
|
| 8047 |
|
ua_types = { |
| 8048 |
|
'TypeDefinitionId': 'NodeId', |
| 8049 |
|
'BrowsePath': 'QualifiedName', |
| 8050 |
|
'AttributeId': 'UInt32', |
| 8051 |
|
'IndexRange': 'String', |
| 8052 |
|
} |
| 8053 |
|
|
| 8054 |
|
def __init__(self, binary=None): |
| 8055 |
|
if binary is not None: |
| 8056 |
|
self._binary_init(binary) |
| 8057 |
|
self._freeze = True |
| 8058 |
|
return |
| 8059 |
|
self.TypeDefinitionId = NodeId() |
| 8060 |
|
self.BrowsePath = [] |
| 8061 |
|
self.AttributeId = 0 |
| 8062 |
|
self.IndexRange = None |
| 8063 |
|
self._freeze = True |
| 8064 |
|
|
| 8065 |
|
def to_binary(self): |
| 8066 |
|
packet = [] |
| 8067 |
|
packet.append(self.TypeDefinitionId.to_binary()) |
| 8068 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePath))) |
| 8069 |
|
for fieldname in self.BrowsePath: |
| 8070 |
|
packet.append(fieldname.to_binary()) |
| 8071 |
|
packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) |
| 8072 |
|
packet.append(uabin.Primitives.String.pack(self.IndexRange)) |
| 8073 |
|
return b''.join(packet) |
| 8074 |
|
|
| 8075 |
|
@staticmethod |
| 8076 |
|
def from_binary(data): |
| 8077 |
|
return SimpleAttributeOperand(data) |
| 8078 |
|
|
| 8079 |
|
def _binary_init(self, data): |
| 8080 |
|
self.TypeDefinitionId = NodeId.from_binary(data) |
| 8081 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 8082 |
|
array = [] |
| 8083 |
|
if length != -1: |
| 8084 |
|
for _ in range(0, length): |
| 8085 |
|
array.append(QualifiedName.from_binary(data)) |
| 8086 |
|
self.BrowsePath = array |
| 8087 |
|
self.AttributeId = uabin.Primitives.UInt32.unpack(data) |
| 8088 |
|
self.IndexRange = uabin.Primitives.String.unpack(data) |
| 8089 |
|
|
| 8090 |
|
def __str__(self): |
| 8091 |
|
return 'SimpleAttributeOperand(' + 'TypeDefinitionId:' + str(self.TypeDefinitionId) + ', ' + \ |
| 8092 |
|
'BrowsePath:' + str(self.BrowsePath) + ', ' + \ |
| 8093 |
|
'AttributeId:' + str(self.AttributeId) + ', ' + \ |
| 8094 |
|
'IndexRange:' + str(self.IndexRange) + ')' |
| 8095 |
|
|
| 8096 |
|
__repr__ = __str__ |
| 8097 |
|
|
| 8098 |
|
|
| 8099 |
|
class ContentFilterElementResult(FrozenClass): |
|
@@ 7742-7803 (lines=62) @@
|
| 7739 |
|
__repr__ = __str__ |
| 7740 |
|
|
| 7741 |
|
|
| 7742 |
|
class NodeReference(FrozenClass): |
| 7743 |
|
''' |
| 7744 |
|
:ivar NodeId: |
| 7745 |
|
:vartype NodeId: NodeId |
| 7746 |
|
:ivar ReferenceTypeId: |
| 7747 |
|
:vartype ReferenceTypeId: NodeId |
| 7748 |
|
:ivar IsForward: |
| 7749 |
|
:vartype IsForward: Boolean |
| 7750 |
|
:ivar ReferencedNodeIds: |
| 7751 |
|
:vartype ReferencedNodeIds: NodeId |
| 7752 |
|
''' |
| 7753 |
|
|
| 7754 |
|
ua_types = { |
| 7755 |
|
'NodeId': 'NodeId', |
| 7756 |
|
'ReferenceTypeId': 'NodeId', |
| 7757 |
|
'IsForward': 'Boolean', |
| 7758 |
|
'ReferencedNodeIds': 'NodeId', |
| 7759 |
|
} |
| 7760 |
|
|
| 7761 |
|
def __init__(self, binary=None): |
| 7762 |
|
if binary is not None: |
| 7763 |
|
self._binary_init(binary) |
| 7764 |
|
self._freeze = True |
| 7765 |
|
return |
| 7766 |
|
self.NodeId = NodeId() |
| 7767 |
|
self.ReferenceTypeId = NodeId() |
| 7768 |
|
self.IsForward = True |
| 7769 |
|
self.ReferencedNodeIds = [] |
| 7770 |
|
self._freeze = True |
| 7771 |
|
|
| 7772 |
|
def to_binary(self): |
| 7773 |
|
packet = [] |
| 7774 |
|
packet.append(self.NodeId.to_binary()) |
| 7775 |
|
packet.append(self.ReferenceTypeId.to_binary()) |
| 7776 |
|
packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) |
| 7777 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.ReferencedNodeIds))) |
| 7778 |
|
for fieldname in self.ReferencedNodeIds: |
| 7779 |
|
packet.append(fieldname.to_binary()) |
| 7780 |
|
return b''.join(packet) |
| 7781 |
|
|
| 7782 |
|
@staticmethod |
| 7783 |
|
def from_binary(data): |
| 7784 |
|
return NodeReference(data) |
| 7785 |
|
|
| 7786 |
|
def _binary_init(self, data): |
| 7787 |
|
self.NodeId = NodeId.from_binary(data) |
| 7788 |
|
self.ReferenceTypeId = NodeId.from_binary(data) |
| 7789 |
|
self.IsForward = uabin.Primitives.Boolean.unpack(data) |
| 7790 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 7791 |
|
array = [] |
| 7792 |
|
if length != -1: |
| 7793 |
|
for _ in range(0, length): |
| 7794 |
|
array.append(NodeId.from_binary(data)) |
| 7795 |
|
self.ReferencedNodeIds = array |
| 7796 |
|
|
| 7797 |
|
def __str__(self): |
| 7798 |
|
return 'NodeReference(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
| 7799 |
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
| 7800 |
|
'IsForward:' + str(self.IsForward) + ', ' + \ |
| 7801 |
|
'ReferencedNodeIds:' + str(self.ReferencedNodeIds) + ')' |
| 7802 |
|
|
| 7803 |
|
__repr__ = __str__ |
| 7804 |
|
|
| 7805 |
|
|
| 7806 |
|
class ContentFilterElement(FrozenClass): |
|
@@ 11683-11737 (lines=55) @@
|
| 11680 |
|
__repr__ = __str__ |
| 11681 |
|
|
| 11682 |
|
|
| 11683 |
|
class ModifyMonitoredItemsParameters(FrozenClass): |
| 11684 |
|
''' |
| 11685 |
|
:ivar SubscriptionId: |
| 11686 |
|
:vartype SubscriptionId: UInt32 |
| 11687 |
|
:ivar TimestampsToReturn: |
| 11688 |
|
:vartype TimestampsToReturn: TimestampsToReturn |
| 11689 |
|
:ivar ItemsToModify: |
| 11690 |
|
:vartype ItemsToModify: MonitoredItemModifyRequest |
| 11691 |
|
''' |
| 11692 |
|
|
| 11693 |
|
ua_types = { |
| 11694 |
|
'SubscriptionId': 'UInt32', |
| 11695 |
|
'TimestampsToReturn': 'TimestampsToReturn', |
| 11696 |
|
'ItemsToModify': 'MonitoredItemModifyRequest', |
| 11697 |
|
} |
| 11698 |
|
|
| 11699 |
|
def __init__(self, binary=None): |
| 11700 |
|
if binary is not None: |
| 11701 |
|
self._binary_init(binary) |
| 11702 |
|
self._freeze = True |
| 11703 |
|
return |
| 11704 |
|
self.SubscriptionId = 0 |
| 11705 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
| 11706 |
|
self.ItemsToModify = [] |
| 11707 |
|
self._freeze = True |
| 11708 |
|
|
| 11709 |
|
def to_binary(self): |
| 11710 |
|
packet = [] |
| 11711 |
|
packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) |
| 11712 |
|
packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
| 11713 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToModify))) |
| 11714 |
|
for fieldname in self.ItemsToModify: |
| 11715 |
|
packet.append(fieldname.to_binary()) |
| 11716 |
|
return b''.join(packet) |
| 11717 |
|
|
| 11718 |
|
@staticmethod |
| 11719 |
|
def from_binary(data): |
| 11720 |
|
return ModifyMonitoredItemsParameters(data) |
| 11721 |
|
|
| 11722 |
|
def _binary_init(self, data): |
| 11723 |
|
self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) |
| 11724 |
|
self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
| 11725 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 11726 |
|
array = [] |
| 11727 |
|
if length != -1: |
| 11728 |
|
for _ in range(0, length): |
| 11729 |
|
array.append(MonitoredItemModifyRequest.from_binary(data)) |
| 11730 |
|
self.ItemsToModify = array |
| 11731 |
|
|
| 11732 |
|
def __str__(self): |
| 11733 |
|
return 'ModifyMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
| 11734 |
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
| 11735 |
|
'ItemsToModify:' + str(self.ItemsToModify) + ')' |
| 11736 |
|
|
| 11737 |
|
__repr__ = __str__ |
| 11738 |
|
|
| 11739 |
|
|
| 11740 |
|
class ModifyMonitoredItemsRequest(FrozenClass): |
|
@@ 11405-11459 (lines=55) @@
|
| 11402 |
|
__repr__ = __str__ |
| 11403 |
|
|
| 11404 |
|
|
| 11405 |
|
class CreateMonitoredItemsParameters(FrozenClass): |
| 11406 |
|
''' |
| 11407 |
|
:ivar SubscriptionId: |
| 11408 |
|
:vartype SubscriptionId: UInt32 |
| 11409 |
|
:ivar TimestampsToReturn: |
| 11410 |
|
:vartype TimestampsToReturn: TimestampsToReturn |
| 11411 |
|
:ivar ItemsToCreate: |
| 11412 |
|
:vartype ItemsToCreate: MonitoredItemCreateRequest |
| 11413 |
|
''' |
| 11414 |
|
|
| 11415 |
|
ua_types = { |
| 11416 |
|
'SubscriptionId': 'UInt32', |
| 11417 |
|
'TimestampsToReturn': 'TimestampsToReturn', |
| 11418 |
|
'ItemsToCreate': 'MonitoredItemCreateRequest', |
| 11419 |
|
} |
| 11420 |
|
|
| 11421 |
|
def __init__(self, binary=None): |
| 11422 |
|
if binary is not None: |
| 11423 |
|
self._binary_init(binary) |
| 11424 |
|
self._freeze = True |
| 11425 |
|
return |
| 11426 |
|
self.SubscriptionId = 0 |
| 11427 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
| 11428 |
|
self.ItemsToCreate = [] |
| 11429 |
|
self._freeze = True |
| 11430 |
|
|
| 11431 |
|
def to_binary(self): |
| 11432 |
|
packet = [] |
| 11433 |
|
packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) |
| 11434 |
|
packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
| 11435 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToCreate))) |
| 11436 |
|
for fieldname in self.ItemsToCreate: |
| 11437 |
|
packet.append(fieldname.to_binary()) |
| 11438 |
|
return b''.join(packet) |
| 11439 |
|
|
| 11440 |
|
@staticmethod |
| 11441 |
|
def from_binary(data): |
| 11442 |
|
return CreateMonitoredItemsParameters(data) |
| 11443 |
|
|
| 11444 |
|
def _binary_init(self, data): |
| 11445 |
|
self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) |
| 11446 |
|
self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
| 11447 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 11448 |
|
array = [] |
| 11449 |
|
if length != -1: |
| 11450 |
|
for _ in range(0, length): |
| 11451 |
|
array.append(MonitoredItemCreateRequest.from_binary(data)) |
| 11452 |
|
self.ItemsToCreate = array |
| 11453 |
|
|
| 11454 |
|
def __str__(self): |
| 11455 |
|
return 'CreateMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
| 11456 |
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
| 11457 |
|
'ItemsToCreate:' + str(self.ItemsToCreate) + ')' |
| 11458 |
|
|
| 11459 |
|
__repr__ = __str__ |
| 11460 |
|
|
| 11461 |
|
|
| 11462 |
|
class CreateMonitoredItemsRequest(FrozenClass): |
|
@@ 8790-8844 (lines=55) @@
|
| 8787 |
|
__repr__ = __str__ |
| 8788 |
|
|
| 8789 |
|
|
| 8790 |
|
class ReadParameters(FrozenClass): |
| 8791 |
|
''' |
| 8792 |
|
:ivar MaxAge: |
| 8793 |
|
:vartype MaxAge: Double |
| 8794 |
|
:ivar TimestampsToReturn: |
| 8795 |
|
:vartype TimestampsToReturn: TimestampsToReturn |
| 8796 |
|
:ivar NodesToRead: |
| 8797 |
|
:vartype NodesToRead: ReadValueId |
| 8798 |
|
''' |
| 8799 |
|
|
| 8800 |
|
ua_types = { |
| 8801 |
|
'MaxAge': 'Double', |
| 8802 |
|
'TimestampsToReturn': 'TimestampsToReturn', |
| 8803 |
|
'NodesToRead': 'ReadValueId', |
| 8804 |
|
} |
| 8805 |
|
|
| 8806 |
|
def __init__(self, binary=None): |
| 8807 |
|
if binary is not None: |
| 8808 |
|
self._binary_init(binary) |
| 8809 |
|
self._freeze = True |
| 8810 |
|
return |
| 8811 |
|
self.MaxAge = 0 |
| 8812 |
|
self.TimestampsToReturn = TimestampsToReturn(0) |
| 8813 |
|
self.NodesToRead = [] |
| 8814 |
|
self._freeze = True |
| 8815 |
|
|
| 8816 |
|
def to_binary(self): |
| 8817 |
|
packet = [] |
| 8818 |
|
packet.append(uabin.Primitives.Double.pack(self.MaxAge)) |
| 8819 |
|
packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
| 8820 |
|
packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead))) |
| 8821 |
|
for fieldname in self.NodesToRead: |
| 8822 |
|
packet.append(fieldname.to_binary()) |
| 8823 |
|
return b''.join(packet) |
| 8824 |
|
|
| 8825 |
|
@staticmethod |
| 8826 |
|
def from_binary(data): |
| 8827 |
|
return ReadParameters(data) |
| 8828 |
|
|
| 8829 |
|
def _binary_init(self, data): |
| 8830 |
|
self.MaxAge = uabin.Primitives.Double.unpack(data) |
| 8831 |
|
self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
| 8832 |
|
length = uabin.Primitives.Int32.unpack(data) |
| 8833 |
|
array = [] |
| 8834 |
|
if length != -1: |
| 8835 |
|
for _ in range(0, length): |
| 8836 |
|
array.append(ReadValueId.from_binary(data)) |
| 8837 |
|
self.NodesToRead = array |
| 8838 |
|
|
| 8839 |
|
def __str__(self): |
| 8840 |
|
return 'ReadParameters(' + 'MaxAge:' + str(self.MaxAge) + ', ' + \ |
| 8841 |
|
'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
| 8842 |
|
'NodesToRead:' + str(self.NodesToRead) + ')' |
| 8843 |
|
|
| 8844 |
|
__repr__ = __str__ |
| 8845 |
|
|
| 8846 |
|
|
| 8847 |
|
class ReadRequest(FrozenClass): |