@@ 5411-5460 (lines=50) @@ | ||
5408 | __repr__ = __str__ |
|
5409 | ||
5410 | ||
5411 | class BrowseResult(FrozenClass): |
|
5412 | ''' |
|
5413 | The result of a browse operation. |
|
5414 | ||
5415 | :ivar StatusCode: |
|
5416 | :vartype StatusCode: StatusCode |
|
5417 | :ivar ContinuationPoint: |
|
5418 | :vartype ContinuationPoint: ByteString |
|
5419 | :ivar References: |
|
5420 | :vartype References: ReferenceDescription |
|
5421 | ''' |
|
5422 | def __init__(self, binary=None): |
|
5423 | if binary is not None: |
|
5424 | self._binary_init(binary) |
|
5425 | self._freeze = True |
|
5426 | return |
|
5427 | self.StatusCode = StatusCode() |
|
5428 | self.ContinuationPoint = b'' |
|
5429 | self.References = [] |
|
5430 | self._freeze = True |
|
5431 | ||
5432 | def to_binary(self): |
|
5433 | packet = [] |
|
5434 | packet.append(self.StatusCode.to_binary()) |
|
5435 | packet.append(pack_bytes(self.ContinuationPoint)) |
|
5436 | packet.append(uatype_Int32.pack(len(self.References))) |
|
5437 | for fieldname in self.References: |
|
5438 | packet.append(fieldname.to_binary()) |
|
5439 | return b''.join(packet) |
|
5440 | ||
5441 | @staticmethod |
|
5442 | def from_binary(data): |
|
5443 | return BrowseResult(data) |
|
5444 | ||
5445 | def _binary_init(self, data): |
|
5446 | self.StatusCode = StatusCode.from_binary(data) |
|
5447 | self.ContinuationPoint = unpack_bytes(data) |
|
5448 | length = uatype_Int32.unpack(data.read(4))[0] |
|
5449 | array = [] |
|
5450 | if length != -1: |
|
5451 | for _ in range(0, length): |
|
5452 | array.append(ReferenceDescription.from_binary(data)) |
|
5453 | self.References = array |
|
5454 | ||
5455 | def __str__(self): |
|
5456 | return 'BrowseResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ |
|
5457 | 'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ |
|
5458 | 'References:' + str(self.References) + ')' |
|
5459 | ||
5460 | __repr__ = __str__ |
|
5461 | ||
5462 | ||
5463 | class BrowseParameters(FrozenClass): |
|
@@ 4694-4743 (lines=50) @@ | ||
4691 | __repr__ = __str__ |
|
4692 | ||
4693 | ||
4694 | class AddReferencesRequest(FrozenClass): |
|
4695 | ''' |
|
4696 | Adds one or more references to the server address space. |
|
4697 | ||
4698 | :ivar TypeId: |
|
4699 | :vartype TypeId: NodeId |
|
4700 | :ivar RequestHeader: |
|
4701 | :vartype RequestHeader: RequestHeader |
|
4702 | :ivar ReferencesToAdd: |
|
4703 | :vartype ReferencesToAdd: AddReferencesItem |
|
4704 | ''' |
|
4705 | def __init__(self, binary=None): |
|
4706 | if binary is not None: |
|
4707 | self._binary_init(binary) |
|
4708 | self._freeze = True |
|
4709 | return |
|
4710 | self.TypeId = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary) |
|
4711 | self.RequestHeader = RequestHeader() |
|
4712 | self.ReferencesToAdd = [] |
|
4713 | self._freeze = True |
|
4714 | ||
4715 | def to_binary(self): |
|
4716 | packet = [] |
|
4717 | packet.append(self.TypeId.to_binary()) |
|
4718 | packet.append(self.RequestHeader.to_binary()) |
|
4719 | packet.append(uatype_Int32.pack(len(self.ReferencesToAdd))) |
|
4720 | for fieldname in self.ReferencesToAdd: |
|
4721 | packet.append(fieldname.to_binary()) |
|
4722 | return b''.join(packet) |
|
4723 | ||
4724 | @staticmethod |
|
4725 | def from_binary(data): |
|
4726 | return AddReferencesRequest(data) |
|
4727 | ||
4728 | def _binary_init(self, data): |
|
4729 | self.TypeId = NodeId.from_binary(data) |
|
4730 | self.RequestHeader = RequestHeader.from_binary(data) |
|
4731 | length = uatype_Int32.unpack(data.read(4))[0] |
|
4732 | array = [] |
|
4733 | if length != -1: |
|
4734 | for _ in range(0, length): |
|
4735 | array.append(AddReferencesItem.from_binary(data)) |
|
4736 | self.ReferencesToAdd = array |
|
4737 | ||
4738 | def __str__(self): |
|
4739 | return 'AddReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
|
4740 | 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ |
|
4741 | 'ReferencesToAdd:' + str(self.ReferencesToAdd) + ')' |
|
4742 | ||
4743 | __repr__ = __str__ |
|
4744 | ||
4745 | ||
4746 | class AddReferencesResponse(FrozenClass): |
|
@@ 1944-1993 (lines=50) @@ | ||
1941 | __repr__ = __str__ |
|
1942 | ||
1943 | ||
1944 | class GetEndpointsResponse(FrozenClass): |
|
1945 | ''' |
|
1946 | Gets the endpoints used by the server. |
|
1947 | ||
1948 | :ivar TypeId: |
|
1949 | :vartype TypeId: NodeId |
|
1950 | :ivar ResponseHeader: |
|
1951 | :vartype ResponseHeader: ResponseHeader |
|
1952 | :ivar Endpoints: |
|
1953 | :vartype Endpoints: EndpointDescription |
|
1954 | ''' |
|
1955 | def __init__(self, binary=None): |
|
1956 | if binary is not None: |
|
1957 | self._binary_init(binary) |
|
1958 | self._freeze = True |
|
1959 | return |
|
1960 | self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary) |
|
1961 | self.ResponseHeader = ResponseHeader() |
|
1962 | self.Endpoints = [] |
|
1963 | self._freeze = True |
|
1964 | ||
1965 | def to_binary(self): |
|
1966 | packet = [] |
|
1967 | packet.append(self.TypeId.to_binary()) |
|
1968 | packet.append(self.ResponseHeader.to_binary()) |
|
1969 | packet.append(uatype_Int32.pack(len(self.Endpoints))) |
|
1970 | for fieldname in self.Endpoints: |
|
1971 | packet.append(fieldname.to_binary()) |
|
1972 | return b''.join(packet) |
|
1973 | ||
1974 | @staticmethod |
|
1975 | def from_binary(data): |
|
1976 | return GetEndpointsResponse(data) |
|
1977 | ||
1978 | def _binary_init(self, data): |
|
1979 | self.TypeId = NodeId.from_binary(data) |
|
1980 | self.ResponseHeader = ResponseHeader.from_binary(data) |
|
1981 | length = uatype_Int32.unpack(data.read(4))[0] |
|
1982 | array = [] |
|
1983 | if length != -1: |
|
1984 | for _ in range(0, length): |
|
1985 | array.append(EndpointDescription.from_binary(data)) |
|
1986 | self.Endpoints = array |
|
1987 | ||
1988 | def __str__(self): |
|
1989 | return 'GetEndpointsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
|
1990 | 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
|
1991 | 'Endpoints:' + str(self.Endpoints) + ')' |
|
1992 | ||
1993 | __repr__ = __str__ |
|
1994 | ||
1995 | ||
1996 | class RegisteredServer(FrozenClass): |
|
@@ 1435-1484 (lines=50) @@ | ||
1432 | __repr__ = __str__ |
|
1433 | ||
1434 | ||
1435 | class FindServersResponse(FrozenClass): |
|
1436 | ''' |
|
1437 | Finds the servers known to the discovery server. |
|
1438 | ||
1439 | :ivar TypeId: |
|
1440 | :vartype TypeId: NodeId |
|
1441 | :ivar ResponseHeader: |
|
1442 | :vartype ResponseHeader: ResponseHeader |
|
1443 | :ivar Servers: |
|
1444 | :vartype Servers: ApplicationDescription |
|
1445 | ''' |
|
1446 | def __init__(self, binary=None): |
|
1447 | if binary is not None: |
|
1448 | self._binary_init(binary) |
|
1449 | self._freeze = True |
|
1450 | return |
|
1451 | self.TypeId = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary) |
|
1452 | self.ResponseHeader = ResponseHeader() |
|
1453 | self.Servers = [] |
|
1454 | self._freeze = True |
|
1455 | ||
1456 | def to_binary(self): |
|
1457 | packet = [] |
|
1458 | packet.append(self.TypeId.to_binary()) |
|
1459 | packet.append(self.ResponseHeader.to_binary()) |
|
1460 | packet.append(uatype_Int32.pack(len(self.Servers))) |
|
1461 | for fieldname in self.Servers: |
|
1462 | packet.append(fieldname.to_binary()) |
|
1463 | return b''.join(packet) |
|
1464 | ||
1465 | @staticmethod |
|
1466 | def from_binary(data): |
|
1467 | return FindServersResponse(data) |
|
1468 | ||
1469 | def _binary_init(self, data): |
|
1470 | self.TypeId = NodeId.from_binary(data) |
|
1471 | self.ResponseHeader = ResponseHeader.from_binary(data) |
|
1472 | length = uatype_Int32.unpack(data.read(4))[0] |
|
1473 | array = [] |
|
1474 | if length != -1: |
|
1475 | for _ in range(0, length): |
|
1476 | array.append(ApplicationDescription.from_binary(data)) |
|
1477 | self.Servers = array |
|
1478 | ||
1479 | def __str__(self): |
|
1480 | return 'FindServersResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ |
|
1481 | 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ |
|
1482 | 'Servers:' + str(self.Servers) + ')' |
|
1483 | ||
1484 | __repr__ = __str__ |
|
1485 | ||
1486 | ||
1487 | class ServerOnNetwork(FrozenClass): |
|
@@ 9267-9314 (lines=48) @@ | ||
9264 | __repr__ = __str__ |
|
9265 | ||
9266 | ||
9267 | class CallMethodRequest(FrozenClass): |
|
9268 | ''' |
|
9269 | :ivar ObjectId: |
|
9270 | :vartype ObjectId: NodeId |
|
9271 | :ivar MethodId: |
|
9272 | :vartype MethodId: NodeId |
|
9273 | :ivar InputArguments: |
|
9274 | :vartype InputArguments: Variant |
|
9275 | ''' |
|
9276 | def __init__(self, binary=None): |
|
9277 | if binary is not None: |
|
9278 | self._binary_init(binary) |
|
9279 | self._freeze = True |
|
9280 | return |
|
9281 | self.ObjectId = NodeId() |
|
9282 | self.MethodId = NodeId() |
|
9283 | self.InputArguments = [] |
|
9284 | self._freeze = True |
|
9285 | ||
9286 | def to_binary(self): |
|
9287 | packet = [] |
|
9288 | packet.append(self.ObjectId.to_binary()) |
|
9289 | packet.append(self.MethodId.to_binary()) |
|
9290 | packet.append(uatype_Int32.pack(len(self.InputArguments))) |
|
9291 | for fieldname in self.InputArguments: |
|
9292 | packet.append(fieldname.to_binary()) |
|
9293 | return b''.join(packet) |
|
9294 | ||
9295 | @staticmethod |
|
9296 | def from_binary(data): |
|
9297 | return CallMethodRequest(data) |
|
9298 | ||
9299 | def _binary_init(self, data): |
|
9300 | self.ObjectId = NodeId.from_binary(data) |
|
9301 | self.MethodId = NodeId.from_binary(data) |
|
9302 | length = uatype_Int32.unpack(data.read(4))[0] |
|
9303 | array = [] |
|
9304 | if length != -1: |
|
9305 | for _ in range(0, length): |
|
9306 | array.append(Variant.from_binary(data)) |
|
9307 | self.InputArguments = array |
|
9308 | ||
9309 | def __str__(self): |
|
9310 | return 'CallMethodRequest(' + 'ObjectId:' + str(self.ObjectId) + ', ' + \ |
|
9311 | 'MethodId:' + str(self.MethodId) + ', ' + \ |
|
9312 | 'InputArguments:' + str(self.InputArguments) + ')' |
|
9313 | ||
9314 | __repr__ = __str__ |
|
9315 | ||
9316 | ||
9317 | class CallMethodResult(FrozenClass): |
|
@@ 8833-8880 (lines=48) @@ | ||
8830 | __repr__ = __str__ |
|
8831 | ||
8832 | ||
8833 | class UpdateStructureDataDetails(FrozenClass): |
|
8834 | ''' |
|
8835 | :ivar NodeId: |
|
8836 | :vartype NodeId: NodeId |
|
8837 | :ivar PerformInsertReplace: |
|
8838 | :vartype PerformInsertReplace: PerformUpdateType |
|
8839 | :ivar UpdateValues: |
|
8840 | :vartype UpdateValues: DataValue |
|
8841 | ''' |
|
8842 | def __init__(self, binary=None): |
|
8843 | if binary is not None: |
|
8844 | self._binary_init(binary) |
|
8845 | self._freeze = True |
|
8846 | return |
|
8847 | self.NodeId = NodeId() |
|
8848 | self.PerformInsertReplace = PerformUpdateType(0) |
|
8849 | self.UpdateValues = [] |
|
8850 | self._freeze = True |
|
8851 | ||
8852 | def to_binary(self): |
|
8853 | packet = [] |
|
8854 | packet.append(self.NodeId.to_binary()) |
|
8855 | packet.append(uatype_UInt32.pack(self.PerformInsertReplace.value)) |
|
8856 | packet.append(uatype_Int32.pack(len(self.UpdateValues))) |
|
8857 | for fieldname in self.UpdateValues: |
|
8858 | packet.append(fieldname.to_binary()) |
|
8859 | return b''.join(packet) |
|
8860 | ||
8861 | @staticmethod |
|
8862 | def from_binary(data): |
|
8863 | return UpdateStructureDataDetails(data) |
|
8864 | ||
8865 | def _binary_init(self, data): |
|
8866 | self.NodeId = NodeId.from_binary(data) |
|
8867 | self.PerformInsertReplace = PerformUpdateType(uatype_UInt32.unpack(data.read(4))[0]) |
|
8868 | length = uatype_Int32.unpack(data.read(4))[0] |
|
8869 | array = [] |
|
8870 | if length != -1: |
|
8871 | for _ in range(0, length): |
|
8872 | array.append(DataValue.from_binary(data)) |
|
8873 | self.UpdateValues = array |
|
8874 | ||
8875 | def __str__(self): |
|
8876 | return 'UpdateStructureDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
8877 | 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
|
8878 | 'UpdateValues:' + str(self.UpdateValues) + ')' |
|
8879 | ||
8880 | __repr__ = __str__ |
|
8881 | ||
8882 | ||
8883 | class UpdateEventDetails(FrozenClass): |
|
@@ 8783-8830 (lines=48) @@ | ||
8780 | __repr__ = __str__ |
|
8781 | ||
8782 | ||
8783 | class UpdateDataDetails(FrozenClass): |
|
8784 | ''' |
|
8785 | :ivar NodeId: |
|
8786 | :vartype NodeId: NodeId |
|
8787 | :ivar PerformInsertReplace: |
|
8788 | :vartype PerformInsertReplace: PerformUpdateType |
|
8789 | :ivar UpdateValues: |
|
8790 | :vartype UpdateValues: DataValue |
|
8791 | ''' |
|
8792 | def __init__(self, binary=None): |
|
8793 | if binary is not None: |
|
8794 | self._binary_init(binary) |
|
8795 | self._freeze = True |
|
8796 | return |
|
8797 | self.NodeId = NodeId() |
|
8798 | self.PerformInsertReplace = PerformUpdateType(0) |
|
8799 | self.UpdateValues = [] |
|
8800 | self._freeze = True |
|
8801 | ||
8802 | def to_binary(self): |
|
8803 | packet = [] |
|
8804 | packet.append(self.NodeId.to_binary()) |
|
8805 | packet.append(uatype_UInt32.pack(self.PerformInsertReplace.value)) |
|
8806 | packet.append(uatype_Int32.pack(len(self.UpdateValues))) |
|
8807 | for fieldname in self.UpdateValues: |
|
8808 | packet.append(fieldname.to_binary()) |
|
8809 | return b''.join(packet) |
|
8810 | ||
8811 | @staticmethod |
|
8812 | def from_binary(data): |
|
8813 | return UpdateDataDetails(data) |
|
8814 | ||
8815 | def _binary_init(self, data): |
|
8816 | self.NodeId = NodeId.from_binary(data) |
|
8817 | self.PerformInsertReplace = PerformUpdateType(uatype_UInt32.unpack(data.read(4))[0]) |
|
8818 | length = uatype_Int32.unpack(data.read(4))[0] |
|
8819 | array = [] |
|
8820 | if length != -1: |
|
8821 | for _ in range(0, length): |
|
8822 | array.append(DataValue.from_binary(data)) |
|
8823 | self.UpdateValues = array |
|
8824 | ||
8825 | def __str__(self): |
|
8826 | return 'UpdateDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
8827 | 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ |
|
8828 | 'UpdateValues:' + str(self.UpdateValues) + ')' |
|
8829 | ||
8830 | __repr__ = __str__ |
|
8831 | ||
8832 | ||
8833 | class UpdateStructureDataDetails(FrozenClass): |
|
@@ 6781-6828 (lines=48) @@ | ||
6778 | __repr__ = __str__ |
|
6779 | ||
6780 | ||
6781 | class QueryDataSet(FrozenClass): |
|
6782 | ''' |
|
6783 | :ivar NodeId: |
|
6784 | :vartype NodeId: ExpandedNodeId |
|
6785 | :ivar TypeDefinitionNode: |
|
6786 | :vartype TypeDefinitionNode: ExpandedNodeId |
|
6787 | :ivar Values: |
|
6788 | :vartype Values: Variant |
|
6789 | ''' |
|
6790 | def __init__(self, binary=None): |
|
6791 | if binary is not None: |
|
6792 | self._binary_init(binary) |
|
6793 | self._freeze = True |
|
6794 | return |
|
6795 | self.NodeId = ExpandedNodeId() |
|
6796 | self.TypeDefinitionNode = ExpandedNodeId() |
|
6797 | self.Values = [] |
|
6798 | self._freeze = True |
|
6799 | ||
6800 | def to_binary(self): |
|
6801 | packet = [] |
|
6802 | packet.append(self.NodeId.to_binary()) |
|
6803 | packet.append(self.TypeDefinitionNode.to_binary()) |
|
6804 | packet.append(uatype_Int32.pack(len(self.Values))) |
|
6805 | for fieldname in self.Values: |
|
6806 | packet.append(fieldname.to_binary()) |
|
6807 | return b''.join(packet) |
|
6808 | ||
6809 | @staticmethod |
|
6810 | def from_binary(data): |
|
6811 | return QueryDataSet(data) |
|
6812 | ||
6813 | def _binary_init(self, data): |
|
6814 | self.NodeId = ExpandedNodeId.from_binary(data) |
|
6815 | self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) |
|
6816 | length = uatype_Int32.unpack(data.read(4))[0] |
|
6817 | array = [] |
|
6818 | if length != -1: |
|
6819 | for _ in range(0, length): |
|
6820 | array.append(Variant.from_binary(data)) |
|
6821 | self.Values = array |
|
6822 | ||
6823 | def __str__(self): |
|
6824 | return 'QueryDataSet(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
6825 | 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ |
|
6826 | 'Values:' + str(self.Values) + ')' |
|
6827 | ||
6828 | __repr__ = __str__ |
|
6829 | ||
6830 | ||
6831 | class NodeReference(FrozenClass): |
|
@@ 6731-6778 (lines=48) @@ | ||
6728 | __repr__ = __str__ |
|
6729 | ||
6730 | ||
6731 | class NodeTypeDescription(FrozenClass): |
|
6732 | ''' |
|
6733 | :ivar TypeDefinitionNode: |
|
6734 | :vartype TypeDefinitionNode: ExpandedNodeId |
|
6735 | :ivar IncludeSubTypes: |
|
6736 | :vartype IncludeSubTypes: Boolean |
|
6737 | :ivar DataToReturn: |
|
6738 | :vartype DataToReturn: QueryDataDescription |
|
6739 | ''' |
|
6740 | def __init__(self, binary=None): |
|
6741 | if binary is not None: |
|
6742 | self._binary_init(binary) |
|
6743 | self._freeze = True |
|
6744 | return |
|
6745 | self.TypeDefinitionNode = ExpandedNodeId() |
|
6746 | self.IncludeSubTypes = True |
|
6747 | self.DataToReturn = [] |
|
6748 | self._freeze = True |
|
6749 | ||
6750 | def to_binary(self): |
|
6751 | packet = [] |
|
6752 | packet.append(self.TypeDefinitionNode.to_binary()) |
|
6753 | packet.append(uatype_Boolean.pack(self.IncludeSubTypes)) |
|
6754 | packet.append(uatype_Int32.pack(len(self.DataToReturn))) |
|
6755 | for fieldname in self.DataToReturn: |
|
6756 | packet.append(fieldname.to_binary()) |
|
6757 | return b''.join(packet) |
|
6758 | ||
6759 | @staticmethod |
|
6760 | def from_binary(data): |
|
6761 | return NodeTypeDescription(data) |
|
6762 | ||
6763 | def _binary_init(self, data): |
|
6764 | self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) |
|
6765 | self.IncludeSubTypes = uatype_Boolean.unpack(data.read(1))[0] |
|
6766 | length = uatype_Int32.unpack(data.read(4))[0] |
|
6767 | array = [] |
|
6768 | if length != -1: |
|
6769 | for _ in range(0, length): |
|
6770 | array.append(QueryDataDescription.from_binary(data)) |
|
6771 | self.DataToReturn = array |
|
6772 | ||
6773 | def __str__(self): |
|
6774 | return 'NodeTypeDescription(' + 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ |
|
6775 | 'IncludeSubTypes:' + str(self.IncludeSubTypes) + ', ' + \ |
|
6776 | 'DataToReturn:' + str(self.DataToReturn) + ')' |
|
6777 | ||
6778 | __repr__ = __str__ |
|
6779 | ||
6780 | ||
6781 | class QueryDataSet(FrozenClass): |
|
@@ 5463-5510 (lines=48) @@ | ||
5460 | __repr__ = __str__ |
|
5461 | ||
5462 | ||
5463 | class BrowseParameters(FrozenClass): |
|
5464 | ''' |
|
5465 | :ivar View: |
|
5466 | :vartype View: ViewDescription |
|
5467 | :ivar RequestedMaxReferencesPerNode: |
|
5468 | :vartype RequestedMaxReferencesPerNode: UInt32 |
|
5469 | :ivar NodesToBrowse: |
|
5470 | :vartype NodesToBrowse: BrowseDescription |
|
5471 | ''' |
|
5472 | def __init__(self, binary=None): |
|
5473 | if binary is not None: |
|
5474 | self._binary_init(binary) |
|
5475 | self._freeze = True |
|
5476 | return |
|
5477 | self.View = ViewDescription() |
|
5478 | self.RequestedMaxReferencesPerNode = 0 |
|
5479 | self.NodesToBrowse = [] |
|
5480 | self._freeze = True |
|
5481 | ||
5482 | def to_binary(self): |
|
5483 | packet = [] |
|
5484 | packet.append(self.View.to_binary()) |
|
5485 | packet.append(uatype_UInt32.pack(self.RequestedMaxReferencesPerNode)) |
|
5486 | packet.append(uatype_Int32.pack(len(self.NodesToBrowse))) |
|
5487 | for fieldname in self.NodesToBrowse: |
|
5488 | packet.append(fieldname.to_binary()) |
|
5489 | return b''.join(packet) |
|
5490 | ||
5491 | @staticmethod |
|
5492 | def from_binary(data): |
|
5493 | return BrowseParameters(data) |
|
5494 | ||
5495 | def _binary_init(self, data): |
|
5496 | self.View = ViewDescription.from_binary(data) |
|
5497 | self.RequestedMaxReferencesPerNode = uatype_UInt32.unpack(data.read(4))[0] |
|
5498 | length = uatype_Int32.unpack(data.read(4))[0] |
|
5499 | array = [] |
|
5500 | if length != -1: |
|
5501 | for _ in range(0, length): |
|
5502 | array.append(BrowseDescription.from_binary(data)) |
|
5503 | self.NodesToBrowse = array |
|
5504 | ||
5505 | def __str__(self): |
|
5506 | return 'BrowseParameters(' + 'View:' + str(self.View) + ', ' + \ |
|
5507 | 'RequestedMaxReferencesPerNode:' + str(self.RequestedMaxReferencesPerNode) + ', ' + \ |
|
5508 | 'NodesToBrowse:' + str(self.NodesToBrowse) + ')' |
|
5509 | ||
5510 | __repr__ = __str__ |
|
5511 | ||
5512 | ||
5513 | class BrowseRequest(FrozenClass): |