@@ 4777-4847 (lines=71) @@ | ||
4774 | __repr__ = __str__ |
|
4775 | ||
4776 | ||
4777 | class DataTypeAttributes(FrozenClass): |
|
4778 | ''' |
|
4779 | The attributes for a data type node. |
|
4780 | ||
4781 | :ivar SpecifiedAttributes: |
|
4782 | :vartype SpecifiedAttributes: UInt32 |
|
4783 | :ivar DisplayName: |
|
4784 | :vartype DisplayName: LocalizedText |
|
4785 | :ivar Description: |
|
4786 | :vartype Description: LocalizedText |
|
4787 | :ivar WriteMask: |
|
4788 | :vartype WriteMask: UInt32 |
|
4789 | :ivar UserWriteMask: |
|
4790 | :vartype UserWriteMask: UInt32 |
|
4791 | :ivar IsAbstract: |
|
4792 | :vartype IsAbstract: Boolean |
|
4793 | ''' |
|
4794 | ||
4795 | ua_types = { |
|
4796 | 'SpecifiedAttributes': 'UInt32', |
|
4797 | 'DisplayName': 'LocalizedText', |
|
4798 | 'Description': 'LocalizedText', |
|
4799 | 'WriteMask': 'UInt32', |
|
4800 | 'UserWriteMask': 'UInt32', |
|
4801 | 'IsAbstract': 'Boolean', |
|
4802 | } |
|
4803 | ||
4804 | def __init__(self, binary=None): |
|
4805 | if binary is not None: |
|
4806 | self._binary_init(binary) |
|
4807 | self._freeze = True |
|
4808 | return |
|
4809 | self.SpecifiedAttributes = 0 |
|
4810 | self.DisplayName = LocalizedText() |
|
4811 | self.Description = LocalizedText() |
|
4812 | self.WriteMask = 0 |
|
4813 | self.UserWriteMask = 0 |
|
4814 | self.IsAbstract = True |
|
4815 | self._freeze = True |
|
4816 | ||
4817 | def to_binary(self): |
|
4818 | packet = [] |
|
4819 | packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) |
|
4820 | packet.append(self.DisplayName.to_binary()) |
|
4821 | packet.append(self.Description.to_binary()) |
|
4822 | packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) |
|
4823 | packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) |
|
4824 | packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract)) |
|
4825 | return b''.join(packet) |
|
4826 | ||
4827 | @staticmethod |
|
4828 | def from_binary(data): |
|
4829 | return DataTypeAttributes(data) |
|
4830 | ||
4831 | def _binary_init(self, data): |
|
4832 | self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) |
|
4833 | self.DisplayName = LocalizedText.from_binary(data) |
|
4834 | self.Description = LocalizedText.from_binary(data) |
|
4835 | self.WriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4836 | self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4837 | self.IsAbstract = uabin.Primitives.Boolean.unpack(data) |
|
4838 | ||
4839 | def __str__(self): |
|
4840 | return 'DataTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
|
4841 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
4842 | 'Description:' + str(self.Description) + ', ' + \ |
|
4843 | 'WriteMask:' + str(self.WriteMask) + ', ' + \ |
|
4844 | 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
|
4845 | 'IsAbstract:' + str(self.IsAbstract) + ')' |
|
4846 | ||
4847 | __repr__ = __str__ |
|
4848 | ||
4849 | ||
4850 | class ViewAttributes(FrozenClass): |
|
@@ 4514-4584 (lines=71) @@ | ||
4511 | __repr__ = __str__ |
|
4512 | ||
4513 | ||
4514 | class ObjectTypeAttributes(FrozenClass): |
|
4515 | ''' |
|
4516 | The attributes for an object type node. |
|
4517 | ||
4518 | :ivar SpecifiedAttributes: |
|
4519 | :vartype SpecifiedAttributes: UInt32 |
|
4520 | :ivar DisplayName: |
|
4521 | :vartype DisplayName: LocalizedText |
|
4522 | :ivar Description: |
|
4523 | :vartype Description: LocalizedText |
|
4524 | :ivar WriteMask: |
|
4525 | :vartype WriteMask: UInt32 |
|
4526 | :ivar UserWriteMask: |
|
4527 | :vartype UserWriteMask: UInt32 |
|
4528 | :ivar IsAbstract: |
|
4529 | :vartype IsAbstract: Boolean |
|
4530 | ''' |
|
4531 | ||
4532 | ua_types = { |
|
4533 | 'SpecifiedAttributes': 'UInt32', |
|
4534 | 'DisplayName': 'LocalizedText', |
|
4535 | 'Description': 'LocalizedText', |
|
4536 | 'WriteMask': 'UInt32', |
|
4537 | 'UserWriteMask': 'UInt32', |
|
4538 | 'IsAbstract': 'Boolean', |
|
4539 | } |
|
4540 | ||
4541 | def __init__(self, binary=None): |
|
4542 | if binary is not None: |
|
4543 | self._binary_init(binary) |
|
4544 | self._freeze = True |
|
4545 | return |
|
4546 | self.SpecifiedAttributes = 0 |
|
4547 | self.DisplayName = LocalizedText() |
|
4548 | self.Description = LocalizedText() |
|
4549 | self.WriteMask = 0 |
|
4550 | self.UserWriteMask = 0 |
|
4551 | self.IsAbstract = True |
|
4552 | self._freeze = True |
|
4553 | ||
4554 | def to_binary(self): |
|
4555 | packet = [] |
|
4556 | packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) |
|
4557 | packet.append(self.DisplayName.to_binary()) |
|
4558 | packet.append(self.Description.to_binary()) |
|
4559 | packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) |
|
4560 | packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) |
|
4561 | packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract)) |
|
4562 | return b''.join(packet) |
|
4563 | ||
4564 | @staticmethod |
|
4565 | def from_binary(data): |
|
4566 | return ObjectTypeAttributes(data) |
|
4567 | ||
4568 | def _binary_init(self, data): |
|
4569 | self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) |
|
4570 | self.DisplayName = LocalizedText.from_binary(data) |
|
4571 | self.Description = LocalizedText.from_binary(data) |
|
4572 | self.WriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4573 | self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4574 | self.IsAbstract = uabin.Primitives.Boolean.unpack(data) |
|
4575 | ||
4576 | def __str__(self): |
|
4577 | return 'ObjectTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
|
4578 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
4579 | 'Description:' + str(self.Description) + ', ' + \ |
|
4580 | 'WriteMask:' + str(self.WriteMask) + ', ' + \ |
|
4581 | 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
|
4582 | 'IsAbstract:' + str(self.IsAbstract) + ')' |
|
4583 | ||
4584 | __repr__ = __str__ |
|
4585 | ||
4586 | ||
4587 | class VariableTypeAttributes(FrozenClass): |
|
@@ 9163-9224 (lines=62) @@ | ||
9160 | __repr__ = __str__ |
|
9161 | ||
9162 | ||
9163 | class ReadRawModifiedDetails(FrozenClass): |
|
9164 | ''' |
|
9165 | :ivar IsReadModified: |
|
9166 | :vartype IsReadModified: Boolean |
|
9167 | :ivar StartTime: |
|
9168 | :vartype StartTime: DateTime |
|
9169 | :ivar EndTime: |
|
9170 | :vartype EndTime: DateTime |
|
9171 | :ivar NumValuesPerNode: |
|
9172 | :vartype NumValuesPerNode: UInt32 |
|
9173 | :ivar ReturnBounds: |
|
9174 | :vartype ReturnBounds: Boolean |
|
9175 | ''' |
|
9176 | ||
9177 | ua_types = { |
|
9178 | 'IsReadModified': 'Boolean', |
|
9179 | 'StartTime': 'DateTime', |
|
9180 | 'EndTime': 'DateTime', |
|
9181 | 'NumValuesPerNode': 'UInt32', |
|
9182 | 'ReturnBounds': 'Boolean', |
|
9183 | } |
|
9184 | ||
9185 | def __init__(self, binary=None): |
|
9186 | if binary is not None: |
|
9187 | self._binary_init(binary) |
|
9188 | self._freeze = True |
|
9189 | return |
|
9190 | self.IsReadModified = True |
|
9191 | self.StartTime = datetime.now() |
|
9192 | self.EndTime = datetime.now() |
|
9193 | self.NumValuesPerNode = 0 |
|
9194 | self.ReturnBounds = True |
|
9195 | self._freeze = True |
|
9196 | ||
9197 | def to_binary(self): |
|
9198 | packet = [] |
|
9199 | packet.append(uabin.Primitives.Boolean.pack(self.IsReadModified)) |
|
9200 | packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) |
|
9201 | packet.append(uabin.Primitives.DateTime.pack(self.EndTime)) |
|
9202 | packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode)) |
|
9203 | packet.append(uabin.Primitives.Boolean.pack(self.ReturnBounds)) |
|
9204 | return b''.join(packet) |
|
9205 | ||
9206 | @staticmethod |
|
9207 | def from_binary(data): |
|
9208 | return ReadRawModifiedDetails(data) |
|
9209 | ||
9210 | def _binary_init(self, data): |
|
9211 | self.IsReadModified = uabin.Primitives.Boolean.unpack(data) |
|
9212 | self.StartTime = uabin.Primitives.DateTime.unpack(data) |
|
9213 | self.EndTime = uabin.Primitives.DateTime.unpack(data) |
|
9214 | self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data) |
|
9215 | self.ReturnBounds = uabin.Primitives.Boolean.unpack(data) |
|
9216 | ||
9217 | def __str__(self): |
|
9218 | return 'ReadRawModifiedDetails(' + 'IsReadModified:' + str(self.IsReadModified) + ', ' + \ |
|
9219 | 'StartTime:' + str(self.StartTime) + ', ' + \ |
|
9220 | 'EndTime:' + str(self.EndTime) + ', ' + \ |
|
9221 | 'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \ |
|
9222 | 'ReturnBounds:' + str(self.ReturnBounds) + ')' |
|
9223 | ||
9224 | __repr__ = __str__ |
|
9225 | ||
9226 | ||
9227 | class ReadProcessedDetails(FrozenClass): |
|
@@ 5963-6033 (lines=71) @@ | ||
5960 | __repr__ = __str__ |
|
5961 | ||
5962 | ||
5963 | class BrowseDescription(FrozenClass): |
|
5964 | ''' |
|
5965 | A request to browse the the references from a node. |
|
5966 | ||
5967 | :ivar NodeId: |
|
5968 | :vartype NodeId: NodeId |
|
5969 | :ivar BrowseDirection: |
|
5970 | :vartype BrowseDirection: BrowseDirection |
|
5971 | :ivar ReferenceTypeId: |
|
5972 | :vartype ReferenceTypeId: NodeId |
|
5973 | :ivar IncludeSubtypes: |
|
5974 | :vartype IncludeSubtypes: Boolean |
|
5975 | :ivar NodeClassMask: |
|
5976 | :vartype NodeClassMask: UInt32 |
|
5977 | :ivar ResultMask: |
|
5978 | :vartype ResultMask: UInt32 |
|
5979 | ''' |
|
5980 | ||
5981 | ua_types = { |
|
5982 | 'NodeId': 'NodeId', |
|
5983 | 'BrowseDirection': 'BrowseDirection', |
|
5984 | 'ReferenceTypeId': 'NodeId', |
|
5985 | 'IncludeSubtypes': 'Boolean', |
|
5986 | 'NodeClassMask': 'UInt32', |
|
5987 | 'ResultMask': 'UInt32', |
|
5988 | } |
|
5989 | ||
5990 | def __init__(self, binary=None): |
|
5991 | if binary is not None: |
|
5992 | self._binary_init(binary) |
|
5993 | self._freeze = True |
|
5994 | return |
|
5995 | self.NodeId = NodeId() |
|
5996 | self.BrowseDirection = BrowseDirection(0) |
|
5997 | self.ReferenceTypeId = NodeId() |
|
5998 | self.IncludeSubtypes = True |
|
5999 | self.NodeClassMask = 0 |
|
6000 | self.ResultMask = 0 |
|
6001 | self._freeze = True |
|
6002 | ||
6003 | def to_binary(self): |
|
6004 | packet = [] |
|
6005 | packet.append(self.NodeId.to_binary()) |
|
6006 | packet.append(uabin.Primitives.UInt32.pack(self.BrowseDirection.value)) |
|
6007 | packet.append(self.ReferenceTypeId.to_binary()) |
|
6008 | packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes)) |
|
6009 | packet.append(uabin.Primitives.UInt32.pack(self.NodeClassMask)) |
|
6010 | packet.append(uabin.Primitives.UInt32.pack(self.ResultMask)) |
|
6011 | return b''.join(packet) |
|
6012 | ||
6013 | @staticmethod |
|
6014 | def from_binary(data): |
|
6015 | return BrowseDescription(data) |
|
6016 | ||
6017 | def _binary_init(self, data): |
|
6018 | self.NodeId = NodeId.from_binary(data) |
|
6019 | self.BrowseDirection = BrowseDirection(uabin.Primitives.UInt32.unpack(data)) |
|
6020 | self.ReferenceTypeId = NodeId.from_binary(data) |
|
6021 | self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data) |
|
6022 | self.NodeClassMask = uabin.Primitives.UInt32.unpack(data) |
|
6023 | self.ResultMask = uabin.Primitives.UInt32.unpack(data) |
|
6024 | ||
6025 | def __str__(self): |
|
6026 | return 'BrowseDescription(' + 'NodeId:' + str(self.NodeId) + ', ' + \ |
|
6027 | 'BrowseDirection:' + str(self.BrowseDirection) + ', ' + \ |
|
6028 | 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
6029 | 'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \ |
|
6030 | 'NodeClassMask:' + str(self.NodeClassMask) + ', ' + \ |
|
6031 | 'ResultMask:' + str(self.ResultMask) + ')' |
|
6032 | ||
6033 | __repr__ = __str__ |
|
6034 | ||
6035 | ||
6036 | class ReferenceDescription(FrozenClass): |
|
@@ 5223-5293 (lines=71) @@ | ||
5220 | __repr__ = __str__ |
|
5221 | ||
5222 | ||
5223 | class AddReferencesItem(FrozenClass): |
|
5224 | ''' |
|
5225 | A request to add a reference to the server address space. |
|
5226 | ||
5227 | :ivar SourceNodeId: |
|
5228 | :vartype SourceNodeId: NodeId |
|
5229 | :ivar ReferenceTypeId: |
|
5230 | :vartype ReferenceTypeId: NodeId |
|
5231 | :ivar IsForward: |
|
5232 | :vartype IsForward: Boolean |
|
5233 | :ivar TargetServerUri: |
|
5234 | :vartype TargetServerUri: String |
|
5235 | :ivar TargetNodeId: |
|
5236 | :vartype TargetNodeId: ExpandedNodeId |
|
5237 | :ivar TargetNodeClass: |
|
5238 | :vartype TargetNodeClass: NodeClass |
|
5239 | ''' |
|
5240 | ||
5241 | ua_types = { |
|
5242 | 'SourceNodeId': 'NodeId', |
|
5243 | 'ReferenceTypeId': 'NodeId', |
|
5244 | 'IsForward': 'Boolean', |
|
5245 | 'TargetServerUri': 'String', |
|
5246 | 'TargetNodeId': 'ExpandedNodeId', |
|
5247 | 'TargetNodeClass': 'NodeClass', |
|
5248 | } |
|
5249 | ||
5250 | def __init__(self, binary=None): |
|
5251 | if binary is not None: |
|
5252 | self._binary_init(binary) |
|
5253 | self._freeze = True |
|
5254 | return |
|
5255 | self.SourceNodeId = NodeId() |
|
5256 | self.ReferenceTypeId = NodeId() |
|
5257 | self.IsForward = True |
|
5258 | self.TargetServerUri = None |
|
5259 | self.TargetNodeId = ExpandedNodeId() |
|
5260 | self.TargetNodeClass = NodeClass(0) |
|
5261 | self._freeze = True |
|
5262 | ||
5263 | def to_binary(self): |
|
5264 | packet = [] |
|
5265 | packet.append(self.SourceNodeId.to_binary()) |
|
5266 | packet.append(self.ReferenceTypeId.to_binary()) |
|
5267 | packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) |
|
5268 | packet.append(uabin.Primitives.String.pack(self.TargetServerUri)) |
|
5269 | packet.append(self.TargetNodeId.to_binary()) |
|
5270 | packet.append(uabin.Primitives.UInt32.pack(self.TargetNodeClass.value)) |
|
5271 | return b''.join(packet) |
|
5272 | ||
5273 | @staticmethod |
|
5274 | def from_binary(data): |
|
5275 | return AddReferencesItem(data) |
|
5276 | ||
5277 | def _binary_init(self, data): |
|
5278 | self.SourceNodeId = NodeId.from_binary(data) |
|
5279 | self.ReferenceTypeId = NodeId.from_binary(data) |
|
5280 | self.IsForward = uabin.Primitives.Boolean.unpack(data) |
|
5281 | self.TargetServerUri = uabin.Primitives.String.unpack(data) |
|
5282 | self.TargetNodeId = ExpandedNodeId.from_binary(data) |
|
5283 | self.TargetNodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) |
|
5284 | ||
5285 | def __str__(self): |
|
5286 | return 'AddReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \ |
|
5287 | 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
|
5288 | 'IsForward:' + str(self.IsForward) + ', ' + \ |
|
5289 | 'TargetServerUri:' + str(self.TargetServerUri) + ', ' + \ |
|
5290 | 'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \ |
|
5291 | 'TargetNodeClass:' + str(self.TargetNodeClass) + ')' |
|
5292 | ||
5293 | __repr__ = __str__ |
|
5294 | ||
5295 | ||
5296 | class AddReferencesRequest(FrozenClass): |
|
@@ 4237-4307 (lines=71) @@ | ||
4234 | __repr__ = __str__ |
|
4235 | ||
4236 | ||
4237 | class ObjectAttributes(FrozenClass): |
|
4238 | ''' |
|
4239 | The attributes for an object node. |
|
4240 | ||
4241 | :ivar SpecifiedAttributes: |
|
4242 | :vartype SpecifiedAttributes: UInt32 |
|
4243 | :ivar DisplayName: |
|
4244 | :vartype DisplayName: LocalizedText |
|
4245 | :ivar Description: |
|
4246 | :vartype Description: LocalizedText |
|
4247 | :ivar WriteMask: |
|
4248 | :vartype WriteMask: UInt32 |
|
4249 | :ivar UserWriteMask: |
|
4250 | :vartype UserWriteMask: UInt32 |
|
4251 | :ivar EventNotifier: |
|
4252 | :vartype EventNotifier: Byte |
|
4253 | ''' |
|
4254 | ||
4255 | ua_types = { |
|
4256 | 'SpecifiedAttributes': 'UInt32', |
|
4257 | 'DisplayName': 'LocalizedText', |
|
4258 | 'Description': 'LocalizedText', |
|
4259 | 'WriteMask': 'UInt32', |
|
4260 | 'UserWriteMask': 'UInt32', |
|
4261 | 'EventNotifier': 'Byte', |
|
4262 | } |
|
4263 | ||
4264 | def __init__(self, binary=None): |
|
4265 | if binary is not None: |
|
4266 | self._binary_init(binary) |
|
4267 | self._freeze = True |
|
4268 | return |
|
4269 | self.SpecifiedAttributes = 0 |
|
4270 | self.DisplayName = LocalizedText() |
|
4271 | self.Description = LocalizedText() |
|
4272 | self.WriteMask = 0 |
|
4273 | self.UserWriteMask = 0 |
|
4274 | self.EventNotifier = 0 |
|
4275 | self._freeze = True |
|
4276 | ||
4277 | def to_binary(self): |
|
4278 | packet = [] |
|
4279 | packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) |
|
4280 | packet.append(self.DisplayName.to_binary()) |
|
4281 | packet.append(self.Description.to_binary()) |
|
4282 | packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) |
|
4283 | packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) |
|
4284 | packet.append(uabin.Primitives.Byte.pack(self.EventNotifier)) |
|
4285 | return b''.join(packet) |
|
4286 | ||
4287 | @staticmethod |
|
4288 | def from_binary(data): |
|
4289 | return ObjectAttributes(data) |
|
4290 | ||
4291 | def _binary_init(self, data): |
|
4292 | self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) |
|
4293 | self.DisplayName = LocalizedText.from_binary(data) |
|
4294 | self.Description = LocalizedText.from_binary(data) |
|
4295 | self.WriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4296 | self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4297 | self.EventNotifier = uabin.Primitives.Byte.unpack(data) |
|
4298 | ||
4299 | def __str__(self): |
|
4300 | return 'ObjectAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
|
4301 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
4302 | 'Description:' + str(self.Description) + ', ' + \ |
|
4303 | 'WriteMask:' + str(self.WriteMask) + ', ' + \ |
|
4304 | 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
|
4305 | 'EventNotifier:' + str(self.EventNotifier) + ')' |
|
4306 | ||
4307 | __repr__ = __str__ |
|
4308 | ||
4309 | ||
4310 | class VariableAttributes(FrozenClass): |
|
@@ 14701-14769 (lines=69) @@ | ||
14698 | __repr__ = __str__ |
|
14699 | ||
14700 | ||
14701 | class ServerStatusDataType(FrozenClass): |
|
14702 | ''' |
|
14703 | :ivar StartTime: |
|
14704 | :vartype StartTime: DateTime |
|
14705 | :ivar CurrentTime: |
|
14706 | :vartype CurrentTime: DateTime |
|
14707 | :ivar State: |
|
14708 | :vartype State: ServerState |
|
14709 | :ivar BuildInfo: |
|
14710 | :vartype BuildInfo: BuildInfo |
|
14711 | :ivar SecondsTillShutdown: |
|
14712 | :vartype SecondsTillShutdown: UInt32 |
|
14713 | :ivar ShutdownReason: |
|
14714 | :vartype ShutdownReason: LocalizedText |
|
14715 | ''' |
|
14716 | ||
14717 | ua_types = { |
|
14718 | 'StartTime': 'DateTime', |
|
14719 | 'CurrentTime': 'DateTime', |
|
14720 | 'State': 'ServerState', |
|
14721 | 'BuildInfo': 'BuildInfo', |
|
14722 | 'SecondsTillShutdown': 'UInt32', |
|
14723 | 'ShutdownReason': 'LocalizedText', |
|
14724 | } |
|
14725 | ||
14726 | def __init__(self, binary=None): |
|
14727 | if binary is not None: |
|
14728 | self._binary_init(binary) |
|
14729 | self._freeze = True |
|
14730 | return |
|
14731 | self.StartTime = datetime.now() |
|
14732 | self.CurrentTime = datetime.now() |
|
14733 | self.State = ServerState(0) |
|
14734 | self.BuildInfo = BuildInfo() |
|
14735 | self.SecondsTillShutdown = 0 |
|
14736 | self.ShutdownReason = LocalizedText() |
|
14737 | self._freeze = True |
|
14738 | ||
14739 | def to_binary(self): |
|
14740 | packet = [] |
|
14741 | packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) |
|
14742 | packet.append(uabin.Primitives.DateTime.pack(self.CurrentTime)) |
|
14743 | packet.append(uabin.Primitives.UInt32.pack(self.State.value)) |
|
14744 | packet.append(self.BuildInfo.to_binary()) |
|
14745 | packet.append(uabin.Primitives.UInt32.pack(self.SecondsTillShutdown)) |
|
14746 | packet.append(self.ShutdownReason.to_binary()) |
|
14747 | return b''.join(packet) |
|
14748 | ||
14749 | @staticmethod |
|
14750 | def from_binary(data): |
|
14751 | return ServerStatusDataType(data) |
|
14752 | ||
14753 | def _binary_init(self, data): |
|
14754 | self.StartTime = uabin.Primitives.DateTime.unpack(data) |
|
14755 | self.CurrentTime = uabin.Primitives.DateTime.unpack(data) |
|
14756 | self.State = ServerState(uabin.Primitives.UInt32.unpack(data)) |
|
14757 | self.BuildInfo = BuildInfo.from_binary(data) |
|
14758 | self.SecondsTillShutdown = uabin.Primitives.UInt32.unpack(data) |
|
14759 | self.ShutdownReason = LocalizedText.from_binary(data) |
|
14760 | ||
14761 | def __str__(self): |
|
14762 | return 'ServerStatusDataType(' + 'StartTime:' + str(self.StartTime) + ', ' + \ |
|
14763 | 'CurrentTime:' + str(self.CurrentTime) + ', ' + \ |
|
14764 | 'State:' + str(self.State) + ', ' + \ |
|
14765 | 'BuildInfo:' + str(self.BuildInfo) + ', ' + \ |
|
14766 | 'SecondsTillShutdown:' + str(self.SecondsTillShutdown) + ', ' + \ |
|
14767 | 'ShutdownReason:' + str(self.ShutdownReason) + ')' |
|
14768 | ||
14769 | __repr__ = __str__ |
|
14770 | ||
14771 | ||
14772 | class SessionDiagnosticsDataType(FrozenClass): |
|
@@ 10961-11022 (lines=62) @@ | ||
10958 | __repr__ = __str__ |
|
10959 | ||
10960 | ||
10961 | class AggregateConfiguration(FrozenClass): |
|
10962 | ''' |
|
10963 | :ivar UseServerCapabilitiesDefaults: |
|
10964 | :vartype UseServerCapabilitiesDefaults: Boolean |
|
10965 | :ivar TreatUncertainAsBad: |
|
10966 | :vartype TreatUncertainAsBad: Boolean |
|
10967 | :ivar PercentDataBad: |
|
10968 | :vartype PercentDataBad: Byte |
|
10969 | :ivar PercentDataGood: |
|
10970 | :vartype PercentDataGood: Byte |
|
10971 | :ivar UseSlopedExtrapolation: |
|
10972 | :vartype UseSlopedExtrapolation: Boolean |
|
10973 | ''' |
|
10974 | ||
10975 | ua_types = { |
|
10976 | 'UseServerCapabilitiesDefaults': 'Boolean', |
|
10977 | 'TreatUncertainAsBad': 'Boolean', |
|
10978 | 'PercentDataBad': 'Byte', |
|
10979 | 'PercentDataGood': 'Byte', |
|
10980 | 'UseSlopedExtrapolation': 'Boolean', |
|
10981 | } |
|
10982 | ||
10983 | def __init__(self, binary=None): |
|
10984 | if binary is not None: |
|
10985 | self._binary_init(binary) |
|
10986 | self._freeze = True |
|
10987 | return |
|
10988 | self.UseServerCapabilitiesDefaults = True |
|
10989 | self.TreatUncertainAsBad = True |
|
10990 | self.PercentDataBad = 0 |
|
10991 | self.PercentDataGood = 0 |
|
10992 | self.UseSlopedExtrapolation = True |
|
10993 | self._freeze = True |
|
10994 | ||
10995 | def to_binary(self): |
|
10996 | packet = [] |
|
10997 | packet.append(uabin.Primitives.Boolean.pack(self.UseServerCapabilitiesDefaults)) |
|
10998 | packet.append(uabin.Primitives.Boolean.pack(self.TreatUncertainAsBad)) |
|
10999 | packet.append(uabin.Primitives.Byte.pack(self.PercentDataBad)) |
|
11000 | packet.append(uabin.Primitives.Byte.pack(self.PercentDataGood)) |
|
11001 | packet.append(uabin.Primitives.Boolean.pack(self.UseSlopedExtrapolation)) |
|
11002 | return b''.join(packet) |
|
11003 | ||
11004 | @staticmethod |
|
11005 | def from_binary(data): |
|
11006 | return AggregateConfiguration(data) |
|
11007 | ||
11008 | def _binary_init(self, data): |
|
11009 | self.UseServerCapabilitiesDefaults = uabin.Primitives.Boolean.unpack(data) |
|
11010 | self.TreatUncertainAsBad = uabin.Primitives.Boolean.unpack(data) |
|
11011 | self.PercentDataBad = uabin.Primitives.Byte.unpack(data) |
|
11012 | self.PercentDataGood = uabin.Primitives.Byte.unpack(data) |
|
11013 | self.UseSlopedExtrapolation = uabin.Primitives.Boolean.unpack(data) |
|
11014 | ||
11015 | def __str__(self): |
|
11016 | return 'AggregateConfiguration(' + 'UseServerCapabilitiesDefaults:' + str(self.UseServerCapabilitiesDefaults) + ', ' + \ |
|
11017 | 'TreatUncertainAsBad:' + str(self.TreatUncertainAsBad) + ', ' + \ |
|
11018 | 'PercentDataBad:' + str(self.PercentDataBad) + ', ' + \ |
|
11019 | 'PercentDataGood:' + str(self.PercentDataGood) + ', ' + \ |
|
11020 | 'UseSlopedExtrapolation:' + str(self.UseSlopedExtrapolation) + ')' |
|
11021 | ||
11022 | __repr__ = __str__ |
|
11023 | ||
11024 | ||
11025 | class AggregateFilter(FrozenClass): |