How to use the udsoncan.__init__.Units.Prefixs.Prefix function in udsoncan

To help you get started, we’ve selected a few udsoncan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
self.symbol = symbol
                self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
            self.symbol = symbol
            self.description = description
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
            self.symbol = symbol
            self.description = description
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
#As defined in ISO-14229:2006 Annex C
    class Prefixs:
        class Prefix:
            def __init__(self, id, name, symbol, description=None):
                self.name = name
                self.id = id
                self.symbol = symbol
                self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
self.name = name
                self.id = id
                self.symbol = symbol
                self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
class Prefix:
            def __init__(self, id, name, symbol, description=None):
                self.name = name
                self.id = id
                self.symbol = symbol
                self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
            self.symbol = symbol
            self.description = description


        def __str__(self):
            return self.name

        def __repr__(self):
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
class Prefixs:
        class Prefix:
            def __init__(self, id, name, symbol, description=None):
                self.name = name
                self.id = id
                self.symbol = symbol
                self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
self.id = id
                self.symbol = symbol
                self.description = description

            def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
            self.symbol = symbol
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
def __str__(self):
                return self.name

            def __repr__(self):
                desc = "(%s) " % self.description if self.description is not None else ""
                return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
            self.symbol = symbol
            self.description = description
github pylessard / python-udsoncan / udsoncan / __init__.py View on Github external
return "" % (self.name, self.symbol, desc, self.id, id(self))
        exa		= Prefix(id=0x40, name= 'exa', 	symbol='E', description='10e18')
        peta	= Prefix(id=0x41, name= 'peta', symbol='P', description='10e15')
        tera	= Prefix(id=0x42, name= 'tera', symbol='T', description='10e12')
        giga	= Prefix(id=0x43, name= 'giga', symbol='G', description='10e9')
        mega	= Prefix(id=0x44, name= 'mega', symbol='M', description='10e6')
        kilo	= Prefix(id=0x45, name= 'kilo', symbol='k', description='10e3')
        hecto	= Prefix(id=0x46, name= 'hecto', symbol='h', description='10e2')
        deca	= Prefix(id=0x47, name= 'deca', symbol='da', description='10e1')
        deci	= Prefix(id=0x48, name= 'deci', symbol='d', description='10e-1')
        centi	= Prefix(id=0x49, name= 'centi', symbol='c', description='10e-2')
        milli	= Prefix(id=0x4A, name= 'milli', symbol='m', description='10e-3')
        micro	= Prefix(id=0x4B, name= 'micro', symbol='m', description='10e-6')
        nano	= Prefix(id=0x4C, name= 'nano', symbol='n', description='10e-9')
        pico	= Prefix(id=0x4D, name= 'pico', symbol='p', description='10e-12')
        femto	= Prefix(id=0x4E, name= 'femto', symbol='f', description='10e-15')
        atto	= Prefix(id=0x4F, name= 'atto', symbol='a', description='10e-18')

    class Unit:
        def __init__(self, id, name, symbol, description=None):
            self.id =id
            self.name = name
            self.symbol = symbol
            self.description = description


        def __str__(self):
            return self.name

        def __repr__(self):
            desc = "(unit of %s) " % self.description if self.description is not None else ""
            return "" % (self.name, self.symbol, desc, self.id, id(self))