diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h index 79f11b865..7a33f6a30 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h @@ -7,39 +7,12 @@ extern const bclass be_class_Matter_Plugin_Sensor_Contact; /******************************************************************** -** Solidified function: +** Solidified function: append_state_json ********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */ +be_local_closure(Matter_Plugin_Sensor_Contact_append_state_json, /* name */ be_nested_proto( - 3, /* nstack */ + 5, /* nstack */ 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Contact_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -47,23 +20,60 @@ be_local_closure(Matter_Plugin_Sensor_Contact_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), + /* K0 */ be_nested_str_weak(_X2C_X22Contact_X22_X3A_X25s), /* K1 */ be_nested_str_weak(shadow_contact), }), - be_str_weak(init), + be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C040400, // 0005 CALL R1 2 + 0x80040200, // 0006 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Contact_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_switch_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 }) ) ); @@ -145,6 +155,125 @@ be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Contact_update_virtual, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Contact), + /* K2 */ be_nested_str_weak(shadow_contact), + /* K3 */ be_nested_str_weak(attribute_updated), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x8C080300, // 0000 GETMET R2 R1 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E000B, // 0005 JMPF R3 #0012 + 0x600C0017, // 0006 GETGBL R3 G23 + 0x5C100400, // 0007 MOVE R4 R2 + 0x7C0C0200, // 0008 CALL R3 1 + 0x5C080600, // 0009 MOVE R2 R3 + 0x880C0102, // 000A GETMBR R3 R0 K2 + 0x200C0602, // 000B NE R3 R3 R2 + 0x780E0004, // 000C JMPF R3 #0012 + 0x8C0C0103, // 000D GETMET R3 R0 K3 + 0x54160044, // 000E LDINT R5 69 + 0x58180004, // 000F LDCONST R6 K4 + 0x7C0C0600, // 0010 CALL R3 3 + 0x90020402, // 0011 SETMBR R0 K2 R2 + 0x600C0003, // 0012 GETGBL R3 G3 + 0x5C100000, // 0013 MOVE R4 R0 + 0x7C0C0200, // 0014 CALL R3 1 + 0x8C0C0705, // 0015 GETMET R3 R3 K5 + 0x5C140200, // 0016 MOVE R5 R1 + 0x7C0C0400, // 0017 CALL R3 2 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Contact_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_contact), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -234,135 +363,6 @@ be_local_closure(Matter_Plugin_Sensor_Contact_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Contact_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Contact_update_virtual, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Contact), - /* K2 */ be_nested_str_weak(shadow_contact), - /* K3 */ be_nested_str_weak(attribute_updated), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x8C080300, // 0000 GETMET R2 R1 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x7C080400, // 0002 CALL R2 2 - 0x4C0C0000, // 0003 LDNIL R3 - 0x200C0403, // 0004 NE R3 R2 R3 - 0x780E000B, // 0005 JMPF R3 #0012 - 0x600C0017, // 0006 GETGBL R3 G23 - 0x5C100400, // 0007 MOVE R4 R2 - 0x7C0C0200, // 0008 CALL R3 1 - 0x5C080600, // 0009 MOVE R2 R3 - 0x880C0102, // 000A GETMBR R3 R0 K2 - 0x200C0602, // 000B NE R3 R3 R2 - 0x780E0004, // 000C JMPF R3 #0012 - 0x8C0C0103, // 000D GETMET R3 R0 K3 - 0x54160044, // 000E LDINT R5 69 - 0x58180004, // 000F LDCONST R6 K4 - 0x7C0C0600, // 0010 CALL R3 3 - 0x90020402, // 0011 SETMBR R0 K2 R2 - 0x600C0003, // 0012 GETGBL R3 G3 - 0x5C100000, // 0013 MOVE R4 R0 - 0x7C0C0200, // 0014 CALL R3 1 - 0x8C0C0705, // 0015 GETMET R3 R3 K5 - 0x5C140200, // 0016 MOVE R5 R1 - 0x7C0C0400, // 0017 CALL R3 2 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: append_state_json -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Contact_append_state_json, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(_X2C_X22Contact_X22_X3A_X25s), - /* K1 */ be_nested_str_weak(shadow_contact), - }), - be_str_weak(append_state_json), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x60040018, // 0000 GETGBL R1 G24 - 0x58080000, // 0001 LDCONST R2 K0 - 0x600C0009, // 0002 GETGBL R3 G9 - 0x88100101, // 0003 GETMBR R4 R0 K1 - 0x7C0C0200, // 0004 CALL R3 1 - 0x7C040400, // 0005 CALL R1 2 - 0x80040200, // 0006 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Contact ********************************************************************/ @@ -370,19 +370,22 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Contact, 2, &be_class_Matter_Plugin_Device, - be_nested_map(16, + be_nested_map(17, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 6), be_const_static_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(shadow_contact, 4), be_const_var(1) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Sensor_Contact_init_closure) }, + { be_const_key_weak(read_attribute, 12), be_const_closure(Matter_Plugin_Sensor_Contact_read_attribute_closure) }, { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Sensor_Contact_append_state_json_closure) }, - { be_const_key_weak(update_shadow, 12), be_const_closure(Matter_Plugin_Sensor_Contact_update_shadow_closure) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Sensor_Contact_init_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(21, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, + { be_const_key_weak(shadow_contact, 16), be_const_var(1) }, { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Sensor_Contact_update_virtual_closure) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) }, - { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(ARG, 7), be_nested_str_weak(switch) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -441,15 +444,17 @@ be_local_class(Matter_Plugin_Sensor_Contact, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPES, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(21, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, - { be_const_key_weak(TYPE, 9), be_nested_str_weak(contact) }, - { be_const_key_weak(read_attribute, 15), be_const_closure(Matter_Plugin_Sensor_Contact_read_attribute_closure) }, { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, + { be_const_key_weak(DISPLAY_NAME, 0), be_nested_str_weak(Contact) }, + { be_const_key_weak(ARG_TYPE, 13), be_const_static_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(contact) }, + { be_const_key_weak(UPDATE_COMMANDS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Contact), + })) ) } )) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Contact_update_shadow_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Contact) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h index fd236778f..a2585b7a0 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h @@ -6,33 +6,6 @@ extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: append_state_json ********************************************************************/ @@ -67,46 +40,9 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_append_state_json, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: parse_configuration ********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Occupancy_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_occupancy), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ +be_local_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */ be_nested_proto( 7, /* nstack */ 2, /* argc */ @@ -116,42 +52,28 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Occupancy), - /* K2 */ be_nested_str_weak(shadow_occupancy), - /* K3 */ be_nested_str_weak(attribute_updated), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_switch_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(update_virtual), }), - be_str_weak(update_virtual), + be_str_weak(parse_configuration), &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x8C080300, // 0000 GETMET R2 R1 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x7C080400, // 0002 CALL R2 2 - 0x4C0C0000, // 0003 LDNIL R3 - 0x200C0403, // 0004 NE R3 R2 R3 - 0x780E000B, // 0005 JMPF R3 #0012 - 0x600C0017, // 0006 GETGBL R3 G23 - 0x5C100400, // 0007 MOVE R4 R2 - 0x7C0C0200, // 0008 CALL R3 1 - 0x5C080600, // 0009 MOVE R2 R3 - 0x880C0102, // 000A GETMBR R3 R0 K2 - 0x200C0602, // 000B NE R3 R3 R2 - 0x780E0004, // 000C JMPF R3 #0012 - 0x8C0C0103, // 000D GETMET R3 R0 K3 - 0x54160405, // 000E LDINT R5 1030 - 0x58180004, // 000F LDCONST R6 K4 - 0x7C0C0600, // 0010 CALL R3 3 - 0x90020402, // 0011 SETMBR R0 K2 R2 - 0x600C0003, // 0012 GETGBL R3 G3 - 0x5C100000, // 0013 MOVE R4 R0 - 0x7C0C0200, // 0014 CALL R3 1 - 0x8C0C0705, // 0015 GETMET R3 R3 K5 - 0x5C140200, // 0016 MOVE R5 R1 - 0x7C0C0400, // 0017 CALL R3 2 - 0x80000000, // 0018 RET 0 + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 }) ) ); @@ -236,6 +158,125 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Occupancy), + /* K2 */ be_nested_str_weak(shadow_occupancy), + /* K3 */ be_nested_str_weak(attribute_updated), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x8C080300, // 0000 GETMET R2 R1 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E000B, // 0005 JMPF R3 #0012 + 0x600C0017, // 0006 GETGBL R3 G23 + 0x5C100400, // 0007 MOVE R4 R2 + 0x7C0C0200, // 0008 CALL R3 1 + 0x5C080600, // 0009 MOVE R2 R3 + 0x880C0102, // 000A GETMBR R3 R0 K2 + 0x200C0602, // 000B NE R3 R3 R2 + 0x780E0004, // 000C JMPF R3 #0012 + 0x8C0C0103, // 000D GETMET R3 R0 K3 + 0x54160405, // 000E LDINT R5 1030 + 0x58180004, // 000F LDCONST R6 K4 + 0x7C0C0600, // 0010 CALL R3 3 + 0x90020402, // 0011 SETMBR R0 K2 R2 + 0x600C0003, // 0012 GETGBL R3 G3 + 0x5C100000, // 0013 MOVE R4 R0 + 0x7C0C0200, // 0014 CALL R3 1 + 0x8C0C0705, // 0015 GETMET R3 R3 K5 + 0x5C140200, // 0016 MOVE R5 R1 + 0x7C0C0400, // 0017 CALL R3 2 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Occupancy_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_occupancy), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -343,47 +384,6 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Occupancy ********************************************************************/ @@ -391,25 +391,22 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Occupancy, 2, &be_class_Matter_Plugin_Device, - be_nested_map(16, + be_nested_map(17, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(read_attribute, 12), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_append_state_json_closure) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_init_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_virtual_closure) }, - { be_const_key_weak(update_shadow, 6), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) }, - { be_const_key_weak(tasmota_switch_index, 11), be_const_var(0) }, - { be_const_key_weak(TYPES, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(263, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) }, + { be_const_key_weak(ARG, 16), be_nested_str_weak(switch) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -470,9 +467,17 @@ be_local_class(Matter_Plugin_Sensor_Occupancy, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPE, 9), be_nested_str_weak(occupancy) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, - { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) }, + { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, + { be_const_key_weak(UPDATE_TIME, 0), be_const_int(750) }, + { be_const_key_weak(shadow_occupancy, 13), be_const_var(1) }, + { be_const_key_weak(ARG_TYPE, 7), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) }, + { be_const_key_weak(UPDATE_COMMANDS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Occupancy), + })) ) } )) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_virtual_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Occupancy) );