@@ 6150-6206 (lines=57) @@ | ||
6147 | __repr__ = __str__ |
|
6148 | ||
6149 | ||
6150 | class BrowseResult(FrozenClass): |
|
6151 | ''' |
|
6152 | The result of a browse operation. |
|
6153 | ||
6154 | :ivar StatusCode: |
|
6155 | :vartype StatusCode: StatusCode |
|
6156 | :ivar ContinuationPoint: |
|
6157 | :vartype ContinuationPoint: ByteString |
|
6158 | :ivar References: |
|
6159 | :vartype References: ReferenceDescription |
|
6160 | ''' |
|
6161 | ||
6162 | ua_types = { |
|
6163 | 'StatusCode': 'StatusCode', |
|
6164 | 'ContinuationPoint': 'ByteString', |
|
6165 | 'References': 'ReferenceDescription', |
|
6166 | } |
|
6167 | ||
6168 | def __init__(self, binary=None): |
|
6169 | if binary is not None: |
|
6170 | self._binary_init(binary) |
|
6171 | self._freeze = True |
|
6172 | return |
|
6173 | self.StatusCode = StatusCode() |
|
6174 | self.ContinuationPoint = None |
|
6175 | self.References = [] |
|
6176 | self._freeze = True |
|
6177 | ||
6178 | def to_binary(self): |
|
6179 | packet = [] |
|
6180 | packet.append(self.StatusCode.to_binary()) |
|
6181 | packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint)) |
|
6182 | packet.append(uabin.Primitives.Int32.pack(len(self.References))) |
|
6183 | for fieldname in self.References: |
|
6184 | packet.append(fieldname.to_binary()) |
|
6185 | return b''.join(packet) |
|
6186 | ||
6187 | @staticmethod |
|
6188 | def from_binary(data): |
|
6189 | return BrowseResult(data) |
|
6190 | ||
6191 | def _binary_init(self, data): |
|
6192 | self.StatusCode = StatusCode.from_binary(data) |
|
6193 | self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data) |
|
6194 | length = uabin.Primitives.Int32.unpack(data) |
|
6195 | array = [] |
|
6196 | if length != -1: |
|
6197 | for _ in range(0, length): |
|
6198 | array.append(ReferenceDescription.from_binary(data)) |
|
6199 | self.References = array |
|
6200 | ||
6201 | def __str__(self): |
|
6202 | return 'BrowseResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
|
6203 | 'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ |
|
6204 | 'References:' + str(self.References) + ')' |
|
6205 | ||
6206 | __repr__ = __str__ |
|
6207 | ||
6208 | ||
6209 | class BrowseParameters(FrozenClass): |
|
@@ 13167-13221 (lines=55) @@ | ||
13164 | __repr__ = __str__ |
|
13165 | ||
13166 | ||
13167 | class NotificationMessage(FrozenClass): |
|
13168 | ''' |
|
13169 | :ivar SequenceNumber: |
|
13170 | :vartype SequenceNumber: UInt32 |
|
13171 | :ivar PublishTime: |
|
13172 | :vartype PublishTime: DateTime |
|
13173 | :ivar NotificationData: |
|
13174 | :vartype NotificationData: ExtensionObject |
|
13175 | ''' |
|
13176 | ||
13177 | ua_types = { |
|
13178 | 'SequenceNumber': 'UInt32', |
|
13179 | 'PublishTime': 'DateTime', |
|
13180 | 'NotificationData': 'ExtensionObject', |
|
13181 | } |
|
13182 | ||
13183 | def __init__(self, binary=None): |
|
13184 | if binary is not None: |
|
13185 | self._binary_init(binary) |
|
13186 | self._freeze = True |
|
13187 | return |
|
13188 | self.SequenceNumber = 0 |
|
13189 | self.PublishTime = datetime.utcnow() |
|
13190 | self.NotificationData = [] |
|
13191 | self._freeze = True |
|
13192 | ||
13193 | def to_binary(self): |
|
13194 | packet = [] |
|
13195 | packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber)) |
|
13196 | packet.append(uabin.Primitives.DateTime.pack(self.PublishTime)) |
|
13197 | packet.append(uabin.Primitives.Int32.pack(len(self.NotificationData))) |
|
13198 | for fieldname in self.NotificationData: |
|
13199 | packet.append(extensionobject_to_binary(fieldname)) |
|
13200 | return b''.join(packet) |
|
13201 | ||
13202 | @staticmethod |
|
13203 | def from_binary(data): |
|
13204 | return NotificationMessage(data) |
|
13205 | ||
13206 | def _binary_init(self, data): |
|
13207 | self.SequenceNumber = uabin.Primitives.UInt32.unpack(data) |
|
13208 | self.PublishTime = uabin.Primitives.DateTime.unpack(data) |
|
13209 | length = uabin.Primitives.Int32.unpack(data) |
|
13210 | array = [] |
|
13211 | if length != -1: |
|
13212 | for _ in range(0, length): |
|
13213 | array.append(extensionobject_from_binary(data)) |
|
13214 | self.NotificationData = array |
|
13215 | ||
13216 | def __str__(self): |
|
13217 | return 'NotificationMessage(' + 'SequenceNumber:' + str(self.SequenceNumber) + ', ' + \ |
|
13218 | 'PublishTime:' + str(self.PublishTime) + ', ' + \ |
|
13219 | 'NotificationData:' + str(self.NotificationData) + ')' |
|
13220 | ||
13221 | __repr__ = __str__ |
|
13222 | ||
13223 | ||
13224 | class NotificationData(FrozenClass): |
|
@@ 11717-11771 (lines=55) @@ | ||
11714 | __repr__ = __str__ |
|
11715 | ||
11716 | ||
11717 | class ModifyMonitoredItemsParameters(FrozenClass): |
|
11718 | ''' |
|
11719 | :ivar SubscriptionId: |
|
11720 | :vartype SubscriptionId: UInt32 |
|
11721 | :ivar TimestampsToReturn: |
|
11722 | :vartype TimestampsToReturn: TimestampsToReturn |
|
11723 | :ivar ItemsToModify: |
|
11724 | :vartype ItemsToModify: MonitoredItemModifyRequest |
|
11725 | ''' |
|
11726 | ||
11727 | ua_types = { |
|
11728 | 'SubscriptionId': 'UInt32', |
|
11729 | 'TimestampsToReturn': 'TimestampsToReturn', |
|
11730 | 'ItemsToModify': 'MonitoredItemModifyRequest', |
|
11731 | } |
|
11732 | ||
11733 | def __init__(self, binary=None): |
|
11734 | if binary is not None: |
|
11735 | self._binary_init(binary) |
|
11736 | self._freeze = True |
|
11737 | return |
|
11738 | self.SubscriptionId = 0 |
|
11739 | self.TimestampsToReturn = TimestampsToReturn(0) |
|
11740 | self.ItemsToModify = [] |
|
11741 | self._freeze = True |
|
11742 | ||
11743 | def to_binary(self): |
|
11744 | packet = [] |
|
11745 | packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) |
|
11746 | packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
|
11747 | packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToModify))) |
|
11748 | for fieldname in self.ItemsToModify: |
|
11749 | packet.append(fieldname.to_binary()) |
|
11750 | return b''.join(packet) |
|
11751 | ||
11752 | @staticmethod |
|
11753 | def from_binary(data): |
|
11754 | return ModifyMonitoredItemsParameters(data) |
|
11755 | ||
11756 | def _binary_init(self, data): |
|
11757 | self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) |
|
11758 | self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
|
11759 | length = uabin.Primitives.Int32.unpack(data) |
|
11760 | array = [] |
|
11761 | if length != -1: |
|
11762 | for _ in range(0, length): |
|
11763 | array.append(MonitoredItemModifyRequest.from_binary(data)) |
|
11764 | self.ItemsToModify = array |
|
11765 | ||
11766 | def __str__(self): |
|
11767 | return 'ModifyMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
|
11768 | 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
|
11769 | 'ItemsToModify:' + str(self.ItemsToModify) + ')' |
|
11770 | ||
11771 | __repr__ = __str__ |
|
11772 | ||
11773 | ||
11774 | class ModifyMonitoredItemsRequest(FrozenClass): |
|
@@ 11439-11493 (lines=55) @@ | ||
11436 | __repr__ = __str__ |
|
11437 | ||
11438 | ||
11439 | class CreateMonitoredItemsParameters(FrozenClass): |
|
11440 | ''' |
|
11441 | :ivar SubscriptionId: |
|
11442 | :vartype SubscriptionId: UInt32 |
|
11443 | :ivar TimestampsToReturn: |
|
11444 | :vartype TimestampsToReturn: TimestampsToReturn |
|
11445 | :ivar ItemsToCreate: |
|
11446 | :vartype ItemsToCreate: MonitoredItemCreateRequest |
|
11447 | ''' |
|
11448 | ||
11449 | ua_types = { |
|
11450 | 'SubscriptionId': 'UInt32', |
|
11451 | 'TimestampsToReturn': 'TimestampsToReturn', |
|
11452 | 'ItemsToCreate': 'MonitoredItemCreateRequest', |
|
11453 | } |
|
11454 | ||
11455 | def __init__(self, binary=None): |
|
11456 | if binary is not None: |
|
11457 | self._binary_init(binary) |
|
11458 | self._freeze = True |
|
11459 | return |
|
11460 | self.SubscriptionId = 0 |
|
11461 | self.TimestampsToReturn = TimestampsToReturn(0) |
|
11462 | self.ItemsToCreate = [] |
|
11463 | self._freeze = True |
|
11464 | ||
11465 | def to_binary(self): |
|
11466 | packet = [] |
|
11467 | packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) |
|
11468 | packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
|
11469 | packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToCreate))) |
|
11470 | for fieldname in self.ItemsToCreate: |
|
11471 | packet.append(fieldname.to_binary()) |
|
11472 | return b''.join(packet) |
|
11473 | ||
11474 | @staticmethod |
|
11475 | def from_binary(data): |
|
11476 | return CreateMonitoredItemsParameters(data) |
|
11477 | ||
11478 | def _binary_init(self, data): |
|
11479 | self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) |
|
11480 | self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
|
11481 | length = uabin.Primitives.Int32.unpack(data) |
|
11482 | array = [] |
|
11483 | if length != -1: |
|
11484 | for _ in range(0, length): |
|
11485 | array.append(MonitoredItemCreateRequest.from_binary(data)) |
|
11486 | self.ItemsToCreate = array |
|
11487 | ||
11488 | def __str__(self): |
|
11489 | return 'CreateMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
|
11490 | 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
|
11491 | 'ItemsToCreate:' + str(self.ItemsToCreate) + ')' |
|
11492 | ||
11493 | __repr__ = __str__ |
|
11494 | ||
11495 | ||
11496 | class CreateMonitoredItemsRequest(FrozenClass): |
|
@@ 10069-10123 (lines=55) @@ | ||
10066 | __repr__ = __str__ |
|
10067 | ||
10068 | ||
10069 | class UpdateStructureDataDetails(FrozenClass): |
|
10070 | ''' |
|
10071 | :ivar NodeId: |
|
10072 | :vartype NodeId: NodeId |
|
10073 | :ivar PerformInsertReplace: |
|
10074 | :vartype PerformInsertReplace: PerformUpdateType |
|
10075 | :ivar UpdateValues: |
|
10076 | :vartype UpdateValues: DataValue |
|
10077 | ''' |
|
10078 | ||
10079 | ua_types = { |
|
10080 | 'NodeId': 'NodeId', |
|
10081 | 'PerformInsertReplace': 'PerformUpdateType', |
|
10082 | 'UpdateValues': 'DataValue', |
|
10083 | } |
|
10084 | ||
10085 | def __init__(self, binary=None): |
|
10086 | if binary is not None: |
|
10087 | self._binary_init(binary) |
|
10088 | self._freeze = True |
|
10089 | return |
|
10090 | self.NodeId = NodeId() |
|
10091 | self.PerformInsertReplace = PerformUpdateType(0) |
|
10092 | self.UpdateValues = [] |
|
10093 | self._freeze = True |
|
10094 | ||
10095 | def to_binary(self): |
|
10096 | packet = [] |
|
10097 | packet.append(self.NodeId.to_binary()) |
|
10098 | packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value)) |
|
10099 | packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues))) |
|
10100 | for fieldname in self.UpdateValues: |
|
10101 | packet.append(fieldname.to_binary()) |
|
10102 | return b''.join(packet) |
|
10103 | ||
10104 | @staticmethod |
|
10105 | def from_binary(data): |
|
10106 | return UpdateStructureDataDetails(data) |
|
10107 | ||
10108 | def _binary_init(self, data): |
|
10109 | self.NodeId = NodeId.from_binary(data) |
|
10110 | self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data)) |
|
10111 | length = uabin.Primitives.Int32.unpack(data) |
|
10112 | array = [] |
|
10113 | if length != -1: |
|
10114 | for _ in range(0, length): |
|
10115 | array.append(DataValue.from_binary(data)) |
|
10116 | self.UpdateValues = array |
|
10117 | ||
10118 | def __str__(self): |
|
10119 | return 'UpdateStructureDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
10120 | 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
|
10121 | 'UpdateValues:' + str(self.UpdateValues) + ')' |
|
10122 | ||
10123 | __repr__ = __str__ |
|
10124 | ||
10125 | ||
10126 | class UpdateEventDetails(FrozenClass): |
|
@@ 10012-10066 (lines=55) @@ | ||
10009 | __repr__ = __str__ |
|
10010 | ||
10011 | ||
10012 | class UpdateDataDetails(FrozenClass): |
|
10013 | ''' |
|
10014 | :ivar NodeId: |
|
10015 | :vartype NodeId: NodeId |
|
10016 | :ivar PerformInsertReplace: |
|
10017 | :vartype PerformInsertReplace: PerformUpdateType |
|
10018 | :ivar UpdateValues: |
|
10019 | :vartype UpdateValues: DataValue |
|
10020 | ''' |
|
10021 | ||
10022 | ua_types = { |
|
10023 | 'NodeId': 'NodeId', |
|
10024 | 'PerformInsertReplace': 'PerformUpdateType', |
|
10025 | 'UpdateValues': 'DataValue', |
|
10026 | } |
|
10027 | ||
10028 | def __init__(self, binary=None): |
|
10029 | if binary is not None: |
|
10030 | self._binary_init(binary) |
|
10031 | self._freeze = True |
|
10032 | return |
|
10033 | self.NodeId = NodeId() |
|
10034 | self.PerformInsertReplace = PerformUpdateType(0) |
|
10035 | self.UpdateValues = [] |
|
10036 | self._freeze = True |
|
10037 | ||
10038 | def to_binary(self): |
|
10039 | packet = [] |
|
10040 | packet.append(self.NodeId.to_binary()) |
|
10041 | packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value)) |
|
10042 | packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues))) |
|
10043 | for fieldname in self.UpdateValues: |
|
10044 | packet.append(fieldname.to_binary()) |
|
10045 | return b''.join(packet) |
|
10046 | ||
10047 | @staticmethod |
|
10048 | def from_binary(data): |
|
10049 | return UpdateDataDetails(data) |
|
10050 | ||
10051 | def _binary_init(self, data): |
|
10052 | self.NodeId = NodeId.from_binary(data) |
|
10053 | self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data)) |
|
10054 | length = uabin.Primitives.Int32.unpack(data) |
|
10055 | array = [] |
|
10056 | if length != -1: |
|
10057 | for _ in range(0, length): |
|
10058 | array.append(DataValue.from_binary(data)) |
|
10059 | self.UpdateValues = array |
|
10060 | ||
10061 | def __str__(self): |
|
10062 | return 'UpdateDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
10063 | 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
|
10064 | 'UpdateValues:' + str(self.UpdateValues) + ')' |
|
10065 | ||
10066 | __repr__ = __str__ |
|
10067 | ||
10068 | ||
10069 | class UpdateStructureDataDetails(FrozenClass): |
|
@@ 8824-8878 (lines=55) @@ | ||
8821 | __repr__ = __str__ |
|
8822 | ||
8823 | ||
8824 | class ReadParameters(FrozenClass): |
|
8825 | ''' |
|
8826 | :ivar MaxAge: |
|
8827 | :vartype MaxAge: Double |
|
8828 | :ivar TimestampsToReturn: |
|
8829 | :vartype TimestampsToReturn: TimestampsToReturn |
|
8830 | :ivar NodesToRead: |
|
8831 | :vartype NodesToRead: ReadValueId |
|
8832 | ''' |
|
8833 | ||
8834 | ua_types = { |
|
8835 | 'MaxAge': 'Double', |
|
8836 | 'TimestampsToReturn': 'TimestampsToReturn', |
|
8837 | 'NodesToRead': 'ReadValueId', |
|
8838 | } |
|
8839 | ||
8840 | def __init__(self, binary=None): |
|
8841 | if binary is not None: |
|
8842 | self._binary_init(binary) |
|
8843 | self._freeze = True |
|
8844 | return |
|
8845 | self.MaxAge = 0 |
|
8846 | self.TimestampsToReturn = TimestampsToReturn(0) |
|
8847 | self.NodesToRead = [] |
|
8848 | self._freeze = True |
|
8849 | ||
8850 | def to_binary(self): |
|
8851 | packet = [] |
|
8852 | packet.append(uabin.Primitives.Double.pack(self.MaxAge)) |
|
8853 | packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) |
|
8854 | packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead))) |
|
8855 | for fieldname in self.NodesToRead: |
|
8856 | packet.append(fieldname.to_binary()) |
|
8857 | return b''.join(packet) |
|
8858 | ||
8859 | @staticmethod |
|
8860 | def from_binary(data): |
|
8861 | return ReadParameters(data) |
|
8862 | ||
8863 | def _binary_init(self, data): |
|
8864 | self.MaxAge = uabin.Primitives.Double.unpack(data) |
|
8865 | self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) |
|
8866 | length = uabin.Primitives.Int32.unpack(data) |
|
8867 | array = [] |
|
8868 | if length != -1: |
|
8869 | for _ in range(0, length): |
|
8870 | array.append(ReadValueId.from_binary(data)) |
|
8871 | self.NodesToRead = array |
|
8872 | ||
8873 | def __str__(self): |
|
8874 | return 'ReadParameters(' + 'MaxAge:' + str(self.MaxAge) + ', ' + \ |
|
8875 | 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ |
|
8876 | 'NodesToRead:' + str(self.NodesToRead) + ')' |
|
8877 | ||
8878 | __repr__ = __str__ |
|
8879 | ||
8880 | ||
8881 | class ReadRequest(FrozenClass): |
|
@@ 7662-7716 (lines=55) @@ | ||
7659 | __repr__ = __str__ |
|
7660 | ||
7661 | ||
7662 | class NodeTypeDescription(FrozenClass): |
|
7663 | ''' |
|
7664 | :ivar TypeDefinitionNode: |
|
7665 | :vartype TypeDefinitionNode: ExpandedNodeId |
|
7666 | :ivar IncludeSubTypes: |
|
7667 | :vartype IncludeSubTypes: Boolean |
|
7668 | :ivar DataToReturn: |
|
7669 | :vartype DataToReturn: QueryDataDescription |
|
7670 | ''' |
|
7671 | ||
7672 | ua_types = { |
|
7673 | 'TypeDefinitionNode': 'ExpandedNodeId', |
|
7674 | 'IncludeSubTypes': 'Boolean', |
|
7675 | 'DataToReturn': 'QueryDataDescription', |
|
7676 | } |
|
7677 | ||
7678 | def __init__(self, binary=None): |
|
7679 | if binary is not None: |
|
7680 | self._binary_init(binary) |
|
7681 | self._freeze = True |
|
7682 | return |
|
7683 | self.TypeDefinitionNode = ExpandedNodeId() |
|
7684 | self.IncludeSubTypes = True |
|
7685 | self.DataToReturn = [] |
|
7686 | self._freeze = True |
|
7687 | ||
7688 | def to_binary(self): |
|
7689 | packet = [] |
|
7690 | packet.append(self.TypeDefinitionNode.to_binary()) |
|
7691 | packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubTypes)) |
|
7692 | packet.append(uabin.Primitives.Int32.pack(len(self.DataToReturn))) |
|
7693 | for fieldname in self.DataToReturn: |
|
7694 | packet.append(fieldname.to_binary()) |
|
7695 | return b''.join(packet) |
|
7696 | ||
7697 | @staticmethod |
|
7698 | def from_binary(data): |
|
7699 | return NodeTypeDescription(data) |
|
7700 | ||
7701 | def _binary_init(self, data): |
|
7702 | self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) |
|
7703 | self.IncludeSubTypes = uabin.Primitives.Boolean.unpack(data) |
|
7704 | length = uabin.Primitives.Int32.unpack(data) |
|
7705 | array = [] |
|
7706 | if length != -1: |
|
7707 | for _ in range(0, length): |
|
7708 | array.append(QueryDataDescription.from_binary(data)) |
|
7709 | self.DataToReturn = array |
|
7710 | ||
7711 | def __str__(self): |
|
7712 | return 'NodeTypeDescription(' + 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ |
|
7713 | 'IncludeSubTypes:' + str(self.IncludeSubTypes) + ', ' + \ |
|
7714 | 'DataToReturn:' + str(self.DataToReturn) + ')' |
|
7715 | ||
7716 | __repr__ = __str__ |
|
7717 | ||
7718 | ||
7719 | class QueryDataSet(FrozenClass): |
|
@@ 6209-6263 (lines=55) @@ | ||
6206 | __repr__ = __str__ |
|
6207 | ||
6208 | ||
6209 | class BrowseParameters(FrozenClass): |
|
6210 | ''' |
|
6211 | :ivar View: |
|
6212 | :vartype View: ViewDescription |
|
6213 | :ivar RequestedMaxReferencesPerNode: |
|
6214 | :vartype RequestedMaxReferencesPerNode: UInt32 |
|
6215 | :ivar NodesToBrowse: |
|
6216 | :vartype NodesToBrowse: BrowseDescription |
|
6217 | ''' |
|
6218 | ||
6219 | ua_types = { |
|
6220 | 'View': 'ViewDescription', |
|
6221 | 'RequestedMaxReferencesPerNode': 'UInt32', |
|
6222 | 'NodesToBrowse': 'BrowseDescription', |
|
6223 | } |
|
6224 | ||
6225 | def __init__(self, binary=None): |
|
6226 | if binary is not None: |
|
6227 | self._binary_init(binary) |
|
6228 | self._freeze = True |
|
6229 | return |
|
6230 | self.View = ViewDescription() |
|
6231 | self.RequestedMaxReferencesPerNode = 0 |
|
6232 | self.NodesToBrowse = [] |
|
6233 | self._freeze = True |
|
6234 | ||
6235 | def to_binary(self): |
|
6236 | packet = [] |
|
6237 | packet.append(self.View.to_binary()) |
|
6238 | packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxReferencesPerNode)) |
|
6239 | packet.append(uabin.Primitives.Int32.pack(len(self.NodesToBrowse))) |
|
6240 | for fieldname in self.NodesToBrowse: |
|
6241 | packet.append(fieldname.to_binary()) |
|
6242 | return b''.join(packet) |
|
6243 | ||
6244 | @staticmethod |
|
6245 | def from_binary(data): |
|
6246 | return BrowseParameters(data) |
|
6247 | ||
6248 | def _binary_init(self, data): |
|
6249 | self.View = ViewDescription.from_binary(data) |
|
6250 | self.RequestedMaxReferencesPerNode = uabin.Primitives.UInt32.unpack(data) |
|
6251 | length = uabin.Primitives.Int32.unpack(data) |
|
6252 | array = [] |
|
6253 | if length != -1: |
|
6254 | for _ in range(0, length): |
|
6255 | array.append(BrowseDescription.from_binary(data)) |
|
6256 | self.NodesToBrowse = array |
|
6257 | ||
6258 | def __str__(self): |
|
6259 | return 'BrowseParameters(' + 'View:' + str(self.View) + ', ' + \ |
|
6260 | 'RequestedMaxReferencesPerNode:' + str(self.RequestedMaxReferencesPerNode) + ', ' + \ |
|
6261 | 'NodesToBrowse:' + str(self.NodesToBrowse) + ')' |
|
6262 | ||
6263 | __repr__ = __str__ |
|
6264 | ||
6265 | ||
6266 | class BrowseRequest(FrozenClass): |
|
@@ 7776-7837 (lines=62) @@ | ||
7773 | __repr__ = __str__ |
|
7774 | ||
7775 | ||
7776 | class NodeReference(FrozenClass): |
|
7777 | ''' |
|
7778 | :ivar NodeId: |
|
7779 | :vartype NodeId: NodeId |
|
7780 | :ivar ReferenceTypeId: |
|
7781 | :vartype ReferenceTypeId: NodeId |
|
7782 | :ivar IsForward: |
|
7783 | :vartype IsForward: Boolean |
|
7784 | :ivar ReferencedNodeIds: |
|
7785 | :vartype ReferencedNodeIds: NodeId |
|
7786 | ''' |
|
7787 | ||
7788 | ua_types = { |
|
7789 | 'NodeId': 'NodeId', |
|
7790 | 'ReferenceTypeId': 'NodeId', |
|
7791 | 'IsForward': 'Boolean', |
|
7792 | 'ReferencedNodeIds': 'NodeId', |
|
7793 | } |
|
7794 | ||
7795 | def __init__(self, binary=None): |
|
7796 | if binary is not None: |
|
7797 | self._binary_init(binary) |
|
7798 | self._freeze = True |
|
7799 | return |
|
7800 | self.NodeId = NodeId() |
|
7801 | self.ReferenceTypeId = NodeId() |
|
7802 | self.IsForward = True |
|
7803 | self.ReferencedNodeIds = [] |
|
7804 | self._freeze = True |
|
7805 | ||
7806 | def to_binary(self): |
|
7807 | packet = [] |
|
7808 | packet.append(self.NodeId.to_binary()) |
|
7809 | packet.append(self.ReferenceTypeId.to_binary()) |
|
7810 | packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) |
|
7811 | packet.append(uabin.Primitives.Int32.pack(len(self.ReferencedNodeIds))) |
|
7812 | for fieldname in self.ReferencedNodeIds: |
|
7813 | packet.append(fieldname.to_binary()) |
|
7814 | return b''.join(packet) |
|
7815 | ||
7816 | @staticmethod |
|
7817 | def from_binary(data): |
|
7818 | return NodeReference(data) |
|
7819 | ||
7820 | def _binary_init(self, data): |
|
7821 | self.NodeId = NodeId.from_binary(data) |
|
7822 | self.ReferenceTypeId = NodeId.from_binary(data) |
|
7823 | self.IsForward = uabin.Primitives.Boolean.unpack(data) |
|
7824 | length = uabin.Primitives.Int32.unpack(data) |
|
7825 | array = [] |
|
7826 | if length != -1: |
|
7827 | for _ in range(0, length): |
|
7828 | array.append(NodeId.from_binary(data)) |
|
7829 | self.ReferencedNodeIds = array |
|
7830 | ||
7831 | def __str__(self): |
|
7832 | return 'NodeReference(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
7833 | 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
7834 | 'IsForward:' + str(self.IsForward) + ', ' + \ |
|
7835 | 'ReferencedNodeIds:' + str(self.ReferencedNodeIds) + ')' |
|
7836 | ||
7837 | __repr__ = __str__ |
|
7838 | ||
7839 | ||
7840 | class ContentFilterElement(FrozenClass): |
|
@@ 2125-2181 (lines=57) @@ | ||
2122 | __repr__ = __str__ |
|
2123 | ||
2124 | ||
2125 | class GetEndpointsResponse(FrozenClass): |
|
2126 | ''' |
|
2127 | Gets the endpoints used by the server. |
|
2128 | ||
2129 | :ivar TypeId: |
|
2130 | :vartype TypeId: NodeId |
|
2131 | :ivar ResponseHeader: |
|
2132 | :vartype ResponseHeader: ResponseHeader |
|
2133 | :ivar Endpoints: |
|
2134 | :vartype Endpoints: EndpointDescription |
|
2135 | ''' |
|
2136 | ||
2137 | ua_types = { |
|
2138 | 'TypeId': 'NodeId', |
|
2139 | 'ResponseHeader': 'ResponseHeader', |
|
2140 | 'Endpoints': 'EndpointDescription', |
|
2141 | } |
|
2142 | ||
2143 | def __init__(self, binary=None): |
|
2144 | if binary is not None: |
|
2145 | self._binary_init(binary) |
|
2146 | self._freeze = True |
|
2147 | return |
|
2148 | self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary) |
|
2149 | self.ResponseHeader = ResponseHeader() |
|
2150 | self.Endpoints = [] |
|
2151 | self._freeze = True |
|
2152 | ||
2153 | def to_binary(self): |
|
2154 | packet = [] |
|
2155 | packet.append(self.TypeId.to_binary()) |
|
2156 | packet.append(self.ResponseHeader.to_binary()) |
|
2157 | packet.append(uabin.Primitives.Int32.pack(len(self.Endpoints))) |
|
2158 | for fieldname in self.Endpoints: |
|
2159 | packet.append(fieldname.to_binary()) |
|
2160 | return b''.join(packet) |
|
2161 | ||
2162 | @staticmethod |
|
2163 | def from_binary(data): |
|
2164 | return GetEndpointsResponse(data) |
|
2165 | ||
2166 | def _binary_init(self, data): |
|
2167 | self.TypeId = NodeId.from_binary(data) |
|
2168 | self.ResponseHeader = ResponseHeader.from_binary(data) |
|
2169 | length = uabin.Primitives.Int32.unpack(data) |
|
2170 | array = [] |
|
2171 | if length != -1: |
|
2172 | for _ in range(0, length): |
|
2173 | array.append(EndpointDescription.from_binary(data)) |
|
2174 | self.Endpoints = array |
|
2175 | ||
2176 | def __str__(self): |
|
2177 | return 'GetEndpointsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
|
2178 | 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
|
2179 | 'Endpoints:' + str(self.Endpoints) + ')' |
|
2180 | ||
2181 | __repr__ = __str__ |
|
2182 | ||
2183 | ||
2184 | class RegisteredServer(FrozenClass): |
|
@@ 1539-1595 (lines=57) @@ | ||
1536 | __repr__ = __str__ |
|
1537 | ||
1538 | ||
1539 | class FindServersResponse(FrozenClass): |
|
1540 | ''' |
|
1541 | Finds the servers known to the discovery server. |
|
1542 | ||
1543 | :ivar TypeId: |
|
1544 | :vartype TypeId: NodeId |
|
1545 | :ivar ResponseHeader: |
|
1546 | :vartype ResponseHeader: ResponseHeader |
|
1547 | :ivar Servers: |
|
1548 | :vartype Servers: ApplicationDescription |
|
1549 | ''' |
|
1550 | ||
1551 | ua_types = { |
|
1552 | 'TypeId': 'NodeId', |
|
1553 | 'ResponseHeader': 'ResponseHeader', |
|
1554 | 'Servers': 'ApplicationDescription', |
|
1555 | } |
|
1556 | ||
1557 | def __init__(self, binary=None): |
|
1558 | if binary is not None: |
|
1559 | self._binary_init(binary) |
|
1560 | self._freeze = True |
|
1561 | return |
|
1562 | self.TypeId = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary) |
|
1563 | self.ResponseHeader = ResponseHeader() |
|
1564 | self.Servers = [] |
|
1565 | self._freeze = True |
|
1566 | ||
1567 | def to_binary(self): |
|
1568 | packet = [] |
|
1569 | packet.append(self.TypeId.to_binary()) |
|
1570 | packet.append(self.ResponseHeader.to_binary()) |
|
1571 | packet.append(uabin.Primitives.Int32.pack(len(self.Servers))) |
|
1572 | for fieldname in self.Servers: |
|
1573 | packet.append(fieldname.to_binary()) |
|
1574 | return b''.join(packet) |
|
1575 | ||
1576 | @staticmethod |
|
1577 | def from_binary(data): |
|
1578 | return FindServersResponse(data) |
|
1579 | ||
1580 | def _binary_init(self, data): |
|
1581 | self.TypeId = NodeId.from_binary(data) |
|
1582 | self.ResponseHeader = ResponseHeader.from_binary(data) |
|
1583 | length = uabin.Primitives.Int32.unpack(data) |
|
1584 | array = [] |
|
1585 | if length != -1: |
|
1586 | for _ in range(0, length): |
|
1587 | array.append(ApplicationDescription.from_binary(data)) |
|
1588 | self.Servers = array |
|
1589 | ||
1590 | def __str__(self): |
|
1591 | return 'FindServersResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
|
1592 | 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
|
1593 | 'Servers:' + str(self.Servers) + ')' |
|
1594 | ||
1595 | __repr__ = __str__ |
|
1596 | ||
1597 | ||
1598 | class ServerOnNetwork(FrozenClass): |
|
@@ 10565-10619 (lines=55) @@ | ||
10562 | __repr__ = __str__ |
|
10563 | ||
10564 | ||
10565 | class CallMethodRequest(FrozenClass): |
|
10566 | ''' |
|
10567 | :ivar ObjectId: |
|
10568 | :vartype ObjectId: NodeId |
|
10569 | :ivar MethodId: |
|
10570 | :vartype MethodId: NodeId |
|
10571 | :ivar InputArguments: |
|
10572 | :vartype InputArguments: Variant |
|
10573 | ''' |
|
10574 | ||
10575 | ua_types = { |
|
10576 | 'ObjectId': 'NodeId', |
|
10577 | 'MethodId': 'NodeId', |
|
10578 | 'InputArguments': 'Variant', |
|
10579 | } |
|
10580 | ||
10581 | def __init__(self, binary=None): |
|
10582 | if binary is not None: |
|
10583 | self._binary_init(binary) |
|
10584 | self._freeze = True |
|
10585 | return |
|
10586 | self.ObjectId = NodeId() |
|
10587 | self.MethodId = NodeId() |
|
10588 | self.InputArguments = [] |
|
10589 | self._freeze = True |
|
10590 | ||
10591 | def to_binary(self): |
|
10592 | packet = [] |
|
10593 | packet.append(self.ObjectId.to_binary()) |
|
10594 | packet.append(self.MethodId.to_binary()) |
|
10595 | packet.append(uabin.Primitives.Int32.pack(len(self.InputArguments))) |
|
10596 | for fieldname in self.InputArguments: |
|
10597 | packet.append(fieldname.to_binary()) |
|
10598 | return b''.join(packet) |
|
10599 | ||
10600 | @staticmethod |
|
10601 | def from_binary(data): |
|
10602 | return CallMethodRequest(data) |
|
10603 | ||
10604 | def _binary_init(self, data): |
|
10605 | self.ObjectId = NodeId.from_binary(data) |
|
10606 | self.MethodId = NodeId.from_binary(data) |
|
10607 | length = uabin.Primitives.Int32.unpack(data) |
|
10608 | array = [] |
|
10609 | if length != -1: |
|
10610 | for _ in range(0, length): |
|
10611 | array.append(Variant.from_binary(data)) |
|
10612 | self.InputArguments = array |
|
10613 | ||
10614 | def __str__(self): |
|
10615 | return 'CallMethodRequest(' + 'ObjectId:' + str(self.ObjectId) + ', ' + \ |
|
10616 | 'MethodId:' + str(self.MethodId) + ', ' + \ |
|
10617 | 'InputArguments:' + str(self.InputArguments) + ')' |
|
10618 | ||
10619 | __repr__ = __str__ |
|
10620 | ||
10621 | ||
10622 | class CallMethodResult(FrozenClass): |
|
@@ 7719-7773 (lines=55) @@ | ||
7716 | __repr__ = __str__ |
|
7717 | ||
7718 | ||
7719 | class QueryDataSet(FrozenClass): |
|
7720 | ''' |
|
7721 | :ivar NodeId: |
|
7722 | :vartype NodeId: ExpandedNodeId |
|
7723 | :ivar TypeDefinitionNode: |
|
7724 | :vartype TypeDefinitionNode: ExpandedNodeId |
|
7725 | :ivar Values: |
|
7726 | :vartype Values: Variant |
|
7727 | ''' |
|
7728 | ||
7729 | ua_types = { |
|
7730 | 'NodeId': 'ExpandedNodeId', |
|
7731 | 'TypeDefinitionNode': 'ExpandedNodeId', |
|
7732 | 'Values': 'Variant', |
|
7733 | } |
|
7734 | ||
7735 | def __init__(self, binary=None): |
|
7736 | if binary is not None: |
|
7737 | self._binary_init(binary) |
|
7738 | self._freeze = True |
|
7739 | return |
|
7740 | self.NodeId = ExpandedNodeId() |
|
7741 | self.TypeDefinitionNode = ExpandedNodeId() |
|
7742 | self.Values = [] |
|
7743 | self._freeze = True |
|
7744 | ||
7745 | def to_binary(self): |
|
7746 | packet = [] |
|
7747 | packet.append(self.NodeId.to_binary()) |
|
7748 | packet.append(self.TypeDefinitionNode.to_binary()) |
|
7749 | packet.append(uabin.Primitives.Int32.pack(len(self.Values))) |
|
7750 | for fieldname in self.Values: |
|
7751 | packet.append(fieldname.to_binary()) |
|
7752 | return b''.join(packet) |
|
7753 | ||
7754 | @staticmethod |
|
7755 | def from_binary(data): |
|
7756 | return QueryDataSet(data) |
|
7757 | ||
7758 | def _binary_init(self, data): |
|
7759 | self.NodeId = ExpandedNodeId.from_binary(data) |
|
7760 | self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) |
|
7761 | length = uabin.Primitives.Int32.unpack(data) |
|
7762 | array = [] |
|
7763 | if length != -1: |
|
7764 | for _ in range(0, length): |
|
7765 | array.append(Variant.from_binary(data)) |
|
7766 | self.Values = array |
|
7767 | ||
7768 | def __str__(self): |
|
7769 | return 'QueryDataSet(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
7770 | 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ |
|
7771 | 'Values:' + str(self.Values) + ')' |
|
7772 | ||
7773 | __repr__ = __str__ |
|
7774 | ||
7775 | ||
7776 | class NodeReference(FrozenClass): |