Ejemplo n.º 1
0
class Model7(EepromModel):
    """ Dummy model with multiple fields, including eext fields and an id. """
    id = EepromId(3)
    name = EepromString(10, lambda id: (id, 4))
    link = EepromByte(lambda id: (id, 14))
    room = EextByte()
Ejemplo n.º 2
0
class Model8(EepromModel):
    """ Dummy model with multiple fields, including eext fields, without an id. """
    name = EepromString(10, (1, 4))
    link = EepromByte((1, 14))
    room = EextByte()
Ejemplo n.º 3
0
class Model5(EepromModel):
    """ Dummy model with multiple fields and an id. """
    id = EepromId(3)
    name = EepromString(10, lambda id: (3 + id, 4))
    link = EepromByte(lambda id: (3 + id, 14))
    out = EepromWord(lambda id: (3 + id, 15))
Ejemplo n.º 4
0
class Model6(EepromModel):
    """ Dummy model with a CompositeDataType. """
    name = EepromString(10, (3, 4))
    status = CompositeDataType([('link', EepromByte((3, 14))),
                                ('out', EepromWord((3, 15)))])
Ejemplo n.º 5
0
class Model4(EepromModel):
    """ Dummy model with a dynamic maximum id. """
    id = EepromId(10, address=EepromAddress(0, 0, 1), multiplier=2)
    name = EepromString(10, lambda id: (1, 2 + id * 10))
Ejemplo n.º 6
0
class Model3(EepromModel):
    """ Dummy model with multiple fields. """
    name = EepromString(10, (3, 4))
    link = EepromByte((3, 14))
    out = EepromWord((3, 15))
Ejemplo n.º 7
0
class Model2(EepromModel):
    """ Dummy model without an id. """
    name = EepromString(100, (3, 4))
Ejemplo n.º 8
0
class Model1(EepromModel):
    """ Dummy model with an id. """
    id = EepromId(10)
    name = EepromString(100, lambda id: (1, 2 + id))
Ejemplo n.º 9
0
 class RoModel(EepromModel):
     """ Dummy model. """
     id = EepromId(10)
     name = EepromString(100, lambda id: (1, 2 + id))
     other = EepromByte(lambda id: (2, 2 + id), read_only=True)