Code Duplication    Length = 43-43 lines in 2 locations

opcua/ua/uaprotocol_auto.py 2 locations

@@ 7618-7660 (lines=43) @@
7615
    __repr__ = __str__
7616
7617
7618
class ModifySubscriptionParameters(FrozenClass):
7619
    '''
7620
    :ivar SubscriptionId:
7621
    :vartype SubscriptionId: UInt32
7622
    :ivar RequestedPublishingInterval:
7623
    :vartype RequestedPublishingInterval: Double
7624
    :ivar RequestedLifetimeCount:
7625
    :vartype RequestedLifetimeCount: UInt32
7626
    :ivar RequestedMaxKeepAliveCount:
7627
    :vartype RequestedMaxKeepAliveCount: UInt32
7628
    :ivar MaxNotificationsPerPublish:
7629
    :vartype MaxNotificationsPerPublish: UInt32
7630
    :ivar Priority:
7631
    :vartype Priority: Byte
7632
    '''
7633
7634
    ua_types = [
7635
        ('SubscriptionId', 'UInt32'),
7636
        ('RequestedPublishingInterval', 'Double'),
7637
        ('RequestedLifetimeCount', 'UInt32'),
7638
        ('RequestedMaxKeepAliveCount', 'UInt32'),
7639
        ('MaxNotificationsPerPublish', 'UInt32'),
7640
        ('Priority', 'Byte'),
7641
               ]
7642
7643
    def __init__(self):
7644
        self.SubscriptionId = 0
7645
        self.RequestedPublishingInterval = 0
7646
        self.RequestedLifetimeCount = 0
7647
        self.RequestedMaxKeepAliveCount = 0
7648
        self.MaxNotificationsPerPublish = 0
7649
        self.Priority = 0
7650
        self._freeze = True
7651
7652
    def __str__(self):
7653
        return 'ModifySubscriptionParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \
7654
               'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \
7655
               'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \
7656
               'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \
7657
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
7658
               'Priority:' + str(self.Priority) + ')'
7659
7660
    __repr__ = __str__
7661
7662
7663
class ModifySubscriptionRequest(FrozenClass):
@@ 7478-7520 (lines=43) @@
7475
    __repr__ = __str__
7476
7477
7478
class CreateSubscriptionParameters(FrozenClass):
7479
    '''
7480
    :ivar RequestedPublishingInterval:
7481
    :vartype RequestedPublishingInterval: Double
7482
    :ivar RequestedLifetimeCount:
7483
    :vartype RequestedLifetimeCount: UInt32
7484
    :ivar RequestedMaxKeepAliveCount:
7485
    :vartype RequestedMaxKeepAliveCount: UInt32
7486
    :ivar MaxNotificationsPerPublish:
7487
    :vartype MaxNotificationsPerPublish: UInt32
7488
    :ivar PublishingEnabled:
7489
    :vartype PublishingEnabled: Boolean
7490
    :ivar Priority:
7491
    :vartype Priority: Byte
7492
    '''
7493
7494
    ua_types = [
7495
        ('RequestedPublishingInterval', 'Double'),
7496
        ('RequestedLifetimeCount', 'UInt32'),
7497
        ('RequestedMaxKeepAliveCount', 'UInt32'),
7498
        ('MaxNotificationsPerPublish', 'UInt32'),
7499
        ('PublishingEnabled', 'Boolean'),
7500
        ('Priority', 'Byte'),
7501
               ]
7502
7503
    def __init__(self):
7504
        self.RequestedPublishingInterval = 0
7505
        self.RequestedLifetimeCount = 0
7506
        self.RequestedMaxKeepAliveCount = 0
7507
        self.MaxNotificationsPerPublish = 0
7508
        self.PublishingEnabled = True
7509
        self.Priority = 0
7510
        self._freeze = True
7511
7512
    def __str__(self):
7513
        return 'CreateSubscriptionParameters(' + 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \
7514
               'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \
7515
               'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \
7516
               'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \
7517
               'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \
7518
               'Priority:' + str(self.Priority) + ')'
7519
7520
    __repr__ = __str__
7521
7522
7523
class CreateSubscriptionRequest(FrozenClass):