@@ 5936-6009 (lines=74) @@ | ||
5933 | __repr__ = __str__ |
|
5934 | ||
5935 | ||
5936 | class ReferenceDescription(FrozenClass): |
|
5937 | ''' |
|
5938 | The description of a reference. |
|
5939 | ||
5940 | :ivar ReferenceTypeId: |
|
5941 | :vartype ReferenceTypeId: NodeId |
|
5942 | :ivar IsForward: |
|
5943 | :vartype IsForward: Boolean |
|
5944 | :ivar NodeId: |
|
5945 | :vartype NodeId: ExpandedNodeId |
|
5946 | :ivar BrowseName: |
|
5947 | :vartype BrowseName: QualifiedName |
|
5948 | :ivar DisplayName: |
|
5949 | :vartype DisplayName: LocalizedText |
|
5950 | :ivar NodeClass: |
|
5951 | :vartype NodeClass: NodeClass |
|
5952 | :ivar TypeDefinition: |
|
5953 | :vartype TypeDefinition: ExpandedNodeId |
|
5954 | ''' |
|
5955 | ||
5956 | ua_types = [ |
|
5957 | ||
5958 | ('ReferenceTypeId', 'NodeId'), |
|
5959 | ('IsForward', 'Boolean'), |
|
5960 | ('NodeId', 'ExpandedNodeId'), |
|
5961 | ('BrowseName', 'QualifiedName'), |
|
5962 | ('DisplayName', 'LocalizedText'), |
|
5963 | ('NodeClass', 'NodeClass'), |
|
5964 | ('TypeDefinition', 'ExpandedNodeId'), |
|
5965 | ] |
|
5966 | ||
5967 | def __init__(self): |
|
5968 | self.ReferenceTypeId = NodeId() |
|
5969 | self.IsForward = True |
|
5970 | self.NodeId = ExpandedNodeId() |
|
5971 | self.BrowseName = QualifiedName() |
|
5972 | self.DisplayName = LocalizedText() |
|
5973 | self.NodeClass = NodeClass(0) |
|
5974 | self.TypeDefinition = ExpandedNodeId() |
|
5975 | self._freeze = True |
|
5976 | ||
5977 | def to_binary(self): |
|
5978 | packet = [] |
|
5979 | packet.append(self.ReferenceTypeId.to_binary()) |
|
5980 | packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) |
|
5981 | packet.append(self.NodeId.to_binary()) |
|
5982 | packet.append(self.BrowseName.to_binary()) |
|
5983 | packet.append(self.DisplayName.to_binary()) |
|
5984 | packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value)) |
|
5985 | packet.append(self.TypeDefinition.to_binary()) |
|
5986 | return b''.join(packet) |
|
5987 | ||
5988 | @staticmethod |
|
5989 | def from_binary(data): |
|
5990 | obj = ReferenceDescription() |
|
5991 | obj.ReferenceTypeId = NodeId.from_binary(data) |
|
5992 | self.IsForward = uabin.Primitives.Boolean.unpack(data) |
|
5993 | obj.NodeId = ExpandedNodeId.from_binary(data) |
|
5994 | obj.BrowseName = QualifiedName.from_binary(data) |
|
5995 | obj.DisplayName = LocalizedText.from_binary(data) |
|
5996 | self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) |
|
5997 | obj.TypeDefinition = ExpandedNodeId.from_binary(data) |
|
5998 | return obj |
|
5999 | ||
6000 | def __str__(self): |
|
6001 | return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
6002 | 'IsForward:' + str(self.IsForward) + ', ' + \ |
|
6003 | 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
6004 | 'BrowseName:' + str(self.BrowseName) + ', ' + \ |
|
6005 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
6006 | 'NodeClass:' + str(self.NodeClass) + ', ' + \ |
|
6007 | 'TypeDefinition:' + str(self.TypeDefinition) + ')' |
|
6008 | ||
6009 | __repr__ = __str__ |
|
6010 | ||
6011 | ||
6012 | class BrowseResult(FrozenClass): |
|
@@ 4874-4947 (lines=74) @@ | ||
4871 | __repr__ = __str__ |
|
4872 | ||
4873 | ||
4874 | class AddNodesItem(FrozenClass): |
|
4875 | ''' |
|
4876 | A request to add a node to the server address space. |
|
4877 | ||
4878 | :ivar ParentNodeId: |
|
4879 | :vartype ParentNodeId: ExpandedNodeId |
|
4880 | :ivar ReferenceTypeId: |
|
4881 | :vartype ReferenceTypeId: NodeId |
|
4882 | :ivar RequestedNewNodeId: |
|
4883 | :vartype RequestedNewNodeId: ExpandedNodeId |
|
4884 | :ivar BrowseName: |
|
4885 | :vartype BrowseName: QualifiedName |
|
4886 | :ivar NodeClass: |
|
4887 | :vartype NodeClass: NodeClass |
|
4888 | :ivar NodeAttributes: |
|
4889 | :vartype NodeAttributes: ExtensionObject |
|
4890 | :ivar TypeDefinition: |
|
4891 | :vartype TypeDefinition: ExpandedNodeId |
|
4892 | ''' |
|
4893 | ||
4894 | ua_types = [ |
|
4895 | ||
4896 | ('ParentNodeId', 'ExpandedNodeId'), |
|
4897 | ('ReferenceTypeId', 'NodeId'), |
|
4898 | ('RequestedNewNodeId', 'ExpandedNodeId'), |
|
4899 | ('BrowseName', 'QualifiedName'), |
|
4900 | ('NodeClass', 'NodeClass'), |
|
4901 | ('NodeAttributes', 'ExtensionObject'), |
|
4902 | ('TypeDefinition', 'ExpandedNodeId'), |
|
4903 | ] |
|
4904 | ||
4905 | def __init__(self): |
|
4906 | self.ParentNodeId = ExpandedNodeId() |
|
4907 | self.ReferenceTypeId = NodeId() |
|
4908 | self.RequestedNewNodeId = ExpandedNodeId() |
|
4909 | self.BrowseName = QualifiedName() |
|
4910 | self.NodeClass = NodeClass(0) |
|
4911 | self.NodeAttributes = ExtensionObject() |
|
4912 | self.TypeDefinition = ExpandedNodeId() |
|
4913 | self._freeze = True |
|
4914 | ||
4915 | def to_binary(self): |
|
4916 | packet = [] |
|
4917 | packet.append(self.ParentNodeId.to_binary()) |
|
4918 | packet.append(self.ReferenceTypeId.to_binary()) |
|
4919 | packet.append(self.RequestedNewNodeId.to_binary()) |
|
4920 | packet.append(self.BrowseName.to_binary()) |
|
4921 | packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value)) |
|
4922 | packet.append(uabin.extensionobject_to_binary(self.NodeAttributes)) |
|
4923 | packet.append(self.TypeDefinition.to_binary()) |
|
4924 | return b''.join(packet) |
|
4925 | ||
4926 | @staticmethod |
|
4927 | def from_binary(data): |
|
4928 | obj = AddNodesItem() |
|
4929 | obj.ParentNodeId = ExpandedNodeId.from_binary(data) |
|
4930 | obj.ReferenceTypeId = NodeId.from_binary(data) |
|
4931 | obj.RequestedNewNodeId = ExpandedNodeId.from_binary(data) |
|
4932 | obj.BrowseName = QualifiedName.from_binary(data) |
|
4933 | self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) |
|
4934 | obj.NodeAttributes = uabin.extensionobject_from_binary(data) |
|
4935 | obj.TypeDefinition = ExpandedNodeId.from_binary(data) |
|
4936 | return obj |
|
4937 | ||
4938 | def __str__(self): |
|
4939 | return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \ |
|
4940 | 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
4941 | 'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \ |
|
4942 | 'BrowseName:' + str(self.BrowseName) + ', ' + \ |
|
4943 | 'NodeClass:' + str(self.NodeClass) + ', ' + \ |
|
4944 | 'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \ |
|
4945 | 'TypeDefinition:' + str(self.TypeDefinition) + ')' |
|
4946 | ||
4947 | __repr__ = __str__ |
|
4948 | ||
4949 | ||
4950 | class AddNodesResult(FrozenClass): |