Code Duplication    Length = 33-40 lines in 2 locations

opcua/ua/uaprotocol_auto.py 2 locations

@@ 2752-2791 (lines=40) @@
2749
    __repr__ = __str__
2750
2751
2752
class NodeAttributes(FrozenClass):
2753
    '''
2754
    The base attributes for all nodes.
2755
2756
    :ivar SpecifiedAttributes:
2757
    :vartype SpecifiedAttributes: UInt32
2758
    :ivar DisplayName:
2759
    :vartype DisplayName: LocalizedText
2760
    :ivar Description:
2761
    :vartype Description: LocalizedText
2762
    :ivar WriteMask:
2763
    :vartype WriteMask: UInt32
2764
    :ivar UserWriteMask:
2765
    :vartype UserWriteMask: UInt32
2766
    '''
2767
2768
    ua_types = [
2769
        ('SpecifiedAttributes', 'UInt32'),
2770
        ('DisplayName', 'LocalizedText'),
2771
        ('Description', 'LocalizedText'),
2772
        ('WriteMask', 'UInt32'),
2773
        ('UserWriteMask', 'UInt32'),
2774
               ]
2775
2776
    def __init__(self):
2777
        self.SpecifiedAttributes = 0
2778
        self.DisplayName = LocalizedText()
2779
        self.Description = LocalizedText()
2780
        self.WriteMask = 0
2781
        self.UserWriteMask = 0
2782
        self._freeze = True
2783
2784
    def __str__(self):
2785
        return 'NodeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \
2786
               'DisplayName:' + str(self.DisplayName) + ', ' + \
2787
               'Description:' + str(self.Description) + ', ' + \
2788
               'WriteMask:' + str(self.WriteMask) + ', ' + \
2789
               'UserWriteMask:' + str(self.UserWriteMask) + ')'
2790
2791
    __repr__ = __str__
2792
2793
2794
class ObjectAttributes(FrozenClass):
@@ 9333-9365 (lines=33) @@
9330
    __repr__ = __str__
9331
9332
9333
class EUInformation(FrozenClass):
9334
    '''
9335
    :ivar NamespaceUri:
9336
    :vartype NamespaceUri: String
9337
    :ivar UnitId:
9338
    :vartype UnitId: Int32
9339
    :ivar DisplayName:
9340
    :vartype DisplayName: LocalizedText
9341
    :ivar Description:
9342
    :vartype Description: LocalizedText
9343
    '''
9344
9345
    ua_types = [
9346
        ('NamespaceUri', 'String'),
9347
        ('UnitId', 'Int32'),
9348
        ('DisplayName', 'LocalizedText'),
9349
        ('Description', 'LocalizedText'),
9350
               ]
9351
9352
    def __init__(self):
9353
        self.NamespaceUri = None
9354
        self.UnitId = 0
9355
        self.DisplayName = LocalizedText()
9356
        self.Description = LocalizedText()
9357
        self._freeze = True
9358
9359
    def __str__(self):
9360
        return 'EUInformation(' + 'NamespaceUri:' + str(self.NamespaceUri) + ', ' + \
9361
               'UnitId:' + str(self.UnitId) + ', ' + \
9362
               'DisplayName:' + str(self.DisplayName) + ', ' + \
9363
               'Description:' + str(self.Description) + ')'
9364
9365
    __repr__ = __str__
9366
9367
9368
class ComplexNumberType(FrozenClass):