@@ 6070-6147 (lines=78) @@ | ||
6067 | __repr__ = __str__ |
|
6068 | ||
6069 | ||
6070 | class ReferenceDescription(FrozenClass): |
|
6071 | ''' |
|
6072 | The description of a reference. |
|
6073 | ||
6074 | :ivar ReferenceTypeId: |
|
6075 | :vartype ReferenceTypeId: NodeId |
|
6076 | :ivar IsForward: |
|
6077 | :vartype IsForward: Boolean |
|
6078 | :ivar NodeId: |
|
6079 | :vartype NodeId: ExpandedNodeId |
|
6080 | :ivar BrowseName: |
|
6081 | :vartype BrowseName: QualifiedName |
|
6082 | :ivar DisplayName: |
|
6083 | :vartype DisplayName: LocalizedText |
|
6084 | :ivar NodeClass: |
|
6085 | :vartype NodeClass: NodeClass |
|
6086 | :ivar TypeDefinition: |
|
6087 | :vartype TypeDefinition: ExpandedNodeId |
|
6088 | ''' |
|
6089 | ||
6090 | ua_types = { |
|
6091 | 'ReferenceTypeId': 'NodeId', |
|
6092 | 'IsForward': 'Boolean', |
|
6093 | 'NodeId': 'ExpandedNodeId', |
|
6094 | 'BrowseName': 'QualifiedName', |
|
6095 | 'DisplayName': 'LocalizedText', |
|
6096 | 'NodeClass': 'NodeClass', |
|
6097 | 'TypeDefinition': 'ExpandedNodeId', |
|
6098 | } |
|
6099 | ||
6100 | def __init__(self, binary=None): |
|
6101 | if binary is not None: |
|
6102 | self._binary_init(binary) |
|
6103 | self._freeze = True |
|
6104 | return |
|
6105 | self.ReferenceTypeId = NodeId() |
|
6106 | self.IsForward = True |
|
6107 | self.NodeId = ExpandedNodeId() |
|
6108 | self.BrowseName = QualifiedName() |
|
6109 | self.DisplayName = LocalizedText() |
|
6110 | self.NodeClass = NodeClass(0) |
|
6111 | self.TypeDefinition = ExpandedNodeId() |
|
6112 | self._freeze = True |
|
6113 | ||
6114 | def to_binary(self): |
|
6115 | packet = [] |
|
6116 | packet.append(self.ReferenceTypeId.to_binary()) |
|
6117 | packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) |
|
6118 | packet.append(self.NodeId.to_binary()) |
|
6119 | packet.append(self.BrowseName.to_binary()) |
|
6120 | packet.append(self.DisplayName.to_binary()) |
|
6121 | packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value)) |
|
6122 | packet.append(self.TypeDefinition.to_binary()) |
|
6123 | return b''.join(packet) |
|
6124 | ||
6125 | @staticmethod |
|
6126 | def from_binary(data): |
|
6127 | return ReferenceDescription(data) |
|
6128 | ||
6129 | def _binary_init(self, data): |
|
6130 | self.ReferenceTypeId = NodeId.from_binary(data) |
|
6131 | self.IsForward = uabin.Primitives.Boolean.unpack(data) |
|
6132 | self.NodeId = ExpandedNodeId.from_binary(data) |
|
6133 | self.BrowseName = QualifiedName.from_binary(data) |
|
6134 | self.DisplayName = LocalizedText.from_binary(data) |
|
6135 | self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) |
|
6136 | self.TypeDefinition = ExpandedNodeId.from_binary(data) |
|
6137 | ||
6138 | def __str__(self): |
|
6139 | return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
6140 | 'IsForward:' + str(self.IsForward) + ', ' + \ |
|
6141 | 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
6142 | 'BrowseName:' + str(self.BrowseName) + ', ' + \ |
|
6143 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
6144 | 'NodeClass:' + str(self.NodeClass) + ', ' + \ |
|
6145 | 'TypeDefinition:' + str(self.TypeDefinition) + ')' |
|
6146 | ||
6147 | __repr__ = __str__ |
|
6148 | ||
6149 | ||
6150 | class BrowseResult(FrozenClass): |
|
@@ 4928-5005 (lines=78) @@ | ||
4925 | __repr__ = __str__ |
|
4926 | ||
4927 | ||
4928 | class AddNodesItem(FrozenClass): |
|
4929 | ''' |
|
4930 | A request to add a node to the server address space. |
|
4931 | ||
4932 | :ivar ParentNodeId: |
|
4933 | :vartype ParentNodeId: ExpandedNodeId |
|
4934 | :ivar ReferenceTypeId: |
|
4935 | :vartype ReferenceTypeId: NodeId |
|
4936 | :ivar RequestedNewNodeId: |
|
4937 | :vartype RequestedNewNodeId: ExpandedNodeId |
|
4938 | :ivar BrowseName: |
|
4939 | :vartype BrowseName: QualifiedName |
|
4940 | :ivar NodeClass: |
|
4941 | :vartype NodeClass: NodeClass |
|
4942 | :ivar NodeAttributes: |
|
4943 | :vartype NodeAttributes: ExtensionObject |
|
4944 | :ivar TypeDefinition: |
|
4945 | :vartype TypeDefinition: ExpandedNodeId |
|
4946 | ''' |
|
4947 | ||
4948 | ua_types = { |
|
4949 | 'ParentNodeId': 'ExpandedNodeId', |
|
4950 | 'ReferenceTypeId': 'NodeId', |
|
4951 | 'RequestedNewNodeId': 'ExpandedNodeId', |
|
4952 | 'BrowseName': 'QualifiedName', |
|
4953 | 'NodeClass': 'NodeClass', |
|
4954 | 'NodeAttributes': 'ExtensionObject', |
|
4955 | 'TypeDefinition': 'ExpandedNodeId', |
|
4956 | } |
|
4957 | ||
4958 | def __init__(self, binary=None): |
|
4959 | if binary is not None: |
|
4960 | self._binary_init(binary) |
|
4961 | self._freeze = True |
|
4962 | return |
|
4963 | self.ParentNodeId = ExpandedNodeId() |
|
4964 | self.ReferenceTypeId = NodeId() |
|
4965 | self.RequestedNewNodeId = ExpandedNodeId() |
|
4966 | self.BrowseName = QualifiedName() |
|
4967 | self.NodeClass = NodeClass(0) |
|
4968 | self.NodeAttributes = None |
|
4969 | self.TypeDefinition = ExpandedNodeId() |
|
4970 | self._freeze = True |
|
4971 | ||
4972 | def to_binary(self): |
|
4973 | packet = [] |
|
4974 | packet.append(self.ParentNodeId.to_binary()) |
|
4975 | packet.append(self.ReferenceTypeId.to_binary()) |
|
4976 | packet.append(self.RequestedNewNodeId.to_binary()) |
|
4977 | packet.append(self.BrowseName.to_binary()) |
|
4978 | packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value)) |
|
4979 | packet.append(extensionobject_to_binary(self.NodeAttributes)) |
|
4980 | packet.append(self.TypeDefinition.to_binary()) |
|
4981 | return b''.join(packet) |
|
4982 | ||
4983 | @staticmethod |
|
4984 | def from_binary(data): |
|
4985 | return AddNodesItem(data) |
|
4986 | ||
4987 | def _binary_init(self, data): |
|
4988 | self.ParentNodeId = ExpandedNodeId.from_binary(data) |
|
4989 | self.ReferenceTypeId = NodeId.from_binary(data) |
|
4990 | self.RequestedNewNodeId = ExpandedNodeId.from_binary(data) |
|
4991 | self.BrowseName = QualifiedName.from_binary(data) |
|
4992 | self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) |
|
4993 | self.NodeAttributes = extensionobject_from_binary(data) |
|
4994 | self.TypeDefinition = ExpandedNodeId.from_binary(data) |
|
4995 | ||
4996 | def __str__(self): |
|
4997 | return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \ |
|
4998 | 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
4999 | 'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \ |
|
5000 | 'BrowseName:' + str(self.BrowseName) + ', ' + \ |
|
5001 | 'NodeClass:' + str(self.NodeClass) + ', ' + \ |
|
5002 | 'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \ |
|
5003 | 'TypeDefinition:' + str(self.TypeDefinition) + ')' |
|
5004 | ||
5005 | __repr__ = __str__ |
|
5006 | ||
5007 | ||
5008 | class AddNodesResult(FrozenClass): |