@@ 4798-4871 (lines=74) @@ | ||
4795 | __repr__ = __str__ |
|
4796 | ||
4797 | ||
4798 | class ViewAttributes(FrozenClass): |
|
4799 | ''' |
|
4800 | The attributes for a view node. |
|
4801 | ||
4802 | :ivar SpecifiedAttributes: |
|
4803 | :vartype SpecifiedAttributes: UInt32 |
|
4804 | :ivar DisplayName: |
|
4805 | :vartype DisplayName: LocalizedText |
|
4806 | :ivar Description: |
|
4807 | :vartype Description: LocalizedText |
|
4808 | :ivar WriteMask: |
|
4809 | :vartype WriteMask: UInt32 |
|
4810 | :ivar UserWriteMask: |
|
4811 | :vartype UserWriteMask: UInt32 |
|
4812 | :ivar ContainsNoLoops: |
|
4813 | :vartype ContainsNoLoops: Boolean |
|
4814 | :ivar EventNotifier: |
|
4815 | :vartype EventNotifier: Byte |
|
4816 | ''' |
|
4817 | ||
4818 | ua_types = [ |
|
4819 | ||
4820 | ('SpecifiedAttributes', 'UInt32'), |
|
4821 | ('DisplayName', 'LocalizedText'), |
|
4822 | ('Description', 'LocalizedText'), |
|
4823 | ('WriteMask', 'UInt32'), |
|
4824 | ('UserWriteMask', 'UInt32'), |
|
4825 | ('ContainsNoLoops', 'Boolean'), |
|
4826 | ('EventNotifier', 'Byte'), |
|
4827 | ] |
|
4828 | ||
4829 | def __init__(self): |
|
4830 | self.SpecifiedAttributes = 0 |
|
4831 | self.DisplayName = LocalizedText() |
|
4832 | self.Description = LocalizedText() |
|
4833 | self.WriteMask = 0 |
|
4834 | self.UserWriteMask = 0 |
|
4835 | self.ContainsNoLoops = True |
|
4836 | self.EventNotifier = 0 |
|
4837 | self._freeze = True |
|
4838 | ||
4839 | def to_binary(self): |
|
4840 | packet = [] |
|
4841 | packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) |
|
4842 | packet.append(self.DisplayName.to_binary()) |
|
4843 | packet.append(self.Description.to_binary()) |
|
4844 | packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) |
|
4845 | packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) |
|
4846 | packet.append(uabin.Primitives.Boolean.pack(self.ContainsNoLoops)) |
|
4847 | packet.append(uabin.Primitives.Byte.pack(self.EventNotifier)) |
|
4848 | return b''.join(packet) |
|
4849 | ||
4850 | @staticmethod |
|
4851 | def from_binary(data): |
|
4852 | obj = ViewAttributes() |
|
4853 | self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) |
|
4854 | obj.DisplayName = LocalizedText.from_binary(data) |
|
4855 | obj.Description = LocalizedText.from_binary(data) |
|
4856 | self.WriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4857 | self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4858 | self.ContainsNoLoops = uabin.Primitives.Boolean.unpack(data) |
|
4859 | self.EventNotifier = uabin.Primitives.Byte.unpack(data) |
|
4860 | return obj |
|
4861 | ||
4862 | def __str__(self): |
|
4863 | return 'ViewAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
|
4864 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
4865 | 'Description:' + str(self.Description) + ', ' + \ |
|
4866 | 'WriteMask:' + str(self.WriteMask) + ', ' + \ |
|
4867 | 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
|
4868 | 'ContainsNoLoops:' + str(self.ContainsNoLoops) + ', ' + \ |
|
4869 | 'EventNotifier:' + str(self.EventNotifier) + ')' |
|
4870 | ||
4871 | __repr__ = __str__ |
|
4872 | ||
4873 | ||
4874 | class AddNodesItem(FrozenClass): |
|
@@ 4402-4475 (lines=74) @@ | ||
4399 | __repr__ = __str__ |
|
4400 | ||
4401 | ||
4402 | class MethodAttributes(FrozenClass): |
|
4403 | ''' |
|
4404 | The attributes for a method node. |
|
4405 | ||
4406 | :ivar SpecifiedAttributes: |
|
4407 | :vartype SpecifiedAttributes: UInt32 |
|
4408 | :ivar DisplayName: |
|
4409 | :vartype DisplayName: LocalizedText |
|
4410 | :ivar Description: |
|
4411 | :vartype Description: LocalizedText |
|
4412 | :ivar WriteMask: |
|
4413 | :vartype WriteMask: UInt32 |
|
4414 | :ivar UserWriteMask: |
|
4415 | :vartype UserWriteMask: UInt32 |
|
4416 | :ivar Executable: |
|
4417 | :vartype Executable: Boolean |
|
4418 | :ivar UserExecutable: |
|
4419 | :vartype UserExecutable: Boolean |
|
4420 | ''' |
|
4421 | ||
4422 | ua_types = [ |
|
4423 | ||
4424 | ('SpecifiedAttributes', 'UInt32'), |
|
4425 | ('DisplayName', 'LocalizedText'), |
|
4426 | ('Description', 'LocalizedText'), |
|
4427 | ('WriteMask', 'UInt32'), |
|
4428 | ('UserWriteMask', 'UInt32'), |
|
4429 | ('Executable', 'Boolean'), |
|
4430 | ('UserExecutable', 'Boolean'), |
|
4431 | ] |
|
4432 | ||
4433 | def __init__(self): |
|
4434 | self.SpecifiedAttributes = 0 |
|
4435 | self.DisplayName = LocalizedText() |
|
4436 | self.Description = LocalizedText() |
|
4437 | self.WriteMask = 0 |
|
4438 | self.UserWriteMask = 0 |
|
4439 | self.Executable = True |
|
4440 | self.UserExecutable = True |
|
4441 | self._freeze = True |
|
4442 | ||
4443 | def to_binary(self): |
|
4444 | packet = [] |
|
4445 | packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) |
|
4446 | packet.append(self.DisplayName.to_binary()) |
|
4447 | packet.append(self.Description.to_binary()) |
|
4448 | packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) |
|
4449 | packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) |
|
4450 | packet.append(uabin.Primitives.Boolean.pack(self.Executable)) |
|
4451 | packet.append(uabin.Primitives.Boolean.pack(self.UserExecutable)) |
|
4452 | return b''.join(packet) |
|
4453 | ||
4454 | @staticmethod |
|
4455 | def from_binary(data): |
|
4456 | obj = MethodAttributes() |
|
4457 | self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) |
|
4458 | obj.DisplayName = LocalizedText.from_binary(data) |
|
4459 | obj.Description = LocalizedText.from_binary(data) |
|
4460 | self.WriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4461 | self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) |
|
4462 | self.Executable = uabin.Primitives.Boolean.unpack(data) |
|
4463 | self.UserExecutable = uabin.Primitives.Boolean.unpack(data) |
|
4464 | return obj |
|
4465 | ||
4466 | def __str__(self): |
|
4467 | return 'MethodAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ |
|
4468 | 'DisplayName:' + str(self.DisplayName) + ', ' + \ |
|
4469 | 'Description:' + str(self.Description) + ', ' + \ |
|
4470 | 'WriteMask:' + str(self.WriteMask) + ', ' + \ |
|
4471 | 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ |
|
4472 | 'Executable:' + str(self.Executable) + ', ' + \ |
|
4473 | 'UserExecutable:' + str(self.UserExecutable) + ')' |
|
4474 | ||
4475 | __repr__ = __str__ |
|
4476 | ||
4477 | ||
4478 | class ObjectTypeAttributes(FrozenClass): |