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