@@ 12744-12812 (lines=69) @@ | ||
12741 | __repr__ = __str__ |
|
12742 | ||
12743 | ||
12744 | class ModifySubscriptionParameters(FrozenClass): |
|
12745 | ''' |
|
12746 | :ivar SubscriptionId: |
|
12747 | :vartype SubscriptionId: UInt32 |
|
12748 | :ivar RequestedPublishingInterval: |
|
12749 | :vartype RequestedPublishingInterval: Double |
|
12750 | :ivar RequestedLifetimeCount: |
|
12751 | :vartype RequestedLifetimeCount: UInt32 |
|
12752 | :ivar RequestedMaxKeepAliveCount: |
|
12753 | :vartype RequestedMaxKeepAliveCount: UInt32 |
|
12754 | :ivar MaxNotificationsPerPublish: |
|
12755 | :vartype MaxNotificationsPerPublish: UInt32 |
|
12756 | :ivar Priority: |
|
12757 | :vartype Priority: Byte |
|
12758 | ''' |
|
12759 | ||
12760 | ua_types = { |
|
12761 | 'SubscriptionId': 'UInt32', |
|
12762 | 'RequestedPublishingInterval': 'Double', |
|
12763 | 'RequestedLifetimeCount': 'UInt32', |
|
12764 | 'RequestedMaxKeepAliveCount': 'UInt32', |
|
12765 | 'MaxNotificationsPerPublish': 'UInt32', |
|
12766 | 'Priority': 'Byte', |
|
12767 | } |
|
12768 | ||
12769 | def __init__(self, binary=None): |
|
12770 | if binary is not None: |
|
12771 | self._binary_init(binary) |
|
12772 | self._freeze = True |
|
12773 | return |
|
12774 | self.SubscriptionId = 0 |
|
12775 | self.RequestedPublishingInterval = 0 |
|
12776 | self.RequestedLifetimeCount = 0 |
|
12777 | self.RequestedMaxKeepAliveCount = 0 |
|
12778 | self.MaxNotificationsPerPublish = 0 |
|
12779 | self.Priority = 0 |
|
12780 | self._freeze = True |
|
12781 | ||
12782 | def to_binary(self): |
|
12783 | packet = [] |
|
12784 | packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) |
|
12785 | packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval)) |
|
12786 | packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount)) |
|
12787 | packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount)) |
|
12788 | packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish)) |
|
12789 | packet.append(uabin.Primitives.Byte.pack(self.Priority)) |
|
12790 | return b''.join(packet) |
|
12791 | ||
12792 | @staticmethod |
|
12793 | def from_binary(data): |
|
12794 | return ModifySubscriptionParameters(data) |
|
12795 | ||
12796 | def _binary_init(self, data): |
|
12797 | self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) |
|
12798 | self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data) |
|
12799 | self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data) |
|
12800 | self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) |
|
12801 | self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data) |
|
12802 | self.Priority = uabin.Primitives.Byte.unpack(data) |
|
12803 | ||
12804 | def __str__(self): |
|
12805 | return 'ModifySubscriptionParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ |
|
12806 | 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \ |
|
12807 | 'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \ |
|
12808 | 'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \ |
|
12809 | 'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ |
|
12810 | 'Priority:' + str(self.Priority) + ')' |
|
12811 | ||
12812 | __repr__ = __str__ |
|
12813 | ||
12814 | ||
12815 | class ModifySubscriptionRequest(FrozenClass): |
|
@@ 12516-12584 (lines=69) @@ | ||
12513 | __repr__ = __str__ |
|
12514 | ||
12515 | ||
12516 | class CreateSubscriptionParameters(FrozenClass): |
|
12517 | ''' |
|
12518 | :ivar RequestedPublishingInterval: |
|
12519 | :vartype RequestedPublishingInterval: Double |
|
12520 | :ivar RequestedLifetimeCount: |
|
12521 | :vartype RequestedLifetimeCount: UInt32 |
|
12522 | :ivar RequestedMaxKeepAliveCount: |
|
12523 | :vartype RequestedMaxKeepAliveCount: UInt32 |
|
12524 | :ivar MaxNotificationsPerPublish: |
|
12525 | :vartype MaxNotificationsPerPublish: UInt32 |
|
12526 | :ivar PublishingEnabled: |
|
12527 | :vartype PublishingEnabled: Boolean |
|
12528 | :ivar Priority: |
|
12529 | :vartype Priority: Byte |
|
12530 | ''' |
|
12531 | ||
12532 | ua_types = { |
|
12533 | 'RequestedPublishingInterval': 'Double', |
|
12534 | 'RequestedLifetimeCount': 'UInt32', |
|
12535 | 'RequestedMaxKeepAliveCount': 'UInt32', |
|
12536 | 'MaxNotificationsPerPublish': 'UInt32', |
|
12537 | 'PublishingEnabled': 'Boolean', |
|
12538 | 'Priority': 'Byte', |
|
12539 | } |
|
12540 | ||
12541 | def __init__(self, binary=None): |
|
12542 | if binary is not None: |
|
12543 | self._binary_init(binary) |
|
12544 | self._freeze = True |
|
12545 | return |
|
12546 | self.RequestedPublishingInterval = 0 |
|
12547 | self.RequestedLifetimeCount = 0 |
|
12548 | self.RequestedMaxKeepAliveCount = 0 |
|
12549 | self.MaxNotificationsPerPublish = 0 |
|
12550 | self.PublishingEnabled = True |
|
12551 | self.Priority = 0 |
|
12552 | self._freeze = True |
|
12553 | ||
12554 | def to_binary(self): |
|
12555 | packet = [] |
|
12556 | packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval)) |
|
12557 | packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount)) |
|
12558 | packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount)) |
|
12559 | packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish)) |
|
12560 | packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled)) |
|
12561 | packet.append(uabin.Primitives.Byte.pack(self.Priority)) |
|
12562 | return b''.join(packet) |
|
12563 | ||
12564 | @staticmethod |
|
12565 | def from_binary(data): |
|
12566 | return CreateSubscriptionParameters(data) |
|
12567 | ||
12568 | def _binary_init(self, data): |
|
12569 | self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data) |
|
12570 | self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data) |
|
12571 | self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) |
|
12572 | self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data) |
|
12573 | self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data) |
|
12574 | self.Priority = uabin.Primitives.Byte.unpack(data) |
|
12575 | ||
12576 | def __str__(self): |
|
12577 | return 'CreateSubscriptionParameters(' + 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \ |
|
12578 | 'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \ |
|
12579 | 'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \ |
|
12580 | 'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ |
|
12581 | 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ |
|
12582 | 'Priority:' + str(self.Priority) + ')' |
|
12583 | ||
12584 | __repr__ = __str__ |
|
12585 | ||
12586 | ||
12587 | class CreateSubscriptionRequest(FrozenClass): |