class OutputConfiguration(EepromModel): """ Models an output. The maximum number of inputs is 240 (30 modules), the actual number of outputs is 8 times the number of output modules (eeprom address 0, 2). """ id = EepromId(240, address=EepromAddress(0, 2, 1), multiplier=8) module_type = EepromString(1, lambda mid: (33 + mid / 8, 0), read_only=True, shared=True) name = EepromString(16, page_per_module(8, 33, 20, 16)) timer = EepromWord(page_per_module(8, 33, 4, 2)) floor = EepromByte(page_per_module(8, 33, 157, 1)) type = EepromByte(page_per_module(8, 33, 149, 1)) can_led_1_id = EepromByte(gen_address(221, 32, 0)) can_led_1_function = EepromEnum(gen_address(221, 32, 1), get_led_functions()) can_led_2_id = EepromByte(gen_address(221, 32, 2)) can_led_2_function = EepromEnum(gen_address(221, 32, 3), get_led_functions()) can_led_3_id = EepromByte(gen_address(221, 32, 4)) can_led_3_function = EepromEnum(gen_address(221, 32, 5), get_led_functions()) can_led_4_id = EepromByte(gen_address(221, 32, 6)) can_led_4_function = EepromEnum(gen_address(221, 32, 7), get_led_functions()) room = EextByte()
class ShutterConfiguration(EepromModel): """ Models a shutter. The maximum number of shutters is 120 (30 modules), the actual number of shutters is 4 times the number of shutter modules (eeprom address 0, 3). """ id = EepromId(240, address=EepromAddress(0, 3, 1), multiplier=4) timer_up = EepromByte(page_per_module(4, 33, 177, 2)) timer_down = EepromByte(page_per_module(4, 33, 178, 2)) up_down_config = EepromByte(page_per_module(4, 33, 185, 1)) name = EepromString(16, page_per_module(4, 33, 189, 16)) group_1 = EepromByte(lambda mid: (63, (mid * 2) + 0)) group_2 = EepromByte(lambda mid: (63, (mid * 2) + 1)) room = EextByte()
class InputConfiguration(EepromModel): """ Models an input. The maximum number of inputs is 240 (30 modules), the actual number of inputs is 8 times the number of input modules (eeprom address 0, 1). """ id = EepromId(240, address=EepromAddress(0, 1, 1), multiplier=8) module_type = EepromString(1, lambda mid: (2 + mid / 8, 0), read_only=True) name = EepromString( 8, per_module( 8, lambda mid, iid: (115 + (mid / 4), 64 * (mid % 4) + 8 * iid))) action = EepromByte(page_per_module(8, 2, 4, 1)) basic_actions = EepromActions(15, page_per_module(8, 2, 12, 30)) invert = EepromByte(lambda mid: (32, mid)) room = EextByte() can = EepromString(1, lambda mid: (2 + mid / 8, 252), read_only=True)