Example #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()
Example #2
0
class Model9(EepromModel):
    """ Dummy model with multiple fields, including eext fields, without an id. """
    id = EepromId(10)
    name = EextString()
    floor = EextByte()
Example #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))
Example #4
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))
Example #5
0
class Model1(EepromModel):
    """ Dummy model with an id. """
    id = EepromId(10)
    name = EepromString(100, lambda id: (1, 2 + id))
Example #6
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)
Example #7
0
 class TestModel(EepromModel):
     id = EepromId(102)
     normal_eeprom_field = EepromByte((0, 6))
     int_field = EextByte()
     str_field = EextString()