Exemplo n.º 1
0
 def apply(cls, ws):
     package = ws.getDataTypePackage()
     if package.find(cls.__name__) is None:
         package.createIntegerDataType(cls.__name__,
                                       min=cls.minValue,
                                       max=cls.maxValue,
                                       offset=0,
                                       scaling=1,
                                       unit='1')
Exemplo n.º 2
0
 def _createDefaultDataTypes(cls, package):
     package.createBooleanDataType('Boolean')
     package.createIntegerDataType('SInt8', -128, 127)
     package.createIntegerDataType('SInt16', -32768, 32767)
     package.createIntegerDataType('SInt32', -2147483648, 2147483647)
     package.createIntegerDataType('UInt8', 0, 255)
     package.createIntegerDataType('UInt16', 0, 65535)
     package.createIntegerDataType('UInt32', 0, 4294967295)
     package.createRealDataType('Float',
                                None,
                                None,
                                minValType='INFINITE',
                                maxValType='INFINITE')
     package.createRealDataType('Double',
                                None,
                                None,
                                minValType='INFINITE',
                                maxValType='INFINITE',
                                hasNaN=True,
                                encoding='DOUBLE')
Exemplo n.º 3
0
 def _createDefaultDataTypes(cls, package):
    package.createBooleanDataType('Boolean')
    package.createIntegerDataType('SInt8', -128, 127)
    package.createIntegerDataType('SInt16', -32768, 32767)
    package.createIntegerDataType('SInt32', -2147483648, 2147483647)
    package.createIntegerDataType('UInt8', 0, 255)
    package.createIntegerDataType('UInt16', 0, 65535)
    package.createIntegerDataType('UInt32', 0, 4294967295)   
    package.createRealDataType('Float', None, None, minValType='INFINITE', maxValType='INFINITE')
    package.createRealDataType('Double', None, None, minValType='INFINITE', maxValType='INFINITE', hasNaN=True, encoding='DOUBLE')