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