From 4f732477dd7f082ec187b673744021c5cb352e77 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:46:58 +0200 Subject: [PATCH] Matter support for Air Quality sensors (#21559) --- CHANGELOG.md | 1 + .../berry_matter/src/be_matter_module.c | 3 + .../berry_matter/src/embedded/Matter_IM.be | 2 +- .../src/embedded/Matter_Plugin_0.be | 30 +- .../src/embedded/Matter_Plugin_1_Device.be | 37 + .../src/embedded/Matter_Plugin_2_Light1.be | 8 +- .../src/embedded/Matter_Plugin_2_OnOff.be | 6 +- .../src/embedded/Matter_Plugin_2_Sensor.be | 6 +- .../Matter_Plugin_2_Sensor_Air_Quality.be | 219 ++ .../Matter_Plugin_2_Sensor_Contact.be | 13 +- .../Matter_Plugin_2_Sensor_Occupancy.be | 13 +- ...tter_Plugin_3_Bridge_Sensor_Air_Quality.be | 112 + .../src/embedded/Matter_Plugin_3_Light2.be | 8 +- .../src/embedded/Matter_Plugin_3_Light3.be | 12 +- .../Matter_Plugin_4_Bridge_Sensor_Flow.be | 23 +- .../Matter_Plugin_4_Bridge_Sensor_Humidity.be | 23 +- ...tter_Plugin_4_Bridge_Sensor_Illuminance.be | 23 +- .../Matter_Plugin_4_Bridge_Sensor_Pressure.be | 23 +- .../Matter_Plugin_4_Bridge_Sensor_Temp.be | 23 +- .../embedded/Matter_Plugin_5_Bridge_Light2.be | 31 +- .../embedded/Matter_Plugin_5_Bridge_Light3.be | 40 +- ...Matter_Plugin_9_Virt_Sensor_Air_Quality.be | 34 + .../berry_matter/src/embedded/Matter_TLV.be | 14 + .../berry_matter/src/embedded/Matter_UI.be | 2 + .../src/solidify/solidified_Matter_IM.h | 52 +- .../src/solidify/solidified_Matter_Plugin_0.h | 1516 ++++++------ .../solidified_Matter_Plugin_1_Device.h | 118 +- ...ified_Matter_Plugin_2_Sensor_Air_Quality.h | 816 +++++++ ...olidified_Matter_Plugin_2_Sensor_Contact.h | 58 +- ...idified_Matter_Plugin_2_Sensor_Occupancy.h | 58 +- ...atter_Plugin_3_Bridge_Sensor_Air_Quality.h | 404 ++++ .../solidified_Matter_Plugin_3_Light2.h | 39 +- .../solidified_Matter_Plugin_3_Light3.h | 27 +- ...ified_Matter_Plugin_4_Bridge_Sensor_Flow.h | 92 +- ...d_Matter_Plugin_4_Bridge_Sensor_Humidity.h | 92 +- ...atter_Plugin_4_Bridge_Sensor_Illuminance.h | 92 +- ...d_Matter_Plugin_4_Bridge_Sensor_Pressure.h | 92 +- ...ified_Matter_Plugin_4_Bridge_Sensor_Temp.h | 90 +- ...solidified_Matter_Plugin_5_Bridge_Light2.h | 125 +- ...solidified_Matter_Plugin_5_Bridge_Light3.h | 150 +- ..._Matter_Plugin_9_Virt_Sensor_Air_Quality.h | 27 + .../src/solidify/solidified_Matter_TLV.h | 2075 +++++++++-------- .../src/solidify/solidified_Matter_UI.h | 2 +- .../solidify/solidified_Matter_zz_Device.h | 87 +- 44 files changed, 3849 insertions(+), 2869 deletions(-) create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Air_Quality.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd18f5d1..7cbe99336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ## [14.1.0.1] ### Added - Berry solidification of `bytes` instances +- Matter support for Air Quality sensors ### Breaking Changed diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index 3d7233f48..c87cb24ee 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -229,6 +229,8 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_1_Device.h" #include "solidify/solidified_Matter_Plugin_2_OnOff.h" #include "solidify/solidified_Matter_Plugin_9_Virt_OnOff.h" +#include "solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h" +#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h" #include "solidify/solidified_Matter_Plugin_3_Light0.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Light0.h" #include "solidify/solidified_Matter_Plugin_2_Light1.h" @@ -271,6 +273,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h" #include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h" #include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h" +#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h" #include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h" #include "solidify/solidified_Matter_Plugin_z_All.h" #include "solidify/solidified_Matter_zz_Device.h" diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM.be index 1e4ca0a78..d0977b242 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_IM.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM.be @@ -830,7 +830,7 @@ class Matter_IM tasmota.log(format("MTR: >Subscribe (%6i) %s (min=%i, max=%i, keep=%i) sub=%i fabric_filtered=%s", msg.session.local_session_id, attr_req.concat(" "), sub.min_interval, sub.max_interval, query.keep_subscriptions ? 1 : 0, sub.subscription_id, query.fabric_filtered), 3) if query.event_requests != nil && size(query.event_requests) > 0 - tasmota.log(f"MTR: >Subscribe (%6i) event_requests_size={size(query.event_requests)}", 3) + tasmota.log(f"MTR: >Subscribe ({msg.session.local_session_id:6i}) event_requests_size={size(query.event_requests)}", 3) end var ret = self._inner_process_read_request(msg.session, query, msg, true #-no_log-#) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be index d8315c3ec..8f89f7d3f 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be @@ -480,10 +480,38 @@ class Matter_Plugin # The map is pre-cleaned and contains only keys declared in # `self.UPDATE_COMMANDS` with the adequate case # (no need to handle case-insensitive) - def update_virtual(payload_json) + def update_virtual(payload) # pass end + ####################################################################### + # _parse_update_virtual: parse a single value out of MtrUpdate JSON + # + # Used internally by `update_virtual` + # + # Args + # payload: the native payload (converted from JSON) from MtrUpdate + # key: key name in the JSON payload to read from, do nothing if key does not exist or content is `null` + # old_val: previous value, used to detect a change or return the value unchanged + # type_func: type enforcer for value, typically `int`, `bool`, `str`, `number`, `real` + # cluster/attribute: in case the value has change, publish a change to cluster/attribute + # + # Returns: + # `old_val` if key does not exist, JSON value is `null`, or value is unchanged + # or new value from JSON (which is the new shadow value) + # + def _parse_update_virtual(payload, key, old_val, type_func, cluster, attribute) + var val = payload.find(key) + if (val != nil) + val = type_func(val) + if (val != old_val) + self.attribute_updated(cluster, attribute) + end + return val + end + return old_val + end + end matter.Plugin = Matter_Plugin diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be index 619646386..94d0145bf 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be @@ -200,9 +200,46 @@ class Matter_Plugin_Device : Matter_Plugin # sensors _stats_json_inner("shadow_contact", "Contact") _stats_json_inner("shadow_occupancy", "Occupancy") + + # air quality + _stats_json_inner("shadow_air_quality", "AirQuality") + _stats_json_inner("shadow_co2", "CO2") + _stats_json_inner("shadow_pm1", "PM1") + _stats_json_inner("shadow_pm2_5", "PM2.5") + _stats_json_inner("shadow_pm10", "PM10") + _stats_json_inner("shadow_tvoc", "TVOC") + # print(ret) return ret end + ####################################################################### + # _parse_sensor_entry: internal helper function + # + # Used internally by `update_virtual` + # + # Args + # payload: the native payload (converted from JSON) from MtrUpdate + # key: key name in the JSON payload to read from, do nothing if key does not exist or content is `null` + # type_func: type enforcer for value, typically `int`, `bool`, `str`, `number`, `real` + # old_val: previous value, used to detect a change or return the value unchanged + # cluster/attribute: in case the value has change, publish a change to cluster/attribute + # + # Returns: + # `old_val` if key does not exist, JSON value is `null`, or value is unchanged + # or new value from JSON (which is the new shadow value) + # + def _parse_sensor_entry(payload, key, old_val, type_func, cluster, attribute) + var val = payload.find(key) + if (val != nil) + val = type_func(val) + if val != old_val + self.attribute_updated(cluster, attribute) # CurrentPositionTiltPercent100ths + end + return val + end + return old_val + end + end matter.Plugin_Device = Matter_Plugin_Device diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be index ab6de67fe..2b0e42255 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be @@ -230,16 +230,16 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val_onoff = payload_json.find("Power") - var val_bri = payload_json.find("Bri") + def update_virtual(payload) + var val_onoff = payload.find("Power") + var val_bri = payload.find("Bri") if val_bri != nil self.set_bri(int(val_bri), val_onoff) return # don't call super() because we already handeld 'Power' elif val_onoff != nil self.set_onoff(bool(val_onoff)) end - super(self).update_virtual(payload_json) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be index 89f3a5430..0c9dc1edb 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be @@ -149,12 +149,12 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val_onoff = payload_json.find("Power") + def update_virtual(payload) + var val_onoff = payload.find("Power") if val_onoff != nil self.set_onoff(bool(val_onoff)) end - super(self).update_virtual(payload_json) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be index a702a11af..f2b2e7f3f 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be @@ -93,8 +93,8 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val = payload_json.find(self.JSON_NAME) + def update_virtual(payload) + var val = payload.find(self.JSON_NAME) if val != nil if type(val) == 'bool' val = int(val) end @@ -103,7 +103,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device self.shadow_value = val end end - super(self).update_virtual(payload_json) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Air_Quality.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Air_Quality.be new file mode 100644 index 000000000..42af25401 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Air_Quality.be @@ -0,0 +1,219 @@ +# +# Matter_Plugin_Sensor_Air_Quality.be - implements the behavior for a Air_Quality sensor +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Sensor_Air_Quality,weak + +class Matter_Plugin_Sensor_Air_Quality : Matter_Plugin_Device + static var TYPE = "airquality" # name of the plug-in in json + static var DISPLAY_NAME = "Air Quality" # display name of the plug-in + static var ARG = "airquality" # additional argument name (or empty if none) + static var ARG_HINT = "Device key (ex: SCD40)" +# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var JSON_NAME = "AirQuality" # Name of the sensor attribute in JSON payloads + static var UPDATE_TIME = 30000 # update every 30 s + static var UPDATE_COMMANDS = matter.UC_LIST(_class, "AirQuality", "CO2", "PM1", "PM2.5", "PM10", "TVOC", "NO2") + static var CLUSTERS = matter.consolidate_clusters(_class, { + 0x005B: [0], # Air Quality - no writable + 0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement + 0x042C: [0,1,2,8,9], # PM1 Concentration Measurement + 0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement + 0x042D: [0,1,2,8,9], # PM10 Concentration Measurement + 0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement + 0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement + }) + + static var TYPES = { 0x002C: 1 } # Air Quality, rev 1 + + var prefix # key prefix in JSON + var shadow_air_quality # Human readable air quality index + # 0: Unknown + # 1: Good + # 4: Poor + # var shadow_pb0_3 + # var shadow_pb0_5 + # var shadow_pb1 + # var shadow_pb2_5 + # var shadow_pb5 + # var shadow_pb10 + var shadow_pm1 + var shadow_pm2_5 + # var shadow_pm5 + var shadow_pm10 + var shadow_co2 + # var shadow_eco2 + var shadow_no2 + var shadow_tvoc + + ############################################################# + # Constructor + def init(device, endpoint, config) + super(self).init(device, endpoint, config) + self.shadow_air_quality = false + end + + ############################################################# + # parse_configuration + # + # Parse configuration map + def parse_configuration(config) + self.prefix = str(config.find(self.ARG)) + end + + + ############################################################# + # parse sensor + # + # parse the output from `ShutterPosition` + # Ex: `{"Shutter1":{"Position":50,"Direction":0,"Target":50,"Tilt":30}}` + def _parse_sensor_entry(v, key, old_val, cluster, attribute) + var val = v.find(key) + if (val != nil) + if val != old_val + self.attribute_updated(cluster, attribute) # CurrentPositionTiltPercent100ths + end + return val + end + return old_val + end + # + def parse_sensors(payload) + var v = payload.find(self.prefix) + if (v != nil) + # CO2 + self.shadow_co2 = self._parse_sensor_entry(v, "CarbonDioxide", self.shadow_co2, number, 0x040D, 0x0000) + # PM1 + self.shadow_pm1 = self._parse_sensor_entry(v, "PM1", self.shadow_pm1, number, 0x042C, 0x0000) + # PM2.5 + self.shadow_pm2_5 = self._parse_sensor_entry(v, "PM2.5", self.shadow_pm2_5, number, 0x042A, 0x0000) + # PM10 + self.shadow_pm10 = self._parse_sensor_entry(v, "PM10", self.shadow_pm10, number, 0x042D, 0x0000) + # TVOC + self.shadow_tvoc = self._parse_sensor_entry(v, "TVOC", self.shadow_tvoc, number, 0x042E, 0x0000) + # NO2 + self.shadow_no2 = self._parse_sensor_entry(v, "NO2", self.shadow_no2, number, 0x0413, 0x0000) + end + super(self).parse_sensors(payload) # parse other shutter values + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx, tlv_solo) + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + var ret + + # mutualize code for all values + # Args + # shadow_value: value of the shadow for the type + # unit: unit of value, `0`=PPM if not specified + # + # Returns + # `nil`: no attribute match + # : TLV value + def handle_value(shadow_value, unit) + if (unit == nil) unit = 0 end # default unit is `0` = PPM + if attribute == 0x0000 # ---------- Measured­ Value / float ---------- + if shadow_value != nil + return tlv_solo.set(TLV.FLOAT, shadow_value) + else + return tlv_solo.set(TLV.NULL, nil) + end + elif attribute == 0x0001 # ---------- MinMeasured Value / float ---------- + return tlv_solo.set(TLV.NULL, nil) + elif attribute == 0x0002 # ---------- MaxMeasured Value / float ---------- + return tlv_solo.set(TLV.NULL, nil) + elif attribute == 0x0008 # ---------- MeasurementUnit / u8 ---------- + return tlv_solo.set(TLV.U1, unit) + elif attribute == 0x0009 # ---------- MeasurementMedium / u8 ---------- + return tlv_solo.set(TLV.U1, 0) # 0 = Air + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return tlv_solo.set(TLV.U4, 1) # MEA = NumericMeasurement + end + return nil + end + + # ==================================================================================================== + if cluster == 0x005B # ========== Air Quality ========== + if attribute == 0x0000 # ---------- AirQuality / U8 ---------- + if self.shadow_air_quality != nil + return tlv_solo.set(TLV.U1, self.shadow_air_quality) + else + return tlv_solo.set(TLV.NULL, nil) + end + # elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + # return tlv_solo.set(TLV.U4, 0) # + end + + # ==================================================================================================== + elif cluster == 0x040D # ========== Carbon Dioxide Concentration Measurement ========== + if (ret := handle_value(self.shadow_co2)) + return ret + end + # ==================================================================================================== + elif cluster == 0x042C # ========== PM1 Concentration Measurement ========== + if (ret := handle_value(self.shadow_pm1)) + return ret + end + # ==================================================================================================== + elif cluster == 0x042A # ========== PM2.5 Concentration Measurement ========== + if (ret := handle_value(self.shadow_pm2_5)) + return ret + end + # ==================================================================================================== + elif cluster == 0x042D # ========== PM10 Concentration Measurement ========== + if (ret := handle_value(self.shadow_pm10)) + return ret + end + # ==================================================================================================== + elif cluster == 0x042E # ========== TVOC ========== + if (ret := handle_value(self.shadow_tvoc)) + return ret + end + # ==================================================================================================== + elif cluster == 0x0413 # ========== NO2 ========== + if (ret := handle_value(self.shadow_no2)) + return ret + end + + end + return super(self).read_attribute(session, ctx, tlv_solo) + end + + ####################################################################### + # update_virtual + # + # Update internal state for virtual devices + def update_virtual(payload) + self.shadow_air_quality = self._parse_update_virtual(payload, "AirQuality", number, self.shadow_air_quality, 0x005B, 0x0000) + self.shadow_co2 = self._parse_update_virtual(payload, "CO2", self.shadow_co2, number, 0x040D, 0x0000) + self.shadow_pm1 = self._parse_update_virtual(payload, "PM1", self.shadow_pm1, number, 0x042C, 0x0000) + self.shadow_pm2_5 = self._parse_update_virtual(payload, "PM2.5", self.shadow_pm2_5, number, 0x042A, 0x0000) + self.shadow_pm10 = self._parse_update_virtual(payload, "PM10", self.shadow_pm10, number, 0x042D, 0x0000) + self.shadow_tvoc = self._parse_update_virtual(payload, "TVOC", self.shadow_tvoc, number, 0x042E, 0x0000) + super(self).update_virtual(payload) + end + +end +matter.Plugin_Sensor_Air_Quality = Matter_Plugin_Sensor_Air_Quality diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be index b7d683039..a6c2f7193 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be @@ -102,16 +102,9 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val_onoff = payload_json.find("Contact") - if val_onoff != nil - val_onoff = bool(val_onoff) - if self.shadow_contact != val_onoff - self.attribute_updated(0x0045, 0x0000) - self.shadow_contact = val_onoff - end - end - super(self).update_virtual(payload_json) + def update_virtual(payload) + self.shadow_contact = self._parse_update_virtual(payload, "Contact", self.shadow_contact, bool, 0x0045, 0x0000) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be index 2d9f09323..fbc6bf84b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be @@ -106,16 +106,9 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val_onoff = payload_json.find("Occupancy") - if val_onoff != nil - val_onoff = bool(val_onoff) - if self.shadow_occupancy != val_onoff - self.attribute_updated(0x0406, 0x0000) - self.shadow_occupancy = val_onoff - end - end - super(self).update_virtual(payload_json) + def update_virtual(payload) + self.val_onoff = self._parse_update_virtual(payload, "Occupancy", self.val_onoff, bool, 0x0406, 0x0000) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be new file mode 100644 index 000000000..b0515eb9e --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be @@ -0,0 +1,112 @@ +# +# Matter_Plugin_Bridge_Sensor_Contact.be - implements Air Quality Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Air_Quality,weak + +class Matter_Plugin_Bridge_Sensor_Air_Quality : Matter_Plugin_Bridge_HTTP + static var TYPE = "http_airquality" # name of the plug-in in json + static var DISPLAY_NAME = "Air Quality" # display name of the plug-in + static var ARG = "airquality" # additional argument name (or empty if none) + static var ARG_HINT = "Sensor Model" +# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var UPDATE_TIME = 5000 # update every 5s + static var UPDATE_CMD = "Status 8" # command to send for updates + + static var CLUSTERS = matter.consolidate_clusters(_class, { + 0x005B: [0], # Air Quality - no writable + 0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement + 0x042C: [0,1,2,8,9], # PM1 Concentration Measurement + 0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement + 0x042D: [0,1,2,8,9], # PM10 Concentration Measurement + 0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement + 0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement + }) + + static var TYPES = { 0x002C: 1 } # Air Quality, rev 1 + + var prefix # key prefix in JSON + var shadow_air_quality # Human readable air quality index + # 0: Unknown + # 1: Good + # 4: Poor + # var shadow_pb0_3 + # var shadow_pb0_5 + # var shadow_pb1 + # var shadow_pb2_5 + # var shadow_pb5 + # var shadow_pb10 + var shadow_pm1 + var shadow_pm2_5 + # var shadow_pm5 + var shadow_pm10 + var shadow_co2 + # var shadow_eco2 + var shadow_no2 + var shadow_tvoc + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + super(self).init(device, endpoint, arguments) + self.prefix = str(arguments.find(self.ARG)) + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_update(data, index) + if index == 8 # Status 8 + var values = data.find(self.prefix) + end + end + + ############################################################# + # read an attribute + # + def read_attribute = matter.Plugin_Sensor_Air_Quality.read_attribute + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + def web_values_single(name, val) + if val != nil + import webserver + webserver.content_send(f"{name} {val:i} ") + end + end + + self.web_values_prefix() # display '| ' and name if present + web_values_single("Air", self.shadow_air_quality) + web_values_single("PM1", self.shadow_pm1) + web_values_single("PM2.5", self.shadow_pm2_5) + web_values_single("PM10", self.shadow_pm10) + web_values_single("CO2", self.shadow_co2) + web_values_single("NO2", self.shadow_no2) + web_values_single("TVOC", self.shadow_tvoc) + end + +end +matter.Plugin_Bridge_Sensor_Air_Quality = Matter_Plugin_Bridge_Sensor_Air_Quality diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be index 265514e29..066d0a850 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be @@ -120,7 +120,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== self.update_shadow_lazy() if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- - return tlv_solo.set(TLV.U1, self.shadow_ct) + return tlv_solo.set_or_nil(TLV.U1, self.shadow_ct) # if `nil` it is replaced with TLV.NULL elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- return tlv_solo.set(TLV.U1, 2)# 2 = ColorTemperatureMireds elif attribute == 0x000F # ---------- Options / u1 ---------- @@ -179,12 +179,12 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val_ct = int(payload_json.find("CT")) # int or nil + def update_virtual(payload) + var val_ct = int(payload.find("CT")) # int or nil if (val_ct != nil) self.set_ct(val_ct) end - super(self).update_virtual(payload_json) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be index a0b77dd21..5f51f2bdc 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be @@ -127,9 +127,9 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== self.update_shadow_lazy() if attribute == 0x0000 # ---------- CurrentHue / u1 ---------- - return tlv_solo.set(TLV.U1, self.shadow_hue) + return tlv_solo.set_or_nil(TLV.U1, self.shadow_hue) elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ---------- - return tlv_solo.set(TLV.U1, self.shadow_sat) + return tlv_solo.set_or_nil(TLV.U1, self.shadow_sat) elif attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- return tlv_solo.set(TLV.U1, 0) elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- @@ -213,13 +213,13 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 # update_virtual # # Update internal state for virtual devices - def update_virtual(payload_json) - var val_hue = int(payload_json.find("Hue")) # int or nil - var val_sat = int(payload_json.find("Sat")) # int or nil + def update_virtual(payload) + var val_hue = int(payload.find("Hue")) # int or nil + var val_sat = int(payload.find("Sat")) # int or nil if (val_hue != nil) || (val_sat != nil) self.set_hue_sat(val_hue, val_sat) end - super(self).update_virtual(payload_json) + super(self).update_virtual(payload) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be index 24f765768..a3e236acd 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be @@ -53,28 +53,7 @@ class Matter_Plugin_Bridge_Sensor_Flow : Matter_Plugin_Bridge_Sensor ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0404 # ========== Flow Measurement 2.1.2 p.127 ========== - if attribute == 0x0000 # ---------- MeasuredValue / i16 ---------- - if self.shadow_value != nil - return tlv_solo.set(TLV.U2, int(self.shadow_value)) # MeasuredValue represents 10 x flow in m3/h. - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ---------- - return tlv_solo.set(TLV.U2, 0) # 0 m3/h - elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ---------- - return tlv_solo.set(TLV.U2, 65534) # 65534 m3/h - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + static var read_attribute = matter.Plugin_Sensor_Flow.read_attribute ############################################################# # web_values diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be index 05e25437a..d6801ced4 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be @@ -53,28 +53,7 @@ class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Bridge_Sensor ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0405 # ========== Humidity Measurement 2.4 p.98 ========== - if attribute == 0x0000 # ---------- Humidity / u16 ---------- - if self.shadow_value != nil - return tlv_solo.set(TLV.U2, int(self.shadow_value)) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- MinMeasuredValue / u16 ---------- - return tlv_solo.set(TLV.U2, 500) # 0% - elif attribute == 0x0002 # ---------- MaxMeasuredValue / u16 ---------- - return tlv_solo.set(TLV.U2, 10000) # 100% - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + def read_attribute = matter.Plugin_Sensor_Humidity.read_attribute ############################################################# # web_values diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be index 88e0e32ee..df31caec6 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be @@ -60,28 +60,7 @@ class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Bridge_Sensor ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0400 # ========== Illuminance Measurement 2.2 p.95 ========== - if attribute == 0x0000 # ---------- MeasuredValue / i16 ---------- - if self.shadow_value != nil - return tlv_solo.set(TLV.U2, int(self.shadow_value)) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ---------- - return tlv_solo.set(TLV.U2, 1) # 1 lux - elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ---------- - return tlv_solo.set(TLV.U2, 0xFFFE) - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + def read_attribute = matter.Plugin_Sensor_Illuminance.read_attribute ############################################################# # web_values diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be index 53b78393a..6b40a7b60 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be @@ -53,28 +53,7 @@ class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Bridge_Sensor ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0403 # ========== Pressure Measurement 2.4 p.98 ========== - if attribute == 0x0000 # ---------- MeasuredValue / i16 ---------- - if self.shadow_value != nil - return tlv_solo.set(TLV.I2, int(self.shadow_value)) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ---------- - return tlv_solo.set(TLV.I2, 500) # 500 hPA - elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ---------- - return tlv_solo.set(TLV.I2, 1500) # 1500 hPA - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + def read_attribute = matter.Plugin_Sensor_Pressure.read_attribute ############################################################# # web_values diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be index 8ee8f73d1..daaaaa9f9 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be @@ -56,28 +56,7 @@ class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Bridge_Sensor ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0402 # ========== Temperature Measurement 2.3 p.97 ========== - if attribute == 0x0000 # ---------- MeasuredValue / i16 (*100) ---------- - if self.shadow_value != nil - return tlv_solo.set(TLV.I2, self.shadow_value) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 (*100) ---------- - return tlv_solo.set(TLV.I2, -5000) # -50 °C - elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 (*100) ---------- - return tlv_solo.set(TLV.I2, 15000) # 150 °C - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + def read_attribute = matter.Plugin_Sensor_Temp.read_attribute ############################################################# # web_values diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be index 0c8595885..8d5622315 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be @@ -92,36 +92,7 @@ class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Bridge_Light1 ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== - self.update_shadow_lazy() - if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- - if self.shadow_ct != nil - return tlv_solo.set(TLV.U1, self.shadow_ct) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- - return tlv_solo.set(TLV.U1, 2)# 2 = ColorTemperatureMireds - elif attribute == 0x000F # ---------- Options / u1 ---------- - return tlv_solo.set(TLV.U1, 0) - elif attribute == 0x400B # ---------- ColorTempPhysicalMinMireds / u2 ---------- - return tlv_solo.set(TLV.U1, self.ct_min) - elif attribute == 0x400C # ---------- ColorTempPhysicalMaxMireds / u2 ---------- - return tlv_solo.set(TLV.U1, self.ct_max) - - elif attribute == 0x400A # ---------- ColorCapabilities / map32 ---------- - return tlv_solo.set(TLV.U4, 0x10) # CT - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + def read_attribute = matter.Plugin_Light2.read_attribute ############################################################# # Invoke a command diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be index 5b4f0ab30..950048118 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be @@ -92,45 +92,7 @@ class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Bridge_Light1 ############################################################# # read an attribute # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== - self.update_shadow_lazy() - if attribute == 0x0000 # ---------- CurrentHue / u1 ---------- - if self.shadow_hue != nil - return tlv_solo.set(TLV.U1, self.shadow_hue) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ---------- - if self.shadow_sat != nil - return tlv_solo.set(TLV.U1, self.shadow_sat) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- - return tlv_solo.set(TLV.U1, 0) - elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- - return tlv_solo.set(TLV.U1, 0)# 0 = CurrentHue and CurrentSaturation - elif attribute == 0x000F # ---------- Options / u1 ---------- - return tlv_solo.set(TLV.U1, 0) - elif attribute == 0x4001 # ---------- EnhancedColorMode / u1 ---------- - return tlv_solo.set(TLV.U1, 0) - elif attribute == 0x400A # ---------- ColorCapabilities / map32 ---------- - return tlv_solo.set(TLV.U4, 0x01) # HS - - # Defined Primaries Information Attribute Set - elif attribute == 0x0010 # ---------- NumberOfPrimaries / u1 ---------- - return tlv_solo.set(TLV.U1, 0) - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end + def read_attribute = matter.Plugin_Light3.read_attribute ############################################################# # Invoke a command diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be new file mode 100644 index 000000000..f969398c3 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be @@ -0,0 +1,34 @@ +# +# Matter_Plugin_9_Virt_Sensor_Air_Quality.be - implements the behavior for a Virtual Air Quality Sensor +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Virt_Sensor_Air_Quality,weak + +class Matter_Plugin_Virt_Sensor_Air_Quality : Matter_Plugin_Sensor_Air_Quality + static var TYPE = "v_airquality" # name of the plug-in in json + static var DISPLAY_NAME = "v.Air Quality" # display name of the plug-in + static var ARG = "" # no arg for virtual device + static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') + static var VIRTUAL = true # virtual device + +end +matter.Plugin_Virt_Sensor_Air_Quality = Matter_Plugin_Virt_Sensor_Air_Quality diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be b/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be index 74a10d25a..a48e4cbef 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be @@ -141,6 +141,20 @@ class Matter_TLV return self end end + + ############################################################# + # set value, equivalent to create_TLV() without allocation + # + # if value is `nil` replace with TLV.NULL + def set_or_nil(t, value) + self.reset() + if (value == nil) t = 0x14 end # force TLV.NULL + if value != nil || t == 0x14 #-t == matter.TLV.NULL-# # put the actual number for performance + self.typ = t + self.val = value + return self + end + end ############################################################# # neutral converter diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index d5f6d6e1b..a325ead88 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -34,8 +34,10 @@ import matter class Matter_UI static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt" "|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|waterleak" + "|airquality" "|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3" "|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_waterleak" + "|v_airquality" static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3" "|http_temperature|http_pressure|http_illuminance|http_humidity" "|http_occupancy|http_contact|http_flow|http_waterleak" diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h index 463f9f498..8a8b3fe8d 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h @@ -3484,13 +3484,13 @@ be_local_closure(class_Matter_IM_subscribe_request, /* name */ /* K27 */ be_nested_str_weak(fabric_filtered), /* K28 */ be_const_int(3), /* K29 */ be_nested_str_weak(event_requests), - /* K30 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X25_X256i_X29_X20event_requests_size_X3D_X25s), + /* K30 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X256i_X29_X20event_requests_size_X3D_X25s), /* K31 */ be_nested_str_weak(_inner_process_read_request), /* K32 */ be_nested_str_weak(send_subscribe_response), }), be_str_weak(subscribe_request), &be_const_str_solidified, - ( &(const binstruction[99]) { /* code */ + ( &(const binstruction[101]) { /* code */ 0xB80E0000, // 0000 GETNGBL R3 K0 0x8C0C0701, // 0001 GETMET R3 R3 K1 0x7C0C0200, // 0002 CALL R3 1 @@ -3559,37 +3559,39 @@ be_local_closure(class_Matter_IM_subscribe_request, /* name */ 0x881C071D, // 0041 GETMBR R7 R3 K29 0x4C200000, // 0042 LDNIL R8 0x201C0E08, // 0043 NE R7 R7 R8 - 0x781E000E, // 0044 JMPF R7 #0054 + 0x781E0010, // 0044 JMPF R7 #0056 0x601C000C, // 0045 GETGBL R7 G12 0x8820071D, // 0046 GETMBR R8 R3 K29 0x7C1C0200, // 0047 CALL R7 1 0x241C0F19, // 0048 GT R7 R7 K25 - 0x781E0009, // 0049 JMPF R7 #0054 + 0x781E000B, // 0049 JMPF R7 #0056 0xB81E2000, // 004A GETNGBL R7 K16 0x8C1C0F11, // 004B GETMET R7 R7 K17 0x60240018, // 004C GETGBL R9 G24 0x5828001E, // 004D LDCONST R10 K30 - 0x602C000C, // 004E GETGBL R11 G12 - 0x8830071D, // 004F GETMBR R12 R3 K29 - 0x7C2C0200, // 0050 CALL R11 1 - 0x7C240400, // 0051 CALL R9 2 - 0x5828001C, // 0052 LDCONST R10 K28 - 0x7C1C0600, // 0053 CALL R7 3 - 0x8C1C011F, // 0054 GETMET R7 R0 K31 - 0x88240306, // 0055 GETMBR R9 R1 K6 - 0x5C280600, // 0056 MOVE R10 R3 - 0x5C2C0200, // 0057 MOVE R11 R1 - 0x50300200, // 0058 LDBOOL R12 1 0 - 0x7C1C0A00, // 0059 CALL R7 5 - 0x8820091A, // 005A GETMBR R8 R4 K26 - 0x901E3408, // 005B SETMBR R7 K26 R8 - 0x8C200120, // 005C GETMET R8 R0 K32 - 0x5C280200, // 005D MOVE R10 R1 - 0x5C2C0E00, // 005E MOVE R11 R7 - 0x5C300800, // 005F MOVE R12 R4 - 0x7C200800, // 0060 CALL R8 4 - 0x50200200, // 0061 LDBOOL R8 1 0 - 0x80041000, // 0062 RET 1 R8 + 0x882C0306, // 004E GETMBR R11 R1 K6 + 0x882C1713, // 004F GETMBR R11 R11 K19 + 0x6030000C, // 0050 GETGBL R12 G12 + 0x8834071D, // 0051 GETMBR R13 R3 K29 + 0x7C300200, // 0052 CALL R12 1 + 0x7C240600, // 0053 CALL R9 3 + 0x5828001C, // 0054 LDCONST R10 K28 + 0x7C1C0600, // 0055 CALL R7 3 + 0x8C1C011F, // 0056 GETMET R7 R0 K31 + 0x88240306, // 0057 GETMBR R9 R1 K6 + 0x5C280600, // 0058 MOVE R10 R3 + 0x5C2C0200, // 0059 MOVE R11 R1 + 0x50300200, // 005A LDBOOL R12 1 0 + 0x7C1C0A00, // 005B CALL R7 5 + 0x8820091A, // 005C GETMBR R8 R4 K26 + 0x901E3408, // 005D SETMBR R7 K26 R8 + 0x8C200120, // 005E GETMET R8 R0 K32 + 0x5C280200, // 005F MOVE R10 R1 + 0x5C2C0E00, // 0060 MOVE R11 R7 + 0x5C300800, // 0061 MOVE R12 R4 + 0x7C200800, // 0062 CALL R8 4 + 0x50200200, // 0063 LDBOOL R8 1 0 + 0x80041000, // 0064 RET 1 R8 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h index 544c53173..e22e8111a 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h @@ -7,174 +7,12 @@ extern const bclass be_class_Matter_Plugin; /******************************************************************** -** Solidified function: every_250ms +** Solidified function: contains_cluster ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_every_250ms, /* name */ +be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(update_next), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(jitter), - /* K3 */ be_nested_str_weak(UPDATE_TIME), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(time_reached), - /* K6 */ be_nested_str_weak(tick), - /* K7 */ be_nested_str_weak(device), - /* K8 */ be_nested_str_weak(update_shadow), - /* K9 */ be_nested_str_weak(millis), - }), - be_str_weak(every_250ms), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x78060005, // 0003 JMPF R1 #000A - 0xB8060200, // 0004 GETNGBL R1 K1 - 0x8C040302, // 0005 GETMET R1 R1 K2 - 0x880C0103, // 0006 GETMBR R3 R0 K3 - 0x7C040400, // 0007 CALL R1 2 - 0x90020001, // 0008 SETMBR R0 K0 R1 - 0x70020010, // 0009 JMP #001B - 0xB8060800, // 000A GETNGBL R1 K4 - 0x8C040305, // 000B GETMET R1 R1 K5 - 0x880C0100, // 000C GETMBR R3 R0 K0 - 0x7C040400, // 000D CALL R1 2 - 0x7806000B, // 000E JMPF R1 #001B - 0x88040106, // 000F GETMBR R1 R0 K6 - 0x88080107, // 0010 GETMBR R2 R0 K7 - 0x88080506, // 0011 GETMBR R2 R2 K6 - 0x20040202, // 0012 NE R1 R1 R2 - 0x78060001, // 0013 JMPF R1 #0016 - 0x8C040108, // 0014 GETMET R1 R0 K8 - 0x7C040200, // 0015 CALL R1 1 - 0xB8060800, // 0016 GETNGBL R1 K4 - 0x8C040309, // 0017 GETMET R1 R1 K9 - 0x880C0103, // 0018 GETMBR R3 R0 K3 - 0x7C040400, // 0019 CALL R1 2 - 0x90020001, // 001A SETMBR R0 K0 R1 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: subscribe_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_subscribe_attribute, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(subscribe_attribute), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_init, /* name */ - be_nested_proto( - 8, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(endpoint), - /* K2 */ be_nested_str_weak(clusters), - /* K3 */ be_nested_str_weak(consolidate_clusters), - /* K4 */ be_nested_str_weak(parse_configuration), - /* K5 */ be_nested_str_weak(node_label), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(name), - /* K8 */ be_nested_str_weak(), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x8C100103, // 0002 GETMET R4 R0 K3 - 0x7C100200, // 0003 CALL R4 1 - 0x90020404, // 0004 SETMBR R0 K2 R4 - 0x8C100104, // 0005 GETMET R4 R0 K4 - 0x5C180600, // 0006 MOVE R6 R3 - 0x7C100400, // 0007 CALL R4 2 - 0x8C100706, // 0008 GETMET R4 R3 K6 - 0x58180007, // 0009 LDCONST R6 K7 - 0x581C0008, // 000A LDCONST R7 K8 - 0x7C100600, // 000B CALL R4 3 - 0x90020A04, // 000C SETMBR R0 K5 R4 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_name -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_set_name, /* name */ - be_nested_proto( - 6, /* nstack */ + 5, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -183,21 +21,17 @@ be_local_closure(class_Matter_Plugin_set_name, /* name */ &be_class_Matter_Plugin, 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(node_label), - /* K1 */ be_nested_str_weak(attribute_updated), + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(contains), }), - be_str_weak(set_name), + be_str_weak(contains_cluster), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ + ( &(const binstruction[ 5]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0003, // 0002 JMPF R2 #0007 - 0x8C080101, // 0003 GETMET R2 R0 K1 - 0x54120038, // 0004 LDINT R4 57 - 0x54160004, // 0005 LDINT R5 5 - 0x7C080600, // 0006 CALL R2 3 - 0x90020001, // 0007 SETMBR R0 K0 R1 - 0x80000000, // 0008 RET 0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 }) ) ); @@ -205,13 +39,98 @@ be_local_closure(class_Matter_Plugin_set_name, /* name */ /******************************************************************** -** Solidified function: subscribe_event +** Solidified function: append_state_json ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ +be_local_closure(class_Matter_Plugin_append_state_json, /* name */ be_nested_proto( - 6, /* nstack */ - 5, /* argc */ + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80060000, // 0000 RET 1 K0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: state_json +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_state_json, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(node_label), + /* K2 */ be_nested_str_weak(_X2C_X22Name_X22_X3A_X25s), + /* K3 */ be_nested_str_weak(dump), + /* K4 */ be_nested_str_weak(), + /* K5 */ be_nested_str_weak(append_state_json), + /* K6 */ be_nested_str_weak(_X7B_X22Ep_X22_X3A_X25i_X25s_X25s_X7D), + /* K7 */ be_nested_str_weak(endpoint), + }), + be_str_weak(state_json), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x780A0006, // 0002 JMPF R2 #000A + 0x60080018, // 0003 GETGBL R2 G24 + 0x580C0002, // 0004 LDCONST R3 K2 + 0x8C100303, // 0005 GETMET R4 R1 K3 + 0x88180101, // 0006 GETMBR R6 R0 K1 + 0x7C100400, // 0007 CALL R4 2 + 0x7C080400, // 0008 CALL R2 2 + 0x70020000, // 0009 JMP #000B + 0x58080004, // 000A LDCONST R2 K4 + 0x8C0C0105, // 000B GETMET R3 R0 K5 + 0x7C0C0200, // 000C CALL R3 1 + 0x780E0007, // 000D JMPF R3 #0016 + 0x60100018, // 000E GETGBL R4 G24 + 0x58140006, // 000F LDCONST R5 K6 + 0x88180107, // 0010 GETMBR R6 R0 K7 + 0x5C1C0400, // 0011 MOVE R7 R2 + 0x5C200600, // 0012 MOVE R8 R3 + 0x7C100800, // 0013 CALL R4 4 + 0x80040800, // 0014 RET 1 R4 + 0x70020001, // 0015 JMP #0018 + 0x4C100000, // 0016 LDNIL R4 + 0x80040800, // 0017 RET 1 R4 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: timed_request +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_timed_request, /* name */ + be_nested_proto( + 5, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -219,11 +138,11 @@ be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(subscribe_event), + be_str_weak(timed_request), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 }) ) ); @@ -256,79 +175,68 @@ be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ /******************************************************************** -** Solidified function: publish_command +** Solidified function: has ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_publish_command, /* name */ +be_local_closure(class_Matter_Plugin_has, /* name */ be_nested_proto( - 16, /* nstack */ - 7, /* argc */ + 6, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(_X25s_X3A_X25s), - /* K2 */ be_nested_str_weak(dump), - /* K3 */ be_nested_str_weak(_X25s_X2C_X25s_X3A_X25s), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(publish_command), - /* K6 */ be_nested_str_weak(MtrReceived), - /* K7 */ be_nested_str_weak(endpoint), - /* K8 */ be_nested_str_weak(node_label), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(endpoints), + /* K3 */ be_nested_str_weak(find), }), - be_str_weak(publish_command), + be_str_weak(has), &be_const_str_solidified, - ( &(const binstruction[46]) { /* code */ - 0xA41E0000, // 0000 IMPORT R7 K0 - 0x60200018, // 0001 GETGBL R8 G24 - 0x58240001, // 0002 LDCONST R9 K1 - 0x8C280F02, // 0003 GETMET R10 R7 K2 - 0x5C300200, // 0004 MOVE R12 R1 - 0x7C280400, // 0005 CALL R10 2 - 0x8C2C0F02, // 0006 GETMET R11 R7 K2 - 0x5C340400, // 0007 MOVE R13 R2 - 0x7C2C0400, // 0008 CALL R11 2 - 0x7C200600, // 0009 CALL R8 3 - 0x4C240000, // 000A LDNIL R9 - 0x20240609, // 000B NE R9 R3 R9 - 0x7826000A, // 000C JMPF R9 #0018 - 0x60240018, // 000D GETGBL R9 G24 - 0x58280003, // 000E LDCONST R10 K3 - 0x5C2C1000, // 000F MOVE R11 R8 - 0x8C300F02, // 0010 GETMET R12 R7 K2 - 0x5C380600, // 0011 MOVE R14 R3 - 0x7C300400, // 0012 CALL R12 2 - 0x8C340F02, // 0013 GETMET R13 R7 K2 - 0x5C3C0800, // 0014 MOVE R15 R4 - 0x7C340400, // 0015 CALL R13 2 - 0x7C240800, // 0016 CALL R9 4 - 0x5C201200, // 0017 MOVE R8 R9 - 0x4C240000, // 0018 LDNIL R9 - 0x20240A09, // 0019 NE R9 R5 R9 - 0x7826000A, // 001A JMPF R9 #0026 - 0x60240018, // 001B GETGBL R9 G24 - 0x58280003, // 001C LDCONST R10 K3 - 0x5C2C1000, // 001D MOVE R11 R8 - 0x8C300F02, // 001E GETMET R12 R7 K2 - 0x5C380A00, // 001F MOVE R14 R5 - 0x7C300400, // 0020 CALL R12 2 - 0x8C340F02, // 0021 GETMET R13 R7 K2 - 0x5C3C0C00, // 0022 MOVE R15 R6 - 0x7C340400, // 0023 CALL R13 2 - 0x7C240800, // 0024 CALL R9 4 - 0x5C201200, // 0025 MOVE R8 R9 - 0xB8260800, // 0026 GETNGBL R9 K4 - 0x8C241305, // 0027 GETMET R9 R9 K5 - 0x582C0006, // 0028 LDCONST R11 K6 - 0x88300107, // 0029 GETMBR R12 R0 K7 - 0x88340108, // 002A GETMBR R13 R0 K8 - 0x5C381000, // 002B MOVE R14 R8 - 0x7C240A00, // 002C CALL R9 5 - 0x80000000, // 002D RET 0 + ( &(const binstruction[15]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x780E0006, // 0004 JMPF R3 #000C + 0x880C0102, // 0005 GETMBR R3 R0 K2 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x5C140400, // 0007 MOVE R5 R2 + 0x7C0C0400, // 0008 CALL R3 2 + 0x4C100000, // 0009 LDNIL R4 + 0x200C0604, // 000A NE R3 R3 R4 + 0x740E0000, // 000B JMPT R3 #000D + 0x500C0001, // 000C LDBOOL R3 0 1 + 0x500C0200, // 000D LDBOOL R3 1 0 + 0x80040600, // 000E RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_update_virtual, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -584,92 +492,6 @@ be_local_closure(class_Matter_Plugin_ui_conf_to_string, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: write_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_write_attribute, /* name */ - be_nested_proto( - 5, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(write_attribute), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_attribute_list -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), - }), - be_str_weak(get_attribute_list), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x60140012, // 0003 GETGBL R5 G18 - 0x7C140000, // 0004 CALL R5 0 - 0x7C080600, // 0005 CALL R2 3 - 0x80040400, // 0006 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_event -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_read_event, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(read_event), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: ack_request ********************************************************************/ @@ -713,6 +535,32 @@ be_local_closure(class_Matter_Plugin_ack_request, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: write_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_write_attribute, /* name */ + be_nested_proto( + 5, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(write_attribute), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_cluster_list_sorted ********************************************************************/ @@ -747,12 +595,12 @@ be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ /******************************************************************** -** Solidified function: attribute_updated +** Solidified function: init ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ +be_local_closure(class_Matter_Plugin_init, /* name */ be_nested_proto( - 10, /* nstack */ + 8, /* nstack */ 4, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -760,22 +608,34 @@ be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ + ( &(const bvalue[ 9]) { /* constants */ /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(attribute_updated), - /* K2 */ be_nested_str_weak(endpoint), + /* K1 */ be_nested_str_weak(endpoint), + /* K2 */ be_nested_str_weak(clusters), + /* K3 */ be_nested_str_weak(consolidate_clusters), + /* K4 */ be_nested_str_weak(parse_configuration), + /* K5 */ be_nested_str_weak(node_label), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(name), + /* K8 */ be_nested_str_weak(), }), - be_str_weak(attribute_updated), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x88180102, // 0002 GETMBR R6 R0 K2 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80000000, // 0007 RET 0 + ( &(const binstruction[14]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x8C100103, // 0002 GETMET R4 R0 K3 + 0x7C100200, // 0003 CALL R4 1 + 0x90020404, // 0004 SETMBR R0 K2 R4 + 0x8C100104, // 0005 GETMET R4 R0 K4 + 0x5C180600, // 0006 MOVE R6 R3 + 0x7C100400, // 0007 CALL R4 2 + 0x8C100706, // 0008 GETMET R4 R3 K6 + 0x58180007, // 0009 LDCONST R6 K7 + 0x581C0008, // 000A LDCONST R7 K8 + 0x7C100600, // 000B CALL R4 3 + 0x90020A04, // 000C SETMBR R0 K5 R4 + 0x80000000, // 000D RET 0 }) ) ); @@ -783,13 +643,114 @@ be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ /******************************************************************** -** Solidified function: timed_request +** Solidified function: ui_string_to_conf ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_timed_request, /* name */ +be_local_closure(class_Matter_Plugin_ui_string_to_conf, /* name */ be_nested_proto( - 5, /* nstack */ - 4, /* argc */ + 8, /* nstack */ + 3, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(ARG_TYPE), + }), + be_str_weak(ui_string_to_conf), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0x88100101, // 0001 GETMBR R4 R0 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x780A0004, // 0003 JMPF R2 #0009 + 0x78120003, // 0004 JMPF R4 #0009 + 0x5C180A00, // 0005 MOVE R6 R5 + 0x5C1C0400, // 0006 MOVE R7 R2 + 0x7C180200, // 0007 CALL R6 1 + 0x98040806, // 0008 SETIDX R1 R4 R6 + 0x80040200, // 0009 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_every_250ms, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(update_next), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(jitter), + /* K3 */ be_nested_str_weak(UPDATE_TIME), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(time_reached), + /* K6 */ be_nested_str_weak(tick), + /* K7 */ be_nested_str_weak(device), + /* K8 */ be_nested_str_weak(update_shadow), + /* K9 */ be_nested_str_weak(millis), + }), + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060005, // 0003 JMPF R1 #000A + 0xB8060200, // 0004 GETNGBL R1 K1 + 0x8C040302, // 0005 GETMET R1 R1 K2 + 0x880C0103, // 0006 GETMBR R3 R0 K3 + 0x7C040400, // 0007 CALL R1 2 + 0x90020001, // 0008 SETMBR R0 K0 R1 + 0x70020010, // 0009 JMP #001B + 0xB8060800, // 000A GETNGBL R1 K4 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x880C0100, // 000C GETMBR R3 R0 K0 + 0x7C040400, // 000D CALL R1 2 + 0x7806000B, // 000E JMPF R1 #001B + 0x88040106, // 000F GETMBR R1 R0 K6 + 0x88080107, // 0010 GETMBR R2 R0 K7 + 0x88080506, // 0011 GETMBR R2 R2 K6 + 0x20040202, // 0012 NE R1 R1 R2 + 0x78060001, // 0013 JMPF R1 #0016 + 0x8C040108, // 0014 GETMET R1 R0 K8 + 0x7C040200, // 0015 CALL R1 1 + 0xB8060800, // 0016 GETNGBL R1 K4 + 0x8C040309, // 0017 GETMET R1 R1 K9 + 0x880C0103, // 0018 GETMBR R3 R0 K3 + 0x7C040400, // 0019 CALL R1 2 + 0x90020001, // 001A SETMBR R0 K0 R1 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -797,11 +758,115 @@ be_local_closure(class_Matter_Plugin_timed_request, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(timed_request), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: subscribe_event +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(subscribe_event), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_attribute_list +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), + }), + be_str_weak(get_attribute_list), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x60140012, // 0003 GETGBL R5 G18 + 0x7C140000, // 0004 CALL R5 0 + 0x7C080600, // 0005 CALL R2 3 + 0x80040400, // 0006 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _parse_update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin__parse_update_virtual, /* name */ + be_nested_proto( + 12, /* nstack */ + 7, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(_parse_update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C1C0300, // 0000 GETMET R7 R1 K0 + 0x5C240400, // 0001 MOVE R9 R2 + 0x7C1C0400, // 0002 CALL R7 2 + 0x4C200000, // 0003 LDNIL R8 + 0x20200E08, // 0004 NE R8 R7 R8 + 0x7822000A, // 0005 JMPF R8 #0011 + 0x5C200800, // 0006 MOVE R8 R4 + 0x5C240E00, // 0007 MOVE R9 R7 + 0x7C200200, // 0008 CALL R8 1 + 0x5C1C1000, // 0009 MOVE R7 R8 + 0x20200E03, // 000A NE R8 R7 R3 + 0x78220003, // 000B JMPF R8 #0010 + 0x8C200101, // 000C GETMET R8 R0 K1 + 0x5C280A00, // 000D MOVE R10 R5 + 0x5C2C0C00, // 000E MOVE R11 R6 + 0x7C200600, // 000F CALL R8 3 + 0x80040E00, // 0010 RET 1 R7 + 0x80040600, // 0011 RET 1 R3 }) ) ); @@ -837,201 +902,13 @@ be_local_closure(class_Matter_Plugin_get_endpoint, /* name */ /******************************************************************** -** Solidified function: update_shadow +** Solidified function: subscribe_attribute ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_shadow, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040101, // 0000 GETMBR R1 R0 K1 - 0x88040300, // 0001 GETMBR R1 R1 K0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: consolidate_update_commands -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), - }), - be_str_weak(consolidate_update_commands), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: append_state_json -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_append_state_json, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(), - }), - be_str_weak(append_state_json), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80060000, // 0000 RET 1 K0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: state_json -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_state_json, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(node_label), - /* K2 */ be_nested_str_weak(_X2C_X22Name_X22_X3A_X25s), - /* K3 */ be_nested_str_weak(dump), - /* K4 */ be_nested_str_weak(), - /* K5 */ be_nested_str_weak(append_state_json), - /* K6 */ be_nested_str_weak(_X7B_X22Ep_X22_X3A_X25i_X25s_X25s_X7D), - /* K7 */ be_nested_str_weak(endpoint), - }), - be_str_weak(state_json), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x780A0006, // 0002 JMPF R2 #000A - 0x60080018, // 0003 GETGBL R2 G24 - 0x580C0002, // 0004 LDCONST R3 K2 - 0x8C100303, // 0005 GETMET R4 R1 K3 - 0x88180101, // 0006 GETMBR R6 R0 K1 - 0x7C100400, // 0007 CALL R4 2 - 0x7C080400, // 0008 CALL R2 2 - 0x70020000, // 0009 JMP #000B - 0x58080004, // 000A LDCONST R2 K4 - 0x8C0C0105, // 000B GETMET R3 R0 K5 - 0x7C0C0200, // 000C CALL R3 1 - 0x780E0007, // 000D JMPF R3 #0016 - 0x60100018, // 000E GETGBL R4 G24 - 0x58140006, // 000F LDCONST R5 K6 - 0x88180107, // 0010 GETMBR R6 R0 K7 - 0x5C1C0400, // 0011 MOVE R7 R2 - 0x5C200600, // 0012 MOVE R8 R3 - 0x7C100800, // 0013 CALL R4 4 - 0x80040800, // 0014 RET 1 R4 - 0x70020001, // 0015 JMP #0018 - 0x4C100000, // 0016 LDNIL R4 - 0x80040800, // 0017 RET 1 R4 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: has -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_has, /* name */ +be_local_closure(class_Matter_Plugin_subscribe_attribute, /* name */ be_nested_proto( 6, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(endpoints), - /* K3 */ be_nested_str_weak(find), - }), - be_str_weak(has), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x780E0006, // 0004 JMPF R3 #000C - 0x880C0102, // 0005 GETMBR R3 R0 K2 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x5C140400, // 0007 MOVE R5 R2 - 0x7C0C0400, // 0008 CALL R3 2 - 0x4C100000, // 0009 LDNIL R4 - 0x200C0604, // 000A NE R3 R3 R4 - 0x740E0000, // 000B JMPT R3 #000D - 0x500C0001, // 000C LDBOOL R3 0 1 - 0x500C0200, // 000D LDBOOL R3 1 0 - 0x80040600, // 000E RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_invoke_request, /* name */ - be_nested_proto( - 5, /* nstack */ - 4, /* argc */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -1039,103 +916,11 @@ be_local_closure(class_Matter_Plugin_invoke_request, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(invoke_request), + be_str_weak(subscribe_attribute), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow_lazy -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow_lazy), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x88080500, // 0002 GETMBR R2 R2 K0 - 0x20040202, // 0003 NE R1 R1 R2 - 0x78060004, // 0004 JMPF R1 #000A - 0x8C040102, // 0005 GETMET R1 R0 K2 - 0x7C040200, // 0006 CALL R1 1 - 0x88040101, // 0007 GETMBR R1 R0 K1 - 0x88040300, // 0008 GETMBR R1 R1 K0 - 0x90020001, // 0009 SETMBR R0 K0 R1 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_virtual, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: consolidate_clusters -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(CLUSTERS), - }), - be_str_weak(consolidate_clusters), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -1194,10 +979,10 @@ be_local_closure(class_Matter_Plugin_contains_attribute, /* name */ /******************************************************************** -** Solidified function: get_name +** Solidified function: consolidate_update_commands ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_name, /* name */ +be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1208,9 +993,9 @@ be_local_closure(class_Matter_Plugin_get_name, /* name */ &be_class_Matter_Plugin, 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(node_label), + /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), }), - be_str_weak(get_name), + be_str_weak(consolidate_update_commands), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -1249,12 +1034,120 @@ be_local_closure(class_Matter_Plugin__X3Clambda_X3E, /* name */ /******************************************************************** -** Solidified function: contains_cluster +** Solidified function: get_name ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ +be_local_closure(class_Matter_Plugin_get_name, /* name */ be_nested_proto( - 5, /* nstack */ + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(node_label), + }), + be_str_weak(get_name), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: publish_command +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_publish_command, /* name */ + be_nested_proto( + 16, /* nstack */ + 7, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(_X25s_X3A_X25s), + /* K2 */ be_nested_str_weak(dump), + /* K3 */ be_nested_str_weak(_X25s_X2C_X25s_X3A_X25s), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(publish_command), + /* K6 */ be_nested_str_weak(MtrReceived), + /* K7 */ be_nested_str_weak(endpoint), + /* K8 */ be_nested_str_weak(node_label), + }), + be_str_weak(publish_command), + &be_const_str_solidified, + ( &(const binstruction[46]) { /* code */ + 0xA41E0000, // 0000 IMPORT R7 K0 + 0x60200018, // 0001 GETGBL R8 G24 + 0x58240001, // 0002 LDCONST R9 K1 + 0x8C280F02, // 0003 GETMET R10 R7 K2 + 0x5C300200, // 0004 MOVE R12 R1 + 0x7C280400, // 0005 CALL R10 2 + 0x8C2C0F02, // 0006 GETMET R11 R7 K2 + 0x5C340400, // 0007 MOVE R13 R2 + 0x7C2C0400, // 0008 CALL R11 2 + 0x7C200600, // 0009 CALL R8 3 + 0x4C240000, // 000A LDNIL R9 + 0x20240609, // 000B NE R9 R3 R9 + 0x7826000A, // 000C JMPF R9 #0018 + 0x60240018, // 000D GETGBL R9 G24 + 0x58280003, // 000E LDCONST R10 K3 + 0x5C2C1000, // 000F MOVE R11 R8 + 0x8C300F02, // 0010 GETMET R12 R7 K2 + 0x5C380600, // 0011 MOVE R14 R3 + 0x7C300400, // 0012 CALL R12 2 + 0x8C340F02, // 0013 GETMET R13 R7 K2 + 0x5C3C0800, // 0014 MOVE R15 R4 + 0x7C340400, // 0015 CALL R13 2 + 0x7C240800, // 0016 CALL R9 4 + 0x5C201200, // 0017 MOVE R8 R9 + 0x4C240000, // 0018 LDNIL R9 + 0x20240A09, // 0019 NE R9 R5 R9 + 0x7826000A, // 001A JMPF R9 #0026 + 0x60240018, // 001B GETGBL R9 G24 + 0x58280003, // 001C LDCONST R10 K3 + 0x5C2C1000, // 001D MOVE R11 R8 + 0x8C300F02, // 001E GETMET R12 R7 K2 + 0x5C380A00, // 001F MOVE R14 R5 + 0x7C300400, // 0020 CALL R12 2 + 0x8C340F02, // 0021 GETMET R13 R7 K2 + 0x5C3C0C00, // 0022 MOVE R15 R6 + 0x7C340400, // 0023 CALL R13 2 + 0x7C240800, // 0024 CALL R9 4 + 0x5C201200, // 0025 MOVE R8 R9 + 0xB8260800, // 0026 GETNGBL R9 K4 + 0x8C241305, // 0027 GETMET R9 R9 K5 + 0x582C0006, // 0028 LDCONST R11 K6 + 0x88300107, // 0029 GETMBR R12 R0 K7 + 0x88340108, // 002A GETMBR R13 R0 K8 + 0x5C381000, // 002B MOVE R14 R8 + 0x7C240A00, // 002C CALL R9 5 + 0x80000000, // 002D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_name +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_set_name, /* name */ + be_nested_proto( + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1263,17 +1156,153 @@ be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ &be_class_Matter_Plugin, 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), + /* K0 */ be_nested_str_weak(node_label), + /* K1 */ be_nested_str_weak(attribute_updated), }), - be_str_weak(contains_cluster), + be_str_weak(set_name), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ + ( &(const binstruction[ 9]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0x8C080101, // 0003 GETMET R2 R0 K1 + 0x54120038, // 0004 LDINT R4 57 + 0x54160004, // 0005 LDINT R5 5 + 0x7C080600, // 0006 CALL R2 3 + 0x90020001, // 0007 SETMBR R0 K0 R1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow_lazy +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), + /* K2 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow_lazy), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x88080500, // 0002 GETMBR R2 R2 K0 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060004, // 0004 JMPF R1 #000A + 0x8C040102, // 0005 GETMET R1 R0 K2 + 0x7C040200, // 0006 CALL R1 1 + 0x88040101, // 0007 GETMBR R1 R0 K1 + 0x88040300, // 0008 GETMBR R1 R1 K0 + 0x90020001, // 0009 SETMBR R0 K0 R1 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_update_shadow, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040101, // 0000 GETMBR R1 R0 K1 + 0x88040300, // 0001 GETMBR R1 R1 K0 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_invoke_request, /* name */ + be_nested_proto( + 5, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: attribute_updated +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(attribute_updated), + /* K2 */ be_nested_str_weak(endpoint), + }), + be_str_weak(attribute_updated), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x88180102, // 0002 GETMBR R6 R0 K2 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80000000, // 0007 RET 0 }) ) ); @@ -1307,37 +1336,53 @@ be_local_closure(class_Matter_Plugin_is_local_device, /* name */ /******************************************************************** -** Solidified function: ui_string_to_conf +** Solidified function: consolidate_clusters ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_ui_string_to_conf, /* name */ +be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 4, /* varg */ + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Plugin), - /* K1 */ be_nested_str_weak(ARG), - /* K2 */ be_nested_str_weak(ARG_TYPE), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(CLUSTERS), }), - be_str_weak(ui_string_to_conf), + be_str_weak(consolidate_clusters), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x580C0000, // 0000 LDCONST R3 K0 - 0x88100101, // 0001 GETMBR R4 R0 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x780A0004, // 0003 JMPF R2 #0009 - 0x78120003, // 0004 JMPF R4 #0009 - 0x5C180A00, // 0005 MOVE R6 R5 - 0x5C1C0400, // 0006 MOVE R7 R2 - 0x7C180200, // 0007 CALL R6 1 - 0x98040806, // 0008 SETIDX R1 R4 R6 - 0x80040200, // 0009 RET 1 R1 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_event +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_read_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(read_event), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -1350,37 +1395,45 @@ be_local_closure(class_Matter_Plugin_ui_string_to_conf, /* name */ be_local_class(Matter_Plugin, 6, NULL, - be_nested_map(50, + be_nested_map(51, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(every_250ms, -1), be_const_closure(class_Matter_Plugin_every_250ms_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak() }, - { be_const_key_weak(FEATURE_MAPS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(258, -1), be_const_int(5) }, - { be_const_key_int(49, -1), be_const_int(4) }, - })) ) } )) }, { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_read_attribute_closure) }, - { be_const_key_weak(subscribe_attribute, 33), be_const_closure(class_Matter_Plugin_subscribe_attribute_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_init_closure) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(COMMANDS, 21), 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(29, -1), be_const_nil() }, - })) ) } )) }, - { be_const_key_weak(endpoint, -1), be_const_var(2) }, - { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_append_state_json_closure) }, + { be_const_key_weak(get_cluster_list_sorted, -1), be_const_closure(class_Matter_Plugin_get_cluster_list_sorted_closure) }, + { be_const_key_weak(state_json, -1), be_const_closure(class_Matter_Plugin_state_json_closure) }, + { be_const_key_weak(read_event, 38), be_const_closure(class_Matter_Plugin_read_event_closure) }, + { be_const_key_weak(timed_request, -1), be_const_closure(class_Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(consolidate_clusters, -1), be_const_closure(class_Matter_Plugin_consolidate_clusters_closure) }, + { be_const_key_weak(has, -1), be_const_closure(class_Matter_Plugin_has_closure) }, + { be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_update_virtual_closure) }, + { be_const_key_weak(is_local_device, -1), be_const_closure(class_Matter_Plugin_is_local_device_closure) }, + { be_const_key_weak(UPDATE_TIME, 0), be_const_int(5000) }, + { be_const_key_weak(ack_request, -1), be_const_closure(class_Matter_Plugin_ack_request_closure) }, + { be_const_key_weak(get_endpoint, 2), be_const_closure(class_Matter_Plugin_get_endpoint_closure) }, + { be_const_key_weak(ui_conf_to_string, 24), be_const_static_closure(class_Matter_Plugin_ui_conf_to_string_closure) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Plugin_attribute_updated_closure) }, + { be_const_key_weak(UPDATE_COMMANDS, 48), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(0, ( (struct bvalue*) &(const bvalue[]) { })) ) } )) }, - { be_const_key_weak(VIRTUAL, -1), be_const_bool(0) }, + { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(class_Matter_Plugin_ui_string_to_conf_closure) }, + { be_const_key_weak(every_250ms, 27), be_const_closure(class_Matter_Plugin_every_250ms_closure) }, { be_const_key_weak(device, -1), be_const_var(1) }, - { be_const_key_weak(subscribe_event, 3), be_const_closure(class_Matter_Plugin_subscribe_event_closure) }, - { be_const_key_weak(clusters, -1), be_const_var(3) }, - { be_const_key_weak(publish_command, -1), be_const_closure(class_Matter_Plugin_publish_command_closure) }, - { be_const_key_weak(is_local_device, 29), be_const_closure(class_Matter_Plugin_is_local_device_closure) }, - { be_const_key_weak(CLUSTER_REVISIONS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(ARG, -1), be_nested_str_weak() }, + { be_const_key_weak(subscribe_event, -1), be_const_closure(class_Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(get_attribute_list, -1), be_const_closure(class_Matter_Plugin_get_attribute_list_closure) }, + { be_const_key_weak(write_attribute, 39), be_const_closure(class_Matter_Plugin_write_attribute_closure) }, + { be_const_key_weak(contains_attribute, -1), be_const_closure(class_Matter_Plugin_contains_attribute_closure) }, + { be_const_key_weak(consolidate_update_commands, 12), be_const_closure(class_Matter_Plugin_consolidate_update_commands_closure) }, + { be_const_key_weak(subscribe_attribute, -1), be_const_closure(class_Matter_Plugin_subscribe_attribute_closure) }, + { be_const_key_weak(contains_cluster, 23), be_const_closure(class_Matter_Plugin_contains_cluster_closure) }, + { be_const_key_weak(update_next, -1), be_const_var(0) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin__X3Clambda_X3E_closure) }, + { be_const_key_weak(get_name, 30), be_const_closure(class_Matter_Plugin_get_name_closure) }, + { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(class_Matter_Plugin_update_shadow_lazy_closure) }, + { be_const_key_weak(TYPE, 34), be_nested_str_weak() }, + { be_const_key_weak(tick, -1), be_const_var(4) }, + { be_const_key_weak(CLUSTER_REVISIONS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(25, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, -1), be_const_int(5) }, @@ -1409,14 +1462,20 @@ be_local_class(Matter_Plugin, { be_const_key_int(6, -1), be_const_int(5) }, { be_const_key_int(1024, -1), be_const_int(3) }, })) ) } )) }, - { be_const_key_weak(contains_cluster, -1), be_const_closure(class_Matter_Plugin_contains_cluster_closure) }, - { be_const_key_weak(ack_request, -1), be_const_closure(class_Matter_Plugin_ack_request_closure) }, - { be_const_key_weak(parse_configuration, 34), be_const_closure(class_Matter_Plugin_parse_configuration_closure) }, - { be_const_key_weak(read_event, 28), be_const_closure(class_Matter_Plugin_read_event_closure) }, - { be_const_key_weak(get_name, 43), be_const_closure(class_Matter_Plugin_get_name_closure) }, - { be_const_key_weak(contains_attribute, 31), be_const_closure(class_Matter_Plugin_contains_attribute_closure) }, - { be_const_key_weak(get_cluster_list_sorted, -1), be_const_closure(class_Matter_Plugin_get_cluster_list_sorted_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(clusters, -1), be_const_var(3) }, + { be_const_key_weak(COMMANDS, -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(29, -1), be_const_nil() }, + })) ) } )) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(set_name, -1), be_const_closure(class_Matter_Plugin_set_name_closure) }, + { be_const_key_weak(publish_command, -1), be_const_closure(class_Matter_Plugin_publish_command_closure) }, + { be_const_key_weak(_parse_update_virtual, 47), be_const_closure(class_Matter_Plugin__parse_update_virtual_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_invoke_request_closure) }, + { be_const_key_weak(parse_sensors, 19), be_const_closure(class_Matter_Plugin_parse_sensors_closure) }, + { be_const_key_weak(CLUSTERS, 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(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -1434,31 +1493,18 @@ be_local_class(Matter_Plugin, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Plugin_attribute_updated_closure) }, - { be_const_key_weak(timed_request, 13), be_const_closure(class_Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(get_endpoint, -1), be_const_closure(class_Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(class_Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(append_state_json, 18), be_const_closure(class_Matter_Plugin_append_state_json_closure) }, - { be_const_key_weak(ui_conf_to_string, 41), be_const_static_closure(class_Matter_Plugin_ui_conf_to_string_closure) }, - { be_const_key_weak(TYPE, 32), be_nested_str_weak() }, - { be_const_key_weak(state_json, -1), be_const_closure(class_Matter_Plugin_state_json_closure) }, - { be_const_key_weak(tick, -1), be_const_var(4) }, - { be_const_key_weak(ARG, 47), be_nested_str_weak() }, - { be_const_key_weak(write_attribute, 36), be_const_closure(class_Matter_Plugin_write_attribute_closure) }, - { be_const_key_weak(has, -1), be_const_closure(class_Matter_Plugin_has_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(class_Matter_Plugin_update_shadow_lazy_closure) }, - { be_const_key_weak(update_shadow, 22), be_const_closure(class_Matter_Plugin_update_shadow_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_update_virtual_closure) }, - { be_const_key_weak(node_label, 42), be_const_var(5) }, - { be_const_key_weak(update_next, -1), be_const_var(0) }, - { be_const_key_weak(set_name, -1), be_const_closure(class_Matter_Plugin_set_name_closure) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, 17), be_nested_str_weak(_Not_X20used_) }, - { be_const_key_weak(parse_sensors, 15), be_const_closure(class_Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(get_attribute_list, -1), be_const_closure(class_Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(class_Matter_Plugin_ui_string_to_conf_closure) }, - { be_const_key_weak(consolidate_update_commands, 2), be_const_closure(class_Matter_Plugin_consolidate_update_commands_closure) }, + { be_const_key_weak(VIRTUAL, -1), be_const_bool(0) }, + { be_const_key_weak(DISPLAY_NAME, 10), be_nested_str_weak() }, + { be_const_key_weak(node_label, 9), be_const_var(5) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_parse_configuration_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_init_closure) }, + { be_const_key_weak(endpoint, -1), be_const_var(2) }, + { be_const_key_weak(FEATURE_MAPS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(258, -1), be_const_int(5) }, + { be_const_key_int(49, -1), be_const_int(4) }, + })) ) } )) }, })), be_str_weak(Matter_Plugin) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h index 83ab36871..0cb5a26f7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h @@ -328,7 +328,7 @@ be_local_closure(class_Matter_Plugin_Device_append_state_json, /* name */ &be_class_Matter_Plugin_Device, }), 1, /* has constants */ - ( &(const bvalue[30]) { /* constants */ + ( &(const bvalue[42]) { /* constants */ /* K0 */ be_nested_str_weak(introspect), /* K1 */ be_nested_str_weak(json), /* K2 */ be_nested_str_weak(), @@ -359,10 +359,22 @@ be_local_closure(class_Matter_Plugin_Device_append_state_json, /* name */ /* K27 */ be_nested_str_weak(Contact), /* K28 */ be_nested_str_weak(shadow_occupancy), /* K29 */ be_nested_str_weak(Occupancy), + /* K30 */ be_nested_str_weak(shadow_air_quality), + /* K31 */ be_nested_str_weak(AirQuality), + /* K32 */ be_nested_str_weak(shadow_co2), + /* K33 */ be_nested_str_weak(CO2), + /* K34 */ be_nested_str_weak(shadow_pm1), + /* K35 */ be_nested_str_weak(PM1), + /* K36 */ be_nested_str_weak(shadow_pm2_5), + /* K37 */ be_nested_str_weak(PM2_X2E5), + /* K38 */ be_nested_str_weak(shadow_pm10), + /* K39 */ be_nested_str_weak(PM10), + /* K40 */ be_nested_str_weak(shadow_tvoc), + /* K41 */ be_nested_str_weak(TVOC), }), be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[71]) { /* code */ + ( &(const binstruction[95]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 0x580C0002, // 0002 LDCONST R3 K2 @@ -432,8 +444,77 @@ be_local_closure(class_Matter_Plugin_Device_append_state_json, /* name */ 0x581C001C, // 0042 LDCONST R7 K28 0x5820001D, // 0043 LDCONST R8 K29 0x7C180400, // 0044 CALL R6 2 - 0xA0000000, // 0045 CLOSE R0 - 0x80040600, // 0046 RET 1 R3 + 0x5C180800, // 0045 MOVE R6 R4 + 0x581C001E, // 0046 LDCONST R7 K30 + 0x5820001F, // 0047 LDCONST R8 K31 + 0x7C180400, // 0048 CALL R6 2 + 0x5C180800, // 0049 MOVE R6 R4 + 0x581C0020, // 004A LDCONST R7 K32 + 0x58200021, // 004B LDCONST R8 K33 + 0x7C180400, // 004C CALL R6 2 + 0x5C180800, // 004D MOVE R6 R4 + 0x581C0022, // 004E LDCONST R7 K34 + 0x58200023, // 004F LDCONST R8 K35 + 0x7C180400, // 0050 CALL R6 2 + 0x5C180800, // 0051 MOVE R6 R4 + 0x581C0024, // 0052 LDCONST R7 K36 + 0x58200025, // 0053 LDCONST R8 K37 + 0x7C180400, // 0054 CALL R6 2 + 0x5C180800, // 0055 MOVE R6 R4 + 0x581C0026, // 0056 LDCONST R7 K38 + 0x58200027, // 0057 LDCONST R8 K39 + 0x7C180400, // 0058 CALL R6 2 + 0x5C180800, // 0059 MOVE R6 R4 + 0x581C0028, // 005A LDCONST R7 K40 + 0x58200029, // 005B LDCONST R8 K41 + 0x7C180400, // 005C CALL R6 2 + 0xA0000000, // 005D CLOSE R0 + 0x80040600, // 005E RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _parse_sensor_entry +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device__parse_sensor_entry, /* name */ + be_nested_proto( + 12, /* nstack */ + 7, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(_parse_sensor_entry), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C1C0300, // 0000 GETMET R7 R1 K0 + 0x5C240400, // 0001 MOVE R9 R2 + 0x7C1C0400, // 0002 CALL R7 2 + 0x4C200000, // 0003 LDNIL R8 + 0x20200E08, // 0004 NE R8 R7 R8 + 0x7822000A, // 0005 JMPF R8 #0011 + 0x5C200800, // 0006 MOVE R8 R4 + 0x5C240E00, // 0007 MOVE R9 R7 + 0x7C200200, // 0008 CALL R8 1 + 0x5C1C1000, // 0009 MOVE R7 R8 + 0x20200E03, // 000A NE R8 R7 R3 + 0x78220003, // 000B JMPF R8 #0010 + 0x8C200101, // 000C GETMET R8 R0 K1 + 0x5C280A00, // 000D MOVE R10 R5 + 0x5C2C0C00, // 000E MOVE R11 R6 + 0x7C200600, // 000F CALL R8 3 + 0x80040E00, // 0010 RET 1 R7 + 0x80040600, // 0011 RET 1 R3 }) ) ); @@ -534,17 +615,18 @@ extern const bclass be_class_Matter_Plugin; be_local_class(Matter_Plugin_Device, 0, &be_class_Matter_Plugin, - be_nested_map(6, + be_nested_map(7, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Device_read_attribute_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Device_invoke_request_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(19, -1), be_const_int(1) }, - })) ) } )) }, + { be_const_key_weak(read_attribute, 1), be_const_closure(class_Matter_Plugin_Device_read_attribute_closure) }, + { be_const_key_weak(invoke_request, 4), be_const_closure(class_Matter_Plugin_Device_invoke_request_closure) }, { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_Device_append_state_json_closure) }, - { be_const_key_weak(CLUSTERS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(NON_BRIDGE_VENDOR, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(2, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(4631), + be_const_int(4993), + })) ) } )) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -617,12 +699,12 @@ be_local_class(Matter_Plugin_Device, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(NON_BRIDGE_VENDOR, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(2, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(4631), - be_const_int(4993), + { be_const_key_weak(TYPES, 6), 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(19, -1), be_const_int(1) }, })) ) } )) }, + { be_const_key_weak(_parse_sensor_entry, -1), be_const_closure(class_Matter_Plugin_Device__parse_sensor_entry_closure) }, })), be_str_weak(Matter_Plugin_Device) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h new file mode 100644 index 000000000..179f66f25 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h @@ -0,0 +1,816 @@ +/* Solidification of Matter_Plugin_2_Sensor_Air_Quality.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; + +/******************************************************************** +** Solidified function: _parse_sensor_entry +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Sensor_Air_Quality__parse_sensor_entry, /* name */ + be_nested_proto( + 11, /* nstack */ + 6, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(_parse_sensor_entry), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C180300, // 0000 GETMET R6 R1 K0 + 0x5C200400, // 0001 MOVE R8 R2 + 0x7C180400, // 0002 CALL R6 2 + 0x4C1C0000, // 0003 LDNIL R7 + 0x201C0C07, // 0004 NE R7 R6 R7 + 0x781E0006, // 0005 JMPF R7 #000D + 0x201C0C03, // 0006 NE R7 R6 R3 + 0x781E0003, // 0007 JMPF R7 #000C + 0x8C1C0101, // 0008 GETMET R7 R0 K1 + 0x5C240800, // 0009 MOVE R9 R4 + 0x5C280A00, // 000A MOVE R10 R5 + 0x7C1C0600, // 000B CALL R7 3 + 0x80040C00, // 000C RET 1 R6 + 0x80040600, // 000D RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_update_virtual, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_air_quality), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(AirQuality), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(shadow_co2), + /* K5 */ be_nested_str_weak(CO2), + /* K6 */ be_nested_str_weak(shadow_pm1), + /* K7 */ be_nested_str_weak(PM1), + /* K8 */ be_nested_str_weak(shadow_pm2_5), + /* K9 */ be_nested_str_weak(PM2_X2E5), + /* K10 */ be_nested_str_weak(shadow_pm10), + /* K11 */ be_nested_str_weak(PM10), + /* K12 */ be_nested_str_weak(shadow_tvoc), + /* K13 */ be_nested_str_weak(TVOC), + /* K14 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[61]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x60180007, // 0003 GETGBL R6 G7 + 0x881C0100, // 0004 GETMBR R7 R0 K0 + 0x5422005A, // 0005 LDINT R8 91 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x8C080101, // 0009 GETMET R2 R0 K1 + 0x5C100200, // 000A MOVE R4 R1 + 0x58140005, // 000B LDCONST R5 K5 + 0x88180104, // 000C GETMBR R6 R0 K4 + 0x601C0007, // 000D GETGBL R7 G7 + 0x5422040C, // 000E LDINT R8 1037 + 0x58240003, // 000F LDCONST R9 K3 + 0x7C080E00, // 0010 CALL R2 7 + 0x90020802, // 0011 SETMBR R0 K4 R2 + 0x8C080101, // 0012 GETMET R2 R0 K1 + 0x5C100200, // 0013 MOVE R4 R1 + 0x58140007, // 0014 LDCONST R5 K7 + 0x88180106, // 0015 GETMBR R6 R0 K6 + 0x601C0007, // 0016 GETGBL R7 G7 + 0x5422042B, // 0017 LDINT R8 1068 + 0x58240003, // 0018 LDCONST R9 K3 + 0x7C080E00, // 0019 CALL R2 7 + 0x90020C02, // 001A SETMBR R0 K6 R2 + 0x8C080101, // 001B GETMET R2 R0 K1 + 0x5C100200, // 001C MOVE R4 R1 + 0x58140009, // 001D LDCONST R5 K9 + 0x88180108, // 001E GETMBR R6 R0 K8 + 0x601C0007, // 001F GETGBL R7 G7 + 0x54220429, // 0020 LDINT R8 1066 + 0x58240003, // 0021 LDCONST R9 K3 + 0x7C080E00, // 0022 CALL R2 7 + 0x90021002, // 0023 SETMBR R0 K8 R2 + 0x8C080101, // 0024 GETMET R2 R0 K1 + 0x5C100200, // 0025 MOVE R4 R1 + 0x5814000B, // 0026 LDCONST R5 K11 + 0x8818010A, // 0027 GETMBR R6 R0 K10 + 0x601C0007, // 0028 GETGBL R7 G7 + 0x5422042C, // 0029 LDINT R8 1069 + 0x58240003, // 002A LDCONST R9 K3 + 0x7C080E00, // 002B CALL R2 7 + 0x90021402, // 002C SETMBR R0 K10 R2 + 0x8C080101, // 002D GETMET R2 R0 K1 + 0x5C100200, // 002E MOVE R4 R1 + 0x5814000D, // 002F LDCONST R5 K13 + 0x8818010C, // 0030 GETMBR R6 R0 K12 + 0x601C0007, // 0031 GETGBL R7 G7 + 0x5422042D, // 0032 LDINT R8 1070 + 0x58240003, // 0033 LDCONST R9 K3 + 0x7C080E00, // 0034 CALL R2 7 + 0x90021802, // 0035 SETMBR R0 K12 R2 + 0x60080003, // 0036 GETGBL R2 G3 + 0x5C0C0000, // 0037 MOVE R3 R0 + 0x7C080200, // 0038 CALL R2 1 + 0x8C08050E, // 0039 GETMET R2 R2 K14 + 0x5C100200, // 003A MOVE R4 R1 + 0x7C080400, // 003B CALL R2 2 + 0x80000000, // 003C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_sensors +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_sensors, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[17]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(prefix), + /* K2 */ be_nested_str_weak(shadow_co2), + /* K3 */ be_nested_str_weak(_parse_sensor_entry), + /* K4 */ be_nested_str_weak(CarbonDioxide), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_pm1), + /* K7 */ be_nested_str_weak(PM1), + /* K8 */ be_nested_str_weak(shadow_pm2_5), + /* K9 */ be_nested_str_weak(PM2_X2E5), + /* K10 */ be_nested_str_weak(shadow_pm10), + /* K11 */ be_nested_str_weak(PM10), + /* K12 */ be_nested_str_weak(shadow_tvoc), + /* K13 */ be_nested_str_weak(TVOC), + /* K14 */ be_nested_str_weak(shadow_no2), + /* K15 */ be_nested_str_weak(NO2), + /* K16 */ be_nested_str_weak(parse_sensors), + }), + be_str_weak(parse_sensors), + &be_const_str_solidified, + ( &(const binstruction[67]) { /* code */ + 0x8C080300, // 0000 GETMET R2 R1 K0 + 0x88100101, // 0001 GETMBR R4 R0 K1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E0035, // 0005 JMPF R3 #003C + 0x8C0C0103, // 0006 GETMET R3 R0 K3 + 0x5C140400, // 0007 MOVE R5 R2 + 0x58180004, // 0008 LDCONST R6 K4 + 0x881C0102, // 0009 GETMBR R7 R0 K2 + 0x60200007, // 000A GETGBL R8 G7 + 0x5426040C, // 000B LDINT R9 1037 + 0x58280005, // 000C LDCONST R10 K5 + 0x7C0C0E00, // 000D CALL R3 7 + 0x90020403, // 000E SETMBR R0 K2 R3 + 0x8C0C0103, // 000F GETMET R3 R0 K3 + 0x5C140400, // 0010 MOVE R5 R2 + 0x58180007, // 0011 LDCONST R6 K7 + 0x881C0106, // 0012 GETMBR R7 R0 K6 + 0x60200007, // 0013 GETGBL R8 G7 + 0x5426042B, // 0014 LDINT R9 1068 + 0x58280005, // 0015 LDCONST R10 K5 + 0x7C0C0E00, // 0016 CALL R3 7 + 0x90020C03, // 0017 SETMBR R0 K6 R3 + 0x8C0C0103, // 0018 GETMET R3 R0 K3 + 0x5C140400, // 0019 MOVE R5 R2 + 0x58180009, // 001A LDCONST R6 K9 + 0x881C0108, // 001B GETMBR R7 R0 K8 + 0x60200007, // 001C GETGBL R8 G7 + 0x54260429, // 001D LDINT R9 1066 + 0x58280005, // 001E LDCONST R10 K5 + 0x7C0C0E00, // 001F CALL R3 7 + 0x90021003, // 0020 SETMBR R0 K8 R3 + 0x8C0C0103, // 0021 GETMET R3 R0 K3 + 0x5C140400, // 0022 MOVE R5 R2 + 0x5818000B, // 0023 LDCONST R6 K11 + 0x881C010A, // 0024 GETMBR R7 R0 K10 + 0x60200007, // 0025 GETGBL R8 G7 + 0x5426042C, // 0026 LDINT R9 1069 + 0x58280005, // 0027 LDCONST R10 K5 + 0x7C0C0E00, // 0028 CALL R3 7 + 0x90021403, // 0029 SETMBR R0 K10 R3 + 0x8C0C0103, // 002A GETMET R3 R0 K3 + 0x5C140400, // 002B MOVE R5 R2 + 0x5818000D, // 002C LDCONST R6 K13 + 0x881C010C, // 002D GETMBR R7 R0 K12 + 0x60200007, // 002E GETGBL R8 G7 + 0x5426042D, // 002F LDINT R9 1070 + 0x58280005, // 0030 LDCONST R10 K5 + 0x7C0C0E00, // 0031 CALL R3 7 + 0x90021803, // 0032 SETMBR R0 K12 R3 + 0x8C0C0103, // 0033 GETMET R3 R0 K3 + 0x5C140400, // 0034 MOVE R5 R2 + 0x5818000F, // 0035 LDCONST R6 K15 + 0x881C010E, // 0036 GETMBR R7 R0 K14 + 0x60200007, // 0037 GETGBL R8 G7 + 0x54260412, // 0038 LDINT R9 1043 + 0x58280005, // 0039 LDCONST R10 K5 + 0x7C0C0E00, // 003A CALL R3 7 + 0x90021C03, // 003B SETMBR R0 K14 R3 + 0x600C0003, // 003C GETGBL R3 G3 + 0x5C100000, // 003D MOVE R4 R0 + 0x7C0C0200, // 003E CALL R3 1 + 0x8C0C0710, // 003F GETMET R3 R3 K16 + 0x5C140200, // 0040 MOVE R5 R1 + 0x7C0C0400, // 0041 CALL R3 2 + 0x80000000, // 0042 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute, /* name */ + be_nested_proto( + 14, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 3]) { /* upvals */ + be_local_const_upval(1, 6), + be_local_const_upval(1, 3), + be_local_const_upval(1, 4), + }), + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(set), + /* K2 */ be_nested_str_weak(FLOAT), + /* K3 */ be_nested_str_weak(NULL), + /* K4 */ be_const_int(1), + /* K5 */ be_const_int(2), + /* K6 */ be_nested_str_weak(U1), + /* K7 */ be_nested_str_weak(U4), + }), + be_str_weak(handle_value), + &be_const_str_solidified, + ( &(const binstruction[85]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0000, // 0002 JMPF R2 #0004 + 0x58040000, // 0003 LDCONST R1 K0 + 0x68080000, // 0004 GETUPV R2 U0 + 0x1C080500, // 0005 EQ R2 R2 K0 + 0x780A0012, // 0006 JMPF R2 #001A + 0x4C080000, // 0007 LDNIL R2 + 0x20080002, // 0008 NE R2 R0 R2 + 0x780A0007, // 0009 JMPF R2 #0012 + 0x68080001, // 000A GETUPV R2 U1 + 0x8C080501, // 000B GETMET R2 R2 K1 + 0x68100002, // 000C GETUPV R4 U2 + 0x88100902, // 000D GETMBR R4 R4 K2 + 0x5C140000, // 000E MOVE R5 R0 + 0x7C080600, // 000F CALL R2 3 + 0x80040400, // 0010 RET 1 R2 + 0x70020006, // 0011 JMP #0019 + 0x68080001, // 0012 GETUPV R2 U1 + 0x8C080501, // 0013 GETMET R2 R2 K1 + 0x68100002, // 0014 GETUPV R4 U2 + 0x88100903, // 0015 GETMBR R4 R4 K3 + 0x4C140000, // 0016 LDNIL R5 + 0x7C080600, // 0017 CALL R2 3 + 0x80040400, // 0018 RET 1 R2 + 0x70020038, // 0019 JMP #0053 + 0x68080000, // 001A GETUPV R2 U0 + 0x1C080504, // 001B EQ R2 R2 K4 + 0x780A0007, // 001C JMPF R2 #0025 + 0x68080001, // 001D GETUPV R2 U1 + 0x8C080501, // 001E GETMET R2 R2 K1 + 0x68100002, // 001F GETUPV R4 U2 + 0x88100903, // 0020 GETMBR R4 R4 K3 + 0x4C140000, // 0021 LDNIL R5 + 0x7C080600, // 0022 CALL R2 3 + 0x80040400, // 0023 RET 1 R2 + 0x7002002D, // 0024 JMP #0053 + 0x68080000, // 0025 GETUPV R2 U0 + 0x1C080505, // 0026 EQ R2 R2 K5 + 0x780A0007, // 0027 JMPF R2 #0030 + 0x68080001, // 0028 GETUPV R2 U1 + 0x8C080501, // 0029 GETMET R2 R2 K1 + 0x68100002, // 002A GETUPV R4 U2 + 0x88100903, // 002B GETMBR R4 R4 K3 + 0x4C140000, // 002C LDNIL R5 + 0x7C080600, // 002D CALL R2 3 + 0x80040400, // 002E RET 1 R2 + 0x70020022, // 002F JMP #0053 + 0x68080000, // 0030 GETUPV R2 U0 + 0x540E0007, // 0031 LDINT R3 8 + 0x1C080403, // 0032 EQ R2 R2 R3 + 0x780A0007, // 0033 JMPF R2 #003C + 0x68080001, // 0034 GETUPV R2 U1 + 0x8C080501, // 0035 GETMET R2 R2 K1 + 0x68100002, // 0036 GETUPV R4 U2 + 0x88100906, // 0037 GETMBR R4 R4 K6 + 0x5C140200, // 0038 MOVE R5 R1 + 0x7C080600, // 0039 CALL R2 3 + 0x80040400, // 003A RET 1 R2 + 0x70020016, // 003B JMP #0053 + 0x68080000, // 003C GETUPV R2 U0 + 0x540E0008, // 003D LDINT R3 9 + 0x1C080403, // 003E EQ R2 R2 R3 + 0x780A0007, // 003F JMPF R2 #0048 + 0x68080001, // 0040 GETUPV R2 U1 + 0x8C080501, // 0041 GETMET R2 R2 K1 + 0x68100002, // 0042 GETUPV R4 U2 + 0x88100906, // 0043 GETMBR R4 R4 K6 + 0x58140000, // 0044 LDCONST R5 K0 + 0x7C080600, // 0045 CALL R2 3 + 0x80040400, // 0046 RET 1 R2 + 0x7002000A, // 0047 JMP #0053 + 0x68080000, // 0048 GETUPV R2 U0 + 0x540EFFFB, // 0049 LDINT R3 65532 + 0x1C080403, // 004A EQ R2 R2 R3 + 0x780A0006, // 004B JMPF R2 #0053 + 0x68080001, // 004C GETUPV R2 U1 + 0x8C080501, // 004D GETMET R2 R2 K1 + 0x68100002, // 004E GETUPV R4 U2 + 0x88100907, // 004F GETMBR R4 R4 K7 + 0x58140004, // 0050 LDCONST R5 K4 + 0x7C080600, // 0051 CALL R2 3 + 0x80040400, // 0052 RET 1 R2 + 0x4C080000, // 0053 LDNIL R2 + 0x80040400, // 0054 RET 1 R2 + }) + ), + &be_class_Matter_Plugin_Sensor_Air_Quality, + }), + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(attribute), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(shadow_air_quality), + /* K6 */ be_nested_str_weak(set), + /* K7 */ be_nested_str_weak(U1), + /* K8 */ be_nested_str_weak(NULL), + /* K9 */ be_nested_str_weak(shadow_co2), + /* K10 */ be_nested_str_weak(shadow_pm1), + /* K11 */ be_nested_str_weak(shadow_pm2_5), + /* K12 */ be_nested_str_weak(shadow_pm10), + /* K13 */ be_nested_str_weak(shadow_tvoc), + /* K14 */ be_nested_str_weak(shadow_no2), + /* K15 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[104]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x4C1C0000, // 0004 LDNIL R7 + 0x84200000, // 0005 CLOSURE R8 P0 + 0x5426005A, // 0006 LDINT R9 91 + 0x1C240A09, // 0007 EQ R9 R5 R9 + 0x78260013, // 0008 JMPF R9 #001D + 0x1C240D04, // 0009 EQ R9 R6 K4 + 0x78260010, // 000A JMPF R9 #001C + 0x88240105, // 000B GETMBR R9 R0 K5 + 0x4C280000, // 000C LDNIL R10 + 0x2024120A, // 000D NE R9 R9 R10 + 0x78260006, // 000E JMPF R9 #0016 + 0x8C240706, // 000F GETMET R9 R3 K6 + 0x882C0907, // 0010 GETMBR R11 R4 K7 + 0x88300105, // 0011 GETMBR R12 R0 K5 + 0x7C240600, // 0012 CALL R9 3 + 0xA0000000, // 0013 CLOSE R0 + 0x80041200, // 0014 RET 1 R9 + 0x70020005, // 0015 JMP #001C + 0x8C240706, // 0016 GETMET R9 R3 K6 + 0x882C0908, // 0017 GETMBR R11 R4 K8 + 0x4C300000, // 0018 LDNIL R12 + 0x7C240600, // 0019 CALL R9 3 + 0xA0000000, // 001A CLOSE R0 + 0x80041200, // 001B RET 1 R9 + 0x70020040, // 001C JMP #005E + 0x5426040C, // 001D LDINT R9 1037 + 0x1C240A09, // 001E EQ R9 R5 R9 + 0x78260007, // 001F JMPF R9 #0028 + 0x5C241000, // 0020 MOVE R9 R8 + 0x88280109, // 0021 GETMBR R10 R0 K9 + 0x7C240200, // 0022 CALL R9 1 + 0x5C1C1200, // 0023 MOVE R7 R9 + 0x78260001, // 0024 JMPF R9 #0027 + 0xA0000000, // 0025 CLOSE R0 + 0x80040E00, // 0026 RET 1 R7 + 0x70020035, // 0027 JMP #005E + 0x5426042B, // 0028 LDINT R9 1068 + 0x1C240A09, // 0029 EQ R9 R5 R9 + 0x78260007, // 002A JMPF R9 #0033 + 0x5C241000, // 002B MOVE R9 R8 + 0x8828010A, // 002C GETMBR R10 R0 K10 + 0x7C240200, // 002D CALL R9 1 + 0x5C1C1200, // 002E MOVE R7 R9 + 0x78260001, // 002F JMPF R9 #0032 + 0xA0000000, // 0030 CLOSE R0 + 0x80040E00, // 0031 RET 1 R7 + 0x7002002A, // 0032 JMP #005E + 0x54260429, // 0033 LDINT R9 1066 + 0x1C240A09, // 0034 EQ R9 R5 R9 + 0x78260007, // 0035 JMPF R9 #003E + 0x5C241000, // 0036 MOVE R9 R8 + 0x8828010B, // 0037 GETMBR R10 R0 K11 + 0x7C240200, // 0038 CALL R9 1 + 0x5C1C1200, // 0039 MOVE R7 R9 + 0x78260001, // 003A JMPF R9 #003D + 0xA0000000, // 003B CLOSE R0 + 0x80040E00, // 003C RET 1 R7 + 0x7002001F, // 003D JMP #005E + 0x5426042C, // 003E LDINT R9 1069 + 0x1C240A09, // 003F EQ R9 R5 R9 + 0x78260007, // 0040 JMPF R9 #0049 + 0x5C241000, // 0041 MOVE R9 R8 + 0x8828010C, // 0042 GETMBR R10 R0 K12 + 0x7C240200, // 0043 CALL R9 1 + 0x5C1C1200, // 0044 MOVE R7 R9 + 0x78260001, // 0045 JMPF R9 #0048 + 0xA0000000, // 0046 CLOSE R0 + 0x80040E00, // 0047 RET 1 R7 + 0x70020014, // 0048 JMP #005E + 0x5426042D, // 0049 LDINT R9 1070 + 0x1C240A09, // 004A EQ R9 R5 R9 + 0x78260007, // 004B JMPF R9 #0054 + 0x5C241000, // 004C MOVE R9 R8 + 0x8828010D, // 004D GETMBR R10 R0 K13 + 0x7C240200, // 004E CALL R9 1 + 0x5C1C1200, // 004F MOVE R7 R9 + 0x78260001, // 0050 JMPF R9 #0053 + 0xA0000000, // 0051 CLOSE R0 + 0x80040E00, // 0052 RET 1 R7 + 0x70020009, // 0053 JMP #005E + 0x54260412, // 0054 LDINT R9 1043 + 0x1C240A09, // 0055 EQ R9 R5 R9 + 0x78260006, // 0056 JMPF R9 #005E + 0x5C241000, // 0057 MOVE R9 R8 + 0x8828010E, // 0058 GETMBR R10 R0 K14 + 0x7C240200, // 0059 CALL R9 1 + 0x5C1C1200, // 005A MOVE R7 R9 + 0x78260001, // 005B JMPF R9 #005E + 0xA0000000, // 005C CLOSE R0 + 0x80040E00, // 005D RET 1 R7 + 0x60240003, // 005E GETGBL R9 G3 + 0x5C280000, // 005F MOVE R10 R0 + 0x7C240200, // 0060 CALL R9 1 + 0x8C24130F, // 0061 GETMET R9 R9 K15 + 0x5C2C0200, // 0062 MOVE R11 R1 + 0x5C300400, // 0063 MOVE R12 R2 + 0x5C340600, // 0064 MOVE R13 R3 + 0x7C240800, // 0065 CALL R9 4 + 0xA0000000, // 0066 CLOSE R0 + 0x80041200, // 0067 RET 1 R9 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_configuration, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(prefix), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x60080008, // 0000 GETGBL R2 G8 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x7C0C0400, // 0003 CALL R3 2 + 0x7C080200, // 0004 CALL R2 1 + 0x90020002, // 0005 SETMBR R0 K0 R2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_air_quality), + }), + 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 class: Matter_Plugin_Sensor_Air_Quality +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_class(Matter_Plugin_Sensor_Air_Quality, + 8, + &be_class_Matter_Plugin_Device, + be_nested_map(23, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_update_virtual_closure) }, + { be_const_key_weak(shadow_pm10, 0), be_const_var(4) }, + { be_const_key_weak(ARG, 1), be_nested_str_weak(airquality) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(airquality) }, + { be_const_key_weak(parse_configuration, 21), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_configuration_closure) }, + { be_const_key_weak(shadow_no2, -1), be_const_var(6) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(30000) }, + { be_const_key_weak(UPDATE_COMMANDS, 13), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(AirQuality), + be_nested_str_weak(CO2), + be_nested_str_weak(PM1), + be_nested_str_weak(PM2_X2E5), + be_nested_str_weak(PM10), + be_nested_str_weak(TVOC), + be_nested_str_weak(NO2), + })) ) } )) }, + { be_const_key_weak(shadow_pm2_5, -1), be_const_var(3) }, + { be_const_key_weak(shadow_air_quality, -1), be_const_var(1) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute_closure) }, + { be_const_key_weak(shadow_tvoc, -1), be_const_var(7) }, + { be_const_key_weak(prefix, -1), be_const_var(0) }, + { be_const_key_weak(TYPES, 4), 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(44, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(_parse_sensor_entry, 19), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality__parse_sensor_entry_closure) }, + { be_const_key_weak(shadow_pm1, 9), be_const_var(2) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Air_X20Quality) }, + { be_const_key_weak(parse_sensors, 7), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_sensors_closure) }, + { be_const_key_weak(shadow_co2, -1), be_const_var(5) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_init_closure) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Device_X20key_X20_X28ex_X3A_X20SCD40_X29) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(12, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(1068, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1069, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1070, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(8, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(5, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(4), + be_const_int(5), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1037, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(91, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(29, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(10, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(3), + be_const_int(5), + be_const_int(10), + be_const_int(15), + be_const_int(17), + be_const_int(18), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1066, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1043, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(AirQuality) }, + })), + be_str_weak(Matter_Plugin_Sensor_Air_Quality) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h index f4124fc0d..9882dd40f 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h @@ -269,7 +269,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */ extern const bclass be_class_Matter_Plugin_Sensor_Contact; be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */ be_nested_proto( - 7, /* nstack */ + 10, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -277,42 +277,32 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Contact, 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), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_contact), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Contact), + /* K3 */ be_const_int(0), + /* K4 */ 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 + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220044, // 0005 LDINT R8 69 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h index eb2704d72..d74be2a22 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h @@ -39,7 +39,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ be_nested_proto( - 7, /* nstack */ + 10, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -47,42 +47,32 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Occupancy, 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), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(val_onoff), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Occupancy), + /* K3 */ be_const_int(0), + /* K4 */ 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 + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220405, // 0005 LDINT R8 1030 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h new file mode 100644 index 000000000..fa6b7f956 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h @@ -0,0 +1,404 @@ +/* Solidification of Matter_Plugin_3_Bridge_Sensor_Air_Quality.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Air_Quality' +extern bclosure *class_Matter_Plugin_Sensor_Air_Quality_read_attribute; + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(content_send), + /* K2 */ be_nested_str_weak(_X25s_X20_X25i_X20), + }), + be_str_weak(web_values_single), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0007, // 0002 JMPF R2 #000B + 0xA40A0000, // 0003 IMPORT R2 K0 + 0x8C0C0501, // 0004 GETMET R3 R2 K1 + 0x60140018, // 0005 GETGBL R5 G24 + 0x58180002, // 0006 LDCONST R6 K2 + 0x5C1C0000, // 0007 MOVE R7 R0 + 0x5C200200, // 0008 MOVE R8 R1 + 0x7C140600, // 0009 CALL R5 3 + 0x7C0C0400, // 000A CALL R3 2 + 0x80000000, // 000B RET 0 + }) + ), + &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, + }), + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(web_values_prefix), + /* K1 */ be_nested_str_weak(Air), + /* K2 */ be_nested_str_weak(shadow_air_quality), + /* K3 */ be_nested_str_weak(PM1), + /* K4 */ be_nested_str_weak(shadow_pm1), + /* K5 */ be_nested_str_weak(PM2_X2E5), + /* K6 */ be_nested_str_weak(shadow_pm2_5), + /* K7 */ be_nested_str_weak(PM10), + /* K8 */ be_nested_str_weak(shadow_pm10), + /* K9 */ be_nested_str_weak(CO2), + /* K10 */ be_nested_str_weak(shadow_co2), + /* K11 */ be_nested_str_weak(NO2), + /* K12 */ be_nested_str_weak(shadow_no2), + /* K13 */ be_nested_str_weak(TVOC), + /* K14 */ be_nested_str_weak(shadow_tvoc), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x84040000, // 0000 CLOSURE R1 P0 + 0x8C080100, // 0001 GETMET R2 R0 K0 + 0x7C080200, // 0002 CALL R2 1 + 0x5C080200, // 0003 MOVE R2 R1 + 0x580C0001, // 0004 LDCONST R3 K1 + 0x88100102, // 0005 GETMBR R4 R0 K2 + 0x7C080400, // 0006 CALL R2 2 + 0x5C080200, // 0007 MOVE R2 R1 + 0x580C0003, // 0008 LDCONST R3 K3 + 0x88100104, // 0009 GETMBR R4 R0 K4 + 0x7C080400, // 000A CALL R2 2 + 0x5C080200, // 000B MOVE R2 R1 + 0x580C0005, // 000C LDCONST R3 K5 + 0x88100106, // 000D GETMBR R4 R0 K6 + 0x7C080400, // 000E CALL R2 2 + 0x5C080200, // 000F MOVE R2 R1 + 0x580C0007, // 0010 LDCONST R3 K7 + 0x88100108, // 0011 GETMBR R4 R0 K8 + 0x7C080400, // 0012 CALL R2 2 + 0x5C080200, // 0013 MOVE R2 R1 + 0x580C0009, // 0014 LDCONST R3 K9 + 0x8810010A, // 0015 GETMBR R4 R0 K10 + 0x7C080400, // 0016 CALL R2 2 + 0x5C080200, // 0017 MOVE R2 R1 + 0x580C000B, // 0018 LDCONST R3 K11 + 0x8810010C, // 0019 GETMBR R4 R0 K12 + 0x7C080400, // 001A CALL R2 2 + 0x5C080200, // 001B MOVE R2 R1 + 0x580C000D, // 001C LDCONST R3 K13 + 0x8810010E, // 001D GETMBR R4 R0 K14 + 0x7C080400, // 001E CALL R2 2 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(prefix), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* 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 + 0x60100008, // 0008 GETGBL R4 G8 + 0x8C140702, // 0009 GETMET R5 R3 K2 + 0x881C0103, // 000A GETMBR R7 R0 K3 + 0x7C140400, // 000B CALL R5 2 + 0x7C100200, // 000C CALL R4 1 + 0x90020204, // 000D SETMBR R0 K1 R4 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_update +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(prefix), + }), + be_str_weak(parse_update), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x540E0007, // 0000 LDINT R3 8 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0002, // 0002 JMPF R3 #0006 + 0x8C0C0300, // 0003 GETMET R3 R1 K0 + 0x88140101, // 0004 GETMBR R5 R0 K1 + 0x7C0C0400, // 0005 CALL R3 2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Air_Quality +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_HTTP; +be_local_class(Matter_Plugin_Bridge_Sensor_Air_Quality, + 8, + &be_class_Matter_Plugin_Bridge_HTTP, + be_nested_map(20, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Air_X20Quality) }, + { be_const_key_weak(shadow_tvoc, 8), be_const_var(7) }, + { be_const_key_weak(shadow_pm10, 7), be_const_var(4) }, + { be_const_key_weak(shadow_pm2_5, -1), be_const_var(3) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Sensor_X20Model) }, + { be_const_key_weak(shadow_co2, -1), be_const_var(5) }, + { be_const_key_weak(parse_update, 18), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute_closure) }, + { be_const_key_weak(prefix, 13), be_const_var(0) }, + { 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(44, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values_closure) }, + { be_const_key_weak(shadow_pm1, 11), be_const_var(2) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_airquality) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(12, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(1068, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1069, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1070, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(8, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(5, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(4), + be_const_int(5), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1037, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(91, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(29, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(10, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(3), + be_const_int(5), + be_const_int(10), + be_const_int(15), + be_const_int(17), + be_const_int(18), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1066, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(1043, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(11, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(8), + be_const_int(9), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init_closure) }, + { be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) }, + { be_const_key_weak(shadow_no2, 4), be_const_var(6) }, + { be_const_key_weak(shadow_air_quality, -1), be_const_var(1) }, + { be_const_key_weak(ARG, 0), be_nested_str_weak(airquality) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Air_Quality) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h index cdf9539d2..c69dec160 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h @@ -340,21 +340,22 @@ be_local_closure(class_Matter_Plugin_Light2_read_attribute, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light2, 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ + ( &(const bvalue[15]) { /* constants */ /* K0 */ be_nested_str_weak(matter), /* K1 */ be_nested_str_weak(TLV), /* K2 */ be_nested_str_weak(cluster), /* K3 */ be_nested_str_weak(attribute), /* K4 */ be_nested_str_weak(update_shadow_lazy), - /* K5 */ be_nested_str_weak(set), + /* K5 */ be_nested_str_weak(set_or_nil), /* K6 */ be_nested_str_weak(U1), /* K7 */ be_nested_str_weak(shadow_ct), - /* K8 */ be_const_int(2), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(ct_min), - /* K11 */ be_nested_str_weak(ct_max), - /* K12 */ be_nested_str_weak(U4), - /* K13 */ be_nested_str_weak(read_attribute), + /* K8 */ be_nested_str_weak(set), + /* K9 */ be_const_int(2), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(ct_min), + /* K12 */ be_nested_str_weak(ct_max), + /* K13 */ be_nested_str_weak(U4), + /* K14 */ be_nested_str_weak(read_attribute), }), be_str_weak(read_attribute), &be_const_str_solidified, @@ -380,51 +381,51 @@ be_local_closure(class_Matter_Plugin_Light2_read_attribute, /* name */ 0x541E0007, // 0012 LDINT R7 8 0x1C1C0C07, // 0013 EQ R7 R6 R7 0x781E0005, // 0014 JMPF R7 #001B - 0x8C1C0705, // 0015 GETMET R7 R3 K5 + 0x8C1C0708, // 0015 GETMET R7 R3 K8 0x88240906, // 0016 GETMBR R9 R4 K6 - 0x58280008, // 0017 LDCONST R10 K8 + 0x58280009, // 0017 LDCONST R10 K9 0x7C1C0600, // 0018 CALL R7 3 0x80040E00, // 0019 RET 1 R7 0x70020022, // 001A JMP #003E 0x541E000E, // 001B LDINT R7 15 0x1C1C0C07, // 001C EQ R7 R6 R7 0x781E0005, // 001D JMPF R7 #0024 - 0x8C1C0705, // 001E GETMET R7 R3 K5 + 0x8C1C0708, // 001E GETMET R7 R3 K8 0x88240906, // 001F GETMBR R9 R4 K6 - 0x58280009, // 0020 LDCONST R10 K9 + 0x5828000A, // 0020 LDCONST R10 K10 0x7C1C0600, // 0021 CALL R7 3 0x80040E00, // 0022 RET 1 R7 0x70020019, // 0023 JMP #003E 0x541E400A, // 0024 LDINT R7 16395 0x1C1C0C07, // 0025 EQ R7 R6 R7 0x781E0005, // 0026 JMPF R7 #002D - 0x8C1C0705, // 0027 GETMET R7 R3 K5 + 0x8C1C0708, // 0027 GETMET R7 R3 K8 0x88240906, // 0028 GETMBR R9 R4 K6 - 0x8828010A, // 0029 GETMBR R10 R0 K10 + 0x8828010B, // 0029 GETMBR R10 R0 K11 0x7C1C0600, // 002A CALL R7 3 0x80040E00, // 002B RET 1 R7 0x70020010, // 002C JMP #003E 0x541E400B, // 002D LDINT R7 16396 0x1C1C0C07, // 002E EQ R7 R6 R7 0x781E0005, // 002F JMPF R7 #0036 - 0x8C1C0705, // 0030 GETMET R7 R3 K5 + 0x8C1C0708, // 0030 GETMET R7 R3 K8 0x88240906, // 0031 GETMBR R9 R4 K6 - 0x8828010B, // 0032 GETMBR R10 R0 K11 + 0x8828010C, // 0032 GETMBR R10 R0 K12 0x7C1C0600, // 0033 CALL R7 3 0x80040E00, // 0034 RET 1 R7 0x70020007, // 0035 JMP #003E 0x541EFFFB, // 0036 LDINT R7 65532 0x1C1C0C07, // 0037 EQ R7 R6 R7 0x781E0004, // 0038 JMPF R7 #003E - 0x8C1C0705, // 0039 GETMET R7 R3 K5 - 0x8824090C, // 003A GETMBR R9 R4 K12 + 0x8C1C0708, // 0039 GETMET R7 R3 K8 + 0x8824090D, // 003A GETMBR R9 R4 K13 0x542A000F, // 003B LDINT R10 16 0x7C1C0600, // 003C CALL R7 3 0x80040E00, // 003D RET 1 R7 0x601C0003, // 003E GETGBL R7 G3 0x5C200000, // 003F MOVE R8 R0 0x7C1C0200, // 0040 CALL R7 1 - 0x8C1C0F0D, // 0041 GETMET R7 R7 K13 + 0x8C1C0F0E, // 0041 GETMET R7 R7 K14 0x5C240200, // 0042 MOVE R9 R1 0x5C280400, // 0043 MOVE R10 R2 0x5C2C0600, // 0044 MOVE R11 R3 diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h index 2a4feefc7..8df599ab7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h @@ -531,20 +531,21 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light3, 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ + ( &(const bvalue[14]) { /* constants */ /* K0 */ be_nested_str_weak(matter), /* K1 */ be_nested_str_weak(TLV), /* K2 */ be_nested_str_weak(cluster), /* K3 */ be_nested_str_weak(attribute), /* K4 */ be_nested_str_weak(update_shadow_lazy), /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(set), + /* K6 */ be_nested_str_weak(set_or_nil), /* K7 */ be_nested_str_weak(U1), /* K8 */ be_nested_str_weak(shadow_hue), /* K9 */ be_const_int(1), /* K10 */ be_nested_str_weak(shadow_sat), - /* K11 */ be_nested_str_weak(U4), - /* K12 */ be_nested_str_weak(read_attribute), + /* K11 */ be_nested_str_weak(set), + /* K12 */ be_nested_str_weak(U4), + /* K13 */ be_nested_str_weak(read_attribute), }), be_str_weak(read_attribute), &be_const_str_solidified, @@ -577,7 +578,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541E0006, // 0019 LDINT R7 7 0x1C1C0C07, // 001A EQ R7 R6 R7 0x781E0005, // 001B JMPF R7 #0022 - 0x8C1C0706, // 001C GETMET R7 R3 K6 + 0x8C1C070B, // 001C GETMET R7 R3 K11 0x88240907, // 001D GETMBR R9 R4 K7 0x58280005, // 001E LDCONST R10 K5 0x7C1C0600, // 001F CALL R7 3 @@ -586,7 +587,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541E0007, // 0022 LDINT R7 8 0x1C1C0C07, // 0023 EQ R7 R6 R7 0x781E0005, // 0024 JMPF R7 #002B - 0x8C1C0706, // 0025 GETMET R7 R3 K6 + 0x8C1C070B, // 0025 GETMET R7 R3 K11 0x88240907, // 0026 GETMBR R9 R4 K7 0x58280005, // 0027 LDCONST R10 K5 0x7C1C0600, // 0028 CALL R7 3 @@ -595,7 +596,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541E000E, // 002B LDINT R7 15 0x1C1C0C07, // 002C EQ R7 R6 R7 0x781E0005, // 002D JMPF R7 #0034 - 0x8C1C0706, // 002E GETMET R7 R3 K6 + 0x8C1C070B, // 002E GETMET R7 R3 K11 0x88240907, // 002F GETMBR R9 R4 K7 0x58280005, // 0030 LDCONST R10 K5 0x7C1C0600, // 0031 CALL R7 3 @@ -604,7 +605,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541E4000, // 0034 LDINT R7 16385 0x1C1C0C07, // 0035 EQ R7 R6 R7 0x781E0005, // 0036 JMPF R7 #003D - 0x8C1C0706, // 0037 GETMET R7 R3 K6 + 0x8C1C070B, // 0037 GETMET R7 R3 K11 0x88240907, // 0038 GETMBR R9 R4 K7 0x58280005, // 0039 LDCONST R10 K5 0x7C1C0600, // 003A CALL R7 3 @@ -613,7 +614,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541E4009, // 003D LDINT R7 16394 0x1C1C0C07, // 003E EQ R7 R6 R7 0x781E0005, // 003F JMPF R7 #0046 - 0x8C1C0706, // 0040 GETMET R7 R3 K6 + 0x8C1C070B, // 0040 GETMET R7 R3 K11 0x88240907, // 0041 GETMBR R9 R4 K7 0x58280009, // 0042 LDCONST R10 K9 0x7C1C0600, // 0043 CALL R7 3 @@ -622,7 +623,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541E000F, // 0046 LDINT R7 16 0x1C1C0C07, // 0047 EQ R7 R6 R7 0x781E0005, // 0048 JMPF R7 #004F - 0x8C1C0706, // 0049 GETMET R7 R3 K6 + 0x8C1C070B, // 0049 GETMET R7 R3 K11 0x88240907, // 004A GETMBR R9 R4 K7 0x58280005, // 004B LDCONST R10 K5 0x7C1C0600, // 004C CALL R7 3 @@ -631,15 +632,15 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ 0x541EFFFB, // 004F LDINT R7 65532 0x1C1C0C07, // 0050 EQ R7 R6 R7 0x781E0004, // 0051 JMPF R7 #0057 - 0x8C1C0706, // 0052 GETMET R7 R3 K6 - 0x8824090B, // 0053 GETMBR R9 R4 K11 + 0x8C1C070B, // 0052 GETMET R7 R3 K11 + 0x8824090C, // 0053 GETMBR R9 R4 K12 0x58280009, // 0054 LDCONST R10 K9 0x7C1C0600, // 0055 CALL R7 3 0x80040E00, // 0056 RET 1 R7 0x601C0003, // 0057 GETGBL R7 G3 0x5C200000, // 0058 MOVE R8 R0 0x7C1C0200, // 0059 CALL R7 1 - 0x8C1C0F0C, // 005A GETMET R7 R7 K12 + 0x8C1C0F0D, // 005A GETMET R7 R7 K13 0x5C240200, // 005B MOVE R9 R1 0x5C280400, // 005C MOVE R10 R2 0x5C2C0600, // 005D MOVE R11 R3 diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h index 2bd05cb2e..b8f7cb5b0 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h @@ -71,94 +71,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed, /* name ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Flow, - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_value), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(U2), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(1), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0403, // 0004 LDINT R7 1028 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0022, // 0006 JMPF R7 #002A - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0011, // 0008 JMPF R7 #001B - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0007, // 000C JMPF R7 #0015 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x60280009, // 000F GETGBL R10 G9 - 0x882C0105, // 0010 GETMBR R11 R0 K5 - 0x7C280200, // 0011 CALL R10 1 - 0x7C1C0600, // 0012 CALL R7 3 - 0x80040E00, // 0013 RET 1 R7 - 0x70020004, // 0014 JMP #001A - 0x8C1C0706, // 0015 GETMET R7 R3 K6 - 0x88240908, // 0016 GETMBR R9 R4 K8 - 0x4C280000, // 0017 LDNIL R10 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x7002000E, // 001A JMP #002A - 0x1C1C0D09, // 001B EQ R7 R6 K9 - 0x781E0005, // 001C JMPF R7 #0023 - 0x8C1C0706, // 001D GETMET R7 R3 K6 - 0x88240907, // 001E GETMBR R9 R4 K7 - 0x58280004, // 001F LDCONST R10 K4 - 0x7C1C0600, // 0020 CALL R7 3 - 0x80040E00, // 0021 RET 1 R7 - 0x70020006, // 0022 JMP #002A - 0x1C1C0D0A, // 0023 EQ R7 R6 K10 - 0x781E0004, // 0024 JMPF R7 #002A - 0x8C1C0706, // 0025 GETMET R7 R3 K6 - 0x88240907, // 0026 GETMBR R9 R4 K7 - 0x542AFFFD, // 0027 LDINT R10 65534 - 0x7C1C0600, // 0028 CALL R7 3 - 0x80040E00, // 0029 RET 1 R7 - 0x601C0003, // 002A GETGBL R7 G3 - 0x5C200000, // 002B MOVE R8 R0 - 0x7C1C0200, // 002C CALL R7 1 - 0x8C1C0F0B, // 002D GETMET R7 R7 K11 - 0x5C240200, // 002E MOVE R9 R1 - 0x5C280400, // 002F MOVE R10 R2 - 0x5C2C0600, // 0030 MOVE R11 R3 - 0x7C1C0800, // 0031 CALL R7 4 - 0x80040E00, // 0032 RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Flow' +extern bclosure *class_Matter_Plugin_Sensor_Flow_read_attribute; /******************************************************************** ** Solidified function: web_values @@ -218,7 +132,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Flow, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(774, -1), be_const_int(1) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_read_attribute_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_static_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) }, { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed_closure) }, { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Flow) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_flow) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h index 5805df777..0c1681ff3 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h @@ -71,94 +71,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed, /* ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Humidity, - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_value), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(U2), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(1), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0404, // 0004 LDINT R7 1029 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0022, // 0006 JMPF R7 #002A - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0011, // 0008 JMPF R7 #001B - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0007, // 000C JMPF R7 #0015 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x60280009, // 000F GETGBL R10 G9 - 0x882C0105, // 0010 GETMBR R11 R0 K5 - 0x7C280200, // 0011 CALL R10 1 - 0x7C1C0600, // 0012 CALL R7 3 - 0x80040E00, // 0013 RET 1 R7 - 0x70020004, // 0014 JMP #001A - 0x8C1C0706, // 0015 GETMET R7 R3 K6 - 0x88240908, // 0016 GETMBR R9 R4 K8 - 0x4C280000, // 0017 LDNIL R10 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x7002000E, // 001A JMP #002A - 0x1C1C0D09, // 001B EQ R7 R6 K9 - 0x781E0005, // 001C JMPF R7 #0023 - 0x8C1C0706, // 001D GETMET R7 R3 K6 - 0x88240907, // 001E GETMBR R9 R4 K7 - 0x542A01F3, // 001F LDINT R10 500 - 0x7C1C0600, // 0020 CALL R7 3 - 0x80040E00, // 0021 RET 1 R7 - 0x70020006, // 0022 JMP #002A - 0x1C1C0D0A, // 0023 EQ R7 R6 K10 - 0x781E0004, // 0024 JMPF R7 #002A - 0x8C1C0706, // 0025 GETMET R7 R3 K6 - 0x88240907, // 0026 GETMBR R9 R4 K7 - 0x542A270F, // 0027 LDINT R10 10000 - 0x7C1C0600, // 0028 CALL R7 3 - 0x80040E00, // 0029 RET 1 R7 - 0x601C0003, // 002A GETGBL R7 G3 - 0x5C200000, // 002B MOVE R8 R0 - 0x7C1C0200, // 002C CALL R7 1 - 0x8C1C0F0B, // 002D GETMET R7 R7 K11 - 0x5C240200, // 002E MOVE R9 R1 - 0x5C280400, // 002F MOVE R10 R2 - 0x5C2C0600, // 0030 MOVE R11 R3 - 0x7C1C0800, // 0031 CALL R7 4 - 0x80040E00, // 0032 RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Humidity' +extern bclosure *class_Matter_Plugin_Sensor_Humidity_read_attribute; /******************************************************************** ** Solidified function: web_values @@ -226,7 +140,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Humidity, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(775, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_read_attribute_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) }, { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed_closure) }, { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Humidity) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_humidity) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h index e31c317b6..49558b390 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h @@ -83,94 +83,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed, ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Illuminance, - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_value), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(U2), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(1), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E03FF, // 0004 LDINT R7 1024 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0022, // 0006 JMPF R7 #002A - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0011, // 0008 JMPF R7 #001B - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0007, // 000C JMPF R7 #0015 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x60280009, // 000F GETGBL R10 G9 - 0x882C0105, // 0010 GETMBR R11 R0 K5 - 0x7C280200, // 0011 CALL R10 1 - 0x7C1C0600, // 0012 CALL R7 3 - 0x80040E00, // 0013 RET 1 R7 - 0x70020004, // 0014 JMP #001A - 0x8C1C0706, // 0015 GETMET R7 R3 K6 - 0x88240908, // 0016 GETMBR R9 R4 K8 - 0x4C280000, // 0017 LDNIL R10 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x7002000E, // 001A JMP #002A - 0x1C1C0D09, // 001B EQ R7 R6 K9 - 0x781E0005, // 001C JMPF R7 #0023 - 0x8C1C0706, // 001D GETMET R7 R3 K6 - 0x88240907, // 001E GETMBR R9 R4 K7 - 0x58280009, // 001F LDCONST R10 K9 - 0x7C1C0600, // 0020 CALL R7 3 - 0x80040E00, // 0021 RET 1 R7 - 0x70020006, // 0022 JMP #002A - 0x1C1C0D0A, // 0023 EQ R7 R6 K10 - 0x781E0004, // 0024 JMPF R7 #002A - 0x8C1C0706, // 0025 GETMET R7 R3 K6 - 0x88240907, // 0026 GETMBR R9 R4 K7 - 0x542AFFFD, // 0027 LDINT R10 65534 - 0x7C1C0600, // 0028 CALL R7 3 - 0x80040E00, // 0029 RET 1 R7 - 0x601C0003, // 002A GETGBL R7 G3 - 0x5C200000, // 002B MOVE R8 R0 - 0x7C1C0200, // 002C CALL R7 1 - 0x8C1C0F0B, // 002D GETMET R7 R7 K11 - 0x5C240200, // 002E MOVE R9 R1 - 0x5C280400, // 002F MOVE R10 R2 - 0x5C2C0600, // 0030 MOVE R11 R3 - 0x7C1C0800, // 0031 CALL R7 4 - 0x80040E00, // 0032 RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Illuminance' +extern bclosure *class_Matter_Plugin_Sensor_Illuminance_read_attribute; /******************************************************************** ** Solidified function: web_values @@ -230,7 +144,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Illuminance, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(262, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_read_attribute_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) }, { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed_closure) }, { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Illuminance) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_illuminance) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h index 1e4078565..4a8cf45cd 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h @@ -70,94 +70,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed, /* ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Pressure, - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_value), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(I2), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(1), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0402, // 0004 LDINT R7 1027 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0022, // 0006 JMPF R7 #002A - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0011, // 0008 JMPF R7 #001B - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0007, // 000C JMPF R7 #0015 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x60280009, // 000F GETGBL R10 G9 - 0x882C0105, // 0010 GETMBR R11 R0 K5 - 0x7C280200, // 0011 CALL R10 1 - 0x7C1C0600, // 0012 CALL R7 3 - 0x80040E00, // 0013 RET 1 R7 - 0x70020004, // 0014 JMP #001A - 0x8C1C0706, // 0015 GETMET R7 R3 K6 - 0x88240908, // 0016 GETMBR R9 R4 K8 - 0x4C280000, // 0017 LDNIL R10 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x7002000E, // 001A JMP #002A - 0x1C1C0D09, // 001B EQ R7 R6 K9 - 0x781E0005, // 001C JMPF R7 #0023 - 0x8C1C0706, // 001D GETMET R7 R3 K6 - 0x88240907, // 001E GETMBR R9 R4 K7 - 0x542A01F3, // 001F LDINT R10 500 - 0x7C1C0600, // 0020 CALL R7 3 - 0x80040E00, // 0021 RET 1 R7 - 0x70020006, // 0022 JMP #002A - 0x1C1C0D0A, // 0023 EQ R7 R6 K10 - 0x781E0004, // 0024 JMPF R7 #002A - 0x8C1C0706, // 0025 GETMET R7 R3 K6 - 0x88240907, // 0026 GETMBR R9 R4 K7 - 0x542A05DB, // 0027 LDINT R10 1500 - 0x7C1C0600, // 0028 CALL R7 3 - 0x80040E00, // 0029 RET 1 R7 - 0x601C0003, // 002A GETGBL R7 G3 - 0x5C200000, // 002B MOVE R8 R0 - 0x7C1C0200, // 002C CALL R7 1 - 0x8C1C0F0B, // 002D GETMET R7 R7 K11 - 0x5C240200, // 002E MOVE R9 R1 - 0x5C280400, // 002F MOVE R10 R2 - 0x5C2C0600, // 0030 MOVE R11 R3 - 0x7C1C0800, // 0031 CALL R7 4 - 0x80040E00, // 0032 RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Pressure' +extern bclosure *class_Matter_Plugin_Sensor_Pressure_read_attribute; /******************************************************************** ** Solidified function: web_values @@ -217,7 +131,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Pressure, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(773, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_read_attribute_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) }, { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed_closure) }, { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Pressure) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_pressure) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h index 491a9e29c..001b3984d 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h @@ -83,92 +83,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed, /* name ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Temp, - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_value), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(I2), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(1), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[49]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0401, // 0004 LDINT R7 1026 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0020, // 0006 JMPF R7 #0028 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E000F, // 0008 JMPF R7 #0019 - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0005, // 000C JMPF R7 #0013 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x88280105, // 000F GETMBR R10 R0 K5 - 0x7C1C0600, // 0010 CALL R7 3 - 0x80040E00, // 0011 RET 1 R7 - 0x70020004, // 0012 JMP #0018 - 0x8C1C0706, // 0013 GETMET R7 R3 K6 - 0x88240908, // 0014 GETMBR R9 R4 K8 - 0x4C280000, // 0015 LDNIL R10 - 0x7C1C0600, // 0016 CALL R7 3 - 0x80040E00, // 0017 RET 1 R7 - 0x7002000E, // 0018 JMP #0028 - 0x1C1C0D09, // 0019 EQ R7 R6 K9 - 0x781E0005, // 001A JMPF R7 #0021 - 0x8C1C0706, // 001B GETMET R7 R3 K6 - 0x88240907, // 001C GETMBR R9 R4 K7 - 0x5429EC77, // 001D LDINT R10 -5000 - 0x7C1C0600, // 001E CALL R7 3 - 0x80040E00, // 001F RET 1 R7 - 0x70020006, // 0020 JMP #0028 - 0x1C1C0D0A, // 0021 EQ R7 R6 K10 - 0x781E0004, // 0022 JMPF R7 #0028 - 0x8C1C0706, // 0023 GETMET R7 R3 K6 - 0x88240907, // 0024 GETMBR R9 R4 K7 - 0x542A3A97, // 0025 LDINT R10 15000 - 0x7C1C0600, // 0026 CALL R7 3 - 0x80040E00, // 0027 RET 1 R7 - 0x601C0003, // 0028 GETGBL R7 G3 - 0x5C200000, // 0029 MOVE R8 R0 - 0x7C1C0200, // 002A CALL R7 1 - 0x8C1C0F0B, // 002B GETMET R7 R7 K11 - 0x5C240200, // 002C MOVE R9 R1 - 0x5C280400, // 002D MOVE R10 R2 - 0x5C2C0600, // 002E MOVE R11 R3 - 0x7C1C0800, // 002F CALL R7 4 - 0x80040E00, // 0030 RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Temp' +extern bclosure *class_Matter_Plugin_Sensor_Temp_read_attribute; /******************************************************************** ** Solidified function: web_values @@ -236,7 +152,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Temp, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(770, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_read_attribute_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) }, { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed_closure) }, { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Temperature) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_temperature) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h index 8015c80ee..703f9b595 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h @@ -354,127 +354,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Light2_invoke_request, /* name */ ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_nested_str_weak(update_shadow_lazy), - /* K5 */ be_nested_str_weak(shadow_ct), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(U1), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(2), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(ct_min), - /* K12 */ be_nested_str_weak(ct_max), - /* K13 */ be_nested_str_weak(U4), - /* K14 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[81]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E02FF, // 0004 LDINT R7 768 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0040, // 0006 JMPF R7 #0048 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x541E0006, // 0009 LDINT R7 7 - 0x1C1C0C07, // 000A EQ R7 R6 R7 - 0x781E000F, // 000B JMPF R7 #001C - 0x881C0105, // 000C GETMBR R7 R0 K5 - 0x4C200000, // 000D LDNIL R8 - 0x201C0E08, // 000E NE R7 R7 R8 - 0x781E0005, // 000F JMPF R7 #0016 - 0x8C1C0706, // 0010 GETMET R7 R3 K6 - 0x88240907, // 0011 GETMBR R9 R4 K7 - 0x88280105, // 0012 GETMBR R10 R0 K5 - 0x7C1C0600, // 0013 CALL R7 3 - 0x80040E00, // 0014 RET 1 R7 - 0x70020004, // 0015 JMP #001B - 0x8C1C0706, // 0016 GETMET R7 R3 K6 - 0x88240908, // 0017 GETMBR R9 R4 K8 - 0x4C280000, // 0018 LDNIL R10 - 0x7C1C0600, // 0019 CALL R7 3 - 0x80040E00, // 001A RET 1 R7 - 0x7002002B, // 001B JMP #0048 - 0x541E0007, // 001C LDINT R7 8 - 0x1C1C0C07, // 001D EQ R7 R6 R7 - 0x781E0005, // 001E JMPF R7 #0025 - 0x8C1C0706, // 001F GETMET R7 R3 K6 - 0x88240907, // 0020 GETMBR R9 R4 K7 - 0x58280009, // 0021 LDCONST R10 K9 - 0x7C1C0600, // 0022 CALL R7 3 - 0x80040E00, // 0023 RET 1 R7 - 0x70020022, // 0024 JMP #0048 - 0x541E000E, // 0025 LDINT R7 15 - 0x1C1C0C07, // 0026 EQ R7 R6 R7 - 0x781E0005, // 0027 JMPF R7 #002E - 0x8C1C0706, // 0028 GETMET R7 R3 K6 - 0x88240907, // 0029 GETMBR R9 R4 K7 - 0x5828000A, // 002A LDCONST R10 K10 - 0x7C1C0600, // 002B CALL R7 3 - 0x80040E00, // 002C RET 1 R7 - 0x70020019, // 002D JMP #0048 - 0x541E400A, // 002E LDINT R7 16395 - 0x1C1C0C07, // 002F EQ R7 R6 R7 - 0x781E0005, // 0030 JMPF R7 #0037 - 0x8C1C0706, // 0031 GETMET R7 R3 K6 - 0x88240907, // 0032 GETMBR R9 R4 K7 - 0x8828010B, // 0033 GETMBR R10 R0 K11 - 0x7C1C0600, // 0034 CALL R7 3 - 0x80040E00, // 0035 RET 1 R7 - 0x70020010, // 0036 JMP #0048 - 0x541E400B, // 0037 LDINT R7 16396 - 0x1C1C0C07, // 0038 EQ R7 R6 R7 - 0x781E0005, // 0039 JMPF R7 #0040 - 0x8C1C0706, // 003A GETMET R7 R3 K6 - 0x88240907, // 003B GETMBR R9 R4 K7 - 0x8828010C, // 003C GETMBR R10 R0 K12 - 0x7C1C0600, // 003D CALL R7 3 - 0x80040E00, // 003E RET 1 R7 - 0x70020007, // 003F JMP #0048 - 0x541E4009, // 0040 LDINT R7 16394 - 0x1C1C0C07, // 0041 EQ R7 R6 R7 - 0x781E0004, // 0042 JMPF R7 #0048 - 0x8C1C0706, // 0043 GETMET R7 R3 K6 - 0x8824090D, // 0044 GETMBR R9 R4 K13 - 0x542A000F, // 0045 LDINT R10 16 - 0x7C1C0600, // 0046 CALL R7 3 - 0x80040E00, // 0047 RET 1 R7 - 0x601C0003, // 0048 GETGBL R7 G3 - 0x5C200000, // 0049 MOVE R8 R0 - 0x7C1C0200, // 004A CALL R7 1 - 0x8C1C0F0E, // 004B GETMET R7 R7 K14 - 0x5C240200, // 004C MOVE R9 R1 - 0x5C280400, // 004D MOVE R10 R2 - 0x5C2C0600, // 004E MOVE R11 R3 - 0x7C1C0800, // 004F CALL R7 4 - 0x80040E00, // 0050 RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light2' +extern bclosure *class_Matter_Plugin_Light2_read_attribute; /******************************************************************** ** Solidified function: update_ct_minmax @@ -659,7 +540,7 @@ be_local_class(Matter_Plugin_Bridge_Light2, { be_const_key_weak(shadow_ct, -1), be_const_var(0) }, { be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_update_ct_minmax_closure) }, { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_invoke_request_closure) }, - { be_const_key_weak(read_attribute, 10), be_const_closure(class_Matter_Plugin_Bridge_Light2_read_attribute_closure) }, + { be_const_key_weak(read_attribute, 10), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) }, { be_const_key_weak(ct_min, -1), be_const_var(1) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light2) }, })), diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h index 303f3ecc7..31cbfdca5 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h @@ -298,152 +298,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Light3_web_value_RGB, /* name */ ); /*******************************************************************/ - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_nested_str_weak(update_shadow_lazy), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(shadow_hue), - /* K7 */ be_nested_str_weak(set), - /* K8 */ be_nested_str_weak(U1), - /* K9 */ be_nested_str_weak(NULL), - /* K10 */ be_const_int(1), - /* K11 */ be_nested_str_weak(shadow_sat), - /* K12 */ be_nested_str_weak(U4), - /* K13 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[107]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E02FF, // 0004 LDINT R7 768 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E005A, // 0006 JMPF R7 #0062 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E000F, // 000A JMPF R7 #001B - 0x881C0106, // 000B GETMBR R7 R0 K6 - 0x4C200000, // 000C LDNIL R8 - 0x201C0E08, // 000D NE R7 R7 R8 - 0x781E0005, // 000E JMPF R7 #0015 - 0x8C1C0707, // 000F GETMET R7 R3 K7 - 0x88240908, // 0010 GETMBR R9 R4 K8 - 0x88280106, // 0011 GETMBR R10 R0 K6 - 0x7C1C0600, // 0012 CALL R7 3 - 0x80040E00, // 0013 RET 1 R7 - 0x70020004, // 0014 JMP #001A - 0x8C1C0707, // 0015 GETMET R7 R3 K7 - 0x88240909, // 0016 GETMBR R9 R4 K9 - 0x4C280000, // 0017 LDNIL R10 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x70020046, // 001A JMP #0062 - 0x1C1C0D0A, // 001B EQ R7 R6 K10 - 0x781E000F, // 001C JMPF R7 #002D - 0x881C010B, // 001D GETMBR R7 R0 K11 - 0x4C200000, // 001E LDNIL R8 - 0x201C0E08, // 001F NE R7 R7 R8 - 0x781E0005, // 0020 JMPF R7 #0027 - 0x8C1C0707, // 0021 GETMET R7 R3 K7 - 0x88240908, // 0022 GETMBR R9 R4 K8 - 0x8828010B, // 0023 GETMBR R10 R0 K11 - 0x7C1C0600, // 0024 CALL R7 3 - 0x80040E00, // 0025 RET 1 R7 - 0x70020004, // 0026 JMP #002C - 0x8C1C0707, // 0027 GETMET R7 R3 K7 - 0x88240909, // 0028 GETMBR R9 R4 K9 - 0x4C280000, // 0029 LDNIL R10 - 0x7C1C0600, // 002A CALL R7 3 - 0x80040E00, // 002B RET 1 R7 - 0x70020034, // 002C JMP #0062 - 0x541E0006, // 002D LDINT R7 7 - 0x1C1C0C07, // 002E EQ R7 R6 R7 - 0x781E0005, // 002F JMPF R7 #0036 - 0x8C1C0707, // 0030 GETMET R7 R3 K7 - 0x88240908, // 0031 GETMBR R9 R4 K8 - 0x58280005, // 0032 LDCONST R10 K5 - 0x7C1C0600, // 0033 CALL R7 3 - 0x80040E00, // 0034 RET 1 R7 - 0x7002002B, // 0035 JMP #0062 - 0x541E0007, // 0036 LDINT R7 8 - 0x1C1C0C07, // 0037 EQ R7 R6 R7 - 0x781E0005, // 0038 JMPF R7 #003F - 0x8C1C0707, // 0039 GETMET R7 R3 K7 - 0x88240908, // 003A GETMBR R9 R4 K8 - 0x58280005, // 003B LDCONST R10 K5 - 0x7C1C0600, // 003C CALL R7 3 - 0x80040E00, // 003D RET 1 R7 - 0x70020022, // 003E JMP #0062 - 0x541E000E, // 003F LDINT R7 15 - 0x1C1C0C07, // 0040 EQ R7 R6 R7 - 0x781E0005, // 0041 JMPF R7 #0048 - 0x8C1C0707, // 0042 GETMET R7 R3 K7 - 0x88240908, // 0043 GETMBR R9 R4 K8 - 0x58280005, // 0044 LDCONST R10 K5 - 0x7C1C0600, // 0045 CALL R7 3 - 0x80040E00, // 0046 RET 1 R7 - 0x70020019, // 0047 JMP #0062 - 0x541E4000, // 0048 LDINT R7 16385 - 0x1C1C0C07, // 0049 EQ R7 R6 R7 - 0x781E0005, // 004A JMPF R7 #0051 - 0x8C1C0707, // 004B GETMET R7 R3 K7 - 0x88240908, // 004C GETMBR R9 R4 K8 - 0x58280005, // 004D LDCONST R10 K5 - 0x7C1C0600, // 004E CALL R7 3 - 0x80040E00, // 004F RET 1 R7 - 0x70020010, // 0050 JMP #0062 - 0x541E4009, // 0051 LDINT R7 16394 - 0x1C1C0C07, // 0052 EQ R7 R6 R7 - 0x781E0005, // 0053 JMPF R7 #005A - 0x8C1C0707, // 0054 GETMET R7 R3 K7 - 0x8824090C, // 0055 GETMBR R9 R4 K12 - 0x5828000A, // 0056 LDCONST R10 K10 - 0x7C1C0600, // 0057 CALL R7 3 - 0x80040E00, // 0058 RET 1 R7 - 0x70020007, // 0059 JMP #0062 - 0x541E000F, // 005A LDINT R7 16 - 0x1C1C0C07, // 005B EQ R7 R6 R7 - 0x781E0004, // 005C JMPF R7 #0062 - 0x8C1C0707, // 005D GETMET R7 R3 K7 - 0x88240908, // 005E GETMBR R9 R4 K8 - 0x58280005, // 005F LDCONST R10 K5 - 0x7C1C0600, // 0060 CALL R7 3 - 0x80040E00, // 0061 RET 1 R7 - 0x601C0003, // 0062 GETGBL R7 G3 - 0x5C200000, // 0063 MOVE R8 R0 - 0x7C1C0200, // 0064 CALL R7 1 - 0x8C1C0F0D, // 0065 GETMET R7 R7 K13 - 0x5C240200, // 0066 MOVE R9 R1 - 0x5C280400, // 0067 MOVE R10 R2 - 0x5C2C0600, // 0068 MOVE R11 R3 - 0x7C1C0800, // 0069 CALL R7 4 - 0x80040E00, // 006A RET 1 R7 - }) - ) -); -/*******************************************************************/ - +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light3' +extern bclosure *class_Matter_Plugin_Light3_read_attribute; /******************************************************************** ** Solidified function: invoke_request @@ -835,7 +691,7 @@ be_local_class(Matter_Plugin_Bridge_Light3, { be_const_key_int(269, -1), be_const_int(2) }, })) ) } )) }, { be_const_key_weak(shadow_sat, -1), be_const_var(1) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_read_attribute_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) }, })), be_str_weak(Matter_Plugin_Bridge_Light3) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h new file mode 100644 index 000000000..74d87f05f --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h @@ -0,0 +1,27 @@ +/* Solidification of Matter_Plugin_9_Virt_Sensor_Air_Quality.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Virt_Sensor_Air_Quality; + +/******************************************************************** +** Solidified class: Matter_Plugin_Virt_Sensor_Air_Quality +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_class(Matter_Plugin_Virt_Sensor_Air_Quality, + 0, + &be_class_Matter_Plugin_Sensor_Air_Quality, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(VIRTUAL, 3), be_const_bool(1) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(v_X2EAir_X20Quality) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(v_airquality) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(ARG, 2), be_nested_str_weak() }, + })), + be_str_weak(Matter_Plugin_Virt_Sensor_Air_Quality) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h index 7df38a55c..d88b86b6b 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h @@ -7,37 +7,12 @@ extern const bclass be_class_Matter_TLV_item; /******************************************************************** -** Solidified function: to_TLV +** Solidified function: reset ********************************************************************/ extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_to_TLV, /* name */ +be_local_closure(class_Matter_TLV_item_reset, /* name */ be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(to_TLV), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80040000, // 0000 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_parent -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_set_parent, /* name */ - be_nested_proto( - 2, /* nstack */ + 3, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -45,14 +20,29 @@ be_local_closure(class_Matter_TLV_item_set_parent, /* name */ 0, /* has sup protos */ &be_class_Matter_TLV_item, 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ + ( &(const bvalue[ 8]) { /* constants */ /* K0 */ be_nested_str_weak(parent), + /* K1 */ be_nested_str_weak(next_idx), + /* K2 */ be_nested_str_weak(tag_vendor), + /* K3 */ be_nested_str_weak(tag_profile), + /* K4 */ be_nested_str_weak(tag_number), + /* K5 */ be_nested_str_weak(tag_sub), + /* K6 */ be_nested_str_weak(typ), + /* K7 */ be_nested_str_weak(val), }), - be_str_weak(set_parent), + be_str_weak(reset), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 + ( &(const binstruction[10]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x90020202, // 0002 SETMBR R0 K1 R2 + 0x90020402, // 0003 SETMBR R0 K2 R2 + 0x90020602, // 0004 SETMBR R0 K3 R2 + 0x90020802, // 0005 SETMBR R0 K4 R2 + 0x90020A02, // 0006 SETMBR R0 K5 R2 + 0x90020C02, // 0007 SETMBR R0 K6 R2 + 0x90020E02, // 0008 SETMBR R0 K7 R2 + 0x80000000, // 0009 RET 0 }) ) ); @@ -60,279 +50,43 @@ be_local_closure(class_Matter_TLV_item_set_parent, /* name */ /******************************************************************** -** Solidified function: set_fulltag +** Solidified function: set_or_nil ********************************************************************/ extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_set_fulltag, /* name */ +be_local_closure(class_Matter_TLV_item_set_or_nil, /* name */ be_nested_proto( - 6, /* nstack */ - 4, /* argc */ + 5, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_TLV_item, 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tag_vendor), - /* K1 */ be_nested_str_weak(tag_profile), - /* K2 */ be_nested_str_weak(tag_number), - /* K3 */ be_nested_str_weak(tag_sub), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(reset), + /* K1 */ be_nested_str_weak(typ), + /* K2 */ be_nested_str_weak(val), }), - be_str_weak(set_fulltag), + be_str_weak(set_or_nil), &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x60100009, // 0000 GETGBL R4 G9 - 0x5C140200, // 0001 MOVE R5 R1 - 0x7C100200, // 0002 CALL R4 1 - 0x90020004, // 0003 SETMBR R0 K0 R4 - 0x60100009, // 0004 GETGBL R4 G9 - 0x5C140400, // 0005 MOVE R5 R2 - 0x7C100200, // 0006 CALL R4 1 - 0x90020204, // 0007 SETMBR R0 K1 R4 - 0x60100009, // 0008 GETGBL R4 G9 - 0x5C140600, // 0009 MOVE R5 R3 - 0x7C100200, // 000A CALL R4 1 - 0x90020404, // 000B SETMBR R0 K2 R4 - 0x4C100000, // 000C LDNIL R4 - 0x90020604, // 000D SETMBR R0 K3 R4 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_contextspecific -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_set_contextspecific, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(set_fulltag), - /* K1 */ be_nested_str_weak(tag_sub), - }), - be_str_weak(set_contextspecific), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x7C080200, // 0001 CALL R2 1 - 0x60080009, // 0002 GETGBL R2 G9 - 0x5C0C0200, // 0003 MOVE R3 R1 - 0x7C080200, // 0004 CALL R2 1 - 0x90020202, // 0005 SETMBR R0 K1 R2 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sort -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_sort, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_TLV_item), - /* K1 */ be_const_int(1), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(_cmp_gt), - /* K4 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(sort), - &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x60080010, // 0001 GETGBL R2 G16 - 0x600C000C, // 0002 GETGBL R3 G12 - 0x5C100000, // 0003 MOVE R4 R0 - 0x7C0C0200, // 0004 CALL R3 1 - 0x040C0701, // 0005 SUB R3 R3 K1 - 0x400E0203, // 0006 CONNECT R3 K1 R3 - 0x7C080200, // 0007 CALL R2 1 - 0xA8020013, // 0008 EXBLK 0 #001D - 0x5C0C0400, // 0009 MOVE R3 R2 - 0x7C0C0000, // 000A CALL R3 0 - 0x94100003, // 000B GETIDX R4 R0 R3 - 0x5C140600, // 000C MOVE R5 R3 - 0x24180B02, // 000D GT R6 R5 K2 - 0x781A000B, // 000E JMPF R6 #001B - 0x04180B01, // 000F SUB R6 R5 K1 - 0x94180006, // 0010 GETIDX R6 R0 R6 - 0x8C180D03, // 0011 GETMET R6 R6 K3 - 0x5C200800, // 0012 MOVE R8 R4 - 0x7C180400, // 0013 CALL R6 2 - 0x24180D02, // 0014 GT R6 R6 K2 - 0x781A0004, // 0015 JMPF R6 #001B - 0x04180B01, // 0016 SUB R6 R5 K1 - 0x94180006, // 0017 GETIDX R6 R0 R6 - 0x98000A06, // 0018 SETIDX R0 R5 R6 - 0x04140B01, // 0019 SUB R5 R5 K1 - 0x7001FFF1, // 001A JMP #000D - 0x98000A04, // 001B SETIDX R0 R5 R4 - 0x7001FFEB, // 001C JMP #0009 - 0x58080004, // 001D LDCONST R2 K4 - 0xAC080200, // 001E CATCH R2 1 0 - 0xB0080000, // 001F RAISE 2 R0 R0 - 0x80040000, // 0020 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: to_str_val -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_to_str_val, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(val), - /* K1 */ be_nested_str_weak(int), - /* K2 */ be_nested_str_weak(typ), - /* K3 */ be_nested_str_weak(TLV), - /* K4 */ be_nested_str_weak(U1), - /* K5 */ be_nested_str_weak(U8), - /* K6 */ be_nested_str_weak(U), - /* K7 */ be_nested_str_weak(bool), - /* K8 */ be_nested_str_weak(true), - /* K9 */ be_nested_str_weak(false), - /* K10 */ be_nested_str_weak(null), - /* K11 */ be_nested_str_weak(real), - /* K12 */ be_nested_str_weak(string), - /* K13 */ be_nested_str_weak(int64), - /* K14 */ be_nested_str_weak(tostring), - /* K15 */ be_nested_str_weak(instance), - }), - be_str_weak(to_str_val), - &be_const_str_solidified, - ( &(const binstruction[98]) { /* code */ - 0x60040004, // 0000 GETGBL R1 G4 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x7C040200, // 0002 CALL R1 1 - 0x1C040301, // 0003 EQ R1 R1 K1 - 0x78060014, // 0004 JMPF R1 #001A - 0x88040102, // 0005 GETMBR R1 R0 K2 - 0x88080103, // 0006 GETMBR R2 R0 K3 - 0x88080504, // 0007 GETMBR R2 R2 K4 - 0x28040202, // 0008 GE R1 R1 R2 - 0x7806000A, // 0009 JMPF R1 #0015 - 0x88040102, // 000A GETMBR R1 R0 K2 - 0x88080103, // 000B GETMBR R2 R0 K3 - 0x88080505, // 000C GETMBR R2 R2 K5 - 0x18040202, // 000D LE R1 R1 R2 - 0x78060005, // 000E JMPF R1 #0015 - 0x60040008, // 000F GETGBL R1 G8 - 0x88080100, // 0010 GETMBR R2 R0 K0 - 0x7C040200, // 0011 CALL R1 1 - 0x00040306, // 0012 ADD R1 R1 K6 - 0x80040200, // 0013 RET 1 R1 - 0x70020003, // 0014 JMP #0019 - 0x60040008, // 0015 GETGBL R1 G8 - 0x88080100, // 0016 GETMBR R2 R0 K0 - 0x7C040200, // 0017 CALL R1 1 - 0x80040200, // 0018 RET 1 R1 - 0x70020046, // 0019 JMP #0061 - 0x60040004, // 001A GETGBL R1 G4 - 0x88080100, // 001B GETMBR R2 R0 K0 - 0x7C040200, // 001C CALL R1 1 - 0x1C040307, // 001D EQ R1 R1 K7 - 0x78060006, // 001E JMPF R1 #0026 - 0x88040100, // 001F GETMBR R1 R0 K0 - 0x78060001, // 0020 JMPF R1 #0023 - 0x58040008, // 0021 LDCONST R1 K8 - 0x70020000, // 0022 JMP #0024 - 0x58040009, // 0023 LDCONST R1 K9 - 0x80040200, // 0024 RET 1 R1 - 0x7002003A, // 0025 JMP #0061 - 0x88040100, // 0026 GETMBR R1 R0 K0 - 0x4C080000, // 0027 LDNIL R2 - 0x1C040202, // 0028 EQ R1 R1 R2 - 0x78060001, // 0029 JMPF R1 #002C - 0x80061400, // 002A RET 1 K10 - 0x70020034, // 002B JMP #0061 - 0x60040004, // 002C GETGBL R1 G4 - 0x88080100, // 002D GETMBR R2 R0 K0 - 0x7C040200, // 002E CALL R1 1 - 0x1C04030B, // 002F EQ R1 R1 K11 - 0x78060004, // 0030 JMPF R1 #0036 - 0x60040008, // 0031 GETGBL R1 G8 - 0x88080100, // 0032 GETMBR R2 R0 K0 - 0x7C040200, // 0033 CALL R1 1 - 0x80040200, // 0034 RET 1 R1 - 0x7002002A, // 0035 JMP #0061 - 0x60040004, // 0036 GETGBL R1 G4 - 0x88080100, // 0037 GETMBR R2 R0 K0 - 0x7C040200, // 0038 CALL R1 1 - 0x1C04030C, // 0039 EQ R1 R1 K12 - 0x78060002, // 003A JMPF R1 #003E - 0x88040100, // 003B GETMBR R1 R0 K0 - 0x80040200, // 003C RET 1 R1 - 0x70020022, // 003D JMP #0061 - 0x6004000F, // 003E GETGBL R1 G15 - 0x88080100, // 003F GETMBR R2 R0 K0 - 0xB80E1A00, // 0040 GETNGBL R3 K13 - 0x7C040400, // 0041 CALL R1 2 - 0x78060014, // 0042 JMPF R1 #0058 - 0x88040102, // 0043 GETMBR R1 R0 K2 - 0x88080103, // 0044 GETMBR R2 R0 K3 - 0x88080504, // 0045 GETMBR R2 R2 K4 - 0x28040202, // 0046 GE R1 R1 R2 - 0x7806000A, // 0047 JMPF R1 #0053 - 0x88040102, // 0048 GETMBR R1 R0 K2 - 0x88080103, // 0049 GETMBR R2 R0 K3 - 0x88080505, // 004A GETMBR R2 R2 K5 - 0x18040202, // 004B LE R1 R1 R2 - 0x78060005, // 004C JMPF R1 #0053 - 0x88040100, // 004D GETMBR R1 R0 K0 - 0x8C04030E, // 004E GETMET R1 R1 K14 - 0x7C040200, // 004F CALL R1 1 - 0x00040306, // 0050 ADD R1 R1 K6 - 0x80040200, // 0051 RET 1 R1 - 0x70020003, // 0052 JMP #0057 - 0x88040100, // 0053 GETMBR R1 R0 K0 - 0x8C04030E, // 0054 GETMET R1 R1 K14 - 0x7C040200, // 0055 CALL R1 1 - 0x80040200, // 0056 RET 1 R1 - 0x70020008, // 0057 JMP #0061 - 0x60040004, // 0058 GETGBL R1 G4 - 0x88080100, // 0059 GETMBR R2 R0 K0 - 0x7C040200, // 005A CALL R1 1 - 0x1C04030F, // 005B EQ R1 R1 K15 - 0x78060003, // 005C JMPF R1 #0061 - 0x8C04010E, // 005D GETMET R1 R0 K14 - 0x500C0200, // 005E LDBOOL R3 1 0 - 0x7C040400, // 005F CALL R1 2 - 0x80040200, // 0060 RET 1 R1 - 0x80000000, // 0061 RET 0 + ( &(const binstruction[16]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x7C0C0200, // 0001 CALL R3 1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C0C0403, // 0003 EQ R3 R2 R3 + 0x780E0000, // 0004 JMPF R3 #0006 + 0x54060013, // 0005 LDINT R1 20 + 0x4C0C0000, // 0006 LDNIL R3 + 0x200C0403, // 0007 NE R3 R2 R3 + 0x740E0002, // 0008 JMPT R3 #000C + 0x540E0013, // 0009 LDINT R3 20 + 0x1C0C0203, // 000A EQ R3 R1 R3 + 0x780E0002, // 000B JMPF R3 #000F + 0x90020201, // 000C SETMBR R0 K1 R1 + 0x90020402, // 000D SETMBR R0 K2 R2 + 0x80040000, // 000E RET 1 R0 + 0x80000000, // 000F RET 0 }) ) ); @@ -655,42 +409,39 @@ be_local_closure(class_Matter_TLV_item_encode_len, /* name */ /******************************************************************** -** Solidified function: reset +** Solidified function: set ********************************************************************/ extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_reset, /* name */ +be_local_closure(class_Matter_TLV_item_set, /* name */ be_nested_proto( - 3, /* nstack */ - 2, /* argc */ + 5, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_TLV_item, 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(parent), - /* K1 */ be_nested_str_weak(next_idx), - /* K2 */ be_nested_str_weak(tag_vendor), - /* K3 */ be_nested_str_weak(tag_profile), - /* K4 */ be_nested_str_weak(tag_number), - /* K5 */ be_nested_str_weak(tag_sub), - /* K6 */ be_nested_str_weak(typ), - /* K7 */ be_nested_str_weak(val), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(reset), + /* K1 */ be_nested_str_weak(typ), + /* K2 */ be_nested_str_weak(val), }), - be_str_weak(reset), + be_str_weak(set), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x90020001, // 0001 SETMBR R0 K0 R1 - 0x90020202, // 0002 SETMBR R0 K1 R2 - 0x90020402, // 0003 SETMBR R0 K2 R2 - 0x90020602, // 0004 SETMBR R0 K3 R2 - 0x90020802, // 0005 SETMBR R0 K4 R2 - 0x90020A02, // 0006 SETMBR R0 K5 R2 - 0x90020C02, // 0007 SETMBR R0 K6 R2 - 0x90020E02, // 0008 SETMBR R0 K7 R2 - 0x80000000, // 0009 RET 0 + ( &(const binstruction[12]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x7C0C0200, // 0001 CALL R3 1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x200C0403, // 0003 NE R3 R2 R3 + 0x740E0002, // 0004 JMPT R3 #0008 + 0x540E0013, // 0005 LDINT R3 20 + 0x1C0C0203, // 0006 EQ R3 R1 R3 + 0x780E0002, // 0007 JMPF R3 #000B + 0x90020201, // 0008 SETMBR R0 K1 R1 + 0x90020402, // 0009 SETMBR R0 K2 R2 + 0x80040000, // 000A RET 1 R0 + 0x80000000, // 000B RET 0 }) ) ); @@ -698,40 +449,433 @@ be_local_closure(class_Matter_TLV_item_reset, /* name */ /******************************************************************** -** Solidified function: create_TLV +** Solidified function: to_TLV ********************************************************************/ extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_create_TLV, /* name */ +be_local_closure(class_Matter_TLV_item_to_TLV, /* name */ be_nested_proto( - 4, /* nstack */ + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(to_TLV), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80040000, // 0000 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: tostring +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_tostring, /* name */ + be_nested_proto( + 7, /* nstack */ 2, /* argc */ - 4, /* varg */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_TLV_item, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_TLV_item), - /* K1 */ be_nested_str_weak(typ), - /* K2 */ be_nested_str_weak(val), + ( &(const bvalue[34]) { /* constants */ + /* K0 */ be_nested_str_weak(), + /* K1 */ be_nested_str_weak(tag_profile), + /* K2 */ be_nested_str_weak(Matter_X3A_X3A), + /* K3 */ be_nested_str_weak(tag_number), + /* K4 */ be_nested_str_weak(0x_X2508X_X20), + /* K5 */ be_nested_str_weak(tag_vendor), + /* K6 */ be_nested_str_weak(0x_X2504X_X3A_X3A), + /* K7 */ be_nested_str_weak(0x_X2504X_X3A), + /* K8 */ be_nested_str_weak(tag_sub), + /* K9 */ be_nested_str_weak(_X25i_X20), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(_X3D_X20), + /* K12 */ be_nested_str_weak(val), + /* K13 */ be_nested_str_weak(int), + /* K14 */ be_nested_str_weak(_X25i), + /* K15 */ be_nested_str_weak(typ), + /* K16 */ be_nested_str_weak(TLV), + /* K17 */ be_nested_str_weak(U1), + /* K18 */ be_nested_str_weak(U8), + /* K19 */ be_nested_str_weak(U), + /* K20 */ be_nested_str_weak(bool), + /* K21 */ be_nested_str_weak(true), + /* K22 */ be_nested_str_weak(false), + /* K23 */ be_nested_str_weak(null), + /* K24 */ be_nested_str_weak(real), + /* K25 */ be_nested_str_weak(_X25g), + /* K26 */ be_nested_str_weak(string), + /* K27 */ be_nested_str_weak(_X22_X25s_X22), + /* K28 */ be_nested_str_weak(int64), + /* K29 */ be_nested_str_weak(tostring), + /* K30 */ be_nested_str_weak(instance), + /* K31 */ be_nested_str_weak(_X25s), + /* K32 */ be_nested_str_weak(tohex), + /* K33 */ be_nested_str_weak(_X20), }), - be_str_weak(create_TLV), + be_str_weak(tostring), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ + ( &(const binstruction[167]) { /* code */ 0x58080000, // 0000 LDCONST R2 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x200C0203, // 0002 NE R3 R1 R3 - 0x740E0002, // 0003 JMPT R3 #0007 - 0x540E0013, // 0004 LDINT R3 20 - 0x1C0C0003, // 0005 EQ R3 R0 R3 - 0x780E0004, // 0006 JMPF R3 #000C - 0x5C0C0400, // 0007 MOVE R3 R2 - 0x7C0C0000, // 0008 CALL R3 0 - 0x900E0200, // 0009 SETMBR R3 K1 R0 - 0x900E0401, // 000A SETMBR R3 K2 R1 - 0x80040600, // 000B RET 1 R3 - 0x80000000, // 000C RET 0 + 0xA802009C, // 0001 EXBLK 0 #009F + 0x500C0200, // 0002 LDBOOL R3 1 0 + 0x200C0203, // 0003 NE R3 R1 R3 + 0x780E0038, // 0004 JMPF R3 #003E + 0x880C0101, // 0005 GETMBR R3 R0 K1 + 0x5411FFFE, // 0006 LDINT R4 -1 + 0x1C0C0604, // 0007 EQ R3 R3 R4 + 0x780E000A, // 0008 JMPF R3 #0014 + 0x00080502, // 0009 ADD R2 R2 K2 + 0x880C0103, // 000A GETMBR R3 R0 K3 + 0x4C100000, // 000B LDNIL R4 + 0x200C0604, // 000C NE R3 R3 R4 + 0x780E0004, // 000D JMPF R3 #0013 + 0x600C0018, // 000E GETGBL R3 G24 + 0x58100004, // 000F LDCONST R4 K4 + 0x88140103, // 0010 GETMBR R5 R0 K3 + 0x7C0C0400, // 0011 CALL R3 2 + 0x00080403, // 0012 ADD R2 R2 R3 + 0x70020023, // 0013 JMP #0038 + 0x880C0105, // 0014 GETMBR R3 R0 K5 + 0x4C100000, // 0015 LDNIL R4 + 0x200C0604, // 0016 NE R3 R3 R4 + 0x780E0004, // 0017 JMPF R3 #001D + 0x600C0018, // 0018 GETGBL R3 G24 + 0x58100006, // 0019 LDCONST R4 K6 + 0x88140105, // 001A GETMBR R5 R0 K5 + 0x7C0C0400, // 001B CALL R3 2 + 0x00080403, // 001C ADD R2 R2 R3 + 0x880C0101, // 001D GETMBR R3 R0 K1 + 0x4C100000, // 001E LDNIL R4 + 0x200C0604, // 001F NE R3 R3 R4 + 0x780E0004, // 0020 JMPF R3 #0026 + 0x600C0018, // 0021 GETGBL R3 G24 + 0x58100007, // 0022 LDCONST R4 K7 + 0x88140101, // 0023 GETMBR R5 R0 K1 + 0x7C0C0400, // 0024 CALL R3 2 + 0x00080403, // 0025 ADD R2 R2 R3 + 0x880C0103, // 0026 GETMBR R3 R0 K3 + 0x4C100000, // 0027 LDNIL R4 + 0x200C0604, // 0028 NE R3 R3 R4 + 0x780E0004, // 0029 JMPF R3 #002F + 0x600C0018, // 002A GETGBL R3 G24 + 0x58100004, // 002B LDCONST R4 K4 + 0x88140103, // 002C GETMBR R5 R0 K3 + 0x7C0C0400, // 002D CALL R3 2 + 0x00080403, // 002E ADD R2 R2 R3 + 0x880C0108, // 002F GETMBR R3 R0 K8 + 0x4C100000, // 0030 LDNIL R4 + 0x200C0604, // 0031 NE R3 R3 R4 + 0x780E0004, // 0032 JMPF R3 #0038 + 0x600C0018, // 0033 GETGBL R3 G24 + 0x58100009, // 0034 LDCONST R4 K9 + 0x88140108, // 0035 GETMBR R5 R0 K8 + 0x7C0C0400, // 0036 CALL R3 2 + 0x00080403, // 0037 ADD R2 R2 R3 + 0x600C000C, // 0038 GETGBL R3 G12 + 0x5C100400, // 0039 MOVE R4 R2 + 0x7C0C0200, // 003A CALL R3 1 + 0x240C070A, // 003B GT R3 R3 K10 + 0x780E0000, // 003C JMPF R3 #003E + 0x0008050B, // 003D ADD R2 R2 K11 + 0x600C0004, // 003E GETGBL R3 G4 + 0x8810010C, // 003F GETMBR R4 R0 K12 + 0x7C0C0200, // 0040 CALL R3 1 + 0x1C0C070D, // 0041 EQ R3 R3 K13 + 0x780E0010, // 0042 JMPF R3 #0054 + 0x600C0018, // 0043 GETGBL R3 G24 + 0x5810000E, // 0044 LDCONST R4 K14 + 0x8814010C, // 0045 GETMBR R5 R0 K12 + 0x7C0C0400, // 0046 CALL R3 2 + 0x00080403, // 0047 ADD R2 R2 R3 + 0x880C010F, // 0048 GETMBR R3 R0 K15 + 0x88100110, // 0049 GETMBR R4 R0 K16 + 0x88100911, // 004A GETMBR R4 R4 K17 + 0x280C0604, // 004B GE R3 R3 R4 + 0x780E0005, // 004C JMPF R3 #0053 + 0x880C010F, // 004D GETMBR R3 R0 K15 + 0x88100110, // 004E GETMBR R4 R0 K16 + 0x88100912, // 004F GETMBR R4 R4 K18 + 0x180C0604, // 0050 LE R3 R3 R4 + 0x780E0000, // 0051 JMPF R3 #0053 + 0x00080513, // 0052 ADD R2 R2 K19 + 0x70020048, // 0053 JMP #009D + 0x600C0004, // 0054 GETGBL R3 G4 + 0x8810010C, // 0055 GETMBR R4 R0 K12 + 0x7C0C0200, // 0056 CALL R3 1 + 0x1C0C0714, // 0057 EQ R3 R3 K20 + 0x780E0006, // 0058 JMPF R3 #0060 + 0x880C010C, // 0059 GETMBR R3 R0 K12 + 0x780E0001, // 005A JMPF R3 #005D + 0x580C0015, // 005B LDCONST R3 K21 + 0x70020000, // 005C JMP #005E + 0x580C0016, // 005D LDCONST R3 K22 + 0x00080403, // 005E ADD R2 R2 R3 + 0x7002003C, // 005F JMP #009D + 0x880C010C, // 0060 GETMBR R3 R0 K12 + 0x4C100000, // 0061 LDNIL R4 + 0x1C0C0604, // 0062 EQ R3 R3 R4 + 0x780E0001, // 0063 JMPF R3 #0066 + 0x00080517, // 0064 ADD R2 R2 K23 + 0x70020036, // 0065 JMP #009D + 0x600C0004, // 0066 GETGBL R3 G4 + 0x8810010C, // 0067 GETMBR R4 R0 K12 + 0x7C0C0200, // 0068 CALL R3 1 + 0x1C0C0718, // 0069 EQ R3 R3 K24 + 0x780E0005, // 006A JMPF R3 #0071 + 0x600C0018, // 006B GETGBL R3 G24 + 0x58100019, // 006C LDCONST R4 K25 + 0x8814010C, // 006D GETMBR R5 R0 K12 + 0x7C0C0400, // 006E CALL R3 2 + 0x00080403, // 006F ADD R2 R2 R3 + 0x7002002B, // 0070 JMP #009D + 0x600C0004, // 0071 GETGBL R3 G4 + 0x8810010C, // 0072 GETMBR R4 R0 K12 + 0x7C0C0200, // 0073 CALL R3 1 + 0x1C0C071A, // 0074 EQ R3 R3 K26 + 0x780E0005, // 0075 JMPF R3 #007C + 0x600C0018, // 0076 GETGBL R3 G24 + 0x5810001B, // 0077 LDCONST R4 K27 + 0x8814010C, // 0078 GETMBR R5 R0 K12 + 0x7C0C0400, // 0079 CALL R3 2 + 0x00080403, // 007A ADD R2 R2 R3 + 0x70020020, // 007B JMP #009D + 0x600C000F, // 007C GETGBL R3 G15 + 0x8810010C, // 007D GETMBR R4 R0 K12 + 0xB8163800, // 007E GETNGBL R5 K28 + 0x7C0C0400, // 007F CALL R3 2 + 0x780E000F, // 0080 JMPF R3 #0091 + 0x880C010C, // 0081 GETMBR R3 R0 K12 + 0x8C0C071D, // 0082 GETMET R3 R3 K29 + 0x7C0C0200, // 0083 CALL R3 1 + 0x00080403, // 0084 ADD R2 R2 R3 + 0x880C010F, // 0085 GETMBR R3 R0 K15 + 0x88100110, // 0086 GETMBR R4 R0 K16 + 0x88100911, // 0087 GETMBR R4 R4 K17 + 0x280C0604, // 0088 GE R3 R3 R4 + 0x780E0005, // 0089 JMPF R3 #0090 + 0x880C010F, // 008A GETMBR R3 R0 K15 + 0x88100110, // 008B GETMBR R4 R0 K16 + 0x88100912, // 008C GETMBR R4 R4 K18 + 0x180C0604, // 008D LE R3 R3 R4 + 0x780E0000, // 008E JMPF R3 #0090 + 0x00080513, // 008F ADD R2 R2 K19 + 0x7002000B, // 0090 JMP #009D + 0x600C0004, // 0091 GETGBL R3 G4 + 0x8810010C, // 0092 GETMBR R4 R0 K12 + 0x7C0C0200, // 0093 CALL R3 1 + 0x1C0C071E, // 0094 EQ R3 R3 K30 + 0x780E0006, // 0095 JMPF R3 #009D + 0x600C0018, // 0096 GETGBL R3 G24 + 0x5810001F, // 0097 LDCONST R4 K31 + 0x8814010C, // 0098 GETMBR R5 R0 K12 + 0x8C140B20, // 0099 GETMET R5 R5 K32 + 0x7C140200, // 009A CALL R5 1 + 0x7C0C0400, // 009B CALL R3 2 + 0x00080403, // 009C ADD R2 R2 R3 + 0xA8040001, // 009D EXBLK 1 1 + 0x70020006, // 009E JMP #00A6 + 0xAC0C0002, // 009F CATCH R3 0 2 + 0x70020003, // 00A0 JMP #00A5 + 0x00140721, // 00A1 ADD R5 R3 K33 + 0x00140A04, // 00A2 ADD R5 R5 R4 + 0x80040A00, // 00A3 RET 1 R5 + 0x70020000, // 00A4 JMP #00A6 + 0xB0080000, // 00A5 RAISE 2 R0 R0 + 0x80040400, // 00A6 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: to_str_val +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_to_str_val, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(val), + /* K1 */ be_nested_str_weak(int), + /* K2 */ be_nested_str_weak(typ), + /* K3 */ be_nested_str_weak(TLV), + /* K4 */ be_nested_str_weak(U1), + /* K5 */ be_nested_str_weak(U8), + /* K6 */ be_nested_str_weak(U), + /* K7 */ be_nested_str_weak(bool), + /* K8 */ be_nested_str_weak(true), + /* K9 */ be_nested_str_weak(false), + /* K10 */ be_nested_str_weak(null), + /* K11 */ be_nested_str_weak(real), + /* K12 */ be_nested_str_weak(string), + /* K13 */ be_nested_str_weak(int64), + /* K14 */ be_nested_str_weak(tostring), + /* K15 */ be_nested_str_weak(instance), + }), + be_str_weak(to_str_val), + &be_const_str_solidified, + ( &(const binstruction[98]) { /* code */ + 0x60040004, // 0000 GETGBL R1 G4 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x7C040200, // 0002 CALL R1 1 + 0x1C040301, // 0003 EQ R1 R1 K1 + 0x78060014, // 0004 JMPF R1 #001A + 0x88040102, // 0005 GETMBR R1 R0 K2 + 0x88080103, // 0006 GETMBR R2 R0 K3 + 0x88080504, // 0007 GETMBR R2 R2 K4 + 0x28040202, // 0008 GE R1 R1 R2 + 0x7806000A, // 0009 JMPF R1 #0015 + 0x88040102, // 000A GETMBR R1 R0 K2 + 0x88080103, // 000B GETMBR R2 R0 K3 + 0x88080505, // 000C GETMBR R2 R2 K5 + 0x18040202, // 000D LE R1 R1 R2 + 0x78060005, // 000E JMPF R1 #0015 + 0x60040008, // 000F GETGBL R1 G8 + 0x88080100, // 0010 GETMBR R2 R0 K0 + 0x7C040200, // 0011 CALL R1 1 + 0x00040306, // 0012 ADD R1 R1 K6 + 0x80040200, // 0013 RET 1 R1 + 0x70020003, // 0014 JMP #0019 + 0x60040008, // 0015 GETGBL R1 G8 + 0x88080100, // 0016 GETMBR R2 R0 K0 + 0x7C040200, // 0017 CALL R1 1 + 0x80040200, // 0018 RET 1 R1 + 0x70020046, // 0019 JMP #0061 + 0x60040004, // 001A GETGBL R1 G4 + 0x88080100, // 001B GETMBR R2 R0 K0 + 0x7C040200, // 001C CALL R1 1 + 0x1C040307, // 001D EQ R1 R1 K7 + 0x78060006, // 001E JMPF R1 #0026 + 0x88040100, // 001F GETMBR R1 R0 K0 + 0x78060001, // 0020 JMPF R1 #0023 + 0x58040008, // 0021 LDCONST R1 K8 + 0x70020000, // 0022 JMP #0024 + 0x58040009, // 0023 LDCONST R1 K9 + 0x80040200, // 0024 RET 1 R1 + 0x7002003A, // 0025 JMP #0061 + 0x88040100, // 0026 GETMBR R1 R0 K0 + 0x4C080000, // 0027 LDNIL R2 + 0x1C040202, // 0028 EQ R1 R1 R2 + 0x78060001, // 0029 JMPF R1 #002C + 0x80061400, // 002A RET 1 K10 + 0x70020034, // 002B JMP #0061 + 0x60040004, // 002C GETGBL R1 G4 + 0x88080100, // 002D GETMBR R2 R0 K0 + 0x7C040200, // 002E CALL R1 1 + 0x1C04030B, // 002F EQ R1 R1 K11 + 0x78060004, // 0030 JMPF R1 #0036 + 0x60040008, // 0031 GETGBL R1 G8 + 0x88080100, // 0032 GETMBR R2 R0 K0 + 0x7C040200, // 0033 CALL R1 1 + 0x80040200, // 0034 RET 1 R1 + 0x7002002A, // 0035 JMP #0061 + 0x60040004, // 0036 GETGBL R1 G4 + 0x88080100, // 0037 GETMBR R2 R0 K0 + 0x7C040200, // 0038 CALL R1 1 + 0x1C04030C, // 0039 EQ R1 R1 K12 + 0x78060002, // 003A JMPF R1 #003E + 0x88040100, // 003B GETMBR R1 R0 K0 + 0x80040200, // 003C RET 1 R1 + 0x70020022, // 003D JMP #0061 + 0x6004000F, // 003E GETGBL R1 G15 + 0x88080100, // 003F GETMBR R2 R0 K0 + 0xB80E1A00, // 0040 GETNGBL R3 K13 + 0x7C040400, // 0041 CALL R1 2 + 0x78060014, // 0042 JMPF R1 #0058 + 0x88040102, // 0043 GETMBR R1 R0 K2 + 0x88080103, // 0044 GETMBR R2 R0 K3 + 0x88080504, // 0045 GETMBR R2 R2 K4 + 0x28040202, // 0046 GE R1 R1 R2 + 0x7806000A, // 0047 JMPF R1 #0053 + 0x88040102, // 0048 GETMBR R1 R0 K2 + 0x88080103, // 0049 GETMBR R2 R0 K3 + 0x88080505, // 004A GETMBR R2 R2 K5 + 0x18040202, // 004B LE R1 R1 R2 + 0x78060005, // 004C JMPF R1 #0053 + 0x88040100, // 004D GETMBR R1 R0 K0 + 0x8C04030E, // 004E GETMET R1 R1 K14 + 0x7C040200, // 004F CALL R1 1 + 0x00040306, // 0050 ADD R1 R1 K6 + 0x80040200, // 0051 RET 1 R1 + 0x70020003, // 0052 JMP #0057 + 0x88040100, // 0053 GETMBR R1 R0 K0 + 0x8C04030E, // 0054 GETMET R1 R1 K14 + 0x7C040200, // 0055 CALL R1 1 + 0x80040200, // 0056 RET 1 R1 + 0x70020008, // 0057 JMP #0061 + 0x60040004, // 0058 GETGBL R1 G4 + 0x88080100, // 0059 GETMBR R2 R0 K0 + 0x7C040200, // 005A CALL R1 1 + 0x1C04030F, // 005B EQ R1 R1 K15 + 0x78060003, // 005C JMPF R1 #0061 + 0x8C04010E, // 005D GETMET R1 R0 K14 + 0x500C0200, // 005E LDBOOL R3 1 0 + 0x7C040400, // 005F CALL R1 2 + 0x80040200, // 0060 RET 1 R1 + 0x80000000, // 0061 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_fulltag +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_set_fulltag, /* name */ + be_nested_proto( + 6, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tag_vendor), + /* K1 */ be_nested_str_weak(tag_profile), + /* K2 */ be_nested_str_weak(tag_number), + /* K3 */ be_nested_str_weak(tag_sub), + }), + be_str_weak(set_fulltag), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x60100009, // 0000 GETGBL R4 G9 + 0x5C140200, // 0001 MOVE R5 R1 + 0x7C100200, // 0002 CALL R4 1 + 0x90020004, // 0003 SETMBR R0 K0 R4 + 0x60100009, // 0004 GETGBL R4 G9 + 0x5C140400, // 0005 MOVE R5 R2 + 0x7C100200, // 0006 CALL R4 1 + 0x90020204, // 0007 SETMBR R0 K1 R4 + 0x60100009, // 0008 GETGBL R4 G9 + 0x5C140600, // 0009 MOVE R5 R3 + 0x7C100200, // 000A CALL R4 1 + 0x90020404, // 000B SETMBR R0 K2 R4 + 0x4C100000, // 000C LDNIL R4 + 0x90020604, // 000D SETMBR R0 K3 R4 + 0x80000000, // 000E RET 0 }) ) ); @@ -892,10 +1036,10 @@ be_local_closure(class_Matter_TLV_item_parse, /* name */ /******************************************************************** -** Solidified function: _encode_tag_len +** Solidified function: set_commonprofile ********************************************************************/ extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item__encode_tag_len, /* name */ +be_local_closure(class_Matter_TLV_item_set_commonprofile, /* name */ be_nested_proto( 6, /* nstack */ 1, /* argc */ @@ -905,73 +1049,18 @@ be_local_closure(class_Matter_TLV_item__encode_tag_len, /* name */ 0, /* has sup protos */ &be_class_Matter_TLV_item, 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(tag_number), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(tag_vendor), - /* K3 */ be_nested_str_weak(tag_profile), - /* K4 */ be_const_int(3), - /* K5 */ be_nested_str_weak(tag_sub), - /* K6 */ be_const_int(2), - /* K7 */ be_const_int(1), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(set_fulltag), }), - be_str_weak(_encode_tag_len), + be_str_weak(set_commonprofile), &be_const_str_solidified, - ( &(const binstruction[54]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x20040202, // 0002 NE R1 R1 R2 - 0x78060001, // 0003 JMPF R1 #0006 - 0x88040100, // 0004 GETMBR R1 R0 K0 - 0x70020000, // 0005 JMP #0007 - 0x58040001, // 0006 LDCONST R1 K1 - 0x540AFFFF, // 0007 LDINT R2 65536 - 0x28080202, // 0008 GE R2 R1 R2 - 0x740A0002, // 0009 JMPT R2 #000D - 0x14080301, // 000A LT R2 R1 K1 - 0x740A0000, // 000B JMPT R2 #000D - 0x50080001, // 000C LDBOOL R2 0 1 - 0x50080200, // 000D LDBOOL R2 1 0 - 0x580C0001, // 000E LDCONST R3 K1 - 0x88100102, // 000F GETMBR R4 R0 K2 - 0x4C140000, // 0010 LDNIL R5 - 0x20100805, // 0011 NE R4 R4 R5 - 0x78120006, // 0012 JMPF R4 #001A - 0x780A0002, // 0013 JMPF R2 #0017 - 0x54120008, // 0014 LDINT R4 9 - 0x80040800, // 0015 RET 1 R4 - 0x70020001, // 0016 JMP #0019 - 0x54120006, // 0017 LDINT R4 7 - 0x80040800, // 0018 RET 1 R4 - 0x7002001A, // 0019 JMP #0035 - 0x88100103, // 001A GETMBR R4 R0 K3 - 0x5415FFFE, // 001B LDINT R5 -1 - 0x1C100805, // 001C EQ R4 R4 R5 - 0x78120005, // 001D JMPF R4 #0024 - 0x780A0002, // 001E JMPF R2 #0022 - 0x54120004, // 001F LDINT R4 5 - 0x80040800, // 0020 RET 1 R4 - 0x70020000, // 0021 JMP #0023 - 0x80060800, // 0022 RET 1 K4 - 0x70020010, // 0023 JMP #0035 - 0x88100103, // 0024 GETMBR R4 R0 K3 - 0x4C140000, // 0025 LDNIL R5 - 0x20100805, // 0026 NE R4 R4 R5 - 0x78120005, // 0027 JMPF R4 #002E - 0x780A0002, // 0028 JMPF R2 #002C - 0x54120004, // 0029 LDINT R4 5 - 0x80040800, // 002A RET 1 R4 - 0x70020000, // 002B JMP #002D - 0x80060800, // 002C RET 1 K4 - 0x70020006, // 002D JMP #0035 - 0x88100105, // 002E GETMBR R4 R0 K5 - 0x4C140000, // 002F LDNIL R5 - 0x20100805, // 0030 NE R4 R4 R5 - 0x78120001, // 0031 JMPF R4 #0034 - 0x80060C00, // 0032 RET 1 K6 - 0x70020000, // 0033 JMP #0035 - 0x80060E00, // 0034 RET 1 K7 - 0x80000000, // 0035 RET 0 + ( &(const binstruction[ 6]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x5411FFFE, // 0002 LDINT R4 -1 + 0x4C140000, // 0003 LDNIL R5 + 0x7C040800, // 0004 CALL R1 4 + 0x80000000, // 0005 RET 0 }) ) ); @@ -979,39 +1068,360 @@ be_local_closure(class_Matter_TLV_item__encode_tag_len, /* name */ /******************************************************************** -** Solidified function: set +** Solidified function: _encode_tag ********************************************************************/ extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_set, /* name */ +be_local_closure(class_Matter_TLV_item__encode_tag, /* name */ be_nested_proto( - 5, /* nstack */ - 3, /* argc */ + 9, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_TLV_item, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(reset), - /* K1 */ be_nested_str_weak(typ), - /* K2 */ be_nested_str_weak(val), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(tag_number), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(tag_vendor), + /* K3 */ be_nested_str_weak(add), + /* K4 */ be_nested_str_weak(typ), + /* K5 */ be_const_int(1), + /* K6 */ be_const_int(2), + /* K7 */ be_nested_str_weak(tag_profile), + /* K8 */ be_nested_str_weak(tag_sub), }), - be_str_weak(set), + be_str_weak(_encode_tag), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x7C0C0200, // 0001 CALL R3 1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x200C0403, // 0003 NE R3 R2 R3 - 0x740E0002, // 0004 JMPT R3 #0008 - 0x540E0013, // 0005 LDINT R3 20 - 0x1C0C0203, // 0006 EQ R3 R1 R3 - 0x780E0002, // 0007 JMPF R3 #000B - 0x90020201, // 0008 SETMBR R0 K1 R1 - 0x90020402, // 0009 SETMBR R0 K2 R2 - 0x80040000, // 000A RET 1 R0 - 0x80000000, // 000B RET 0 + ( &(const binstruction[133]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x20080403, // 0002 NE R2 R2 R3 + 0x780A0001, // 0003 JMPF R2 #0006 + 0x88080100, // 0004 GETMBR R2 R0 K0 + 0x70020000, // 0005 JMP #0007 + 0x58080001, // 0006 LDCONST R2 K1 + 0x540EFFFF, // 0007 LDINT R3 65536 + 0x280C0403, // 0008 GE R3 R2 R3 + 0x740E0002, // 0009 JMPT R3 #000D + 0x140C0501, // 000A LT R3 R2 K1 + 0x740E0000, // 000B JMPT R3 #000D + 0x500C0001, // 000C LDBOOL R3 0 1 + 0x500C0200, // 000D LDBOOL R3 1 0 + 0x58100001, // 000E LDCONST R4 K1 + 0x88140102, // 000F GETMBR R5 R0 K2 + 0x4C180000, // 0010 LDNIL R6 + 0x20140A06, // 0011 NE R5 R5 R6 + 0x78160026, // 0012 JMPF R5 #003A + 0x780E0012, // 0013 JMPF R3 #0027 + 0x8C140303, // 0014 GETMET R5 R1 K3 + 0x541E00DF, // 0015 LDINT R7 224 + 0x88200104, // 0016 GETMBR R8 R0 K4 + 0x001C0E08, // 0017 ADD R7 R7 R8 + 0x58200005, // 0018 LDCONST R8 K5 + 0x7C140600, // 0019 CALL R5 3 + 0x8C140303, // 001A GETMET R5 R1 K3 + 0x881C0102, // 001B GETMBR R7 R0 K2 + 0x58200006, // 001C LDCONST R8 K6 + 0x7C140600, // 001D CALL R5 3 + 0x8C140303, // 001E GETMET R5 R1 K3 + 0x881C0107, // 001F GETMBR R7 R0 K7 + 0x58200006, // 0020 LDCONST R8 K6 + 0x7C140600, // 0021 CALL R5 3 + 0x8C140303, // 0022 GETMET R5 R1 K3 + 0x881C0100, // 0023 GETMBR R7 R0 K0 + 0x54220003, // 0024 LDINT R8 4 + 0x7C140600, // 0025 CALL R5 3 + 0x70020011, // 0026 JMP #0039 + 0x8C140303, // 0027 GETMET R5 R1 K3 + 0x541E00BF, // 0028 LDINT R7 192 + 0x88200104, // 0029 GETMBR R8 R0 K4 + 0x001C0E08, // 002A ADD R7 R7 R8 + 0x58200005, // 002B LDCONST R8 K5 + 0x7C140600, // 002C CALL R5 3 + 0x8C140303, // 002D GETMET R5 R1 K3 + 0x881C0102, // 002E GETMBR R7 R0 K2 + 0x58200006, // 002F LDCONST R8 K6 + 0x7C140600, // 0030 CALL R5 3 + 0x8C140303, // 0031 GETMET R5 R1 K3 + 0x881C0107, // 0032 GETMBR R7 R0 K7 + 0x58200006, // 0033 LDCONST R8 K6 + 0x7C140600, // 0034 CALL R5 3 + 0x8C140303, // 0035 GETMET R5 R1 K3 + 0x881C0100, // 0036 GETMBR R7 R0 K0 + 0x58200006, // 0037 LDCONST R8 K6 + 0x7C140600, // 0038 CALL R5 3 + 0x70020049, // 0039 JMP #0084 + 0x88140107, // 003A GETMBR R5 R0 K7 + 0x5419FFFE, // 003B LDINT R6 -1 + 0x1C140A06, // 003C EQ R5 R5 R6 + 0x78160016, // 003D JMPF R5 #0055 + 0x780E000A, // 003E JMPF R3 #004A + 0x8C140303, // 003F GETMET R5 R1 K3 + 0x541E005F, // 0040 LDINT R7 96 + 0x88200104, // 0041 GETMBR R8 R0 K4 + 0x001C0E08, // 0042 ADD R7 R7 R8 + 0x58200005, // 0043 LDCONST R8 K5 + 0x7C140600, // 0044 CALL R5 3 + 0x8C140303, // 0045 GETMET R5 R1 K3 + 0x881C0100, // 0046 GETMBR R7 R0 K0 + 0x54220003, // 0047 LDINT R8 4 + 0x7C140600, // 0048 CALL R5 3 + 0x70020009, // 0049 JMP #0054 + 0x8C140303, // 004A GETMET R5 R1 K3 + 0x541E003F, // 004B LDINT R7 64 + 0x88200104, // 004C GETMBR R8 R0 K4 + 0x001C0E08, // 004D ADD R7 R7 R8 + 0x58200005, // 004E LDCONST R8 K5 + 0x7C140600, // 004F CALL R5 3 + 0x8C140303, // 0050 GETMET R5 R1 K3 + 0x881C0100, // 0051 GETMBR R7 R0 K0 + 0x58200006, // 0052 LDCONST R8 K6 + 0x7C140600, // 0053 CALL R5 3 + 0x7002002E, // 0054 JMP #0084 + 0x88140107, // 0055 GETMBR R5 R0 K7 + 0x4C180000, // 0056 LDNIL R6 + 0x20140A06, // 0057 NE R5 R5 R6 + 0x78160016, // 0058 JMPF R5 #0070 + 0x780E000A, // 0059 JMPF R3 #0065 + 0x8C140303, // 005A GETMET R5 R1 K3 + 0x541E009F, // 005B LDINT R7 160 + 0x88200104, // 005C GETMBR R8 R0 K4 + 0x001C0E08, // 005D ADD R7 R7 R8 + 0x58200005, // 005E LDCONST R8 K5 + 0x7C140600, // 005F CALL R5 3 + 0x8C140303, // 0060 GETMET R5 R1 K3 + 0x881C0100, // 0061 GETMBR R7 R0 K0 + 0x54220003, // 0062 LDINT R8 4 + 0x7C140600, // 0063 CALL R5 3 + 0x70020009, // 0064 JMP #006F + 0x8C140303, // 0065 GETMET R5 R1 K3 + 0x541E007F, // 0066 LDINT R7 128 + 0x88200104, // 0067 GETMBR R8 R0 K4 + 0x001C0E08, // 0068 ADD R7 R7 R8 + 0x58200005, // 0069 LDCONST R8 K5 + 0x7C140600, // 006A CALL R5 3 + 0x8C140303, // 006B GETMET R5 R1 K3 + 0x881C0100, // 006C GETMBR R7 R0 K0 + 0x58200006, // 006D LDCONST R8 K6 + 0x7C140600, // 006E CALL R5 3 + 0x70020013, // 006F JMP #0084 + 0x88140108, // 0070 GETMBR R5 R0 K8 + 0x4C180000, // 0071 LDNIL R6 + 0x20140A06, // 0072 NE R5 R5 R6 + 0x7816000A, // 0073 JMPF R5 #007F + 0x8C140303, // 0074 GETMET R5 R1 K3 + 0x541E001F, // 0075 LDINT R7 32 + 0x88200104, // 0076 GETMBR R8 R0 K4 + 0x001C0E08, // 0077 ADD R7 R7 R8 + 0x58200005, // 0078 LDCONST R8 K5 + 0x7C140600, // 0079 CALL R5 3 + 0x8C140303, // 007A GETMET R5 R1 K3 + 0x881C0108, // 007B GETMBR R7 R0 K8 + 0x58200005, // 007C LDCONST R8 K5 + 0x7C140600, // 007D CALL R5 3 + 0x70020004, // 007E JMP #0084 + 0x8C140303, // 007F GETMET R5 R1 K3 + 0x881C0104, // 0080 GETMBR R7 R0 K4 + 0x001E0207, // 0081 ADD R7 K1 R7 + 0x58200005, // 0082 LDCONST R8 K5 + 0x7C140600, // 0083 CALL R5 3 + 0x80000000, // 0084 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sort +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_sort, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_TLV_item), + /* K1 */ be_const_int(1), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(_cmp_gt), + /* K4 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(sort), + &be_const_str_solidified, + ( &(const binstruction[33]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x60080010, // 0001 GETGBL R2 G16 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C0C0200, // 0004 CALL R3 1 + 0x040C0701, // 0005 SUB R3 R3 K1 + 0x400E0203, // 0006 CONNECT R3 K1 R3 + 0x7C080200, // 0007 CALL R2 1 + 0xA8020013, // 0008 EXBLK 0 #001D + 0x5C0C0400, // 0009 MOVE R3 R2 + 0x7C0C0000, // 000A CALL R3 0 + 0x94100003, // 000B GETIDX R4 R0 R3 + 0x5C140600, // 000C MOVE R5 R3 + 0x24180B02, // 000D GT R6 R5 K2 + 0x781A000B, // 000E JMPF R6 #001B + 0x04180B01, // 000F SUB R6 R5 K1 + 0x94180006, // 0010 GETIDX R6 R0 R6 + 0x8C180D03, // 0011 GETMET R6 R6 K3 + 0x5C200800, // 0012 MOVE R8 R4 + 0x7C180400, // 0013 CALL R6 2 + 0x24180D02, // 0014 GT R6 R6 K2 + 0x781A0004, // 0015 JMPF R6 #001B + 0x04180B01, // 0016 SUB R6 R5 K1 + 0x94180006, // 0017 GETIDX R6 R0 R6 + 0x98000A06, // 0018 SETIDX R0 R5 R6 + 0x04140B01, // 0019 SUB R5 R5 K1 + 0x7001FFF1, // 001A JMP #000D + 0x98000A04, // 001B SETIDX R0 R5 R4 + 0x7001FFEB, // 001C JMP #0009 + 0x58080004, // 001D LDCONST R2 K4 + 0xAC080200, // 001E CATCH R2 1 0 + 0xB0080000, // 001F RAISE 2 R0 R0 + 0x80040000, // 0020 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_init, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(parent), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _cmp_gt +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item__cmp_gt, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(tag_vendor), + /* K1 */ be_const_int(1), + /* K2 */ be_nested_str_weak(tag_profile), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(tag_number), + /* K5 */ be_nested_str_weak(tag_sub), + }), + be_str_weak(_cmp_gt), + &be_const_str_solidified, + ( &(const binstruction[72]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x20080403, // 0002 NE R2 R2 R3 + 0x780A0012, // 0003 JMPF R2 #0017 + 0x88080300, // 0004 GETMBR R2 R1 K0 + 0x4C0C0000, // 0005 LDNIL R3 + 0x1C080403, // 0006 EQ R2 R2 R3 + 0x780A0000, // 0007 JMPF R2 #0009 + 0x80060200, // 0008 RET 1 K1 + 0x88080100, // 0009 GETMBR R2 R0 K0 + 0x880C0300, // 000A GETMBR R3 R1 K0 + 0x24080403, // 000B GT R2 R2 R3 + 0x780A0000, // 000C JMPF R2 #000E + 0x80060200, // 000D RET 1 K1 + 0x88080100, // 000E GETMBR R2 R0 K0 + 0x880C0300, // 000F GETMBR R3 R1 K0 + 0x1C080403, // 0010 EQ R2 R2 R3 + 0x780A0004, // 0011 JMPF R2 #0017 + 0x88080102, // 0012 GETMBR R2 R0 K2 + 0x880C0302, // 0013 GETMBR R3 R1 K2 + 0x24080403, // 0014 GT R2 R2 R3 + 0x780A0000, // 0015 JMPF R2 #0017 + 0x80060200, // 0016 RET 1 K1 + 0x88080102, // 0017 GETMBR R2 R0 K2 + 0x540DFFFE, // 0018 LDINT R3 -1 + 0x1C080403, // 0019 EQ R2 R2 R3 + 0x780A0005, // 001A JMPF R2 #0021 + 0x88080302, // 001B GETMBR R2 R1 K2 + 0x4C0C0000, // 001C LDNIL R3 + 0x1C080403, // 001D EQ R2 R2 R3 + 0x780A0000, // 001E JMPF R2 #0020 + 0x80060200, // 001F RET 1 K1 + 0x70020008, // 0020 JMP #002A + 0x88080102, // 0021 GETMBR R2 R0 K2 + 0x4C0C0000, // 0022 LDNIL R3 + 0x1C080403, // 0023 EQ R2 R2 R3 + 0x780A0004, // 0024 JMPF R2 #002A + 0x88080302, // 0025 GETMBR R2 R1 K2 + 0x540DFFFE, // 0026 LDINT R3 -1 + 0x1C080403, // 0027 EQ R2 R2 R3 + 0x780A0000, // 0028 JMPF R2 #002A + 0x80060600, // 0029 RET 1 K3 + 0x88080104, // 002A GETMBR R2 R0 K4 + 0x4C0C0000, // 002B LDNIL R3 + 0x20080403, // 002C NE R2 R2 R3 + 0x780A000A, // 002D JMPF R2 #0039 + 0x88080304, // 002E GETMBR R2 R1 K4 + 0x4C0C0000, // 002F LDNIL R3 + 0x1C080403, // 0030 EQ R2 R2 R3 + 0x780A0000, // 0031 JMPF R2 #0033 + 0x80060200, // 0032 RET 1 K1 + 0x88080104, // 0033 GETMBR R2 R0 K4 + 0x880C0304, // 0034 GETMBR R3 R1 K4 + 0x24080403, // 0035 GT R2 R2 R3 + 0x780A0000, // 0036 JMPF R2 #0038 + 0x80060200, // 0037 RET 1 K1 + 0x80060600, // 0038 RET 1 K3 + 0x88080105, // 0039 GETMBR R2 R0 K5 + 0x4C0C0000, // 003A LDNIL R3 + 0x20080403, // 003B NE R2 R2 R3 + 0x780A0009, // 003C JMPF R2 #0047 + 0x88080305, // 003D GETMBR R2 R1 K5 + 0x4C0C0000, // 003E LDNIL R3 + 0x1C080403, // 003F EQ R2 R2 R3 + 0x780A0000, // 0040 JMPF R2 #0042 + 0x80060200, // 0041 RET 1 K1 + 0x88080105, // 0042 GETMBR R2 R0 K5 + 0x880C0305, // 0043 GETMBR R3 R1 K5 + 0x24080403, // 0044 GT R2 R2 R3 + 0x780A0000, // 0045 JMPF R2 #0047 + 0x80060200, // 0046 RET 1 K1 + 0x80060600, // 0047 RET 1 K3 }) ) ); @@ -1453,6 +1863,196 @@ be_local_closure(class_Matter_TLV_item_tlv2raw, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: _encode_tag_len +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item__encode_tag_len, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(tag_number), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(tag_vendor), + /* K3 */ be_nested_str_weak(tag_profile), + /* K4 */ be_const_int(3), + /* K5 */ be_nested_str_weak(tag_sub), + /* K6 */ be_const_int(2), + /* K7 */ be_const_int(1), + }), + be_str_weak(_encode_tag_len), + &be_const_str_solidified, + ( &(const binstruction[54]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x78060001, // 0003 JMPF R1 #0006 + 0x88040100, // 0004 GETMBR R1 R0 K0 + 0x70020000, // 0005 JMP #0007 + 0x58040001, // 0006 LDCONST R1 K1 + 0x540AFFFF, // 0007 LDINT R2 65536 + 0x28080202, // 0008 GE R2 R1 R2 + 0x740A0002, // 0009 JMPT R2 #000D + 0x14080301, // 000A LT R2 R1 K1 + 0x740A0000, // 000B JMPT R2 #000D + 0x50080001, // 000C LDBOOL R2 0 1 + 0x50080200, // 000D LDBOOL R2 1 0 + 0x580C0001, // 000E LDCONST R3 K1 + 0x88100102, // 000F GETMBR R4 R0 K2 + 0x4C140000, // 0010 LDNIL R5 + 0x20100805, // 0011 NE R4 R4 R5 + 0x78120006, // 0012 JMPF R4 #001A + 0x780A0002, // 0013 JMPF R2 #0017 + 0x54120008, // 0014 LDINT R4 9 + 0x80040800, // 0015 RET 1 R4 + 0x70020001, // 0016 JMP #0019 + 0x54120006, // 0017 LDINT R4 7 + 0x80040800, // 0018 RET 1 R4 + 0x7002001A, // 0019 JMP #0035 + 0x88100103, // 001A GETMBR R4 R0 K3 + 0x5415FFFE, // 001B LDINT R5 -1 + 0x1C100805, // 001C EQ R4 R4 R5 + 0x78120005, // 001D JMPF R4 #0024 + 0x780A0002, // 001E JMPF R2 #0022 + 0x54120004, // 001F LDINT R4 5 + 0x80040800, // 0020 RET 1 R4 + 0x70020000, // 0021 JMP #0023 + 0x80060800, // 0022 RET 1 K4 + 0x70020010, // 0023 JMP #0035 + 0x88100103, // 0024 GETMBR R4 R0 K3 + 0x4C140000, // 0025 LDNIL R5 + 0x20100805, // 0026 NE R4 R4 R5 + 0x78120005, // 0027 JMPF R4 #002E + 0x780A0002, // 0028 JMPF R2 #002C + 0x54120004, // 0029 LDINT R4 5 + 0x80040800, // 002A RET 1 R4 + 0x70020000, // 002B JMP #002D + 0x80060800, // 002C RET 1 K4 + 0x70020006, // 002D JMP #0035 + 0x88100105, // 002E GETMBR R4 R0 K5 + 0x4C140000, // 002F LDNIL R5 + 0x20100805, // 0030 NE R4 R4 R5 + 0x78120001, // 0031 JMPF R4 #0034 + 0x80060C00, // 0032 RET 1 K6 + 0x70020000, // 0033 JMP #0035 + 0x80060E00, // 0034 RET 1 K7 + 0x80000000, // 0035 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_contextspecific +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_set_contextspecific, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(set_fulltag), + /* K1 */ be_nested_str_weak(tag_sub), + }), + be_str_weak(set_contextspecific), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x60080009, // 0002 GETGBL R2 G9 + 0x5C0C0200, // 0003 MOVE R3 R1 + 0x7C080200, // 0004 CALL R2 1 + 0x90020202, // 0005 SETMBR R0 K1 R2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_parent +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_set_parent, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(parent), + }), + be_str_weak(set_parent), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: create_TLV +********************************************************************/ +extern const bclass be_class_Matter_TLV_item; +be_local_closure(class_Matter_TLV_item_create_TLV, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_TLV_item, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_TLV_item), + /* K1 */ be_nested_str_weak(typ), + /* K2 */ be_nested_str_weak(val), + }), + be_str_weak(create_TLV), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x200C0203, // 0002 NE R3 R1 R3 + 0x740E0002, // 0003 JMPT R3 #0007 + 0x540E0013, // 0004 LDINT R3 20 + 0x1C0C0003, // 0005 EQ R3 R0 R3 + 0x780E0004, // 0006 JMPF R3 #000C + 0x5C0C0400, // 0007 MOVE R3 R2 + 0x7C0C0000, // 0008 CALL R3 0 + 0x900E0200, // 0009 SETMBR R3 K1 R0 + 0x900E0401, // 000A SETMBR R3 K2 R1 + 0x80040600, // 000B RET 1 R3 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: set_anonymoustag ********************************************************************/ @@ -1482,601 +2082,46 @@ be_local_closure(class_Matter_TLV_item_set_anonymoustag, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: _cmp_gt -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item__cmp_gt, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tag_vendor), - /* K1 */ be_const_int(1), - /* K2 */ be_nested_str_weak(tag_profile), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(tag_number), - /* K5 */ be_nested_str_weak(tag_sub), - }), - be_str_weak(_cmp_gt), - &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x20080403, // 0002 NE R2 R2 R3 - 0x780A0012, // 0003 JMPF R2 #0017 - 0x88080300, // 0004 GETMBR R2 R1 K0 - 0x4C0C0000, // 0005 LDNIL R3 - 0x1C080403, // 0006 EQ R2 R2 R3 - 0x780A0000, // 0007 JMPF R2 #0009 - 0x80060200, // 0008 RET 1 K1 - 0x88080100, // 0009 GETMBR R2 R0 K0 - 0x880C0300, // 000A GETMBR R3 R1 K0 - 0x24080403, // 000B GT R2 R2 R3 - 0x780A0000, // 000C JMPF R2 #000E - 0x80060200, // 000D RET 1 K1 - 0x88080100, // 000E GETMBR R2 R0 K0 - 0x880C0300, // 000F GETMBR R3 R1 K0 - 0x1C080403, // 0010 EQ R2 R2 R3 - 0x780A0004, // 0011 JMPF R2 #0017 - 0x88080102, // 0012 GETMBR R2 R0 K2 - 0x880C0302, // 0013 GETMBR R3 R1 K2 - 0x24080403, // 0014 GT R2 R2 R3 - 0x780A0000, // 0015 JMPF R2 #0017 - 0x80060200, // 0016 RET 1 K1 - 0x88080102, // 0017 GETMBR R2 R0 K2 - 0x540DFFFE, // 0018 LDINT R3 -1 - 0x1C080403, // 0019 EQ R2 R2 R3 - 0x780A0005, // 001A JMPF R2 #0021 - 0x88080302, // 001B GETMBR R2 R1 K2 - 0x4C0C0000, // 001C LDNIL R3 - 0x1C080403, // 001D EQ R2 R2 R3 - 0x780A0000, // 001E JMPF R2 #0020 - 0x80060200, // 001F RET 1 K1 - 0x70020008, // 0020 JMP #002A - 0x88080102, // 0021 GETMBR R2 R0 K2 - 0x4C0C0000, // 0022 LDNIL R3 - 0x1C080403, // 0023 EQ R2 R2 R3 - 0x780A0004, // 0024 JMPF R2 #002A - 0x88080302, // 0025 GETMBR R2 R1 K2 - 0x540DFFFE, // 0026 LDINT R3 -1 - 0x1C080403, // 0027 EQ R2 R2 R3 - 0x780A0000, // 0028 JMPF R2 #002A - 0x80060600, // 0029 RET 1 K3 - 0x88080104, // 002A GETMBR R2 R0 K4 - 0x4C0C0000, // 002B LDNIL R3 - 0x20080403, // 002C NE R2 R2 R3 - 0x780A000A, // 002D JMPF R2 #0039 - 0x88080304, // 002E GETMBR R2 R1 K4 - 0x4C0C0000, // 002F LDNIL R3 - 0x1C080403, // 0030 EQ R2 R2 R3 - 0x780A0000, // 0031 JMPF R2 #0033 - 0x80060200, // 0032 RET 1 K1 - 0x88080104, // 0033 GETMBR R2 R0 K4 - 0x880C0304, // 0034 GETMBR R3 R1 K4 - 0x24080403, // 0035 GT R2 R2 R3 - 0x780A0000, // 0036 JMPF R2 #0038 - 0x80060200, // 0037 RET 1 K1 - 0x80060600, // 0038 RET 1 K3 - 0x88080105, // 0039 GETMBR R2 R0 K5 - 0x4C0C0000, // 003A LDNIL R3 - 0x20080403, // 003B NE R2 R2 R3 - 0x780A0009, // 003C JMPF R2 #0047 - 0x88080305, // 003D GETMBR R2 R1 K5 - 0x4C0C0000, // 003E LDNIL R3 - 0x1C080403, // 003F EQ R2 R2 R3 - 0x780A0000, // 0040 JMPF R2 #0042 - 0x80060200, // 0041 RET 1 K1 - 0x88080105, // 0042 GETMBR R2 R0 K5 - 0x880C0305, // 0043 GETMBR R3 R1 K5 - 0x24080403, // 0044 GT R2 R2 R3 - 0x780A0000, // 0045 JMPF R2 #0047 - 0x80060200, // 0046 RET 1 K1 - 0x80060600, // 0047 RET 1 K3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _encode_tag -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item__encode_tag, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(tag_number), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(tag_vendor), - /* K3 */ be_nested_str_weak(add), - /* K4 */ be_nested_str_weak(typ), - /* K5 */ be_const_int(1), - /* K6 */ be_const_int(2), - /* K7 */ be_nested_str_weak(tag_profile), - /* K8 */ be_nested_str_weak(tag_sub), - }), - be_str_weak(_encode_tag), - &be_const_str_solidified, - ( &(const binstruction[133]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x20080403, // 0002 NE R2 R2 R3 - 0x780A0001, // 0003 JMPF R2 #0006 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x70020000, // 0005 JMP #0007 - 0x58080001, // 0006 LDCONST R2 K1 - 0x540EFFFF, // 0007 LDINT R3 65536 - 0x280C0403, // 0008 GE R3 R2 R3 - 0x740E0002, // 0009 JMPT R3 #000D - 0x140C0501, // 000A LT R3 R2 K1 - 0x740E0000, // 000B JMPT R3 #000D - 0x500C0001, // 000C LDBOOL R3 0 1 - 0x500C0200, // 000D LDBOOL R3 1 0 - 0x58100001, // 000E LDCONST R4 K1 - 0x88140102, // 000F GETMBR R5 R0 K2 - 0x4C180000, // 0010 LDNIL R6 - 0x20140A06, // 0011 NE R5 R5 R6 - 0x78160026, // 0012 JMPF R5 #003A - 0x780E0012, // 0013 JMPF R3 #0027 - 0x8C140303, // 0014 GETMET R5 R1 K3 - 0x541E00DF, // 0015 LDINT R7 224 - 0x88200104, // 0016 GETMBR R8 R0 K4 - 0x001C0E08, // 0017 ADD R7 R7 R8 - 0x58200005, // 0018 LDCONST R8 K5 - 0x7C140600, // 0019 CALL R5 3 - 0x8C140303, // 001A GETMET R5 R1 K3 - 0x881C0102, // 001B GETMBR R7 R0 K2 - 0x58200006, // 001C LDCONST R8 K6 - 0x7C140600, // 001D CALL R5 3 - 0x8C140303, // 001E GETMET R5 R1 K3 - 0x881C0107, // 001F GETMBR R7 R0 K7 - 0x58200006, // 0020 LDCONST R8 K6 - 0x7C140600, // 0021 CALL R5 3 - 0x8C140303, // 0022 GETMET R5 R1 K3 - 0x881C0100, // 0023 GETMBR R7 R0 K0 - 0x54220003, // 0024 LDINT R8 4 - 0x7C140600, // 0025 CALL R5 3 - 0x70020011, // 0026 JMP #0039 - 0x8C140303, // 0027 GETMET R5 R1 K3 - 0x541E00BF, // 0028 LDINT R7 192 - 0x88200104, // 0029 GETMBR R8 R0 K4 - 0x001C0E08, // 002A ADD R7 R7 R8 - 0x58200005, // 002B LDCONST R8 K5 - 0x7C140600, // 002C CALL R5 3 - 0x8C140303, // 002D GETMET R5 R1 K3 - 0x881C0102, // 002E GETMBR R7 R0 K2 - 0x58200006, // 002F LDCONST R8 K6 - 0x7C140600, // 0030 CALL R5 3 - 0x8C140303, // 0031 GETMET R5 R1 K3 - 0x881C0107, // 0032 GETMBR R7 R0 K7 - 0x58200006, // 0033 LDCONST R8 K6 - 0x7C140600, // 0034 CALL R5 3 - 0x8C140303, // 0035 GETMET R5 R1 K3 - 0x881C0100, // 0036 GETMBR R7 R0 K0 - 0x58200006, // 0037 LDCONST R8 K6 - 0x7C140600, // 0038 CALL R5 3 - 0x70020049, // 0039 JMP #0084 - 0x88140107, // 003A GETMBR R5 R0 K7 - 0x5419FFFE, // 003B LDINT R6 -1 - 0x1C140A06, // 003C EQ R5 R5 R6 - 0x78160016, // 003D JMPF R5 #0055 - 0x780E000A, // 003E JMPF R3 #004A - 0x8C140303, // 003F GETMET R5 R1 K3 - 0x541E005F, // 0040 LDINT R7 96 - 0x88200104, // 0041 GETMBR R8 R0 K4 - 0x001C0E08, // 0042 ADD R7 R7 R8 - 0x58200005, // 0043 LDCONST R8 K5 - 0x7C140600, // 0044 CALL R5 3 - 0x8C140303, // 0045 GETMET R5 R1 K3 - 0x881C0100, // 0046 GETMBR R7 R0 K0 - 0x54220003, // 0047 LDINT R8 4 - 0x7C140600, // 0048 CALL R5 3 - 0x70020009, // 0049 JMP #0054 - 0x8C140303, // 004A GETMET R5 R1 K3 - 0x541E003F, // 004B LDINT R7 64 - 0x88200104, // 004C GETMBR R8 R0 K4 - 0x001C0E08, // 004D ADD R7 R7 R8 - 0x58200005, // 004E LDCONST R8 K5 - 0x7C140600, // 004F CALL R5 3 - 0x8C140303, // 0050 GETMET R5 R1 K3 - 0x881C0100, // 0051 GETMBR R7 R0 K0 - 0x58200006, // 0052 LDCONST R8 K6 - 0x7C140600, // 0053 CALL R5 3 - 0x7002002E, // 0054 JMP #0084 - 0x88140107, // 0055 GETMBR R5 R0 K7 - 0x4C180000, // 0056 LDNIL R6 - 0x20140A06, // 0057 NE R5 R5 R6 - 0x78160016, // 0058 JMPF R5 #0070 - 0x780E000A, // 0059 JMPF R3 #0065 - 0x8C140303, // 005A GETMET R5 R1 K3 - 0x541E009F, // 005B LDINT R7 160 - 0x88200104, // 005C GETMBR R8 R0 K4 - 0x001C0E08, // 005D ADD R7 R7 R8 - 0x58200005, // 005E LDCONST R8 K5 - 0x7C140600, // 005F CALL R5 3 - 0x8C140303, // 0060 GETMET R5 R1 K3 - 0x881C0100, // 0061 GETMBR R7 R0 K0 - 0x54220003, // 0062 LDINT R8 4 - 0x7C140600, // 0063 CALL R5 3 - 0x70020009, // 0064 JMP #006F - 0x8C140303, // 0065 GETMET R5 R1 K3 - 0x541E007F, // 0066 LDINT R7 128 - 0x88200104, // 0067 GETMBR R8 R0 K4 - 0x001C0E08, // 0068 ADD R7 R7 R8 - 0x58200005, // 0069 LDCONST R8 K5 - 0x7C140600, // 006A CALL R5 3 - 0x8C140303, // 006B GETMET R5 R1 K3 - 0x881C0100, // 006C GETMBR R7 R0 K0 - 0x58200006, // 006D LDCONST R8 K6 - 0x7C140600, // 006E CALL R5 3 - 0x70020013, // 006F JMP #0084 - 0x88140108, // 0070 GETMBR R5 R0 K8 - 0x4C180000, // 0071 LDNIL R6 - 0x20140A06, // 0072 NE R5 R5 R6 - 0x7816000A, // 0073 JMPF R5 #007F - 0x8C140303, // 0074 GETMET R5 R1 K3 - 0x541E001F, // 0075 LDINT R7 32 - 0x88200104, // 0076 GETMBR R8 R0 K4 - 0x001C0E08, // 0077 ADD R7 R7 R8 - 0x58200005, // 0078 LDCONST R8 K5 - 0x7C140600, // 0079 CALL R5 3 - 0x8C140303, // 007A GETMET R5 R1 K3 - 0x881C0108, // 007B GETMBR R7 R0 K8 - 0x58200005, // 007C LDCONST R8 K5 - 0x7C140600, // 007D CALL R5 3 - 0x70020004, // 007E JMP #0084 - 0x8C140303, // 007F GETMET R5 R1 K3 - 0x881C0104, // 0080 GETMBR R7 R0 K4 - 0x001E0207, // 0081 ADD R7 K1 R7 - 0x58200005, // 0082 LDCONST R8 K5 - 0x7C140600, // 0083 CALL R5 3 - 0x80000000, // 0084 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: tostring -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_tostring, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[34]) { /* constants */ - /* K0 */ be_nested_str_weak(), - /* K1 */ be_nested_str_weak(tag_profile), - /* K2 */ be_nested_str_weak(Matter_X3A_X3A), - /* K3 */ be_nested_str_weak(tag_number), - /* K4 */ be_nested_str_weak(0x_X2508X_X20), - /* K5 */ be_nested_str_weak(tag_vendor), - /* K6 */ be_nested_str_weak(0x_X2504X_X3A_X3A), - /* K7 */ be_nested_str_weak(0x_X2504X_X3A), - /* K8 */ be_nested_str_weak(tag_sub), - /* K9 */ be_nested_str_weak(_X25i_X20), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(_X3D_X20), - /* K12 */ be_nested_str_weak(val), - /* K13 */ be_nested_str_weak(int), - /* K14 */ be_nested_str_weak(_X25i), - /* K15 */ be_nested_str_weak(typ), - /* K16 */ be_nested_str_weak(TLV), - /* K17 */ be_nested_str_weak(U1), - /* K18 */ be_nested_str_weak(U8), - /* K19 */ be_nested_str_weak(U), - /* K20 */ be_nested_str_weak(bool), - /* K21 */ be_nested_str_weak(true), - /* K22 */ be_nested_str_weak(false), - /* K23 */ be_nested_str_weak(null), - /* K24 */ be_nested_str_weak(real), - /* K25 */ be_nested_str_weak(_X25g), - /* K26 */ be_nested_str_weak(string), - /* K27 */ be_nested_str_weak(_X22_X25s_X22), - /* K28 */ be_nested_str_weak(int64), - /* K29 */ be_nested_str_weak(tostring), - /* K30 */ be_nested_str_weak(instance), - /* K31 */ be_nested_str_weak(_X25s), - /* K32 */ be_nested_str_weak(tohex), - /* K33 */ be_nested_str_weak(_X20), - }), - be_str_weak(tostring), - &be_const_str_solidified, - ( &(const binstruction[167]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0xA802009C, // 0001 EXBLK 0 #009F - 0x500C0200, // 0002 LDBOOL R3 1 0 - 0x200C0203, // 0003 NE R3 R1 R3 - 0x780E0038, // 0004 JMPF R3 #003E - 0x880C0101, // 0005 GETMBR R3 R0 K1 - 0x5411FFFE, // 0006 LDINT R4 -1 - 0x1C0C0604, // 0007 EQ R3 R3 R4 - 0x780E000A, // 0008 JMPF R3 #0014 - 0x00080502, // 0009 ADD R2 R2 K2 - 0x880C0103, // 000A GETMBR R3 R0 K3 - 0x4C100000, // 000B LDNIL R4 - 0x200C0604, // 000C NE R3 R3 R4 - 0x780E0004, // 000D JMPF R3 #0013 - 0x600C0018, // 000E GETGBL R3 G24 - 0x58100004, // 000F LDCONST R4 K4 - 0x88140103, // 0010 GETMBR R5 R0 K3 - 0x7C0C0400, // 0011 CALL R3 2 - 0x00080403, // 0012 ADD R2 R2 R3 - 0x70020023, // 0013 JMP #0038 - 0x880C0105, // 0014 GETMBR R3 R0 K5 - 0x4C100000, // 0015 LDNIL R4 - 0x200C0604, // 0016 NE R3 R3 R4 - 0x780E0004, // 0017 JMPF R3 #001D - 0x600C0018, // 0018 GETGBL R3 G24 - 0x58100006, // 0019 LDCONST R4 K6 - 0x88140105, // 001A GETMBR R5 R0 K5 - 0x7C0C0400, // 001B CALL R3 2 - 0x00080403, // 001C ADD R2 R2 R3 - 0x880C0101, // 001D GETMBR R3 R0 K1 - 0x4C100000, // 001E LDNIL R4 - 0x200C0604, // 001F NE R3 R3 R4 - 0x780E0004, // 0020 JMPF R3 #0026 - 0x600C0018, // 0021 GETGBL R3 G24 - 0x58100007, // 0022 LDCONST R4 K7 - 0x88140101, // 0023 GETMBR R5 R0 K1 - 0x7C0C0400, // 0024 CALL R3 2 - 0x00080403, // 0025 ADD R2 R2 R3 - 0x880C0103, // 0026 GETMBR R3 R0 K3 - 0x4C100000, // 0027 LDNIL R4 - 0x200C0604, // 0028 NE R3 R3 R4 - 0x780E0004, // 0029 JMPF R3 #002F - 0x600C0018, // 002A GETGBL R3 G24 - 0x58100004, // 002B LDCONST R4 K4 - 0x88140103, // 002C GETMBR R5 R0 K3 - 0x7C0C0400, // 002D CALL R3 2 - 0x00080403, // 002E ADD R2 R2 R3 - 0x880C0108, // 002F GETMBR R3 R0 K8 - 0x4C100000, // 0030 LDNIL R4 - 0x200C0604, // 0031 NE R3 R3 R4 - 0x780E0004, // 0032 JMPF R3 #0038 - 0x600C0018, // 0033 GETGBL R3 G24 - 0x58100009, // 0034 LDCONST R4 K9 - 0x88140108, // 0035 GETMBR R5 R0 K8 - 0x7C0C0400, // 0036 CALL R3 2 - 0x00080403, // 0037 ADD R2 R2 R3 - 0x600C000C, // 0038 GETGBL R3 G12 - 0x5C100400, // 0039 MOVE R4 R2 - 0x7C0C0200, // 003A CALL R3 1 - 0x240C070A, // 003B GT R3 R3 K10 - 0x780E0000, // 003C JMPF R3 #003E - 0x0008050B, // 003D ADD R2 R2 K11 - 0x600C0004, // 003E GETGBL R3 G4 - 0x8810010C, // 003F GETMBR R4 R0 K12 - 0x7C0C0200, // 0040 CALL R3 1 - 0x1C0C070D, // 0041 EQ R3 R3 K13 - 0x780E0010, // 0042 JMPF R3 #0054 - 0x600C0018, // 0043 GETGBL R3 G24 - 0x5810000E, // 0044 LDCONST R4 K14 - 0x8814010C, // 0045 GETMBR R5 R0 K12 - 0x7C0C0400, // 0046 CALL R3 2 - 0x00080403, // 0047 ADD R2 R2 R3 - 0x880C010F, // 0048 GETMBR R3 R0 K15 - 0x88100110, // 0049 GETMBR R4 R0 K16 - 0x88100911, // 004A GETMBR R4 R4 K17 - 0x280C0604, // 004B GE R3 R3 R4 - 0x780E0005, // 004C JMPF R3 #0053 - 0x880C010F, // 004D GETMBR R3 R0 K15 - 0x88100110, // 004E GETMBR R4 R0 K16 - 0x88100912, // 004F GETMBR R4 R4 K18 - 0x180C0604, // 0050 LE R3 R3 R4 - 0x780E0000, // 0051 JMPF R3 #0053 - 0x00080513, // 0052 ADD R2 R2 K19 - 0x70020048, // 0053 JMP #009D - 0x600C0004, // 0054 GETGBL R3 G4 - 0x8810010C, // 0055 GETMBR R4 R0 K12 - 0x7C0C0200, // 0056 CALL R3 1 - 0x1C0C0714, // 0057 EQ R3 R3 K20 - 0x780E0006, // 0058 JMPF R3 #0060 - 0x880C010C, // 0059 GETMBR R3 R0 K12 - 0x780E0001, // 005A JMPF R3 #005D - 0x580C0015, // 005B LDCONST R3 K21 - 0x70020000, // 005C JMP #005E - 0x580C0016, // 005D LDCONST R3 K22 - 0x00080403, // 005E ADD R2 R2 R3 - 0x7002003C, // 005F JMP #009D - 0x880C010C, // 0060 GETMBR R3 R0 K12 - 0x4C100000, // 0061 LDNIL R4 - 0x1C0C0604, // 0062 EQ R3 R3 R4 - 0x780E0001, // 0063 JMPF R3 #0066 - 0x00080517, // 0064 ADD R2 R2 K23 - 0x70020036, // 0065 JMP #009D - 0x600C0004, // 0066 GETGBL R3 G4 - 0x8810010C, // 0067 GETMBR R4 R0 K12 - 0x7C0C0200, // 0068 CALL R3 1 - 0x1C0C0718, // 0069 EQ R3 R3 K24 - 0x780E0005, // 006A JMPF R3 #0071 - 0x600C0018, // 006B GETGBL R3 G24 - 0x58100019, // 006C LDCONST R4 K25 - 0x8814010C, // 006D GETMBR R5 R0 K12 - 0x7C0C0400, // 006E CALL R3 2 - 0x00080403, // 006F ADD R2 R2 R3 - 0x7002002B, // 0070 JMP #009D - 0x600C0004, // 0071 GETGBL R3 G4 - 0x8810010C, // 0072 GETMBR R4 R0 K12 - 0x7C0C0200, // 0073 CALL R3 1 - 0x1C0C071A, // 0074 EQ R3 R3 K26 - 0x780E0005, // 0075 JMPF R3 #007C - 0x600C0018, // 0076 GETGBL R3 G24 - 0x5810001B, // 0077 LDCONST R4 K27 - 0x8814010C, // 0078 GETMBR R5 R0 K12 - 0x7C0C0400, // 0079 CALL R3 2 - 0x00080403, // 007A ADD R2 R2 R3 - 0x70020020, // 007B JMP #009D - 0x600C000F, // 007C GETGBL R3 G15 - 0x8810010C, // 007D GETMBR R4 R0 K12 - 0xB8163800, // 007E GETNGBL R5 K28 - 0x7C0C0400, // 007F CALL R3 2 - 0x780E000F, // 0080 JMPF R3 #0091 - 0x880C010C, // 0081 GETMBR R3 R0 K12 - 0x8C0C071D, // 0082 GETMET R3 R3 K29 - 0x7C0C0200, // 0083 CALL R3 1 - 0x00080403, // 0084 ADD R2 R2 R3 - 0x880C010F, // 0085 GETMBR R3 R0 K15 - 0x88100110, // 0086 GETMBR R4 R0 K16 - 0x88100911, // 0087 GETMBR R4 R4 K17 - 0x280C0604, // 0088 GE R3 R3 R4 - 0x780E0005, // 0089 JMPF R3 #0090 - 0x880C010F, // 008A GETMBR R3 R0 K15 - 0x88100110, // 008B GETMBR R4 R0 K16 - 0x88100912, // 008C GETMBR R4 R4 K18 - 0x180C0604, // 008D LE R3 R3 R4 - 0x780E0000, // 008E JMPF R3 #0090 - 0x00080513, // 008F ADD R2 R2 K19 - 0x7002000B, // 0090 JMP #009D - 0x600C0004, // 0091 GETGBL R3 G4 - 0x8810010C, // 0092 GETMBR R4 R0 K12 - 0x7C0C0200, // 0093 CALL R3 1 - 0x1C0C071E, // 0094 EQ R3 R3 K30 - 0x780E0006, // 0095 JMPF R3 #009D - 0x600C0018, // 0096 GETGBL R3 G24 - 0x5810001F, // 0097 LDCONST R4 K31 - 0x8814010C, // 0098 GETMBR R5 R0 K12 - 0x8C140B20, // 0099 GETMET R5 R5 K32 - 0x7C140200, // 009A CALL R5 1 - 0x7C0C0400, // 009B CALL R3 2 - 0x00080403, // 009C ADD R2 R2 R3 - 0xA8040001, // 009D EXBLK 1 1 - 0x70020006, // 009E JMP #00A6 - 0xAC0C0002, // 009F CATCH R3 0 2 - 0x70020003, // 00A0 JMP #00A5 - 0x00140721, // 00A1 ADD R5 R3 K33 - 0x00140A04, // 00A2 ADD R5 R5 R4 - 0x80040A00, // 00A3 RET 1 R5 - 0x70020000, // 00A4 JMP #00A6 - 0xB0080000, // 00A5 RAISE 2 R0 R0 - 0x80040400, // 00A6 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_commonprofile -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_set_commonprofile, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(set_fulltag), - }), - be_str_weak(set_commonprofile), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x5411FFFE, // 0002 LDINT R4 -1 - 0x4C140000, // 0003 LDNIL R5 - 0x7C040800, // 0004 CALL R1 4 - 0x80000000, // 0005 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_TLV_item; -be_local_closure(class_Matter_TLV_item_init, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_TLV_item, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(parent), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_TLV_item ********************************************************************/ be_local_class(Matter_TLV_item, 8, NULL, - be_nested_map(31, + be_nested_map(32, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(is_array, 17), be_const_bool(0) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_TLV_item_init_closure) }, - { be_const_key_weak(set_parent, -1), be_const_closure(class_Matter_TLV_item_set_parent_closure) }, - { be_const_key_weak(set_fulltag, -1), be_const_closure(class_Matter_TLV_item_set_fulltag_closure) }, - { be_const_key_weak(typ, -1), be_const_var(6) }, - { be_const_key_weak(parse, 30), be_const_closure(class_Matter_TLV_item_parse_closure) }, - { be_const_key_weak(parent, 22), be_const_var(0) }, - { be_const_key_weak(to_str_val, -1), be_const_closure(class_Matter_TLV_item_to_str_val_closure) }, - { be_const_key_weak(encode_len, 4), be_const_closure(class_Matter_TLV_item_encode_len_closure) }, - { be_const_key_weak(TLV, 20), be_const_class(be_class_Matter_TLV) }, - { be_const_key_weak(reset, 0), be_const_closure(class_Matter_TLV_item_reset_closure) }, - { be_const_key_weak(tag_profile, -1), be_const_var(3) }, - { be_const_key_weak(create_TLV, -1), be_const_static_closure(class_Matter_TLV_item_create_TLV_closure) }, - { be_const_key_weak(tag_sub, -1), be_const_var(5) }, - { be_const_key_weak(tag_vendor, -1), be_const_var(2) }, - { be_const_key_weak(tostring, -1), be_const_closure(class_Matter_TLV_item_tostring_closure) }, - { be_const_key_weak(val, 5), be_const_var(7) }, - { be_const_key_weak(_encode_tag, -1), be_const_closure(class_Matter_TLV_item__encode_tag_closure) }, - { be_const_key_weak(_cmp_gt, -1), be_const_closure(class_Matter_TLV_item__cmp_gt_closure) }, - { be_const_key_weak(_encode_tag_len, 25), be_const_closure(class_Matter_TLV_item__encode_tag_len_closure) }, - { be_const_key_weak(is_struct, -1), be_const_bool(0) }, - { be_const_key_weak(tlv2raw, -1), be_const_closure(class_Matter_TLV_item_tlv2raw_closure) }, - { be_const_key_weak(sort, -1), be_const_static_closure(class_Matter_TLV_item_sort_closure) }, - { be_const_key_weak(is_list, -1), be_const_bool(0) }, - { be_const_key_weak(to_TLV, 18), be_const_closure(class_Matter_TLV_item_to_TLV_closure) }, + { be_const_key_weak(reset, -1), be_const_closure(class_Matter_TLV_item_reset_closure) }, + { be_const_key_weak(set_or_nil, -1), be_const_closure(class_Matter_TLV_item_set_or_nil_closure) }, + { be_const_key_weak(set_anonymoustag, 30), be_const_closure(class_Matter_TLV_item_set_anonymoustag_closure) }, { be_const_key_weak(set, -1), be_const_closure(class_Matter_TLV_item_set_closure) }, - { be_const_key_weak(set_anonymoustag, 15), be_const_closure(class_Matter_TLV_item_set_anonymoustag_closure) }, + { be_const_key_weak(create_TLV, -1), be_const_static_closure(class_Matter_TLV_item_create_TLV_closure) }, + { be_const_key_weak(tostring, 22), be_const_closure(class_Matter_TLV_item_tostring_closure) }, + { be_const_key_weak(tag_sub, -1), be_const_var(5) }, + { be_const_key_weak(is_array, -1), be_const_bool(0) }, + { be_const_key_weak(to_str_val, 4), be_const_closure(class_Matter_TLV_item_to_str_val_closure) }, + { be_const_key_weak(parent, -1), be_const_var(0) }, + { be_const_key_weak(is_list, -1), be_const_bool(0) }, + { be_const_key_weak(is_struct, -1), be_const_bool(0) }, + { be_const_key_weak(parse, -1), be_const_closure(class_Matter_TLV_item_parse_closure) }, + { be_const_key_weak(set_parent, -1), be_const_closure(class_Matter_TLV_item_set_parent_closure) }, { be_const_key_weak(set_commonprofile, -1), be_const_closure(class_Matter_TLV_item_set_commonprofile_closure) }, + { be_const_key_weak(_encode_tag, -1), be_const_closure(class_Matter_TLV_item__encode_tag_closure) }, + { be_const_key_weak(TLV, -1), be_const_class(be_class_Matter_TLV) }, + { be_const_key_weak(sort, 25), be_const_static_closure(class_Matter_TLV_item_sort_closure) }, + { be_const_key_weak(tag_vendor, -1), be_const_var(2) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_TLV_item_init_closure) }, + { be_const_key_weak(_cmp_gt, -1), be_const_closure(class_Matter_TLV_item__cmp_gt_closure) }, { be_const_key_weak(tag_number, -1), be_const_var(4) }, - { be_const_key_weak(next_idx, 1), be_const_var(1) }, + { be_const_key_weak(tlv2raw, -1), be_const_closure(class_Matter_TLV_item_tlv2raw_closure) }, + { be_const_key_weak(_encode_tag_len, -1), be_const_closure(class_Matter_TLV_item__encode_tag_len_closure) }, + { be_const_key_weak(next_idx, -1), be_const_var(1) }, + { be_const_key_weak(tag_profile, 16), be_const_var(3) }, + { be_const_key_weak(typ, -1), be_const_var(6) }, { be_const_key_weak(set_contextspecific, -1), be_const_closure(class_Matter_TLV_item_set_contextspecific_closure) }, + { be_const_key_weak(val, 13), be_const_var(7) }, + { be_const_key_weak(to_TLV, 9), be_const_closure(class_Matter_TLV_item_to_TLV_closure) }, + { be_const_key_weak(set_fulltag, -1), be_const_closure(class_Matter_TLV_item_set_fulltag_closure) }, + { be_const_key_weak(encode_len, 2), be_const_closure(class_Matter_TLV_item_encode_len_closure) }, })), be_str_weak(Matter_TLV_item) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h index 8bae5ab68..4ed01b4c6 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -3419,7 +3419,7 @@ be_local_class(Matter_UI, { be_const_key_weak(show_commissioning_info, -1), be_const_closure(class_Matter_UI_show_commissioning_info_closure) }, { be_const_key_weak(page_part_ctl, 18), be_const_closure(class_Matter_UI_page_part_ctl_closure) }, { be_const_key_weak(show_fabric_info, -1), be_const_closure(class_Matter_UI_show_fabric_info_closure) }, - { be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Cwaterleak_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_waterleak) }, + { be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Cwaterleak_X7Cairquality_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_waterleak_X7Cv_airquality) }, { be_const_key_weak(web_get_arg, -1), be_const_closure(class_Matter_UI_web_get_arg_closure) }, { be_const_key_weak(plugin_option, 5), be_const_closure(class_Matter_UI_plugin_option_closure) }, { be_const_key_weak(web_add_config_button, -1), be_const_closure(class_Matter_UI_web_add_config_button_closure) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h index 3a49183ff..b1ad4546f 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h @@ -6284,52 +6284,55 @@ be_local_class(Matter_Device, { be_const_key_weak(stop, 14), be_const_closure(class_Matter_Device_stop_closure) }, { be_const_key_weak(stop_basic_commissioning, 13), be_const_closure(class_Matter_Device_stop_basic_commissioning_closure) }, { be_const_key_weak(plugins_classes, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(44, + be_const_map( * be_nested_map(47, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(humidity, 37), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) }, - { be_const_key_weak(flow, -1), be_const_class(be_class_Matter_Plugin_Sensor_Flow) }, - { be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) }, - { be_const_key_weak(waterleak, -1), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) }, - { be_const_key_weak(http_flow, 25), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) }, - { be_const_key_weak(v_pressure, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) }, - { be_const_key_weak(v_waterleak, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) }, - { be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) }, - { be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) }, - { be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) }, - { be_const_key_weak(illuminance, 22), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) }, - { be_const_key_weak(v_light3, 33), be_const_class(be_class_Matter_Plugin_Virt_Light3) }, - { be_const_key_weak(contact, -1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) }, - { be_const_key_weak(v_light1, 14), be_const_class(be_class_Matter_Plugin_Virt_Light1) }, - { be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) }, - { be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) }, - { be_const_key_weak(http_illuminance, 12), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) }, - { be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) }, - { be_const_key_weak(http_contact, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) }, - { be_const_key_weak(light2, -1), be_const_class(be_class_Matter_Plugin_Light2) }, - { be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) }, + { be_const_key_weak(v_waterleak, 43), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) }, { be_const_key_weak(light0, -1), be_const_class(be_class_Matter_Plugin_Light0) }, - { be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) }, + { be_const_key_weak(waterleak, -1), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) }, + { be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) }, + { be_const_key_weak(humidity, 17), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) }, + { be_const_key_weak(http_contact, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) }, { be_const_key_weak(http_humidity, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) }, - { be_const_key_weak(shutter, 28), be_const_class(be_class_Matter_Plugin_Shutter) }, - { be_const_key_weak(http_light0, 24), be_const_class(be_class_Matter_Plugin_Bridge_Light0) }, - { be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) }, - { be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) }, - { be_const_key_weak(v_contact, 41), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) }, - { be_const_key_weak(root, 7), be_const_class(be_class_Matter_Plugin_Root) }, - { be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) }, - { be_const_key_weak(v_illuminance, 8), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) }, - { be_const_key_weak(v_light2, 26), be_const_class(be_class_Matter_Plugin_Virt_Light2) }, - { be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) }, - { be_const_key_weak(v_light0, 4), be_const_class(be_class_Matter_Plugin_Virt_Light0) }, - { be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) }, - { be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) }, - { be_const_key_weak(shutter_X2Btilt, 43), be_const_class(be_class_Matter_Plugin_ShutterTilt) }, - { be_const_key_weak(http_waterleak, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) }, - { be_const_key_weak(http_relay, 16), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) }, - { be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) }, - { be_const_key_weak(relay, -1), be_const_class(be_class_Matter_Plugin_OnOff) }, - { be_const_key_weak(light1, -1), be_const_class(be_class_Matter_Plugin_Light1) }, { be_const_key_weak(http_temperature, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) }, + { be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) }, + { be_const_key_weak(airquality, -1), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) }, + { be_const_key_weak(http_flow, 36), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) }, + { be_const_key_weak(v_illuminance, 24), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) }, + { be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) }, + { be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) }, + { be_const_key_weak(http_light1, 26), be_const_class(be_class_Matter_Plugin_Bridge_Light1) }, + { be_const_key_weak(http_light0, 6), be_const_class(be_class_Matter_Plugin_Bridge_Light0) }, + { be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) }, + { be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) }, + { be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) }, + { be_const_key_weak(contact, 10), be_const_class(be_class_Matter_Plugin_Sensor_Contact) }, + { be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) }, + { be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) }, + { be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) }, + { be_const_key_weak(v_light1, -1), be_const_class(be_class_Matter_Plugin_Virt_Light1) }, + { be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) }, + { be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) }, + { be_const_key_weak(http_illuminance, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) }, + { be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) }, + { be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) }, + { be_const_key_weak(v_contact, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) }, + { be_const_key_weak(flow, 34), be_const_class(be_class_Matter_Plugin_Sensor_Flow) }, + { be_const_key_weak(shutter, 5), be_const_class(be_class_Matter_Plugin_Shutter) }, + { be_const_key_weak(v_pressure, 2), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) }, + { be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) }, + { be_const_key_weak(v_light2, 39), be_const_class(be_class_Matter_Plugin_Virt_Light2) }, + { be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) }, + { be_const_key_weak(v_airquality, 42), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) }, + { be_const_key_weak(light2, 3), be_const_class(be_class_Matter_Plugin_Light2) }, + { be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) }, + { be_const_key_weak(illuminance, 40), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) }, + { be_const_key_weak(relay, -1), be_const_class(be_class_Matter_Plugin_OnOff) }, + { be_const_key_weak(v_light0, -1), be_const_class(be_class_Matter_Plugin_Virt_Light0) }, + { be_const_key_weak(light1, -1), be_const_class(be_class_Matter_Plugin_Light1) }, + { be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) }, + { be_const_key_weak(http_waterleak, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) }, + { be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) }, + { be_const_key_weak(root, 29), be_const_class(be_class_Matter_Plugin_Root) }, })) ) } )) }, { be_const_key_weak(tick, 9), be_const_var(10) }, { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(17) },