Code Duplication    Length = 45-50 lines in 2 locations

opcua/ua/uaprotocol_auto.py 2 locations

@@ 1018-1067 (lines=50) @@
1015
    DataTypeChanged = 16
1016
1017
1018
class AxisScaleEnumeration(IntEnum):
1019
    '''
1020
    :ivar Linear:
1021
    :vartype Linear: 0
1022
    :ivar Log:
1023
    :vartype Log: 1
1024
    :ivar Ln:
1025
    :vartype Ln: 2
1026
    '''
1027
    Linear = 0
1028
    Log = 1
1029
    Ln = 2
1030
1031
1032
class ExceptionDeviationFormat(IntEnum):
1033
    '''
1034
    :ivar AbsoluteValue:
1035
    :vartype AbsoluteValue: 0
1036
    :ivar PercentOfValue:
1037
    :vartype PercentOfValue: 1
1038
    :ivar PercentOfRange:
1039
    :vartype PercentOfRange: 2
1040
    :ivar PercentOfEURange:
1041
    :vartype PercentOfEURange: 3
1042
    :ivar Unknown:
1043
    :vartype Unknown: 4
1044
    '''
1045
    AbsoluteValue = 0
1046
    PercentOfValue = 1
1047
    PercentOfRange = 2
1048
    PercentOfEURange = 3
1049
    Unknown = 4
1050
1051
1052
class DataTypeDefinition(FrozenClass):
1053
    '''
1054
    '''
1055
1056
    ua_types = [
1057
               ]
1058
1059
    def __init__(self):
1060
        self._freeze = True
1061
1062
    def __str__(self):
1063
        return 'DataTypeDefinition(' +  + ')'
1064
1065
    __repr__ = __str__
1066
1067
1068
class DiagnosticInfo(FrozenClass):
1069
    '''
1070
    A recursive structure containing diagnostic information associated with a status code.
@@ 1070-1114 (lines=45) @@
1067
1068
class DiagnosticInfo(FrozenClass):
1069
    '''
1070
    A recursive structure containing diagnostic information associated with a status code.
1071
1072
    :ivar Encoding:
1073
    :vartype Encoding: Byte
1074
    :ivar SymbolicId:
1075
    :vartype SymbolicId: Int32
1076
    :ivar NamespaceURI:
1077
    :vartype NamespaceURI: Int32
1078
    :ivar Locale:
1079
    :vartype Locale: Int32
1080
    :ivar LocalizedText:
1081
    :vartype LocalizedText: Int32
1082
    :ivar AdditionalInfo:
1083
    :vartype AdditionalInfo: String
1084
    :ivar InnerStatusCode:
1085
    :vartype InnerStatusCode: StatusCode
1086
    :ivar InnerDiagnosticInfo:
1087
    :vartype InnerDiagnosticInfo: DiagnosticInfo
1088
    '''
1089
1090
    ua_switches = {
1091
        'SymbolicId': ('Encoding', 0),
1092
        'NamespaceURI': ('Encoding', 1),
1093
        'Locale': ('Encoding', 2),
1094
        'LocalizedText': ('Encoding', 3),
1095
        'AdditionalInfo': ('Encoding', 4),
1096
        'InnerStatusCode': ('Encoding', 5),
1097
        'InnerDiagnosticInfo': ('Encoding', 6),
1098
               }
1099
    ua_types = [
1100
        ('Encoding', 'Byte'),
1101
        ('SymbolicId', 'Int32'),
1102
        ('NamespaceURI', 'Int32'),
1103
        ('Locale', 'Int32'),
1104
        ('LocalizedText', 'Int32'),
1105
        ('AdditionalInfo', 'String'),
1106
        ('InnerStatusCode', 'StatusCode'),
1107
        ('InnerDiagnosticInfo', 'DiagnosticInfo'),
1108
               ]
1109
1110
    def __init__(self):
1111
        self.Encoding = 0
1112
        self.SymbolicId = None
1113
        self.NamespaceURI = None
1114
        self.Locale = None
1115
        self.LocalizedText = None
1116
        self.AdditionalInfo = None
1117
        self.InnerStatusCode = None