From 00bd97fdc70285f14742b98c7f5393cf963cc7c6 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Wed, 13 Sep 2023 22:49:46 +0200 Subject: [PATCH] Matter virtual lights (#19511) --- .../berry_matter/src/be_matter_module.c | 3 +- .../src/embedded/Matter_0_Inspect.be | 11 + .../src/embedded/Matter_Device.be | 123 +- .../src/embedded/Matter_Plugin_0.be | 47 + .../src/embedded/Matter_Plugin_1_Device.be | 17 +- .../src/embedded/Matter_Plugin_2_Light0.be | 12 +- .../src/embedded/Matter_Plugin_2_OnOff.be | 23 + .../src/embedded/Matter_Plugin_2_Shutter.be | 9 + .../src/embedded/Matter_Plugin_3_Light1.be | 26 + .../Matter_Plugin_3_Sensor_Contact.be | 9 + .../Matter_Plugin_3_Sensor_Humidity.be | 9 + .../Matter_Plugin_3_Sensor_Illuminance.be | 9 + .../Matter_Plugin_3_Sensor_Occupancy.be | 9 + .../embedded/Matter_Plugin_3_Sensor_OnOff.be | 9 + .../Matter_Plugin_3_Sensor_Pressure.be | 9 + .../embedded/Matter_Plugin_3_Sensor_Temp.be | 9 + .../embedded/Matter_Plugin_3_ShutterTilt.be | 8 +- .../src/embedded/Matter_Plugin_4_Light2.be | 22 + ..._3_Light3.be => Matter_Plugin_4_Light3.be} | 24 + .../berry_matter/src/embedded/Matter_UI.be | 1 + .../solidify/solidified_Matter_0_Inspect.h | 31 + .../src/solidify/solidified_Matter_Device.h | 9637 +++++++++-------- .../src/solidify/solidified_Matter_Plugin_0.h | 1436 +-- .../solidified_Matter_Plugin_1_Device.h | 226 +- .../solidified_Matter_Plugin_2_Light0.h | 316 +- .../solidified_Matter_Plugin_2_OnOff.h | 442 +- .../solidified_Matter_Plugin_2_Shutter.h | 402 +- .../solidified_Matter_Plugin_3_Light1.h | 648 +- ...olidified_Matter_Plugin_3_Sensor_Contact.h | 190 +- ...lidified_Matter_Plugin_3_Sensor_Humidity.h | 182 +- ...ified_Matter_Plugin_3_Sensor_Illuminance.h | 206 +- ...idified_Matter_Plugin_3_Sensor_Occupancy.h | 216 +- .../solidified_Matter_Plugin_3_Sensor_OnOff.h | 180 +- ...lidified_Matter_Plugin_3_Sensor_Pressure.h | 180 +- .../solidified_Matter_Plugin_3_Sensor_Temp.h | 212 +- .../solidified_Matter_Plugin_3_ShutterTilt.h | 304 +- .../solidified_Matter_Plugin_4_Light2.h | 392 +- ....h => solidified_Matter_Plugin_4_Light3.h} | 557 +- .../src/solidify/solidified_Matter_UI.h | 2 +- .../berry_tasmota/src/be_tasmota_lib.c | 1 + .../src/embedded/tasmota_class.be | 13 + .../src/solidify/solidified_tasmota_class.h | 2923 ++--- tasmota/include/i18n.h | 1 + .../xdrv_52_3_berry_matter.ino | 11 +- 44 files changed, 10239 insertions(+), 8858 deletions(-) rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_3_Light3.be => Matter_Plugin_4_Light3.be} (91%) rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_3_Light3.h => solidified_Matter_Plugin_4_Light3.h} (84%) diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index 6df0f0f55981..3e0bab9afdb3 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -220,7 +220,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_9_Virt_Light1.h" #include "solidify/solidified_Matter_Plugin_4_Light2.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Light2.h" -#include "solidify/solidified_Matter_Plugin_3_Light3.h" +#include "solidify/solidified_Matter_Plugin_4_Light3.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Light3.h" #include "solidify/solidified_Matter_Plugin_2_Shutter.h" #include "solidify/solidified_Matter_Plugin_3_ShutterTilt.h" @@ -296,6 +296,7 @@ module matter (scope: global, strings: weak) { jitter, closure(matter_jitter_closure) inspect, closure(matter_inspect_closure) consolidate_clusters, closure(matter_consolidate_clusters_closure) + UC_LIST, closure(matter_UC_LIST_closure) Profiler, class(be_class_Matter_Profiler) // Status codes diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_0_Inspect.be b/lib/libesp32/berry_matter/src/embedded/Matter_0_Inspect.be index b95486d5e8ed..5d6f31de06c0 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_0_Inspect.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_0_Inspect.be @@ -102,3 +102,14 @@ def consolidate_clusters(cl, m) return ret end matter.consolidate_clusters = consolidate_clusters + +############################################################# +# consolidate_update_commands_list +# +# Build a consolidated list and remove duplicates +#@ solidify:matter.UC_LIST,weak +def UC_LIST(cl, *l) + var uc_parent = super(cl).UPDATE_COMMANDS + return uc_parent + l +end +matter.UC_LIST = UC_LIST diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be index 0f8f12730c75..5fb12c2fb304 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be @@ -1532,6 +1532,7 @@ class Matter_Device def register_commands() tasmota.add_cmd("MtrJoin", /cmd_found, idx, payload, payload_json -> self.MtrJoin(cmd_found, idx, payload, payload_json)) tasmota.add_cmd("MtrUpdate", /cmd_found, idx, payload, payload_json -> self.MtrUpdate(cmd_found, idx, payload, payload_json)) + tasmota.add_cmd("MtrInfo", /cmd_found, idx, payload, payload_json -> self.MtrInfo(cmd_found, idx, payload, payload_json)) end ##################################################################### @@ -1553,47 +1554,111 @@ class Matter_Device # `MtrUpdate` # # MtrUpdate {"ep":1, "Power":1} - # MtrUpdate {"Name":"ep1", "Power":1} - # MtrUpdate {"Name":"My_virtual_light", "Power":1} + # MtrUpdate {"name":"ep1", "power":1} + # MtrUpdate {"Name":"Light0", "Power":0} + # MtrUpdate {"Name":"Light0", "Power":1} + # MtrUpdate {"Name":"Light1", "Power":0} + # MtrUpdate {"Name":"Light1", "Power":1,"Bri":55} + # MtrUpdate {"Name":"Light2", "Power":0} + # MtrUpdate {"Name":"Light2", "Power":1, "CT":400, "Bri":20} + # MtrUpdate {"Name":"Light3", "Power":0} + # MtrUpdate {"Name":"Light3", "Power":1, "Bri":20, "Hue":85, "Sat":200} # def MtrUpdate(cmd_found, idx, payload, payload_json) - if payload_json == nil return tasmota.resp_cmnd("Invalid JSON") end + if payload_json == nil return tasmota.resp_cmnd_str("Invalid JSON") end + + var key_ep = tasmota.find_key_i(payload_json, 'Ep') + var key_name = tasmota.find_key_i(payload_json, 'Name') + if key_ep || key_name + var pl = nil # plugin instance + + if key_ep + var ep = int(payload_json[key_ep]) + if ep <= 0 return tasmota.resp_cmnd_str("Invalid 'Ep' attribute") end + pl = self.find_plugin_by_endpoint(ep) + payload_json.remove(key_ep) + end + + if key_name + if pl == nil + pl = self.find_plugin_by_friendly_name(payload_json[key_name]) + end + payload_json.remove(key_name) + end - var key_i - if (key_i := tasmota.find_key_i(payload_json, 'Device')) != nil - var pl = self.find_plugin_by_name_or_ep(payload[key_i]) - if (pl == nil) return tasmota.resp_cmnd("Invalid Device") end - if (!pl.virtual) return tasmota.resp_cmnd("Device is not virtual") end - # find endpoint (plugin) by name - # can be: - # - integer: endpoint number - # - "ep": endpoint number - # - "": friendly name for endpoint + if (pl == nil) return tasmota.resp_cmnd_str("Invalid Device") end + if (!pl.virtual) return tasmota.resp_cmnd_str("Device is not virtual") end + # filter parameter accedpted by plugin, and rename with canonical + # Ex: {"power":1,"HUE":2} becomes {"Power":1,"Hue":2} + var uc = pl.consolidate_update_commands() + # check that all commands are in the list of supported commands + var cmd_cleaned = {} + for k: payload_json.keys() + var cleaned_command_idx = tasmota.find_list_i(uc, k) + if (cleaned_command_idx == nil) + tasmota.resp_cmnd_str(f"Invalid command '{payload_json[k]}'") + return + end + cmd_cleaned[uc[cleaned_command_idx]] = payload_json[k] + end + # call plug-in + pl.update_virtual(cmd_cleaned) + var state_json = pl.state_json() + if state_json + var cmnd_status = f'{{"{cmd_found}":{state_json}}}' + return tasmota.resp_cmnd(cmnd_status) + else + return tasmota.resp_cmnd_done() + end end - tasmota.resp_cmnd_done() + tasmota.resp_cmnd_str("Missing 'Device' attribute") end ##################################################################### - # find_plugin_by_name_or_ep + # `MtrInfo` # - # `name`can be: - # - integer: endpoint number - # - "ep": endpoint number - # - "": friendly name for endpoint - def find_plugin_by_name_or_ep(name) - if type(name) == 'int' - if (name > 0) return self.find_plugin_by_endpoint(name) end - elif type(name) == 'string' - if name[0..1] == "ep" - var ep_num = int(name[2..]) - if ep_num > 0 return self.find_plugin_by_endpoint(ep_num) end - else - return self.find_plugin_by_friendly_name(name) + # MtrInfo 9 + def MtrInfo(cmd_found, idx, payload, payload_json) + if payload == "" + # dump all devices + end + + if payload == "" + # dump all + for pl: self.plugins + self.MtrInfo_one(pl.endpoint) + end + + elif type(payload_json) == 'int' + # try ep number + self.MtrInfo_one(payload_json) + + else + # try by name + var pl = self.find_plugin_by_friendly_name(payload) + if pl != nil + self.MtrInfo_one(pl.endpoint) end end - return nil # invalid type + + tasmota.resp_cmnd_done() end + + # output for a single endpoint + def MtrInfo_one(ep) + var pl = self.find_plugin_by_endpoint(ep) + if pl == nil return end # abort + + var state_json = pl.state_json() + if state_json + var mtr_info = f'{{"' 'MtrInfo"' ':{state_json}}}' + # publish + # tasmota.publish_rule(mtr_info) + tasmota.publish_result(mtr_info, "") + end + end + end matter.Device = Matter_Device 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 07c54dde5527..7a37e4e47721 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be @@ -39,11 +39,14 @@ class Matter_Plugin 0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453 0x0039: [0x11], # Bridged Device Basic Information 9.13 p.485 } + # Accepted Update commands for virtual devices + static var UPDATE_COMMANDS = [] var device # reference to the `device` global object var endpoint # current endpoint var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy var tick # tick value when it was last updated var node_label # name of the endpoint, used only in bridge mode, "" if none + var virtual # (bool) is the device pure virtual (i.e. not related to a device implementation by Tasmota) ############################################################# # MVC Model @@ -63,6 +66,7 @@ class Matter_Plugin self.clusters = self.consolidate_clusters() self.parse_configuration(config) self.node_label = config.find("name", "") + self.virtual = false end # proxy for the same method in IM @@ -149,6 +153,14 @@ class Matter_Plugin # return ret end + ############################################################# + # consolidate_update_commands + # + # Return consolidated "update commands" for this class + def consolidate_update_commands() + return self.UPDATE_COMMANDS + end + ############################################################# # Publish to MQTT a command received from controller # @@ -370,6 +382,41 @@ class Matter_Plugin return conf end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # Takes the JSON string prefix + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return "" + end + + # This is to be called by matter_device to get the full state JSON + # including "Ep":,"Name"=" 254) bri_254 = 254 end + pow = (pow != nil) ? bool(pow) : nil # nil or bool if !self.virtual import light var bri_255 = tasmota.scale_uint(bri_254, 0, 254, 0, 255) @@ -187,5 +189,29 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0 end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # Takes the JSON string prefix + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Power":{int(self.shadow_onoff)},"Bri":{self.shadow_bri}' + end + + ############################################################# + # 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") + if val_bri != nil + self.set_bri(int(val_bri), val_onoff) + return # don't call super() because we already handeld 'Power' + end + super(self).update_virtual(payload_json) + end + end matter.Plugin_Light1 = Matter_Plugin_Light1 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be index bce20c0a2661..d7d11f4496a6 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be @@ -96,5 +96,14 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Contact":{int(self.shadow_contact)}' + end + end matter.Plugin_Sensor_Contact = Matter_Plugin_Sensor_Contact diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be index 89fe814e6a21..199fee6b9243 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be @@ -80,5 +80,14 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Humidity":{self.shadow_value}' + end + end matter.Plugin_Sensor_Humidity = Matter_Plugin_Sensor_Humidity diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be index 0763d2bba3f8..bc521d34e037 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be @@ -87,5 +87,14 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Illuminance":{self.shadow_value}' + end + end matter.Plugin_Sensor_Illuminance = Matter_Plugin_Sensor_Illuminance diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be index 25951762b07d..956771717504 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be @@ -97,5 +97,14 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Occupancy":{int(self.shadow_occupancy)}' + end + end matter.Plugin_Sensor_Occupancy = Matter_Plugin_Sensor_Occupancy diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be index 17480fc42019..5a1da4749393 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be @@ -88,5 +88,14 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"OnOff":{int(self.shadow_onoff)}' + end + end matter.Plugin_Sensor_OnOff = Matter_Plugin_Sensor_OnOff diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be index 87d4b53fc7ed..74a2d2615083 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be @@ -80,5 +80,14 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Pressure":{self.shadow_value}' + end + end matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be index 23ff293a59e9..412a053b4501 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be @@ -83,5 +83,14 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor end end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json() + return f',"Temperature":{self.shadow_value}' + end + end matter.Plugin_Sensor_Temp = Matter_Plugin_Sensor_Temp diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_ShutterTilt.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_ShutterTilt.be index afa57ce4ce50..ca027e1e01d2 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_ShutterTilt.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_ShutterTilt.be @@ -165,7 +165,13 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter end ############################################################# - # parse sensor inherited + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json(payload_str) + return f',"ShutterPos":{self.shadow_shutter_pos},"ShutterTarget":{self.shadow_shutter_target},"ShutterTilt":{self.shadow_shutter_tilt}' + end end matter.Plugin_ShutterTilt = Matter_Plugin_ShutterTilt diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light2.be index 89b3c9f52df7..569296515f85 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light2.be @@ -35,6 +35,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 # 0x0008: inherited # Level Control 1.6 p.57 0x0300: [7,8,0xF,0x400B,0x400C,0xFFFC,0xFFFD], # Color Control 3.2 p.111 }) + static var UPDATE_COMMANDS = matter.UC_LIST(_class, "CT") static var TYPES = { 0x010C: 2 } # Color Temperature Light # Inherited @@ -174,5 +175,26 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json(payload_str) + return f',"Power":{int(self.shadow_onoff)},"Bri":{self.shadow_bri},"CT":{self.shadow_ct}' + end + + ############################################################# + # update_virtual + # + # Update internal state for virtual devices + def update_virtual(payload_json) + var val_ct = int(payload_json.find("CT")) # int or nil + if (val_ct != nil) + self.set_ct(val_ct) + end + super(self).update_virtual(payload_json) + end + end matter.Plugin_Light2 = Matter_Plugin_Light2 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light3.be similarity index 91% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light3.be index 1510447d49e2..cd8577483caa 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Light3.be @@ -35,6 +35,7 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 # 0x0008: inherited # Level Control 1.6 p.57 0x0300: [0,1,7,8,0xF,0x4001,0x400A,0xFFFC,0xFFFD],# Color Control 3.2 p.111 }) + static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Hue", "Sat") static var TYPES = { 0x010D: 2 } # Extended Color Light # Inherited @@ -211,5 +212,28 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 end + ############################################################# + # append_state_json + # + # Output the current state in JSON + # Takes the JSON string prefix + # New values need to be appended with `,"key":value` (including prefix comma) + def append_state_json(payload_str) + return f',"Power":{int(self.shadow_onoff)},"Bri":{self.shadow_bri},"Hue":{self.shadow_hue},"Sat":{self.shadow_sat}' + end + + ############################################################# + # 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 + if (val_hue != nil) || (val_sat != nil) + self.set_hue_sat(val_hue, val_sat) + end + super(self).update_virtual(payload_json) + end + end matter.Plugin_Light3 = Matter_Plugin_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index 4467ffe94702..cc47886263b8 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -34,6 +34,7 @@ import matter class Matter_UI static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt" "|temperature|pressure|illuminance|humidity|occupancy|onoff|contact" + "|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3" # static var _CLASSES_HTTP = "-http" static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3" "|http_temperature|http_pressure|http_illuminance|http_humidity" diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_0_Inspect.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_0_Inspect.h index 494bd1825f9e..079f5e775c98 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_0_Inspect.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_0_Inspect.h @@ -301,5 +301,36 @@ be_local_closure(matter_consolidate_clusters, /* name */ ); /*******************************************************************/ + +/******************************************************************** +** Solidified function: UC_LIST +********************************************************************/ +be_local_closure(matter_UC_LIST, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 1, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), + }), + be_str_weak(UC_LIST), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x60080003, // 0000 GETGBL R2 G3 + 0x5C0C0000, // 0001 MOVE R3 R0 + 0x7C080200, // 0002 CALL R2 1 + 0x88080500, // 0003 GETMBR R2 R2 K0 + 0x000C0401, // 0004 ADD R3 R2 R1 + 0x80040600, // 0005 RET 1 R3 + }) + ) +); +/*******************************************************************/ + /********************************************************************/ /* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h index af2dff7a6f7a..d24f23e28ea4 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h @@ -7,67 +7,36 @@ extern const bclass be_class_Matter_Device; /******************************************************************** -** Solidified function: register_native_classes +** Solidified function: get_plugin_class_displayname ********************************************************************/ -be_local_closure(Matter_Device_register_native_classes, /* name */ +be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */ be_nested_proto( - 12, /* nstack */ - 3, /* argc */ + 5, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(members), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(get), - /* K5 */ be_nested_str_weak(class), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(Plugin_), - /* K8 */ be_const_int(0), - /* K9 */ be_nested_str_weak(register_plugin_class), - /* K10 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(plugins_classes), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(NAME), + /* K3 */ be_nested_str_weak(), }), - be_str_weak(register_native_classes), + be_str_weak(get_plugin_class_displayname), &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xA4120200, // 0001 IMPORT R4 K1 - 0x60140010, // 0002 GETGBL R5 G16 - 0x8C180702, // 0003 GETMET R6 R3 K2 - 0xB8220600, // 0004 GETNGBL R8 K3 - 0x7C180400, // 0005 CALL R6 2 - 0x7C140200, // 0006 CALL R5 1 - 0xA8020014, // 0007 EXBLK 0 #001D - 0x5C180A00, // 0008 MOVE R6 R5 - 0x7C180000, // 0009 CALL R6 0 - 0x8C1C0704, // 000A GETMET R7 R3 K4 - 0xB8260600, // 000B GETNGBL R9 K3 - 0x5C280C00, // 000C MOVE R10 R6 - 0x7C1C0600, // 000D CALL R7 3 - 0x60200004, // 000E GETGBL R8 G4 - 0x5C240E00, // 000F MOVE R9 R7 - 0x7C200200, // 0010 CALL R8 1 - 0x1C201105, // 0011 EQ R8 R8 K5 - 0x78220008, // 0012 JMPF R8 #001C - 0x8C200906, // 0013 GETMET R8 R4 K6 - 0x5C280C00, // 0014 MOVE R10 R6 - 0x582C0007, // 0015 LDCONST R11 K7 - 0x7C200600, // 0016 CALL R8 3 - 0x1C201108, // 0017 EQ R8 R8 K8 - 0x78220002, // 0018 JMPF R8 #001C - 0x8C200109, // 0019 GETMET R8 R0 K9 - 0x5C280E00, // 001A MOVE R10 R7 - 0x7C200400, // 001B CALL R8 2 - 0x7001FFEA, // 001C JMP #0008 - 0x5814000A, // 001D LDCONST R5 K10 - 0xAC140200, // 001E CATCH R5 1 0 - 0xB0080000, // 001F RAISE 2 R0 R0 - 0x80000000, // 0020 RET 0 + ( &(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 + 0x780A0001, // 0004 JMPF R2 #0007 + 0x880C0502, // 0005 GETMBR R3 R2 K2 + 0x70020000, // 0006 JMP #0008 + 0x580C0003, // 0007 LDCONST R3 K3 + 0x80040600, // 0008 RET 1 R3 }) ) ); @@ -75,11 +44,11 @@ be_local_closure(Matter_Device_register_native_classes, /* name */ /******************************************************************** -** Solidified function: save_before_restart +** Solidified function: mdns_remove_PASE ********************************************************************/ -be_local_closure(Matter_Device_save_before_restart, /* name */ +be_local_closure(Matter_Device_mdns_remove_PASE, /* name */ be_nested_proto( - 3, /* nstack */ + 10, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -87,18 +56,113 @@ be_local_closure(Matter_Device_save_before_restart, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(stop_basic_commissioning), - /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics), + ( &(const bvalue[20]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(mdns_pase_eth), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(log), + /* K4 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), + /* K5 */ be_nested_str_weak(_matterc), + /* K6 */ be_nested_str_weak(_udp), + /* K7 */ be_nested_str_weak(commissioning_instance_eth), + /* K8 */ be_nested_str_weak(hostname_eth), + /* K9 */ be_const_int(3), + /* K10 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), + /* K11 */ be_nested_str_weak(eth), + /* K12 */ be_nested_str_weak(remove_service), + /* K13 */ be_nested_str_weak(mdns_pase_wifi), + /* K14 */ be_nested_str_weak(commissioning_instance_wifi), + /* K15 */ be_nested_str_weak(hostname_wifi), + /* K16 */ be_nested_str_weak(wifi), + /* K17 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K18 */ be_nested_str_weak(_X7C), + /* K19 */ be_const_int(2), }), - be_str_weak(save_before_restart), + be_str_weak(mdns_remove_PASE), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x8C040101, // 0002 GETMET R1 R0 K1 - 0x7C040200, // 0003 CALL R1 1 - 0x80000000, // 0004 RET 0 + ( &(const binstruction[82]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA802003D, // 0001 EXBLK 0 #0040 + 0x88080101, // 0002 GETMBR R2 R0 K1 + 0x780A001B, // 0003 JMPF R2 #0020 + 0xB80A0400, // 0004 GETNGBL R2 K2 + 0x8C080503, // 0005 GETMET R2 R2 K3 + 0x60100018, // 0006 GETGBL R4 G24 + 0x58140004, // 0007 LDCONST R5 K4 + 0x58180005, // 0008 LDCONST R6 K5 + 0x581C0006, // 0009 LDCONST R7 K6 + 0x88200107, // 000A GETMBR R8 R0 K7 + 0x88240108, // 000B GETMBR R9 R0 K8 + 0x7C100A00, // 000C CALL R4 5 + 0x58140009, // 000D LDCONST R5 K9 + 0x7C080600, // 000E CALL R2 3 + 0xB80A0400, // 000F GETNGBL R2 K2 + 0x8C080503, // 0010 GETMET R2 R2 K3 + 0x60100018, // 0011 GETGBL R4 G24 + 0x5814000A, // 0012 LDCONST R5 K10 + 0x5818000B, // 0013 LDCONST R6 K11 + 0x881C0107, // 0014 GETMBR R7 R0 K7 + 0x7C100600, // 0015 CALL R4 3 + 0x58140009, // 0016 LDCONST R5 K9 + 0x7C080600, // 0017 CALL R2 3 + 0x50080000, // 0018 LDBOOL R2 0 0 + 0x90020202, // 0019 SETMBR R0 K1 R2 + 0x8C08030C, // 001A GETMET R2 R1 K12 + 0x58100005, // 001B LDCONST R4 K5 + 0x58140006, // 001C LDCONST R5 K6 + 0x88180107, // 001D GETMBR R6 R0 K7 + 0x881C0108, // 001E GETMBR R7 R0 K8 + 0x7C080A00, // 001F CALL R2 5 + 0x8808010D, // 0020 GETMBR R2 R0 K13 + 0x780A001B, // 0021 JMPF R2 #003E + 0xB80A0400, // 0022 GETNGBL R2 K2 + 0x8C080503, // 0023 GETMET R2 R2 K3 + 0x60100018, // 0024 GETGBL R4 G24 + 0x58140004, // 0025 LDCONST R5 K4 + 0x58180005, // 0026 LDCONST R6 K5 + 0x581C0006, // 0027 LDCONST R7 K6 + 0x8820010E, // 0028 GETMBR R8 R0 K14 + 0x8824010F, // 0029 GETMBR R9 R0 K15 + 0x7C100A00, // 002A CALL R4 5 + 0x58140009, // 002B LDCONST R5 K9 + 0x7C080600, // 002C CALL R2 3 + 0xB80A0400, // 002D GETNGBL R2 K2 + 0x8C080503, // 002E GETMET R2 R2 K3 + 0x60100018, // 002F GETGBL R4 G24 + 0x5814000A, // 0030 LDCONST R5 K10 + 0x58180010, // 0031 LDCONST R6 K16 + 0x881C010E, // 0032 GETMBR R7 R0 K14 + 0x7C100600, // 0033 CALL R4 3 + 0x58140009, // 0034 LDCONST R5 K9 + 0x7C080600, // 0035 CALL R2 3 + 0x50080000, // 0036 LDBOOL R2 0 0 + 0x90021A02, // 0037 SETMBR R0 K13 R2 + 0x8C08030C, // 0038 GETMET R2 R1 K12 + 0x58100005, // 0039 LDCONST R4 K5 + 0x58140006, // 003A LDCONST R5 K6 + 0x8818010E, // 003B GETMBR R6 R0 K14 + 0x881C010F, // 003C GETMBR R7 R0 K15 + 0x7C080A00, // 003D CALL R2 5 + 0xA8040001, // 003E EXBLK 1 1 + 0x70020010, // 003F JMP #0051 + 0xAC080002, // 0040 CATCH R2 0 2 + 0x7002000D, // 0041 JMP #0050 + 0xB8120400, // 0042 GETNGBL R4 K2 + 0x8C100903, // 0043 GETMET R4 R4 K3 + 0x60180008, // 0044 GETGBL R6 G8 + 0x5C1C0400, // 0045 MOVE R7 R2 + 0x7C180200, // 0046 CALL R6 1 + 0x001A2206, // 0047 ADD R6 K17 R6 + 0x00180D12, // 0048 ADD R6 R6 K18 + 0x601C0008, // 0049 GETGBL R7 G8 + 0x5C200600, // 004A MOVE R8 R3 + 0x7C1C0200, // 004B CALL R7 1 + 0x00180C07, // 004C ADD R6 R6 R7 + 0x581C0013, // 004D LDCONST R7 K19 + 0x7C100600, // 004E CALL R4 3 + 0x70020000, // 004F JMP #0051 + 0xB0080000, // 0050 RAISE 2 R0 R0 + 0x80000000, // 0051 RET 0 }) ) ); @@ -106,59 +170,75 @@ be_local_closure(Matter_Device_save_before_restart, /* name */ /******************************************************************** -** Solidified function: start_operational_discovery_deferred +** Solidified function: compute_qrcode_content ********************************************************************/ -be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */ +be_local_closure(Matter_Device_compute_qrcode_content, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 8, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 3, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 2]) { /* upvals */ - be_local_const_upval(1, 0), - be_local_const_upval(1, 1), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(start_operational_discovery), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x68080001, // 0002 GETUPV R2 U1 - 0x7C000400, // 0003 CALL R0 2 - 0x80040000, // 0004 RET 1 R0 - }) - ), - }), + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(set_timer), - /* K2 */ be_const_int(0), + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(resize), + /* K1 */ be_nested_str_weak(setbits), + /* K2 */ be_const_int(3), + /* K3 */ be_nested_str_weak(vendorid), + /* K4 */ be_nested_str_weak(productid), + /* K5 */ be_nested_str_weak(root_discriminator), + /* K6 */ be_nested_str_weak(root_passcode), + /* K7 */ be_const_int(134217727), + /* K8 */ be_nested_str_weak(MT_X3A), + /* K9 */ be_nested_str_weak(matter), + /* K10 */ be_nested_str_weak(Base38), + /* K11 */ be_nested_str_weak(encode), }), - be_str_weak(start_operational_discovery_deferred), + be_str_weak(compute_qrcode_content), &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x84140000, // 0003 CLOSURE R5 P0 - 0x7C080600, // 0004 CALL R2 3 - 0xA0000000, // 0005 CLOSE R0 - 0x80000000, // 0006 RET 0 + ( &(const binstruction[40]) { /* code */ + 0x60040015, // 0000 GETGBL R1 G21 + 0x7C040000, // 0001 CALL R1 0 + 0x8C040300, // 0002 GETMET R1 R1 K0 + 0x540E000A, // 0003 LDINT R3 11 + 0x7C040400, // 0004 CALL R1 2 + 0x8C080301, // 0005 GETMET R2 R1 K1 + 0x58100002, // 0006 LDCONST R4 K2 + 0x5416000F, // 0007 LDINT R5 16 + 0x88180103, // 0008 GETMBR R6 R0 K3 + 0x7C080800, // 0009 CALL R2 4 + 0x8C080301, // 000A GETMET R2 R1 K1 + 0x54120012, // 000B LDINT R4 19 + 0x5416000F, // 000C LDINT R5 16 + 0x88180104, // 000D GETMBR R6 R0 K4 + 0x7C080800, // 000E CALL R2 4 + 0x8C080301, // 000F GETMET R2 R1 K1 + 0x54120024, // 0010 LDINT R4 37 + 0x54160007, // 0011 LDINT R5 8 + 0x541A0003, // 0012 LDINT R6 4 + 0x7C080800, // 0013 CALL R2 4 + 0x8C080301, // 0014 GETMET R2 R1 K1 + 0x5412002C, // 0015 LDINT R4 45 + 0x5416000B, // 0016 LDINT R5 12 + 0x88180105, // 0017 GETMBR R6 R0 K5 + 0x541E0FFE, // 0018 LDINT R7 4095 + 0x2C180C07, // 0019 AND R6 R6 R7 + 0x7C080800, // 001A CALL R2 4 + 0x8C080301, // 001B GETMET R2 R1 K1 + 0x54120038, // 001C LDINT R4 57 + 0x5416001A, // 001D LDINT R5 27 + 0x88180106, // 001E GETMBR R6 R0 K6 + 0x2C180D07, // 001F AND R6 R6 K7 + 0x7C080800, // 0020 CALL R2 4 + 0xB80A1200, // 0021 GETNGBL R2 K9 + 0x8808050A, // 0022 GETMBR R2 R2 K10 + 0x8C08050B, // 0023 GETMET R2 R2 K11 + 0x5C100200, // 0024 MOVE R4 R1 + 0x7C080400, // 0025 CALL R2 2 + 0x000A1002, // 0026 ADD R2 K8 R2 + 0x80040400, // 0027 RET 1 R2 }) ) ); @@ -166,9 +246,9 @@ be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name * /******************************************************************** -** Solidified function: is_commissioning_open +** Solidified function: _init_basic_commissioning ********************************************************************/ -be_local_closure(Matter_Device_is_commissioning_open, /* name */ +be_local_closure(Matter_Device__init_basic_commissioning, /* name */ be_nested_proto( 3, /* nstack */ 1, /* argc */ @@ -178,16 +258,23 @@ be_local_closure(Matter_Device_is_commissioning_open, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(commissioning_open), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(count_active_fabrics), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(start_root_basic_commissioning), }), - be_str_weak(is_commissioning_open), + be_str_weak(_init_basic_commissioning), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ + ( &(const binstruction[ 8]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x20040202, // 0002 NE R1 R1 R2 - 0x80040200, // 0003 RET 1 R1 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x1C040302, // 0003 EQ R1 R1 K2 + 0x78060001, // 0004 JMPF R1 #0007 + 0x8C040103, // 0005 GETMET R1 R0 K3 + 0x7C040200, // 0006 CALL R1 1 + 0x80000000, // 0007 RET 0 }) ) ); @@ -195,142 +282,59 @@ be_local_closure(Matter_Device_is_commissioning_open, /* name */ /******************************************************************** -** Solidified function: start_basic_commissioning +** Solidified function: compute_manual_pairing_code ********************************************************************/ -be_local_closure(Matter_Device_start_basic_commissioning, /* name */ +be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */ be_nested_proto( - 13, /* nstack */ - 8, /* argc */ + 9, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns_announce_PASE), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Wifi_X23Connected), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0xB8020200, // 0003 GETNGBL R0 K1 - 0x8C000102, // 0004 GETMET R0 R0 K2 - 0x58080003, // 0005 LDCONST R2 K3 - 0x580C0000, // 0006 LDCONST R3 K0 - 0x7C000600, // 0007 CALL R0 3 - 0x80000000, // 0008 RET 0 - }) - ), - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns_announce_PASE), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Eth_X23Connected), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0xB8020200, // 0003 GETNGBL R0 K1 - 0x8C000102, // 0004 GETMET R0 R0 K2 - 0x58080003, // 0005 LDCONST R2 K3 - 0x580C0000, // 0006 LDCONST R3 K0 - 0x7C000600, // 0007 CALL R0 3 - 0x80000000, // 0008 RET 0 - }) - ), - }), + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(commissioning_open), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(millis), - /* K3 */ be_nested_str_weak(commissioning_iterations), - /* K4 */ be_nested_str_weak(commissioning_discriminator), - /* K5 */ be_nested_str_weak(commissioning_salt), - /* K6 */ be_nested_str_weak(commissioning_w0), - /* K7 */ be_nested_str_weak(commissioning_L), - /* K8 */ be_nested_str_weak(commissioning_admin_fabric), - /* K9 */ be_nested_str_weak(wifi), - /* K10 */ be_nested_str_weak(up), - /* K11 */ be_nested_str_weak(eth), - /* K12 */ be_nested_str_weak(mdns_announce_PASE), - /* K13 */ be_nested_str_weak(add_rule), - /* K14 */ be_nested_str_weak(Wifi_X23Connected), - /* K15 */ be_nested_str_weak(Eth_X23Connected), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(root_discriminator), + /* K1 */ be_nested_str_weak(root_passcode), + /* K2 */ be_nested_str_weak(_X251i_X2505i_X2504i), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(Verhoeff), + /* K5 */ be_nested_str_weak(checksum), }), - be_str_weak(start_basic_commissioning), + be_str_weak(compute_manual_pairing_code), &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0xB8220200, // 0000 GETNGBL R8 K1 - 0x8C201102, // 0001 GETMET R8 R8 K2 - 0x7C200200, // 0002 CALL R8 1 - 0x542603E7, // 0003 LDINT R9 1000 - 0x08240209, // 0004 MUL R9 R1 R9 - 0x00201009, // 0005 ADD R8 R8 R9 - 0x90020008, // 0006 SETMBR R0 K0 R8 - 0x90020602, // 0007 SETMBR R0 K3 R2 - 0x90020803, // 0008 SETMBR R0 K4 R3 - 0x90020A04, // 0009 SETMBR R0 K5 R4 - 0x90020C05, // 000A SETMBR R0 K6 R5 - 0x90020E06, // 000B SETMBR R0 K7 R6 - 0x90021007, // 000C SETMBR R0 K8 R7 - 0xB8220200, // 000D GETNGBL R8 K1 - 0x8C201109, // 000E GETMET R8 R8 K9 - 0x7C200200, // 000F CALL R8 1 - 0x9420110A, // 0010 GETIDX R8 R8 K10 - 0x74220004, // 0011 JMPT R8 #0017 - 0xB8220200, // 0012 GETNGBL R8 K1 - 0x8C20110B, // 0013 GETMET R8 R8 K11 - 0x7C200200, // 0014 CALL R8 1 - 0x9420110A, // 0015 GETIDX R8 R8 K10 - 0x78220002, // 0016 JMPF R8 #001A - 0x8C20010C, // 0017 GETMET R8 R0 K12 - 0x7C200200, // 0018 CALL R8 1 - 0x7002000B, // 0019 JMP #0026 - 0xB8220200, // 001A GETNGBL R8 K1 - 0x8C20110D, // 001B GETMET R8 R8 K13 - 0x5828000E, // 001C LDCONST R10 K14 - 0x842C0000, // 001D CLOSURE R11 P0 - 0x5830000C, // 001E LDCONST R12 K12 - 0x7C200800, // 001F CALL R8 4 - 0xB8220200, // 0020 GETNGBL R8 K1 - 0x8C20110D, // 0021 GETMET R8 R8 K13 - 0x5828000F, // 0022 LDCONST R10 K15 - 0x842C0001, // 0023 CLOSURE R11 P1 - 0x5830000C, // 0024 LDCONST R12 K12 - 0x7C200800, // 0025 CALL R8 4 - 0xA0000000, // 0026 CLOSE R0 - 0x80000000, // 0027 RET 0 + ( &(const binstruction[30]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x540A0FFE, // 0001 LDINT R2 4095 + 0x2C040202, // 0002 AND R1 R1 R2 + 0x540A0009, // 0003 LDINT R2 10 + 0x3C040202, // 0004 SHR R1 R1 R2 + 0x88080100, // 0005 GETMBR R2 R0 K0 + 0x540E02FF, // 0006 LDINT R3 768 + 0x2C080403, // 0007 AND R2 R2 R3 + 0x540E0005, // 0008 LDINT R3 6 + 0x38080403, // 0009 SHL R2 R2 R3 + 0x880C0101, // 000A GETMBR R3 R0 K1 + 0x54123FFE, // 000B LDINT R4 16383 + 0x2C0C0604, // 000C AND R3 R3 R4 + 0x30080403, // 000D OR R2 R2 R3 + 0x880C0101, // 000E GETMBR R3 R0 K1 + 0x5412000D, // 000F LDINT R4 14 + 0x3C0C0604, // 0010 SHR R3 R3 R4 + 0x60100018, // 0011 GETGBL R4 G24 + 0x58140002, // 0012 LDCONST R5 K2 + 0x5C180200, // 0013 MOVE R6 R1 + 0x5C1C0400, // 0014 MOVE R7 R2 + 0x5C200600, // 0015 MOVE R8 R3 + 0x7C100800, // 0016 CALL R4 4 + 0xB8160600, // 0017 GETNGBL R5 K3 + 0x88140B04, // 0018 GETMBR R5 R5 K4 + 0x8C140B05, // 0019 GETMET R5 R5 K5 + 0x5C1C0800, // 001A MOVE R7 R4 + 0x7C140400, // 001B CALL R5 2 + 0x00100805, // 001C ADD R4 R4 R5 + 0x80040800, // 001D RET 1 R4 }) ) ); @@ -338,125 +342,55 @@ be_local_closure(Matter_Device_start_basic_commissioning, /* name */ /******************************************************************** -** Solidified function: mdns_remove_PASE +** Solidified function: invoke_request ********************************************************************/ -be_local_closure(Matter_Device_mdns_remove_PASE, /* name */ +be_local_closure(Matter_Device_invoke_request, /* name */ be_nested_proto( - 10, /* nstack */ - 1, /* argc */ + 12, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[20]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(mdns_pase_eth), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(log), - /* K4 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), - /* K5 */ be_nested_str_weak(_matterc), - /* K6 */ be_nested_str_weak(_udp), - /* K7 */ be_nested_str_weak(commissioning_instance_eth), - /* K8 */ be_nested_str_weak(hostname_eth), - /* K9 */ be_const_int(3), - /* K10 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), - /* K11 */ be_nested_str_weak(eth), - /* K12 */ be_nested_str_weak(remove_service), - /* K13 */ be_nested_str_weak(mdns_pase_wifi), - /* K14 */ be_nested_str_weak(commissioning_instance_wifi), - /* K15 */ be_nested_str_weak(hostname_wifi), - /* K16 */ be_nested_str_weak(wifi), - /* K17 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K18 */ be_nested_str_weak(_X7C), - /* K19 */ be_const_int(2), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(endpoint), + /* K2 */ be_nested_str_weak(plugins), + /* K3 */ be_nested_str_weak(invoke_request), + /* K4 */ be_const_int(1), + /* K5 */ be_nested_str_weak(status), + /* K6 */ be_nested_str_weak(matter), + /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), }), - be_str_weak(mdns_remove_PASE), + be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[82]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA802003D, // 0001 EXBLK 0 #0040 - 0x88080101, // 0002 GETMBR R2 R0 K1 - 0x780A001B, // 0003 JMPF R2 #0020 - 0xB80A0400, // 0004 GETNGBL R2 K2 - 0x8C080503, // 0005 GETMET R2 R2 K3 - 0x60100018, // 0006 GETGBL R4 G24 - 0x58140004, // 0007 LDCONST R5 K4 - 0x58180005, // 0008 LDCONST R6 K5 - 0x581C0006, // 0009 LDCONST R7 K6 - 0x88200107, // 000A GETMBR R8 R0 K7 - 0x88240108, // 000B GETMBR R9 R0 K8 - 0x7C100A00, // 000C CALL R4 5 - 0x58140009, // 000D LDCONST R5 K9 - 0x7C080600, // 000E CALL R2 3 - 0xB80A0400, // 000F GETNGBL R2 K2 - 0x8C080503, // 0010 GETMET R2 R2 K3 - 0x60100018, // 0011 GETGBL R4 G24 - 0x5814000A, // 0012 LDCONST R5 K10 - 0x5818000B, // 0013 LDCONST R6 K11 - 0x881C0107, // 0014 GETMBR R7 R0 K7 - 0x7C100600, // 0015 CALL R4 3 - 0x58140009, // 0016 LDCONST R5 K9 - 0x7C080600, // 0017 CALL R2 3 - 0x50080000, // 0018 LDBOOL R2 0 0 - 0x90020202, // 0019 SETMBR R0 K1 R2 - 0x8C08030C, // 001A GETMET R2 R1 K12 - 0x58100005, // 001B LDCONST R4 K5 - 0x58140006, // 001C LDCONST R5 K6 - 0x88180107, // 001D GETMBR R6 R0 K7 - 0x881C0108, // 001E GETMBR R7 R0 K8 - 0x7C080A00, // 001F CALL R2 5 - 0x8808010D, // 0020 GETMBR R2 R0 K13 - 0x780A001B, // 0021 JMPF R2 #003E - 0xB80A0400, // 0022 GETNGBL R2 K2 - 0x8C080503, // 0023 GETMET R2 R2 K3 - 0x60100018, // 0024 GETGBL R4 G24 - 0x58140004, // 0025 LDCONST R5 K4 - 0x58180005, // 0026 LDCONST R6 K5 - 0x581C0006, // 0027 LDCONST R7 K6 - 0x8820010E, // 0028 GETMBR R8 R0 K14 - 0x8824010F, // 0029 GETMBR R9 R0 K15 - 0x7C100A00, // 002A CALL R4 5 - 0x58140009, // 002B LDCONST R5 K9 - 0x7C080600, // 002C CALL R2 3 - 0xB80A0400, // 002D GETNGBL R2 K2 - 0x8C080503, // 002E GETMET R2 R2 K3 - 0x60100018, // 002F GETGBL R4 G24 - 0x5814000A, // 0030 LDCONST R5 K10 - 0x58180010, // 0031 LDCONST R6 K16 - 0x881C010E, // 0032 GETMBR R7 R0 K14 - 0x7C100600, // 0033 CALL R4 3 - 0x58140009, // 0034 LDCONST R5 K9 - 0x7C080600, // 0035 CALL R2 3 - 0x50080000, // 0036 LDBOOL R2 0 0 - 0x90021A02, // 0037 SETMBR R0 K13 R2 - 0x8C08030C, // 0038 GETMET R2 R1 K12 - 0x58100005, // 0039 LDCONST R4 K5 - 0x58140006, // 003A LDCONST R5 K6 - 0x8818010E, // 003B GETMBR R6 R0 K14 - 0x881C010F, // 003C GETMBR R7 R0 K15 - 0x7C080A00, // 003D CALL R2 5 - 0xA8040001, // 003E EXBLK 1 1 - 0x70020010, // 003F JMP #0051 - 0xAC080002, // 0040 CATCH R2 0 2 - 0x7002000D, // 0041 JMP #0050 - 0xB8120400, // 0042 GETNGBL R4 K2 - 0x8C100903, // 0043 GETMET R4 R4 K3 - 0x60180008, // 0044 GETGBL R6 G8 - 0x5C1C0400, // 0045 MOVE R7 R2 - 0x7C180200, // 0046 CALL R6 1 - 0x001A2206, // 0047 ADD R6 K17 R6 - 0x00180D12, // 0048 ADD R6 R6 K18 - 0x601C0008, // 0049 GETGBL R7 G8 - 0x5C200600, // 004A MOVE R8 R3 - 0x7C1C0200, // 004B CALL R7 1 - 0x00180C07, // 004C ADD R6 R6 R7 - 0x581C0013, // 004D LDCONST R7 K19 - 0x7C100600, // 004E CALL R4 3 - 0x70020000, // 004F JMP #0051 - 0xB0080000, // 0050 RAISE 2 R0 R0 - 0x80000000, // 0051 RET 0 + ( &(const binstruction[24]) { /* code */ + 0x58100000, // 0000 LDCONST R4 K0 + 0x88140701, // 0001 GETMBR R5 R3 K1 + 0x6018000C, // 0002 GETGBL R6 G12 + 0x881C0102, // 0003 GETMBR R7 R0 K2 + 0x7C180200, // 0004 CALL R6 1 + 0x14180806, // 0005 LT R6 R4 R6 + 0x781A000C, // 0006 JMPF R6 #0014 + 0x88180102, // 0007 GETMBR R6 R0 K2 + 0x94180C04, // 0008 GETIDX R6 R6 R4 + 0x881C0D01, // 0009 GETMBR R7 R6 K1 + 0x1C1C0E05, // 000A EQ R7 R7 R5 + 0x781E0005, // 000B JMPF R7 #0012 + 0x8C1C0D03, // 000C GETMET R7 R6 K3 + 0x5C240200, // 000D MOVE R9 R1 + 0x5C280400, // 000E MOVE R10 R2 + 0x5C2C0600, // 000F MOVE R11 R3 + 0x7C1C0800, // 0010 CALL R7 4 + 0x80040E00, // 0011 RET 1 R7 + 0x00100904, // 0012 ADD R4 R4 K4 + 0x7001FFED, // 0013 JMP #0002 + 0xB81A0C00, // 0014 GETNGBL R6 K6 + 0x88180D07, // 0015 GETMBR R6 R6 K7 + 0x900E0A06, // 0016 SETMBR R3 K5 R6 + 0x80000000, // 0017 RET 0 }) ) ); @@ -464,11 +398,11 @@ be_local_closure(Matter_Device_mdns_remove_PASE, /* name */ /******************************************************************** -** Solidified function: autoconf_device +** Solidified function: stop ********************************************************************/ -be_local_closure(Matter_Device_autoconf_device, /* name */ +be_local_closure(Matter_Device_stop, /* name */ be_nested_proto( - 6, /* nstack */ + 4, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -476,67 +410,25 @@ be_local_closure(Matter_Device_autoconf_device, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(plugins), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(plugins_persist), - /* K4 */ be_nested_str_weak(plugins_config), - /* K5 */ be_nested_str_weak(autoconf_device_map), - /* K6 */ be_nested_str_weak(plugins_config_remotes), - /* K7 */ be_nested_str_weak(adjust_next_ep), - /* K8 */ be_nested_str_weak(tasmota), - /* K9 */ be_nested_str_weak(log), - /* K10 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20), - /* K11 */ be_const_int(3), - /* K12 */ be_nested_str_weak(_instantiate_plugins_from_config), - /* K13 */ be_nested_str_weak(sessions), - /* K14 */ be_nested_str_weak(count_active_fabrics), - /* K15 */ be_nested_str_weak(save_param), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(remove_driver), + /* K2 */ be_nested_str_weak(udp_server), + /* K3 */ be_nested_str_weak(stop), }), - be_str_weak(autoconf_device), + be_str_weak(stop), &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x6008000C, // 0001 GETGBL R2 G12 - 0x880C0101, // 0002 GETMBR R3 R0 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x24080502, // 0004 GT R2 R2 K2 - 0x780A0000, // 0005 JMPF R2 #0007 - 0x80000400, // 0006 RET 0 - 0x88080103, // 0007 GETMBR R2 R0 K3 - 0x740A000F, // 0008 JMPT R2 #0019 - 0x8C080105, // 0009 GETMET R2 R0 K5 - 0x7C080200, // 000A CALL R2 1 - 0x90020802, // 000B SETMBR R0 K4 R2 - 0x60080013, // 000C GETGBL R2 G19 - 0x7C080000, // 000D CALL R2 0 - 0x90020C02, // 000E SETMBR R0 K6 R2 - 0x8C080107, // 000F GETMET R2 R0 K7 - 0x7C080200, // 0010 CALL R2 1 - 0xB80A1000, // 0011 GETNGBL R2 K8 - 0x8C080509, // 0012 GETMET R2 R2 K9 - 0x60100008, // 0013 GETGBL R4 G8 - 0x88140104, // 0014 GETMBR R5 R0 K4 - 0x7C100200, // 0015 CALL R4 1 - 0x00121404, // 0016 ADD R4 K10 R4 - 0x5814000B, // 0017 LDCONST R5 K11 - 0x7C080600, // 0018 CALL R2 3 - 0x8C08010C, // 0019 GETMET R2 R0 K12 - 0x88100104, // 001A GETMBR R4 R0 K4 - 0x7C080400, // 001B CALL R2 2 - 0x88080103, // 001C GETMBR R2 R0 K3 - 0x740A0008, // 001D JMPT R2 #0027 - 0x8808010D, // 001E GETMBR R2 R0 K13 - 0x8C08050E, // 001F GETMET R2 R2 K14 - 0x7C080200, // 0020 CALL R2 1 - 0x24080502, // 0021 GT R2 R2 K2 - 0x780A0003, // 0022 JMPF R2 #0027 - 0x50080200, // 0023 LDBOOL R2 1 0 - 0x90020602, // 0024 SETMBR R0 K3 R2 - 0x8C08010F, // 0025 GETMET R2 R0 K15 - 0x7C080200, // 0026 CALL R2 1 - 0x80000000, // 0027 RET 0 + ( &(const binstruction[10]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x88040102, // 0004 GETMBR R1 R0 K2 + 0x78060002, // 0005 JMPF R1 #0009 + 0x88040102, // 0006 GETMBR R1 R0 K2 + 0x8C040303, // 0007 GETMET R1 R1 K3 + 0x7C040200, // 0008 CALL R1 1 + 0x80000000, // 0009 RET 0 }) ) ); @@ -544,124 +436,114 @@ be_local_closure(Matter_Device_autoconf_device, /* name */ /******************************************************************** -** Solidified function: process_attribute_read_solo +** Solidified function: bridge_add_endpoint ********************************************************************/ -be_local_closure(Matter_Device_process_attribute_read_solo, /* name */ +be_local_closure(Matter_Device_bridge_add_endpoint, /* name */ be_nested_proto( - 10, /* nstack */ - 2, /* argc */ + 17, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(endpoint), - /* K1 */ be_nested_str_weak(cluster), - /* K2 */ be_nested_str_weak(attribute), - /* K3 */ be_nested_str_weak(find_plugin_by_endpoint), - /* K4 */ be_nested_str_weak(status), - /* K5 */ be_nested_str_weak(matter), - /* K6 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), - /* K7 */ be_nested_str_weak(contains_cluster), - /* K8 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), - /* K9 */ be_nested_str_weak(contains_attribute), - /* K10 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str_weak(plugins_classes), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(log), + /* K4 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), + /* K5 */ be_nested_str_weak(_X27_X20skipping), + /* K6 */ be_const_int(3), + /* K7 */ be_nested_str_weak(next_ep), + /* K8 */ be_nested_str_weak(plugins), + /* K9 */ be_nested_str_weak(push), + /* K10 */ be_nested_str_weak(type), + /* K11 */ be_nested_str_weak(keys), + /* K12 */ be_nested_str_weak(stop_iteration), + /* K13 */ be_nested_str_weak(MTR_X3A_X20adding_X20endpoint_X20_X3D_X20_X25i_X20type_X3A_X25s_X25s), + /* K14 */ be_nested_str_weak(conf_to_log), + /* K15 */ be_const_int(2), + /* K16 */ be_nested_str_weak(plugins_config), + /* K17 */ be_nested_str_weak(plugins_persist), + /* K18 */ be_const_int(1), + /* K19 */ be_nested_str_weak(save_param), + /* K20 */ be_nested_str_weak(signal_endpoints_changed), }), - be_str_weak(process_attribute_read_solo), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0x88080300, // 0000 GETMBR R2 R1 K0 - 0x880C0301, // 0001 GETMBR R3 R1 K1 - 0x88100302, // 0002 GETMBR R4 R1 K2 - 0x4C140000, // 0003 LDNIL R5 - 0x1C140405, // 0004 EQ R5 R2 R5 - 0x74160005, // 0005 JMPT R5 #000C - 0x4C140000, // 0006 LDNIL R5 - 0x1C140605, // 0007 EQ R5 R3 R5 - 0x74160002, // 0008 JMPT R5 #000C - 0x4C140000, // 0009 LDNIL R5 - 0x1C140805, // 000A EQ R5 R4 R5 - 0x78160001, // 000B JMPF R5 #000E - 0x4C140000, // 000C LDNIL R5 - 0x80040A00, // 000D RET 1 R5 - 0x8C140103, // 000E GETMET R5 R0 K3 - 0x5C1C0400, // 000F MOVE R7 R2 - 0x7C140400, // 0010 CALL R5 2 - 0x4C180000, // 0011 LDNIL R6 - 0x1C180A06, // 0012 EQ R6 R5 R6 - 0x781A0004, // 0013 JMPF R6 #0019 - 0xB81A0A00, // 0014 GETNGBL R6 K5 - 0x88180D06, // 0015 GETMBR R6 R6 K6 - 0x90060806, // 0016 SETMBR R1 K4 R6 - 0x4C180000, // 0017 LDNIL R6 - 0x80040C00, // 0018 RET 1 R6 - 0x8C180B07, // 0019 GETMET R6 R5 K7 - 0x5C200600, // 001A MOVE R8 R3 - 0x7C180400, // 001B CALL R6 2 - 0x741A0004, // 001C JMPT R6 #0022 - 0xB81A0A00, // 001D GETNGBL R6 K5 - 0x88180D08, // 001E GETMBR R6 R6 K8 - 0x90060806, // 001F SETMBR R1 K4 R6 - 0x4C180000, // 0020 LDNIL R6 - 0x80040C00, // 0021 RET 1 R6 - 0x8C180B09, // 0022 GETMET R6 R5 K9 - 0x5C200600, // 0023 MOVE R8 R3 - 0x5C240800, // 0024 MOVE R9 R4 - 0x7C180600, // 0025 CALL R6 3 - 0x741A0004, // 0026 JMPT R6 #002C - 0xB81A0A00, // 0027 GETNGBL R6 K5 - 0x88180D0A, // 0028 GETMBR R6 R6 K10 - 0x90060806, // 0029 SETMBR R1 K4 R6 - 0x4C180000, // 002A LDNIL R6 - 0x80040C00, // 002B RET 1 R6 - 0x80040A00, // 002C RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_250ms -********************************************************************/ -be_local_closure(Matter_Device_every_250ms, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(message_handler), - /* K1 */ be_nested_str_weak(every_250ms), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(plugins), - /* K4 */ be_const_int(1), - }), - be_str_weak(every_250ms), + be_str_weak(bridge_add_endpoint), &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x58040002, // 0003 LDCONST R1 K2 - 0x6008000C, // 0004 GETGBL R2 G12 - 0x880C0103, // 0005 GETMBR R3 R0 K3 - 0x7C080200, // 0006 CALL R2 1 - 0x14080202, // 0007 LT R2 R1 R2 - 0x780A0005, // 0008 JMPF R2 #000F - 0x88080103, // 0009 GETMBR R2 R0 K3 - 0x94080401, // 000A GETIDX R2 R2 R1 - 0x8C080501, // 000B GETMET R2 R2 K1 - 0x7C080200, // 000C CALL R2 1 - 0x00040304, // 000D ADD R1 R1 K4 - 0x7001FFF4, // 000E JMP #0004 - 0x80000000, // 000F RET 0 + ( &(const binstruction[70]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x4C100000, // 0004 LDNIL R4 + 0x1C100604, // 0005 EQ R4 R3 R4 + 0x78120009, // 0006 JMPF R4 #0011 + 0xB8120400, // 0007 GETNGBL R4 K2 + 0x8C100903, // 0008 GETMET R4 R4 K3 + 0x60180008, // 0009 GETGBL R6 G8 + 0x5C1C0200, // 000A MOVE R7 R1 + 0x7C180200, // 000B CALL R6 1 + 0x001A0806, // 000C ADD R6 K4 R6 + 0x00180D05, // 000D ADD R6 R6 K5 + 0x581C0006, // 000E LDCONST R7 K6 + 0x7C100600, // 000F CALL R4 3 + 0x80000800, // 0010 RET 0 + 0x88100107, // 0011 GETMBR R4 R0 K7 + 0x60140008, // 0012 GETGBL R5 G8 + 0x5C180800, // 0013 MOVE R6 R4 + 0x7C140200, // 0014 CALL R5 1 + 0x5C180600, // 0015 MOVE R6 R3 + 0x5C1C0000, // 0016 MOVE R7 R0 + 0x5C200800, // 0017 MOVE R8 R4 + 0x5C240400, // 0018 MOVE R9 R2 + 0x7C180600, // 0019 CALL R6 3 + 0x881C0108, // 001A GETMBR R7 R0 K8 + 0x8C1C0F09, // 001B GETMET R7 R7 K9 + 0x5C240C00, // 001C MOVE R9 R6 + 0x7C1C0400, // 001D CALL R7 2 + 0x601C0013, // 001E GETGBL R7 G19 + 0x7C1C0000, // 001F CALL R7 0 + 0x981E1401, // 0020 SETIDX R7 K10 R1 + 0x60200010, // 0021 GETGBL R8 G16 + 0x8C24050B, // 0022 GETMET R9 R2 K11 + 0x7C240200, // 0023 CALL R9 1 + 0x7C200200, // 0024 CALL R8 1 + 0xA8020004, // 0025 EXBLK 0 #002B + 0x5C241000, // 0026 MOVE R9 R8 + 0x7C240000, // 0027 CALL R9 0 + 0x94280409, // 0028 GETIDX R10 R2 R9 + 0x981C120A, // 0029 SETIDX R7 R9 R10 + 0x7001FFFA, // 002A JMP #0026 + 0x5820000C, // 002B LDCONST R8 K12 + 0xAC200200, // 002C CATCH R8 1 0 + 0xB0080000, // 002D RAISE 2 R0 R0 + 0xB8220400, // 002E GETNGBL R8 K2 + 0x8C201103, // 002F GETMET R8 R8 K3 + 0x60280018, // 0030 GETGBL R10 G24 + 0x582C000D, // 0031 LDCONST R11 K13 + 0x5C300800, // 0032 MOVE R12 R4 + 0x5C340200, // 0033 MOVE R13 R1 + 0x8C38010E, // 0034 GETMET R14 R0 K14 + 0x5C400400, // 0035 MOVE R16 R2 + 0x7C380400, // 0036 CALL R14 2 + 0x7C280800, // 0037 CALL R10 4 + 0x582C000F, // 0038 LDCONST R11 K15 + 0x7C200600, // 0039 CALL R8 3 + 0x88200110, // 003A GETMBR R8 R0 K16 + 0x98200A07, // 003B SETIDX R8 R5 R7 + 0x50200200, // 003C LDBOOL R8 1 0 + 0x90022208, // 003D SETMBR R0 K17 R8 + 0x88200107, // 003E GETMBR R8 R0 K7 + 0x00201112, // 003F ADD R8 R8 K18 + 0x90020E08, // 0040 SETMBR R0 K7 R8 + 0x8C200113, // 0041 GETMET R8 R0 K19 + 0x7C200200, // 0042 CALL R8 1 + 0x8C200114, // 0043 GETMET R8 R0 K20 + 0x7C200200, // 0044 CALL R8 1 + 0x80040800, // 0045 RET 1 R4 }) ) ); @@ -669,11 +551,11 @@ be_local_closure(Matter_Device_every_250ms, /* name */ /******************************************************************** -** Solidified function: get_plugin_remote_info +** Solidified function: mdns_remove_op_discovery ********************************************************************/ -be_local_closure(Matter_Device_get_plugin_remote_info, /* name */ +be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */ be_nested_proto( - 6, /* nstack */ + 12, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -681,200 +563,114 @@ be_local_closure(Matter_Device_get_plugin_remote_info, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(plugins_config_remotes), - /* K1 */ be_nested_str_weak(find), - }), - be_str_weak(get_plugin_remote_info), - &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 - 0x60140013, // 0003 GETGBL R5 G19 - 0x7C140000, // 0004 CALL R5 0 - 0x7C080600, // 0005 CALL R2 3 - 0x80040400, // 0006 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Device_every_second, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(every_second), - /* K2 */ be_nested_str_weak(message_handler), - /* K3 */ be_nested_str_weak(commissioning_open), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(time_reached), + ( &(const bvalue[23]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(get_device_id), + /* K2 */ be_nested_str_weak(copy), + /* K3 */ be_nested_str_weak(reverse), + /* K4 */ be_nested_str_weak(get_fabric_compressed), + /* K5 */ be_nested_str_weak(tohex), + /* K6 */ be_nested_str_weak(_X2D), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(eth), + /* K9 */ be_nested_str_weak(find), + /* K10 */ be_nested_str_weak(up), + /* K11 */ be_nested_str_weak(log), + /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), + /* K13 */ be_const_int(3), + /* K14 */ be_nested_str_weak(remove_service), + /* K15 */ be_nested_str_weak(_matter), + /* K16 */ be_nested_str_weak(_tcp), + /* K17 */ be_nested_str_weak(hostname_eth), + /* K18 */ be_nested_str_weak(wifi), + /* K19 */ be_nested_str_weak(hostname_wifi), + /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K21 */ be_nested_str_weak(_X7C), + /* K22 */ be_const_int(2), }), - be_str_weak(every_second), + be_str_weak(mdns_remove_op_discovery), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x88040102, // 0003 GETMBR R1 R0 K2 - 0x8C040301, // 0004 GETMET R1 R1 K1 - 0x7C040200, // 0005 CALL R1 1 - 0x88040103, // 0006 GETMBR R1 R0 K3 - 0x4C080000, // 0007 LDNIL R2 - 0x20040202, // 0008 NE R1 R1 R2 - 0x78060006, // 0009 JMPF R1 #0011 - 0xB8060800, // 000A GETNGBL R1 K4 - 0x8C040305, // 000B GETMET R1 R1 K5 - 0x880C0103, // 000C GETMBR R3 R0 K3 - 0x7C040400, // 000D CALL R1 2 - 0x78060001, // 000E JMPF R1 #0011 - 0x4C040000, // 000F LDNIL R1 - 0x90020601, // 0010 SETMBR R0 K3 R1 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_mdns_announce_hostnames -********************************************************************/ -be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(_mdns_announce_hostname), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Wifi_X23Connected), - /* K4 */ be_nested_str_weak(matter_mdns_host), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x50080000, // 0002 LDBOOL R2 0 0 - 0x7C000400, // 0003 CALL R0 2 - 0xB8020200, // 0004 GETNGBL R0 K1 - 0x8C000102, // 0005 GETMET R0 R0 K2 - 0x58080003, // 0006 LDCONST R2 K3 - 0x580C0004, // 0007 LDCONST R3 K4 - 0x7C000600, // 0008 CALL R0 3 - 0x80000000, // 0009 RET 0 - }) - ), - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(_mdns_announce_hostname), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Eth_X23Connected), - /* K4 */ be_nested_str_weak(matter_mdns_host), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x50080200, // 0002 LDBOOL R2 1 0 - 0x7C000400, // 0003 CALL R0 2 - 0xB8020200, // 0004 GETNGBL R0 K1 - 0x8C000102, // 0005 GETMET R0 R0 K2 - 0x58080003, // 0006 LDCONST R2 K3 - 0x580C0004, // 0007 LDCONST R3 K4 - 0x7C000600, // 0008 CALL R0 3 - 0x80000000, // 0009 RET 0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(wifi), - /* K2 */ be_nested_str_weak(up), - /* K3 */ be_nested_str_weak(_mdns_announce_hostname), - /* K4 */ be_nested_str_weak(add_rule), - /* K5 */ be_nested_str_weak(Wifi_X23Connected), - /* K6 */ be_nested_str_weak(matter_mdns_host), - /* K7 */ be_nested_str_weak(eth), - /* K8 */ be_nested_str_weak(Eth_X23Connected), - }), - be_str_weak(start_mdns_announce_hostnames), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x94040302, // 0003 GETIDX R1 R1 K2 - 0x78060003, // 0004 JMPF R1 #0009 - 0x8C040103, // 0005 GETMET R1 R0 K3 - 0x500C0000, // 0006 LDBOOL R3 0 0 - 0x7C040400, // 0007 CALL R1 2 - 0x70020005, // 0008 JMP #000F - 0xB8060000, // 0009 GETNGBL R1 K0 - 0x8C040304, // 000A GETMET R1 R1 K4 - 0x580C0005, // 000B LDCONST R3 K5 - 0x84100000, // 000C CLOSURE R4 P0 - 0x58140006, // 000D LDCONST R5 K6 - 0x7C040800, // 000E CALL R1 4 - 0xB8060000, // 000F GETNGBL R1 K0 - 0x8C040307, // 0010 GETMET R1 R1 K7 - 0x7C040200, // 0011 CALL R1 1 - 0x94040302, // 0012 GETIDX R1 R1 K2 - 0x78060003, // 0013 JMPF R1 #0018 - 0x8C040103, // 0014 GETMET R1 R0 K3 - 0x500C0200, // 0015 LDBOOL R3 1 0 - 0x7C040400, // 0016 CALL R1 2 - 0x70020005, // 0017 JMP #001E - 0xB8060000, // 0018 GETNGBL R1 K0 - 0x8C040304, // 0019 GETMET R1 R1 K4 - 0x580C0008, // 001A LDCONST R3 K8 - 0x84100001, // 001B CLOSURE R4 P1 - 0x58140006, // 001C LDCONST R5 K6 - 0x7C040800, // 001D CALL R1 4 - 0xA0000000, // 001E CLOSE R0 - 0x80000000, // 001F RET 0 + ( &(const binstruction[80]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA802003B, // 0001 EXBLK 0 #003E + 0x8C0C0301, // 0002 GETMET R3 R1 K1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x8C0C0702, // 0004 GETMET R3 R3 K2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x8C100304, // 0008 GETMET R4 R1 K4 + 0x7C100200, // 0009 CALL R4 1 + 0x8C140905, // 000A GETMET R5 R4 K5 + 0x7C140200, // 000B CALL R5 1 + 0x00140B06, // 000C ADD R5 R5 K6 + 0x8C180705, // 000D GETMET R6 R3 K5 + 0x7C180200, // 000E CALL R6 1 + 0x00140A06, // 000F ADD R5 R5 R6 + 0xB81A0E00, // 0010 GETNGBL R6 K7 + 0x8C180D08, // 0011 GETMET R6 R6 K8 + 0x7C180200, // 0012 CALL R6 1 + 0x8C180D09, // 0013 GETMET R6 R6 K9 + 0x5820000A, // 0014 LDCONST R8 K10 + 0x7C180400, // 0015 CALL R6 2 + 0x781A000E, // 0016 JMPF R6 #0026 + 0xB81A0E00, // 0017 GETNGBL R6 K7 + 0x8C180D0B, // 0018 GETMET R6 R6 K11 + 0x60200018, // 0019 GETGBL R8 G24 + 0x5824000C, // 001A LDCONST R9 K12 + 0x58280008, // 001B LDCONST R10 K8 + 0x5C2C0A00, // 001C MOVE R11 R5 + 0x7C200600, // 001D CALL R8 3 + 0x5824000D, // 001E LDCONST R9 K13 + 0x7C180600, // 001F CALL R6 3 + 0x8C18050E, // 0020 GETMET R6 R2 K14 + 0x5820000F, // 0021 LDCONST R8 K15 + 0x58240010, // 0022 LDCONST R9 K16 + 0x5C280A00, // 0023 MOVE R10 R5 + 0x882C0111, // 0024 GETMBR R11 R0 K17 + 0x7C180A00, // 0025 CALL R6 5 + 0xB81A0E00, // 0026 GETNGBL R6 K7 + 0x8C180D12, // 0027 GETMET R6 R6 K18 + 0x7C180200, // 0028 CALL R6 1 + 0x8C180D09, // 0029 GETMET R6 R6 K9 + 0x5820000A, // 002A LDCONST R8 K10 + 0x7C180400, // 002B CALL R6 2 + 0x781A000E, // 002C JMPF R6 #003C + 0xB81A0E00, // 002D GETNGBL R6 K7 + 0x8C180D0B, // 002E GETMET R6 R6 K11 + 0x60200018, // 002F GETGBL R8 G24 + 0x5824000C, // 0030 LDCONST R9 K12 + 0x58280012, // 0031 LDCONST R10 K18 + 0x5C2C0A00, // 0032 MOVE R11 R5 + 0x7C200600, // 0033 CALL R8 3 + 0x5824000D, // 0034 LDCONST R9 K13 + 0x7C180600, // 0035 CALL R6 3 + 0x8C18050E, // 0036 GETMET R6 R2 K14 + 0x5820000F, // 0037 LDCONST R8 K15 + 0x58240010, // 0038 LDCONST R9 K16 + 0x5C280A00, // 0039 MOVE R10 R5 + 0x882C0113, // 003A GETMBR R11 R0 K19 + 0x7C180A00, // 003B CALL R6 5 + 0xA8040001, // 003C EXBLK 1 1 + 0x70020010, // 003D JMP #004F + 0xAC0C0002, // 003E CATCH R3 0 2 + 0x7002000D, // 003F JMP #004E + 0xB8160E00, // 0040 GETNGBL R5 K7 + 0x8C140B0B, // 0041 GETMET R5 R5 K11 + 0x601C0008, // 0042 GETGBL R7 G8 + 0x5C200600, // 0043 MOVE R8 R3 + 0x7C1C0200, // 0044 CALL R7 1 + 0x001E2807, // 0045 ADD R7 K20 R7 + 0x001C0F15, // 0046 ADD R7 R7 K21 + 0x60200008, // 0047 GETGBL R8 G8 + 0x5C240800, // 0048 MOVE R9 R4 + 0x7C200200, // 0049 CALL R8 1 + 0x001C0E08, // 004A ADD R7 R7 R8 + 0x58200016, // 004B LDCONST R8 K22 + 0x7C140600, // 004C CALL R5 3 + 0x70020000, // 004D JMP #004F + 0xB0080000, // 004E RAISE 2 R0 R0 + 0x80000000, // 004F RET 0 }) ) ); @@ -882,12 +678,12 @@ be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */ /******************************************************************** -** Solidified function: msg_received +** Solidified function: get_plugin_remote_info ********************************************************************/ -be_local_closure(Matter_Device_msg_received, /* name */ +be_local_closure(Matter_Device_get_plugin_remote_info, /* name */ be_nested_proto( - 9, /* nstack */ - 4, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -895,19 +691,19 @@ be_local_closure(Matter_Device_msg_received, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(message_handler), - /* K1 */ be_nested_str_weak(msg_received), + /* K0 */ be_nested_str_weak(plugins_config_remotes), + /* K1 */ be_nested_str_weak(find), }), - be_str_weak(msg_received), + be_str_weak(get_plugin_remote_info), &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x5C180200, // 0002 MOVE R6 R1 - 0x5C1C0400, // 0003 MOVE R7 R2 - 0x5C200600, // 0004 MOVE R8 R3 - 0x7C100800, // 0005 CALL R4 4 - 0x80040800, // 0006 RET 1 R4 + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x60140013, // 0003 GETGBL R5 G19 + 0x7C140000, // 0004 CALL R5 0 + 0x7C080600, // 0005 CALL R2 3 + 0x80040400, // 0006 RET 1 R2 }) ) ); @@ -915,279 +711,257 @@ be_local_closure(Matter_Device_msg_received, /* name */ /******************************************************************** -** Solidified function: _instantiate_plugins_from_config +** Solidified function: autoconf_device_map ********************************************************************/ -be_local_closure(Matter_Device__instantiate_plugins_from_config, /* name */ +be_local_closure(Matter_Device_autoconf_device_map, /* name */ be_nested_proto( - 18, /* nstack */ - 2, /* argc */ + 20, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[30]) { /* constants */ - /* K0 */ be_nested_str_weak(k2l_num), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20Configuring_X20endpoints), - /* K4 */ be_const_int(2), - /* K5 */ be_nested_str_weak(plugins), - /* K6 */ be_nested_str_weak(push), - /* K7 */ be_nested_str_weak(matter), - /* K8 */ be_nested_str_weak(Plugin_Root), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(MTR_X3A_X20_X20_X20endpoint_X20_X3D_X20_X255i_X20type_X3A_X25s_X25s), - /* K11 */ be_nested_str_weak(root), - /* K12 */ be_nested_str_weak(), - /* K13 */ be_nested_str_weak(Plugin_Aggregator), - /* K14 */ be_nested_str_weak(find), - /* K15 */ be_nested_str_weak(type), - /* K16 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping), - /* K17 */ be_const_int(3), - /* K18 */ be_nested_str_weak(MTR_X3A_X20only_X20one_X20root_X20node_X20allowed), - /* K19 */ be_nested_str_weak(plugins_classes), - /* K20 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), - /* K21 */ be_nested_str_weak(_X27_X20skipping), - /* K22 */ be_nested_str_weak(conf_to_log), - /* K23 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K24 */ be_nested_str_weak(_X7C), - /* K25 */ be_nested_str_weak(stop_iteration), - /* K26 */ be_nested_str_weak(aggregator), - /* K27 */ be_nested_str_weak(publish_result), - /* K28 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D), - /* K29 */ be_nested_str_weak(Matter), + ( &(const bvalue[36]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_const_int(1), + /* K2 */ be_nested_str_weak(light), + /* K3 */ be_nested_str_weak(get), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(channels), + /* K6 */ be_nested_str_weak(), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(type), + /* K9 */ be_nested_str_weak(light1), + /* K10 */ be_const_int(2), + /* K11 */ be_nested_str_weak(light2), + /* K12 */ be_nested_str_weak(light3), + /* K13 */ be_nested_str_weak(tasmota), + /* K14 */ be_nested_str_weak(cmd), + /* K15 */ be_nested_str_weak(Status_X2013), + /* K16 */ be_nested_str_weak(log), + /* K17 */ be_nested_str_weak(MTR_X3A_X20Status_X2013_X20_X3D_X20), + /* K18 */ be_const_int(3), + /* K19 */ be_nested_str_weak(contains), + /* K20 */ be_nested_str_weak(StatusSHT), + /* K21 */ be_nested_str_weak(SHT), + /* K22 */ be_nested_str_weak(MTR_X3A_X20_X27_X25s_X27_X20_X3D_X20_X25s), + /* K23 */ be_nested_str_weak(Relay1), + /* K24 */ be_nested_str_weak(Relay2), + /* K25 */ be_nested_str_weak(push), + /* K26 */ be_nested_str_weak(MTR_X3A_X20relay1_X3D_X25s_X20relay2_X3D_X25s), + /* K27 */ be_nested_str_weak(TiltConfig), + /* K28 */ be_nested_str_weak(shutter_X2Btilt), + /* K29 */ be_nested_str_weak(shutter), + /* K30 */ be_nested_str_weak(get_power), + /* K31 */ be_nested_str_weak(relay), + /* K32 */ be_nested_str_weak(load), + /* K33 */ be_nested_str_weak(read_sensors), + /* K34 */ be_nested_str_weak(autoconf_sensors_list), + /* K35 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(_instantiate_plugins_from_config), + be_str_weak(autoconf_device_map), &be_const_str_solidified, - ( &(const binstruction[152]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 - 0xB80E0200, // 0003 GETNGBL R3 K1 - 0x8C0C0702, // 0004 GETMET R3 R3 K2 - 0x58140003, // 0005 LDCONST R5 K3 - 0x58180004, // 0006 LDCONST R6 K4 - 0x7C0C0600, // 0007 CALL R3 3 - 0x880C0105, // 0008 GETMBR R3 R0 K5 - 0x8C0C0706, // 0009 GETMET R3 R3 K6 - 0xB8160E00, // 000A GETNGBL R5 K7 - 0x8C140B08, // 000B GETMET R5 R5 K8 - 0x5C1C0000, // 000C MOVE R7 R0 - 0x58200009, // 000D LDCONST R8 K9 - 0x60240013, // 000E GETGBL R9 G19 - 0x7C240000, // 000F CALL R9 0 - 0x7C140800, // 0010 CALL R5 4 - 0x7C0C0400, // 0011 CALL R3 2 - 0xB80E0200, // 0012 GETNGBL R3 K1 - 0x8C0C0702, // 0013 GETMET R3 R3 K2 - 0x60140018, // 0014 GETGBL R5 G24 - 0x5818000A, // 0015 LDCONST R6 K10 - 0x581C0009, // 0016 LDCONST R7 K9 - 0x5820000B, // 0017 LDCONST R8 K11 - 0x5824000C, // 0018 LDCONST R9 K12 - 0x7C140800, // 0019 CALL R5 4 - 0x58180004, // 001A LDCONST R6 K4 - 0x7C0C0600, // 001B CALL R3 3 - 0x880C0105, // 001C GETMBR R3 R0 K5 - 0x8C0C0706, // 001D GETMET R3 R3 K6 - 0xB8160E00, // 001E GETNGBL R5 K7 - 0x8C140B0D, // 001F GETMET R5 R5 K13 - 0x5C1C0000, // 0020 MOVE R7 R0 - 0x5422FEFF, // 0021 LDINT R8 65280 + ( &(const binstruction[198]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x60080013, // 0001 GETGBL R2 G19 + 0x7C080000, // 0002 CALL R2 0 + 0x580C0001, // 0003 LDCONST R3 K1 + 0x50100000, // 0004 LDBOOL R4 0 0 + 0xA4160400, // 0005 IMPORT R5 K2 + 0x8C180B03, // 0006 GETMET R6 R5 K3 + 0x7C180200, // 0007 CALL R6 1 + 0x4C1C0000, // 0008 LDNIL R7 + 0x201C0C07, // 0009 NE R7 R6 R7 + 0x781E0024, // 000A JMPF R7 #0030 + 0x601C000C, // 000B GETGBL R7 G12 + 0x8C200D04, // 000C GETMET R8 R6 K4 + 0x58280005, // 000D LDCONST R10 K5 + 0x582C0006, // 000E LDCONST R11 K6 + 0x7C200600, // 000F CALL R8 3 + 0x7C1C0200, // 0010 CALL R7 1 + 0x24200F07, // 0011 GT R8 R7 K7 + 0x7822001C, // 0012 JMPF R8 #0030 + 0x1C200F01, // 0013 EQ R8 R7 K1 + 0x78220007, // 0014 JMPF R8 #001D + 0x60200008, // 0015 GETGBL R8 G8 + 0x5C240600, // 0016 MOVE R9 R3 + 0x7C200200, // 0017 CALL R8 1 + 0x60240013, // 0018 GETGBL R9 G19 + 0x7C240000, // 0019 CALL R9 0 + 0x98261109, // 001A SETIDX R9 K8 K9 + 0x98081009, // 001B SETIDX R2 R8 R9 + 0x70020010, // 001C JMP #002E + 0x1C200F0A, // 001D EQ R8 R7 K10 + 0x78220007, // 001E JMPF R8 #0027 + 0x60200008, // 001F GETGBL R8 G8 + 0x5C240600, // 0020 MOVE R9 R3 + 0x7C200200, // 0021 CALL R8 1 0x60240013, // 0022 GETGBL R9 G19 0x7C240000, // 0023 CALL R9 0 - 0x7C140800, // 0024 CALL R5 4 - 0x7C0C0400, // 0025 CALL R3 2 - 0x600C0010, // 0026 GETGBL R3 G16 - 0x5C100400, // 0027 MOVE R4 R2 - 0x7C0C0200, // 0028 CALL R3 1 - 0xA802005A, // 0029 EXBLK 0 #0085 - 0x5C100600, // 002A MOVE R4 R3 - 0x7C100000, // 002B CALL R4 0 - 0x1C140909, // 002C EQ R5 R4 K9 - 0x78160000, // 002D JMPF R5 #002F - 0x7001FFFA, // 002E JMP #002A - 0xA8020042, // 002F EXBLK 0 #0073 - 0x60140008, // 0030 GETGBL R5 G8 - 0x5C180800, // 0031 MOVE R6 R4 - 0x7C140200, // 0032 CALL R5 1 - 0x94140205, // 0033 GETIDX R5 R1 R5 - 0x8C180B0E, // 0034 GETMET R6 R5 K14 - 0x5820000F, // 0035 LDCONST R8 K15 - 0x7C180400, // 0036 CALL R6 2 - 0x4C1C0000, // 0037 LDNIL R7 - 0x1C1C0C07, // 0038 EQ R7 R6 R7 - 0x781E0006, // 0039 JMPF R7 #0041 - 0xB81E0200, // 003A GETNGBL R7 K1 - 0x8C1C0F02, // 003B GETMET R7 R7 K2 - 0x58240010, // 003C LDCONST R9 K16 - 0x58280011, // 003D LDCONST R10 K17 - 0x7C1C0600, // 003E CALL R7 3 - 0xA8040001, // 003F EXBLK 1 1 - 0x7001FFE8, // 0040 JMP #002A - 0x1C1C0D0B, // 0041 EQ R7 R6 K11 - 0x781E0006, // 0042 JMPF R7 #004A - 0xB81E0200, // 0043 GETNGBL R7 K1 - 0x8C1C0F02, // 0044 GETMET R7 R7 K2 - 0x58240012, // 0045 LDCONST R9 K18 - 0x58280011, // 0046 LDCONST R10 K17 - 0x7C1C0600, // 0047 CALL R7 3 - 0xA8040001, // 0048 EXBLK 1 1 - 0x7001FFDF, // 0049 JMP #002A - 0x881C0113, // 004A GETMBR R7 R0 K19 - 0x8C1C0F0E, // 004B GETMET R7 R7 K14 - 0x5C240C00, // 004C MOVE R9 R6 - 0x7C1C0400, // 004D CALL R7 2 - 0x4C200000, // 004E LDNIL R8 - 0x1C200E08, // 004F EQ R8 R7 R8 - 0x7822000A, // 0050 JMPF R8 #005C - 0xB8220200, // 0051 GETNGBL R8 K1 - 0x8C201102, // 0052 GETMET R8 R8 K2 - 0x60280008, // 0053 GETGBL R10 G8 - 0x5C2C0C00, // 0054 MOVE R11 R6 - 0x7C280200, // 0055 CALL R10 1 - 0x002A280A, // 0056 ADD R10 K20 R10 - 0x00281515, // 0057 ADD R10 R10 K21 - 0x582C0004, // 0058 LDCONST R11 K4 - 0x7C200600, // 0059 CALL R8 3 - 0xA8040001, // 005A EXBLK 1 1 - 0x7001FFCD, // 005B JMP #002A - 0x5C200E00, // 005C MOVE R8 R7 - 0x5C240000, // 005D MOVE R9 R0 - 0x5C280800, // 005E MOVE R10 R4 - 0x5C2C0A00, // 005F MOVE R11 R5 - 0x7C200600, // 0060 CALL R8 3 - 0x88240105, // 0061 GETMBR R9 R0 K5 - 0x8C241306, // 0062 GETMET R9 R9 K6 - 0x5C2C1000, // 0063 MOVE R11 R8 - 0x7C240400, // 0064 CALL R9 2 - 0xB8260200, // 0065 GETNGBL R9 K1 - 0x8C241302, // 0066 GETMET R9 R9 K2 - 0x602C0018, // 0067 GETGBL R11 G24 - 0x5830000A, // 0068 LDCONST R12 K10 - 0x5C340800, // 0069 MOVE R13 R4 - 0x5C380C00, // 006A MOVE R14 R6 - 0x8C3C0116, // 006B GETMET R15 R0 K22 - 0x5C440A00, // 006C MOVE R17 R5 - 0x7C3C0400, // 006D CALL R15 2 - 0x7C2C0800, // 006E CALL R11 4 - 0x58300004, // 006F LDCONST R12 K4 - 0x7C240600, // 0070 CALL R9 3 - 0xA8040001, // 0071 EXBLK 1 1 - 0x70020010, // 0072 JMP #0084 - 0xAC140002, // 0073 CATCH R5 0 2 - 0x7002000D, // 0074 JMP #0083 - 0xB81E0200, // 0075 GETNGBL R7 K1 - 0x8C1C0F02, // 0076 GETMET R7 R7 K2 - 0x60240008, // 0077 GETGBL R9 G8 - 0x5C280A00, // 0078 MOVE R10 R5 - 0x7C240200, // 0079 CALL R9 1 - 0x00262E09, // 007A ADD R9 K23 R9 - 0x00241318, // 007B ADD R9 R9 K24 - 0x60280008, // 007C GETGBL R10 G8 - 0x5C2C0C00, // 007D MOVE R11 R6 - 0x7C280200, // 007E CALL R10 1 - 0x0024120A, // 007F ADD R9 R9 R10 - 0x58280004, // 0080 LDCONST R10 K4 - 0x7C1C0600, // 0081 CALL R7 3 - 0x70020000, // 0082 JMP #0084 - 0xB0080000, // 0083 RAISE 2 R0 R0 - 0x7001FFA4, // 0084 JMP #002A - 0x580C0019, // 0085 LDCONST R3 K25 - 0xAC0C0200, // 0086 CATCH R3 1 0 - 0xB0080000, // 0087 RAISE 2 R0 R0 - 0xB80E0200, // 0088 GETNGBL R3 K1 - 0x8C0C0702, // 0089 GETMET R3 R3 K2 - 0x60140018, // 008A GETGBL R5 G24 - 0x5818000A, // 008B LDCONST R6 K10 - 0x541EFEFF, // 008C LDINT R7 65280 - 0x5820001A, // 008D LDCONST R8 K26 - 0x5824000C, // 008E LDCONST R9 K12 - 0x7C140800, // 008F CALL R5 4 - 0x58180004, // 0090 LDCONST R6 K4 - 0x7C0C0600, // 0091 CALL R3 3 - 0xB80E0200, // 0092 GETNGBL R3 K1 - 0x8C0C071B, // 0093 GETMET R3 R3 K27 - 0x5814001C, // 0094 LDCONST R5 K28 - 0x5818001D, // 0095 LDCONST R6 K29 - 0x7C0C0600, // 0096 CALL R3 3 - 0x80000000, // 0097 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _compute_pbkdf -********************************************************************/ -be_local_closure(Matter_Device__compute_pbkdf, /* name */ - be_nested_proto( - 13, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(add), - /* K2 */ be_nested_str_weak(PBKDF2_HMAC_SHA256), - /* K3 */ be_nested_str_weak(derive), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(root_w0), - /* K6 */ be_nested_str_weak(EC_P256), - /* K7 */ be_nested_str_weak(mod), - /* K8 */ be_nested_str_weak(root_L), - /* K9 */ be_nested_str_weak(public_key), - }), - be_str_weak(_compute_pbkdf), - &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0x60140015, // 0001 GETGBL R5 G21 - 0x7C140000, // 0002 CALL R5 0 - 0x8C140B01, // 0003 GETMET R5 R5 K1 - 0x5C1C0200, // 0004 MOVE R7 R1 - 0x54220003, // 0005 LDINT R8 4 - 0x7C140600, // 0006 CALL R5 3 - 0x8C180902, // 0007 GETMET R6 R4 K2 - 0x7C180200, // 0008 CALL R6 1 - 0x8C180D03, // 0009 GETMET R6 R6 K3 - 0x5C200A00, // 000A MOVE R8 R5 - 0x5C240600, // 000B MOVE R9 R3 - 0x5C280400, // 000C MOVE R10 R2 - 0x542E004F, // 000D LDINT R11 80 - 0x7C180A00, // 000E CALL R6 5 - 0x541E0026, // 000F LDINT R7 39 - 0x401E0807, // 0010 CONNECT R7 K4 R7 - 0x941C0C07, // 0011 GETIDX R7 R6 R7 - 0x54220027, // 0012 LDINT R8 40 - 0x5426004E, // 0013 LDINT R9 79 - 0x40201009, // 0014 CONNECT R8 R8 R9 - 0x94200C08, // 0015 GETIDX R8 R6 R8 - 0x8C240906, // 0016 GETMET R9 R4 K6 - 0x7C240200, // 0017 CALL R9 1 - 0x8C241307, // 0018 GETMET R9 R9 K7 - 0x5C2C0E00, // 0019 MOVE R11 R7 - 0x7C240400, // 001A CALL R9 2 - 0x90020A09, // 001B SETMBR R0 K5 R9 - 0x8C240906, // 001C GETMET R9 R4 K6 - 0x7C240200, // 001D CALL R9 1 - 0x8C241307, // 001E GETMET R9 R9 K7 - 0x5C2C1000, // 001F MOVE R11 R8 - 0x7C240400, // 0020 CALL R9 2 - 0x8C280906, // 0021 GETMET R10 R4 K6 - 0x7C280200, // 0022 CALL R10 1 - 0x8C281509, // 0023 GETMET R10 R10 K9 - 0x5C301200, // 0024 MOVE R12 R9 - 0x7C280400, // 0025 CALL R10 2 - 0x9002100A, // 0026 SETMBR R0 K8 R10 - 0x80000000, // 0027 RET 0 + 0x9826110B, // 0024 SETIDX R9 K8 K11 + 0x98081009, // 0025 SETIDX R2 R8 R9 + 0x70020006, // 0026 JMP #002E + 0x60200008, // 0027 GETGBL R8 G8 + 0x5C240600, // 0028 MOVE R9 R3 + 0x7C200200, // 0029 CALL R8 1 + 0x60240013, // 002A GETGBL R9 G19 + 0x7C240000, // 002B CALL R9 0 + 0x9826110C, // 002C SETIDX R9 K8 K12 + 0x98081009, // 002D SETIDX R2 R8 R9 + 0x50100200, // 002E LDBOOL R4 1 0 + 0x000C0701, // 002F ADD R3 R3 K1 + 0xB81E1A00, // 0030 GETNGBL R7 K13 + 0x8C1C0F0E, // 0031 GETMET R7 R7 K14 + 0x5824000F, // 0032 LDCONST R9 K15 + 0x50280200, // 0033 LDBOOL R10 1 0 + 0x7C1C0600, // 0034 CALL R7 3 + 0x60200012, // 0035 GETGBL R8 G18 + 0x7C200000, // 0036 CALL R8 0 + 0xB8261A00, // 0037 GETNGBL R9 K13 + 0x8C241310, // 0038 GETMET R9 R9 K16 + 0x602C0008, // 0039 GETGBL R11 G8 + 0x5C300E00, // 003A MOVE R12 R7 + 0x7C2C0200, // 003B CALL R11 1 + 0x002E220B, // 003C ADD R11 K17 R11 + 0x58300012, // 003D LDCONST R12 K18 + 0x7C240600, // 003E CALL R9 3 + 0x4C240000, // 003F LDNIL R9 + 0x20240E09, // 0040 NE R9 R7 R9 + 0x7826004F, // 0041 JMPF R9 #0092 + 0x8C240F13, // 0042 GETMET R9 R7 K19 + 0x582C0014, // 0043 LDCONST R11 K20 + 0x7C240400, // 0044 CALL R9 2 + 0x7826004B, // 0045 JMPF R9 #0092 + 0x941C0F14, // 0046 GETIDX R7 R7 K20 + 0x58240007, // 0047 LDCONST R9 K7 + 0x50280200, // 0048 LDBOOL R10 1 0 + 0x782A0047, // 0049 JMPF R10 #0092 + 0x60280008, // 004A GETGBL R10 G8 + 0x5C2C1200, // 004B MOVE R11 R9 + 0x7C280200, // 004C CALL R10 1 + 0x002A2A0A, // 004D ADD R10 K21 R10 + 0x8C2C0F13, // 004E GETMET R11 R7 K19 + 0x5C341400, // 004F MOVE R13 R10 + 0x7C2C0400, // 0050 CALL R11 2 + 0x742E0000, // 0051 JMPT R11 #0053 + 0x7002003E, // 0052 JMP #0092 + 0x942C0E0A, // 0053 GETIDX R11 R7 R10 + 0xB8321A00, // 0054 GETNGBL R12 K13 + 0x8C301910, // 0055 GETMET R12 R12 K16 + 0x60380018, // 0056 GETGBL R14 G24 + 0x583C0016, // 0057 LDCONST R15 K22 + 0x5C401400, // 0058 MOVE R16 R10 + 0x60440008, // 0059 GETGBL R17 G8 + 0x5C481600, // 005A MOVE R18 R11 + 0x7C440200, // 005B CALL R17 1 + 0x7C380600, // 005C CALL R14 3 + 0x583C0012, // 005D LDCONST R15 K18 + 0x7C300600, // 005E CALL R12 3 + 0x8C301704, // 005F GETMET R12 R11 K4 + 0x58380017, // 0060 LDCONST R14 K23 + 0x543DFFFE, // 0061 LDINT R15 -1 + 0x7C300600, // 0062 CALL R12 3 + 0x8C341704, // 0063 GETMET R13 R11 K4 + 0x583C0018, // 0064 LDCONST R15 K24 + 0x5441FFFE, // 0065 LDINT R16 -1 + 0x7C340600, // 0066 CALL R13 3 + 0x24381907, // 0067 GT R14 R12 K7 + 0x783A0002, // 0068 JMPF R14 #006C + 0x8C381119, // 0069 GETMET R14 R8 K25 + 0x04401901, // 006A SUB R16 R12 K1 + 0x7C380400, // 006B CALL R14 2 + 0x24381B07, // 006C GT R14 R13 K7 + 0x783A0002, // 006D JMPF R14 #0071 + 0x8C381119, // 006E GETMET R14 R8 K25 + 0x04401B01, // 006F SUB R16 R13 K1 + 0x7C380400, // 0070 CALL R14 2 + 0xB83A1A00, // 0071 GETNGBL R14 K13 + 0x8C381D10, // 0072 GETMET R14 R14 K16 + 0x60400018, // 0073 GETGBL R16 G24 + 0x5844001A, // 0074 LDCONST R17 K26 + 0x5C481800, // 0075 MOVE R18 R12 + 0x5C4C1A00, // 0076 MOVE R19 R13 + 0x7C400600, // 0077 CALL R16 3 + 0x58440012, // 0078 LDCONST R17 K18 + 0x7C380600, // 0079 CALL R14 3 + 0x8C381704, // 007A GETMET R14 R11 K4 + 0x5840001B, // 007B LDCONST R16 K27 + 0x7C380400, // 007C CALL R14 2 + 0x783A0002, // 007D JMPF R14 #0081 + 0x943C1D0A, // 007E GETIDX R15 R14 K10 + 0x243C1F07, // 007F GT R15 R15 K7 + 0x743E0000, // 0080 JMPT R15 #0082 + 0x503C0001, // 0081 LDBOOL R15 0 1 + 0x503C0200, // 0082 LDBOOL R15 1 0 + 0x60400008, // 0083 GETGBL R16 G8 + 0x5C440600, // 0084 MOVE R17 R3 + 0x7C400200, // 0085 CALL R16 1 + 0x60440013, // 0086 GETGBL R17 G19 + 0x7C440000, // 0087 CALL R17 0 + 0x783E0001, // 0088 JMPF R15 #008B + 0x5848001C, // 0089 LDCONST R18 K28 + 0x70020000, // 008A JMP #008C + 0x5848001D, // 008B LDCONST R18 K29 + 0x98461012, // 008C SETIDX R17 K8 R18 + 0x98463A09, // 008D SETIDX R17 K29 R9 + 0x98082011, // 008E SETIDX R2 R16 R17 + 0x000C0701, // 008F ADD R3 R3 K1 + 0x00241301, // 0090 ADD R9 R9 K1 + 0x7001FFB5, // 0091 JMP #0048 + 0x6024000C, // 0092 GETGBL R9 G12 + 0xB82A1A00, // 0093 GETNGBL R10 K13 + 0x8C28151E, // 0094 GETMET R10 R10 K30 + 0x7C280200, // 0095 CALL R10 1 + 0x7C240200, // 0096 CALL R9 1 + 0x58280007, // 0097 LDCONST R10 K7 + 0x78120000, // 0098 JMPF R4 #009A + 0x04241301, // 0099 SUB R9 R9 K1 + 0x142C1409, // 009A LT R11 R10 R9 + 0x782E0011, // 009B JMPF R11 #00AE + 0x8C2C1104, // 009C GETMET R11 R8 K4 + 0x5C341400, // 009D MOVE R13 R10 + 0x7C2C0400, // 009E CALL R11 2 + 0x4C300000, // 009F LDNIL R12 + 0x1C2C160C, // 00A0 EQ R11 R11 R12 + 0x782E0009, // 00A1 JMPF R11 #00AC + 0x602C0008, // 00A2 GETGBL R11 G8 + 0x5C300600, // 00A3 MOVE R12 R3 + 0x7C2C0200, // 00A4 CALL R11 1 + 0x60300013, // 00A5 GETGBL R12 G19 + 0x7C300000, // 00A6 CALL R12 0 + 0x9832111F, // 00A7 SETIDX R12 K8 K31 + 0x00341501, // 00A8 ADD R13 R10 K1 + 0x98323E0D, // 00A9 SETIDX R12 K31 R13 + 0x9808160C, // 00AA SETIDX R2 R11 R12 + 0x000C0701, // 00AB ADD R3 R3 K1 + 0x00281501, // 00AC ADD R10 R10 K1 + 0x7001FFEB, // 00AD JMP #009A + 0x8C2C0320, // 00AE GETMET R11 R1 K32 + 0xB8361A00, // 00AF GETNGBL R13 K13 + 0x8C341B21, // 00B0 GETMET R13 R13 K33 + 0x7C340200, // 00B1 CALL R13 1 + 0x7C2C0400, // 00B2 CALL R11 2 + 0x8C300122, // 00B3 GETMET R12 R0 K34 + 0x5C381600, // 00B4 MOVE R14 R11 + 0x7C300400, // 00B5 CALL R12 2 + 0x60340010, // 00B6 GETGBL R13 G16 + 0x5C381800, // 00B7 MOVE R14 R12 + 0x7C340200, // 00B8 CALL R13 1 + 0xA8020007, // 00B9 EXBLK 0 #00C2 + 0x5C381A00, // 00BA MOVE R14 R13 + 0x7C380000, // 00BB CALL R14 0 + 0x603C0008, // 00BC GETGBL R15 G8 + 0x5C400600, // 00BD MOVE R16 R3 + 0x7C3C0200, // 00BE CALL R15 1 + 0x98081E0E, // 00BF SETIDX R2 R15 R14 + 0x000C0701, // 00C0 ADD R3 R3 K1 + 0x7001FFF7, // 00C1 JMP #00BA + 0x58340023, // 00C2 LDCONST R13 K35 + 0xAC340200, // 00C3 CATCH R13 1 0 + 0xB0080000, // 00C4 RAISE 2 R0 R0 + 0x80040400, // 00C5 RET 1 R2 }) ) ); @@ -1195,11 +969,11 @@ be_local_closure(Matter_Device__compute_pbkdf, /* name */ /******************************************************************** -** Solidified function: compute_qrcode_content +** Solidified function: clean_remotes ********************************************************************/ -be_local_closure(Matter_Device_compute_qrcode_content, /* name */ +be_local_closure(Matter_Device_clean_remotes, /* name */ be_nested_proto( - 8, /* nstack */ + 10, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1207,63 +981,110 @@ be_local_closure(Matter_Device_compute_qrcode_content, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(resize), - /* K1 */ be_nested_str_weak(setbits), - /* K2 */ be_const_int(3), - /* K3 */ be_nested_str_weak(vendorid), - /* K4 */ be_nested_str_weak(productid), - /* K5 */ be_nested_str_weak(root_discriminator), - /* K6 */ be_nested_str_weak(root_passcode), - /* K7 */ be_const_int(134217727), - /* K8 */ be_nested_str_weak(MT_X3A), - /* K9 */ be_nested_str_weak(matter), - /* K10 */ be_nested_str_weak(Base38), - /* K11 */ be_nested_str_weak(encode), - }), - be_str_weak(compute_qrcode_content), - &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0x60040015, // 0000 GETGBL R1 G21 - 0x7C040000, // 0001 CALL R1 0 - 0x8C040300, // 0002 GETMET R1 R1 K0 - 0x540E000A, // 0003 LDINT R3 11 - 0x7C040400, // 0004 CALL R1 2 - 0x8C080301, // 0005 GETMET R2 R1 K1 - 0x58100002, // 0006 LDCONST R4 K2 - 0x5416000F, // 0007 LDINT R5 16 - 0x88180103, // 0008 GETMBR R6 R0 K3 - 0x7C080800, // 0009 CALL R2 4 - 0x8C080301, // 000A GETMET R2 R1 K1 - 0x54120012, // 000B LDINT R4 19 - 0x5416000F, // 000C LDINT R5 16 - 0x88180104, // 000D GETMBR R6 R0 K4 - 0x7C080800, // 000E CALL R2 4 - 0x8C080301, // 000F GETMET R2 R1 K1 - 0x54120024, // 0010 LDINT R4 37 - 0x54160007, // 0011 LDINT R5 8 - 0x541A0003, // 0012 LDINT R6 4 - 0x7C080800, // 0013 CALL R2 4 - 0x8C080301, // 0014 GETMET R2 R1 K1 - 0x5412002C, // 0015 LDINT R4 45 - 0x5416000B, // 0016 LDINT R5 12 - 0x88180105, // 0017 GETMBR R6 R0 K5 - 0x541E0FFE, // 0018 LDINT R7 4095 - 0x2C180C07, // 0019 AND R6 R6 R7 - 0x7C080800, // 001A CALL R2 4 - 0x8C080301, // 001B GETMET R2 R1 K1 - 0x54120038, // 001C LDINT R4 57 - 0x5416001A, // 001D LDINT R5 27 - 0x88180106, // 001E GETMBR R6 R0 K6 - 0x2C180D07, // 001F AND R6 R6 K7 - 0x7C080800, // 0020 CALL R2 4 - 0xB80A1200, // 0021 GETNGBL R2 K9 - 0x8808050A, // 0022 GETMBR R2 R2 K10 - 0x8C08050B, // 0023 GETMET R2 R2 K11 - 0x5C100200, // 0024 MOVE R4 R1 - 0x7C080400, // 0025 CALL R2 2 - 0x000A1002, // 0026 ADD R2 K8 R2 - 0x80040400, // 0027 RET 1 R2 + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(introspect), + /* K1 */ be_nested_str_weak(http_remotes), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(stop_iteration), + /* K4 */ be_nested_str_weak(plugins), + /* K5 */ be_nested_str_weak(get), + /* K6 */ be_nested_str_weak(http_remote), + /* K7 */ be_nested_str_weak(find), + /* K8 */ be_const_int(1), + /* K9 */ be_nested_str_weak(keys), + /* K10 */ be_nested_str_weak(push), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(MTR_X3A_X20remove_X20unused_X20remote_X3A_X20), + /* K14 */ be_nested_str_weak(addr), + /* K15 */ be_const_int(3), + /* K16 */ be_nested_str_weak(close), + /* K17 */ be_nested_str_weak(remove), + }), + be_str_weak(clean_remotes), + &be_const_str_solidified, + ( &(const binstruction[81]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x780A004C, // 0002 JMPF R2 #0050 + 0x60080013, // 0003 GETGBL R2 G19 + 0x7C080000, // 0004 CALL R2 0 + 0x600C0010, // 0005 GETGBL R3 G16 + 0x88100101, // 0006 GETMBR R4 R0 K1 + 0x7C0C0200, // 0007 CALL R3 1 + 0xA8020003, // 0008 EXBLK 0 #000D + 0x5C100600, // 0009 MOVE R4 R3 + 0x7C100000, // 000A CALL R4 0 + 0x98080902, // 000B SETIDX R2 R4 K2 + 0x7001FFFB, // 000C JMP #0009 + 0x580C0003, // 000D LDCONST R3 K3 + 0xAC0C0200, // 000E CATCH R3 1 0 + 0xB0080000, // 000F RAISE 2 R0 R0 + 0x600C0010, // 0010 GETGBL R3 G16 + 0x88100104, // 0011 GETMBR R4 R0 K4 + 0x7C0C0200, // 0012 CALL R3 1 + 0xA802000F, // 0013 EXBLK 0 #0024 + 0x5C100600, // 0014 MOVE R4 R3 + 0x7C100000, // 0015 CALL R4 0 + 0x8C140305, // 0016 GETMET R5 R1 K5 + 0x5C1C0800, // 0017 MOVE R7 R4 + 0x58200006, // 0018 LDCONST R8 K6 + 0x7C140600, // 0019 CALL R5 3 + 0x4C180000, // 001A LDNIL R6 + 0x20180A06, // 001B NE R6 R5 R6 + 0x781A0005, // 001C JMPF R6 #0023 + 0x8C180507, // 001D GETMET R6 R2 K7 + 0x5C200A00, // 001E MOVE R8 R5 + 0x58240002, // 001F LDCONST R9 K2 + 0x7C180600, // 0020 CALL R6 3 + 0x00180D08, // 0021 ADD R6 R6 K8 + 0x98080A06, // 0022 SETIDX R2 R5 R6 + 0x7001FFEF, // 0023 JMP #0014 + 0x580C0003, // 0024 LDCONST R3 K3 + 0xAC0C0200, // 0025 CATCH R3 1 0 + 0xB0080000, // 0026 RAISE 2 R0 R0 + 0x600C0012, // 0027 GETGBL R3 G18 + 0x7C0C0000, // 0028 CALL R3 0 + 0x60100010, // 0029 GETGBL R4 G16 + 0x8C140509, // 002A GETMET R5 R2 K9 + 0x7C140200, // 002B CALL R5 1 + 0x7C100200, // 002C CALL R4 1 + 0xA8020008, // 002D EXBLK 0 #0037 + 0x5C140800, // 002E MOVE R5 R4 + 0x7C140000, // 002F CALL R5 0 + 0x94180405, // 0030 GETIDX R6 R2 R5 + 0x1C180D02, // 0031 EQ R6 R6 K2 + 0x781A0002, // 0032 JMPF R6 #0036 + 0x8C18070A, // 0033 GETMET R6 R3 K10 + 0x5C200A00, // 0034 MOVE R8 R5 + 0x7C180400, // 0035 CALL R6 2 + 0x7001FFF6, // 0036 JMP #002E + 0x58100003, // 0037 LDCONST R4 K3 + 0xAC100200, // 0038 CATCH R4 1 0 + 0xB0080000, // 0039 RAISE 2 R0 R0 + 0x60100010, // 003A GETGBL R4 G16 + 0x5C140600, // 003B MOVE R5 R3 + 0x7C100200, // 003C CALL R4 1 + 0xA802000E, // 003D EXBLK 0 #004D + 0x5C140800, // 003E MOVE R5 R4 + 0x7C140000, // 003F CALL R5 0 + 0xB81A1600, // 0040 GETNGBL R6 K11 + 0x8C180D0C, // 0041 GETMET R6 R6 K12 + 0x88200B0E, // 0042 GETMBR R8 R5 K14 + 0x00221A08, // 0043 ADD R8 K13 R8 + 0x5824000F, // 0044 LDCONST R9 K15 + 0x7C180600, // 0045 CALL R6 3 + 0x8C180B10, // 0046 GETMET R6 R5 K16 + 0x7C180200, // 0047 CALL R6 1 + 0x88180101, // 0048 GETMBR R6 R0 K1 + 0x8C180D11, // 0049 GETMET R6 R6 K17 + 0x88200B0E, // 004A GETMBR R8 R5 K14 + 0x7C180400, // 004B CALL R6 2 + 0x7001FFF0, // 004C JMP #003E + 0x58100003, // 004D LDCONST R4 K3 + 0xAC100200, // 004E CATCH R4 1 0 + 0xB0080000, // 004F RAISE 2 R0 R0 + 0x80000000, // 0050 RET 0 }) ) ); @@ -1271,35 +1092,72 @@ be_local_closure(Matter_Device_compute_qrcode_content, /* name */ /******************************************************************** -** Solidified function: _init_basic_commissioning +** Solidified function: remove_fabric ********************************************************************/ -be_local_closure(Matter_Device__init_basic_commissioning, /* name */ +be_local_closure(Matter_Device_remove_fabric, /* name */ be_nested_proto( - 3, /* nstack */ - 1, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(count_active_fabrics), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(start_root_basic_commissioning), + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(log), + /* K2 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(copy), + /* K5 */ be_nested_str_weak(reverse), + /* K6 */ be_nested_str_weak(tohex), + /* K7 */ be_const_int(2), + /* K8 */ be_nested_str_weak(message_handler), + /* K9 */ be_nested_str_weak(im), + /* K10 */ be_nested_str_weak(subs_shop), + /* K11 */ be_nested_str_weak(remove_by_fabric), + /* K12 */ be_nested_str_weak(mdns_remove_op_discovery), + /* K13 */ be_nested_str_weak(sessions), + /* K14 */ be_nested_str_weak(remove_fabric), + /* K15 */ be_nested_str_weak(save_fabrics), }), - be_str_weak(_init_basic_commissioning), + be_str_weak(remove_fabric), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x1C040302, // 0003 EQ R1 R1 K2 - 0x78060001, // 0004 JMPF R1 #0007 - 0x8C040103, // 0005 GETMET R1 R0 K3 - 0x7C040200, // 0006 CALL R1 1 - 0x80000000, // 0007 RET 0 + ( &(const binstruction[33]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0019, // 0002 JMPF R2 #001D + 0xB80A0000, // 0003 GETNGBL R2 K0 + 0x8C080501, // 0004 GETMET R2 R2 K1 + 0x8C100303, // 0005 GETMET R4 R1 K3 + 0x7C100200, // 0006 CALL R4 1 + 0x8C100904, // 0007 GETMET R4 R4 K4 + 0x7C100200, // 0008 CALL R4 1 + 0x8C100905, // 0009 GETMET R4 R4 K5 + 0x7C100200, // 000A CALL R4 1 + 0x8C100906, // 000B GETMET R4 R4 K6 + 0x7C100200, // 000C CALL R4 1 + 0x00120404, // 000D ADD R4 K2 R4 + 0x58140007, // 000E LDCONST R5 K7 + 0x7C080600, // 000F CALL R2 3 + 0x88080108, // 0010 GETMBR R2 R0 K8 + 0x88080509, // 0011 GETMBR R2 R2 K9 + 0x8808050A, // 0012 GETMBR R2 R2 K10 + 0x8C08050B, // 0013 GETMET R2 R2 K11 + 0x5C100200, // 0014 MOVE R4 R1 + 0x7C080400, // 0015 CALL R2 2 + 0x8C08010C, // 0016 GETMET R2 R0 K12 + 0x5C100200, // 0017 MOVE R4 R1 + 0x7C080400, // 0018 CALL R2 2 + 0x8808010D, // 0019 GETMBR R2 R0 K13 + 0x8C08050E, // 001A GETMET R2 R2 K14 + 0x5C100200, // 001B MOVE R4 R1 + 0x7C080400, // 001C CALL R2 2 + 0x8808010D, // 001D GETMBR R2 R0 K13 + 0x8C08050F, // 001E GETMET R2 R2 K15 + 0x7C080200, // 001F CALL R2 1 + 0x80000000, // 0020 RET 0 }) ) ); @@ -1307,11 +1165,11 @@ be_local_closure(Matter_Device__init_basic_commissioning, /* name */ /******************************************************************** -** Solidified function: autoconf_sensors_list +** Solidified function: _mdns_announce_hostname ********************************************************************/ -be_local_closure(Matter_Device_autoconf_sensors_list, /* name */ +be_local_closure(Matter_Device__mdns_announce_hostname, /* name */ be_nested_proto( - 10, /* nstack */ + 14, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1319,353 +1177,186 @@ be_local_closure(Matter_Device_autoconf_sensors_list, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_str_weak(k2l), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(Temperature), - /* K3 */ be_nested_str_weak(_X23Temperature), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_nested_str_weak(type), - /* K6 */ be_nested_str_weak(temperature), - /* K7 */ be_nested_str_weak(filter), - /* K8 */ be_nested_str_weak(stop_iteration), - /* K9 */ be_nested_str_weak(Pressure), - /* K10 */ be_nested_str_weak(_X23Pressure), - /* K11 */ be_nested_str_weak(pressure), - /* K12 */ be_nested_str_weak(Illuminance), - /* K13 */ be_nested_str_weak(_X23Illuminance), - /* K14 */ be_nested_str_weak(illuminance), - /* K15 */ be_nested_str_weak(Humidity), - /* K16 */ be_nested_str_weak(_X23Humidity), - /* K17 */ be_nested_str_weak(humidity), - }), - be_str_weak(autoconf_sensors_list), - &be_const_str_solidified, - ( &(const binstruction[119]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x8C100100, // 0003 GETMET R4 R0 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C100400, // 0005 CALL R4 2 - 0x7C0C0200, // 0006 CALL R3 1 - 0xA8020013, // 0007 EXBLK 0 #001C - 0x5C100600, // 0008 MOVE R4 R3 - 0x7C100000, // 0009 CALL R4 0 - 0x94140204, // 000A GETIDX R5 R1 R4 - 0x6018000F, // 000B GETGBL R6 G15 - 0x5C1C0A00, // 000C MOVE R7 R5 - 0x60200013, // 000D GETGBL R8 G19 - 0x7C180400, // 000E CALL R6 2 - 0x781A000A, // 000F JMPF R6 #001B - 0x8C180B01, // 0010 GETMET R6 R5 K1 - 0x58200002, // 0011 LDCONST R8 K2 - 0x7C180400, // 0012 CALL R6 2 - 0x781A0006, // 0013 JMPF R6 #001B - 0x00180903, // 0014 ADD R6 R4 K3 - 0x8C1C0504, // 0015 GETMET R7 R2 K4 - 0x60240013, // 0016 GETGBL R9 G19 - 0x7C240000, // 0017 CALL R9 0 - 0x98260B06, // 0018 SETIDX R9 K5 K6 - 0x98260E06, // 0019 SETIDX R9 K7 R6 - 0x7C1C0400, // 001A CALL R7 2 - 0x7001FFEB, // 001B JMP #0008 - 0x580C0008, // 001C LDCONST R3 K8 - 0xAC0C0200, // 001D CATCH R3 1 0 - 0xB0080000, // 001E RAISE 2 R0 R0 - 0x600C0010, // 001F GETGBL R3 G16 - 0x8C100100, // 0020 GETMET R4 R0 K0 - 0x5C180200, // 0021 MOVE R6 R1 - 0x7C100400, // 0022 CALL R4 2 - 0x7C0C0200, // 0023 CALL R3 1 - 0xA8020013, // 0024 EXBLK 0 #0039 - 0x5C100600, // 0025 MOVE R4 R3 - 0x7C100000, // 0026 CALL R4 0 - 0x94140204, // 0027 GETIDX R5 R1 R4 - 0x6018000F, // 0028 GETGBL R6 G15 - 0x5C1C0A00, // 0029 MOVE R7 R5 - 0x60200013, // 002A GETGBL R8 G19 - 0x7C180400, // 002B CALL R6 2 - 0x781A000A, // 002C JMPF R6 #0038 - 0x8C180B01, // 002D GETMET R6 R5 K1 - 0x58200009, // 002E LDCONST R8 K9 - 0x7C180400, // 002F CALL R6 2 - 0x781A0006, // 0030 JMPF R6 #0038 - 0x0018090A, // 0031 ADD R6 R4 K10 - 0x8C1C0504, // 0032 GETMET R7 R2 K4 - 0x60240013, // 0033 GETGBL R9 G19 - 0x7C240000, // 0034 CALL R9 0 - 0x98260B0B, // 0035 SETIDX R9 K5 K11 - 0x98260E06, // 0036 SETIDX R9 K7 R6 - 0x7C1C0400, // 0037 CALL R7 2 - 0x7001FFEB, // 0038 JMP #0025 - 0x580C0008, // 0039 LDCONST R3 K8 - 0xAC0C0200, // 003A CATCH R3 1 0 - 0xB0080000, // 003B RAISE 2 R0 R0 - 0x600C0010, // 003C GETGBL R3 G16 - 0x8C100100, // 003D GETMET R4 R0 K0 - 0x5C180200, // 003E MOVE R6 R1 - 0x7C100400, // 003F CALL R4 2 - 0x7C0C0200, // 0040 CALL R3 1 - 0xA8020013, // 0041 EXBLK 0 #0056 - 0x5C100600, // 0042 MOVE R4 R3 - 0x7C100000, // 0043 CALL R4 0 - 0x94140204, // 0044 GETIDX R5 R1 R4 - 0x6018000F, // 0045 GETGBL R6 G15 - 0x5C1C0A00, // 0046 MOVE R7 R5 - 0x60200013, // 0047 GETGBL R8 G19 - 0x7C180400, // 0048 CALL R6 2 - 0x781A000A, // 0049 JMPF R6 #0055 - 0x8C180B01, // 004A GETMET R6 R5 K1 - 0x5820000C, // 004B LDCONST R8 K12 - 0x7C180400, // 004C CALL R6 2 - 0x781A0006, // 004D JMPF R6 #0055 - 0x0018090D, // 004E ADD R6 R4 K13 - 0x8C1C0504, // 004F GETMET R7 R2 K4 - 0x60240013, // 0050 GETGBL R9 G19 - 0x7C240000, // 0051 CALL R9 0 - 0x98260B0E, // 0052 SETIDX R9 K5 K14 - 0x98260E06, // 0053 SETIDX R9 K7 R6 - 0x7C1C0400, // 0054 CALL R7 2 - 0x7001FFEB, // 0055 JMP #0042 - 0x580C0008, // 0056 LDCONST R3 K8 - 0xAC0C0200, // 0057 CATCH R3 1 0 - 0xB0080000, // 0058 RAISE 2 R0 R0 - 0x600C0010, // 0059 GETGBL R3 G16 - 0x8C100100, // 005A GETMET R4 R0 K0 - 0x5C180200, // 005B MOVE R6 R1 - 0x7C100400, // 005C CALL R4 2 - 0x7C0C0200, // 005D CALL R3 1 - 0xA8020013, // 005E EXBLK 0 #0073 - 0x5C100600, // 005F MOVE R4 R3 - 0x7C100000, // 0060 CALL R4 0 - 0x94140204, // 0061 GETIDX R5 R1 R4 - 0x6018000F, // 0062 GETGBL R6 G15 - 0x5C1C0A00, // 0063 MOVE R7 R5 - 0x60200013, // 0064 GETGBL R8 G19 - 0x7C180400, // 0065 CALL R6 2 - 0x781A000A, // 0066 JMPF R6 #0072 - 0x8C180B01, // 0067 GETMET R6 R5 K1 - 0x5820000F, // 0068 LDCONST R8 K15 - 0x7C180400, // 0069 CALL R6 2 - 0x781A0006, // 006A JMPF R6 #0072 - 0x00180910, // 006B ADD R6 R4 K16 - 0x8C1C0504, // 006C GETMET R7 R2 K4 - 0x60240013, // 006D GETGBL R9 G19 - 0x7C240000, // 006E CALL R9 0 - 0x98260B11, // 006F SETIDX R9 K5 K17 - 0x98260E06, // 0070 SETIDX R9 K7 R6 - 0x7C1C0400, // 0071 CALL R7 2 - 0x7001FFEB, // 0072 JMP #005F - 0x580C0008, // 0073 LDCONST R3 K8 - 0xAC0C0200, // 0074 CATCH R3 1 0 - 0xB0080000, // 0075 RAISE 2 R0 R0 - 0x80040400, // 0076 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sort_distinct -********************************************************************/ -be_local_closure(Matter_Device_sort_distinct, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Device), - /* K1 */ be_const_int(1), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(stop_iteration), - /* K4 */ be_nested_str_weak(remove), - }), - be_str_weak(sort_distinct), - &be_const_str_solidified, - ( &(const binstruction[53]) { /* 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 - 0xA8020010, // 0008 EXBLK 0 #001A - 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 - 0x781A0008, // 000E JMPF R6 #0018 - 0x04180B01, // 000F SUB R6 R5 K1 - 0x94180006, // 0010 GETIDX R6 R0 R6 - 0x24180C04, // 0011 GT R6 R6 R4 - 0x781A0004, // 0012 JMPF R6 #0018 - 0x04180B01, // 0013 SUB R6 R5 K1 - 0x94180006, // 0014 GETIDX R6 R0 R6 - 0x98000A06, // 0015 SETIDX R0 R5 R6 - 0x04140B01, // 0016 SUB R5 R5 K1 - 0x7001FFF4, // 0017 JMP #000D - 0x98000A04, // 0018 SETIDX R0 R5 R4 - 0x7001FFEE, // 0019 JMP #0009 - 0x58080003, // 001A LDCONST R2 K3 - 0xAC080200, // 001B CATCH R2 1 0 - 0xB0080000, // 001C RAISE 2 R0 R0 - 0x58080001, // 001D LDCONST R2 K1 - 0x600C000C, // 001E GETGBL R3 G12 - 0x5C100000, // 001F MOVE R4 R0 - 0x7C0C0200, // 0020 CALL R3 1 - 0x180C0701, // 0021 LE R3 R3 K1 - 0x780E0000, // 0022 JMPF R3 #0024 - 0x80040000, // 0023 RET 1 R0 - 0x940C0102, // 0024 GETIDX R3 R0 K2 - 0x6010000C, // 0025 GETGBL R4 G12 - 0x5C140000, // 0026 MOVE R5 R0 - 0x7C100200, // 0027 CALL R4 1 - 0x14100404, // 0028 LT R4 R2 R4 - 0x78120009, // 0029 JMPF R4 #0034 - 0x94100002, // 002A GETIDX R4 R0 R2 - 0x1C100803, // 002B EQ R4 R4 R3 - 0x78120003, // 002C JMPF R4 #0031 - 0x8C100104, // 002D GETMET R4 R0 K4 - 0x5C180400, // 002E MOVE R6 R2 - 0x7C100400, // 002F CALL R4 2 - 0x70020001, // 0030 JMP #0033 - 0x940C0002, // 0031 GETIDX R3 R0 R2 - 0x00080501, // 0032 ADD R2 R2 K1 - 0x7001FFF0, // 0033 JMP #0025 - 0x80040000, // 0034 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: clean_remotes -********************************************************************/ -be_local_closure(Matter_Device_clean_remotes, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), - /* K1 */ be_nested_str_weak(http_remotes), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(stop_iteration), - /* K4 */ be_nested_str_weak(plugins), - /* K5 */ be_nested_str_weak(get), - /* K6 */ be_nested_str_weak(http_remote), + ( &(const bvalue[27]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(start), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(eth), + /* K5 */ be_nested_str_weak(hostname_eth), + /* K6 */ be_nested_str_weak(replace), /* K7 */ be_nested_str_weak(find), - /* K8 */ be_const_int(1), - /* K9 */ be_nested_str_weak(keys), - /* K10 */ be_nested_str_weak(push), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(log), - /* K13 */ be_nested_str_weak(MTR_X3A_X20remove_X20unused_X20remote_X3A_X20), - /* K14 */ be_nested_str_weak(addr), - /* K15 */ be_const_int(3), - /* K16 */ be_nested_str_weak(close), - /* K17 */ be_nested_str_weak(remove), + /* K8 */ be_nested_str_weak(mac), + /* K9 */ be_nested_str_weak(_X3A), + /* K10 */ be_nested_str_weak(), + /* K11 */ be_nested_str_weak(ipv4only), + /* K12 */ be_nested_str_weak(contains), + /* K13 */ be_nested_str_weak(ip6local), + /* K14 */ be_nested_str_weak(add_hostname), + /* K15 */ be_nested_str_weak(ip), + /* K16 */ be_nested_str_weak(ip6), + /* K17 */ be_nested_str_weak(log), + /* K18 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29), + /* K19 */ be_const_int(3), + /* K20 */ be_nested_str_weak(wifi), + /* K21 */ be_nested_str_weak(hostname_wifi), + /* K22 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27), + /* K23 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K24 */ be_nested_str_weak(_X7C), + /* K25 */ be_const_int(2), + /* K26 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics), }), - be_str_weak(clean_remotes), + be_str_weak(_mdns_announce_hostname), &be_const_str_solidified, - ( &(const binstruction[81]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x780A004C, // 0002 JMPF R2 #0050 - 0x60080013, // 0003 GETGBL R2 G19 - 0x7C080000, // 0004 CALL R2 0 - 0x600C0010, // 0005 GETGBL R3 G16 - 0x88100101, // 0006 GETMBR R4 R0 K1 - 0x7C0C0200, // 0007 CALL R3 1 - 0xA8020003, // 0008 EXBLK 0 #000D - 0x5C100600, // 0009 MOVE R4 R3 - 0x7C100000, // 000A CALL R4 0 - 0x98080902, // 000B SETIDX R2 R4 K2 - 0x7001FFFB, // 000C JMP #0009 - 0x580C0003, // 000D LDCONST R3 K3 - 0xAC0C0200, // 000E CATCH R3 1 0 - 0xB0080000, // 000F RAISE 2 R0 R0 - 0x600C0010, // 0010 GETGBL R3 G16 - 0x88100104, // 0011 GETMBR R4 R0 K4 - 0x7C0C0200, // 0012 CALL R3 1 - 0xA802000F, // 0013 EXBLK 0 #0024 - 0x5C100600, // 0014 MOVE R4 R3 - 0x7C100000, // 0015 CALL R4 0 - 0x8C140305, // 0016 GETMET R5 R1 K5 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x58200006, // 0018 LDCONST R8 K6 - 0x7C140600, // 0019 CALL R5 3 - 0x4C180000, // 001A LDNIL R6 - 0x20180A06, // 001B NE R6 R5 R6 - 0x781A0005, // 001C JMPF R6 #0023 - 0x8C180507, // 001D GETMET R6 R2 K7 - 0x5C200A00, // 001E MOVE R8 R5 - 0x58240002, // 001F LDCONST R9 K2 - 0x7C180600, // 0020 CALL R6 3 - 0x00180D08, // 0021 ADD R6 R6 K8 - 0x98080A06, // 0022 SETIDX R2 R5 R6 - 0x7001FFEF, // 0023 JMP #0014 - 0x580C0003, // 0024 LDCONST R3 K3 - 0xAC0C0200, // 0025 CATCH R3 1 0 - 0xB0080000, // 0026 RAISE 2 R0 R0 - 0x600C0012, // 0027 GETGBL R3 G18 - 0x7C0C0000, // 0028 CALL R3 0 - 0x60100010, // 0029 GETGBL R4 G16 - 0x8C140509, // 002A GETMET R5 R2 K9 - 0x7C140200, // 002B CALL R5 1 - 0x7C100200, // 002C CALL R4 1 - 0xA8020008, // 002D EXBLK 0 #0037 - 0x5C140800, // 002E MOVE R5 R4 - 0x7C140000, // 002F CALL R5 0 - 0x94180405, // 0030 GETIDX R6 R2 R5 - 0x1C180D02, // 0031 EQ R6 R6 K2 - 0x781A0002, // 0032 JMPF R6 #0036 - 0x8C18070A, // 0033 GETMET R6 R3 K10 - 0x5C200A00, // 0034 MOVE R8 R5 - 0x7C180400, // 0035 CALL R6 2 - 0x7001FFF6, // 0036 JMP #002E - 0x58100003, // 0037 LDCONST R4 K3 - 0xAC100200, // 0038 CATCH R4 1 0 - 0xB0080000, // 0039 RAISE 2 R0 R0 - 0x60100010, // 003A GETGBL R4 G16 - 0x5C140600, // 003B MOVE R5 R3 - 0x7C100200, // 003C CALL R4 1 - 0xA802000E, // 003D EXBLK 0 #004D - 0x5C140800, // 003E MOVE R5 R4 - 0x7C140000, // 003F CALL R5 0 - 0xB81A1600, // 0040 GETNGBL R6 K11 - 0x8C180D0C, // 0041 GETMET R6 R6 K12 - 0x88200B0E, // 0042 GETMBR R8 R5 K14 - 0x00221A08, // 0043 ADD R8 K13 R8 - 0x5824000F, // 0044 LDCONST R9 K15 - 0x7C180600, // 0045 CALL R6 3 - 0x8C180B10, // 0046 GETMET R6 R5 K16 - 0x7C180200, // 0047 CALL R6 1 - 0x88180101, // 0048 GETMBR R6 R0 K1 - 0x8C180D11, // 0049 GETMET R6 R6 K17 - 0x88200B0E, // 004A GETMBR R8 R5 K14 - 0x7C180400, // 004B CALL R6 2 - 0x7001FFF0, // 004C JMP #003E - 0x58100003, // 004D LDCONST R4 K3 - 0xAC100200, // 004E CATCH R4 1 0 - 0xB0080000, // 004F RAISE 2 R0 R0 - 0x80000000, // 0050 RET 0 + ( &(const binstruction[148]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x8C100502, // 0002 GETMET R4 R2 K2 + 0x7C100200, // 0003 CALL R4 1 + 0xA802007A, // 0004 EXBLK 0 #0080 + 0x78060034, // 0005 JMPF R1 #003B + 0xB8120600, // 0006 GETNGBL R4 K3 + 0x8C100904, // 0007 GETMET R4 R4 K4 + 0x7C100200, // 0008 CALL R4 1 + 0x8C140706, // 0009 GETMET R5 R3 K6 + 0x8C1C0907, // 000A GETMET R7 R4 K7 + 0x58240008, // 000B LDCONST R9 K8 + 0x7C1C0400, // 000C CALL R7 2 + 0x58200009, // 000D LDCONST R8 K9 + 0x5824000A, // 000E LDCONST R9 K10 + 0x7C140800, // 000F CALL R5 4 + 0x90020A05, // 0010 SETMBR R0 K5 R5 + 0x8814010B, // 0011 GETMBR R5 R0 K11 + 0x78160003, // 0012 JMPF R5 #0017 + 0x8C14090C, // 0013 GETMET R5 R4 K12 + 0x581C000D, // 0014 LDCONST R7 K13 + 0x7C140400, // 0015 CALL R5 2 + 0x7416000F, // 0016 JMPT R5 #0027 + 0x8C14050E, // 0017 GETMET R5 R2 K14 + 0x881C0105, // 0018 GETMBR R7 R0 K5 + 0x8C200907, // 0019 GETMET R8 R4 K7 + 0x5828000D, // 001A LDCONST R10 K13 + 0x582C000A, // 001B LDCONST R11 K10 + 0x7C200600, // 001C CALL R8 3 + 0x8C240907, // 001D GETMET R9 R4 K7 + 0x582C000F, // 001E LDCONST R11 K15 + 0x5830000A, // 001F LDCONST R12 K10 + 0x7C240600, // 0020 CALL R9 3 + 0x8C280907, // 0021 GETMET R10 R4 K7 + 0x58300010, // 0022 LDCONST R12 K16 + 0x5834000A, // 0023 LDCONST R13 K10 + 0x7C280600, // 0024 CALL R10 3 + 0x7C140A00, // 0025 CALL R5 5 + 0x70020012, // 0026 JMP #003A + 0xB8160600, // 0027 GETNGBL R5 K3 + 0x8C140B11, // 0028 GETMET R5 R5 K17 + 0x601C0018, // 0029 GETGBL R7 G24 + 0x58200012, // 002A LDCONST R8 K18 + 0x88240105, // 002B GETMBR R9 R0 K5 + 0x8C280907, // 002C GETMET R10 R4 K7 + 0x5830000F, // 002D LDCONST R12 K15 + 0x5834000A, // 002E LDCONST R13 K10 + 0x7C280600, // 002F CALL R10 3 + 0x7C1C0600, // 0030 CALL R7 3 + 0x58200013, // 0031 LDCONST R8 K19 + 0x7C140600, // 0032 CALL R5 3 + 0x8C14050E, // 0033 GETMET R5 R2 K14 + 0x881C0105, // 0034 GETMBR R7 R0 K5 + 0x8C200907, // 0035 GETMET R8 R4 K7 + 0x5828000F, // 0036 LDCONST R10 K15 + 0x582C000A, // 0037 LDCONST R11 K10 + 0x7C200600, // 0038 CALL R8 3 + 0x7C140600, // 0039 CALL R5 3 + 0x70020033, // 003A JMP #006F + 0xB8120600, // 003B GETNGBL R4 K3 + 0x8C100914, // 003C GETMET R4 R4 K20 + 0x7C100200, // 003D CALL R4 1 + 0x8C140706, // 003E GETMET R5 R3 K6 + 0x8C1C0907, // 003F GETMET R7 R4 K7 + 0x58240008, // 0040 LDCONST R9 K8 + 0x7C1C0400, // 0041 CALL R7 2 + 0x58200009, // 0042 LDCONST R8 K9 + 0x5824000A, // 0043 LDCONST R9 K10 + 0x7C140800, // 0044 CALL R5 4 + 0x90022A05, // 0045 SETMBR R0 K21 R5 + 0x8814010B, // 0046 GETMBR R5 R0 K11 + 0x78160003, // 0047 JMPF R5 #004C + 0x8C14090C, // 0048 GETMET R5 R4 K12 + 0x581C000D, // 0049 LDCONST R7 K13 + 0x7C140400, // 004A CALL R5 2 + 0x7416000F, // 004B JMPT R5 #005C + 0x8C14050E, // 004C GETMET R5 R2 K14 + 0x881C0115, // 004D GETMBR R7 R0 K21 + 0x8C200907, // 004E GETMET R8 R4 K7 + 0x5828000D, // 004F LDCONST R10 K13 + 0x582C000A, // 0050 LDCONST R11 K10 + 0x7C200600, // 0051 CALL R8 3 + 0x8C240907, // 0052 GETMET R9 R4 K7 + 0x582C000F, // 0053 LDCONST R11 K15 + 0x5830000A, // 0054 LDCONST R12 K10 + 0x7C240600, // 0055 CALL R9 3 + 0x8C280907, // 0056 GETMET R10 R4 K7 + 0x58300010, // 0057 LDCONST R12 K16 + 0x5834000A, // 0058 LDCONST R13 K10 + 0x7C280600, // 0059 CALL R10 3 + 0x7C140A00, // 005A CALL R5 5 + 0x70020012, // 005B JMP #006F + 0xB8160600, // 005C GETNGBL R5 K3 + 0x8C140B11, // 005D GETMET R5 R5 K17 + 0x601C0018, // 005E GETGBL R7 G24 + 0x58200012, // 005F LDCONST R8 K18 + 0x88240115, // 0060 GETMBR R9 R0 K21 + 0x8C280907, // 0061 GETMET R10 R4 K7 + 0x5830000F, // 0062 LDCONST R12 K15 + 0x5834000A, // 0063 LDCONST R13 K10 + 0x7C280600, // 0064 CALL R10 3 + 0x7C1C0600, // 0065 CALL R7 3 + 0x58200013, // 0066 LDCONST R8 K19 + 0x7C140600, // 0067 CALL R5 3 + 0x8C14050E, // 0068 GETMET R5 R2 K14 + 0x881C0115, // 0069 GETMBR R7 R0 K21 + 0x8C200907, // 006A GETMET R8 R4 K7 + 0x5828000F, // 006B LDCONST R10 K15 + 0x582C000A, // 006C LDCONST R11 K10 + 0x7C200600, // 006D CALL R8 3 + 0x7C140600, // 006E CALL R5 3 + 0xB8120600, // 006F GETNGBL R4 K3 + 0x8C100911, // 0070 GETMET R4 R4 K17 + 0x60180018, // 0071 GETGBL R6 G24 + 0x581C0016, // 0072 LDCONST R7 K22 + 0x78060001, // 0073 JMPF R1 #0076 + 0x58200004, // 0074 LDCONST R8 K4 + 0x70020000, // 0075 JMP #0077 + 0x58200014, // 0076 LDCONST R8 K20 + 0x78060001, // 0077 JMPF R1 #007A + 0x88240105, // 0078 GETMBR R9 R0 K5 + 0x70020000, // 0079 JMP #007B + 0x88240115, // 007A GETMBR R9 R0 K21 + 0x7C180600, // 007B CALL R6 3 + 0x581C0013, // 007C LDCONST R7 K19 + 0x7C100600, // 007D CALL R4 3 + 0xA8040001, // 007E EXBLK 1 1 + 0x70020010, // 007F JMP #0091 + 0xAC100002, // 0080 CATCH R4 0 2 + 0x7002000D, // 0081 JMP #0090 + 0xB81A0600, // 0082 GETNGBL R6 K3 + 0x8C180D11, // 0083 GETMET R6 R6 K17 + 0x60200008, // 0084 GETGBL R8 G8 + 0x5C240800, // 0085 MOVE R9 R4 + 0x7C200200, // 0086 CALL R8 1 + 0x00222E08, // 0087 ADD R8 K23 R8 + 0x00201118, // 0088 ADD R8 R8 K24 + 0x60240008, // 0089 GETGBL R9 G8 + 0x5C280A00, // 008A MOVE R10 R5 + 0x7C240200, // 008B CALL R9 1 + 0x00201009, // 008C ADD R8 R8 R9 + 0x58240019, // 008D LDCONST R9 K25 + 0x7C180600, // 008E CALL R6 3 + 0x70020000, // 008F JMP #0091 + 0xB0080000, // 0090 RAISE 2 R0 R0 + 0x8C10011A, // 0091 GETMET R4 R0 K26 + 0x7C100200, // 0092 CALL R4 1 + 0x80000000, // 0093 RET 0 }) ) ); @@ -1673,53 +1364,67 @@ be_local_closure(Matter_Device_clean_remotes, /* name */ /******************************************************************** -** Solidified function: conf_to_log +** Solidified function: register_native_classes ********************************************************************/ -be_local_closure(Matter_Device_conf_to_log, /* name */ +be_local_closure(Matter_Device_register_native_classes, /* name */ be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 4, /* varg */ + 12, /* nstack */ + 3, /* argc */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Device), - /* K1 */ be_nested_str_weak(), - /* K2 */ be_nested_str_weak(k2l), - /* K3 */ be_nested_str_weak(type), - /* K4 */ be_nested_str_weak(_X20_X25s_X3A_X25s), - /* K5 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(conf_to_log), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x58080001, // 0001 LDCONST R2 K1 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x8C100302, // 0003 GETMET R4 R1 K2 - 0x5C180000, // 0004 MOVE R6 R0 - 0x7C100400, // 0005 CALL R4 2 - 0x7C0C0200, // 0006 CALL R3 1 - 0xA802000B, // 0007 EXBLK 0 #0014 - 0x5C100600, // 0008 MOVE R4 R3 - 0x7C100000, // 0009 CALL R4 0 - 0x1C140903, // 000A EQ R5 R4 K3 - 0x78160000, // 000B JMPF R5 #000D - 0x7001FFFA, // 000C JMP #0008 - 0x60140018, // 000D GETGBL R5 G24 - 0x58180004, // 000E LDCONST R6 K4 - 0x5C1C0800, // 000F MOVE R7 R4 - 0x94200004, // 0010 GETIDX R8 R0 R4 - 0x7C140600, // 0011 CALL R5 3 - 0x00080405, // 0012 ADD R2 R2 R5 - 0x7001FFF3, // 0013 JMP #0008 - 0x580C0005, // 0014 LDCONST R3 K5 - 0xAC0C0200, // 0015 CATCH R3 1 0 - 0xB0080000, // 0016 RAISE 2 R0 R0 - 0x80040400, // 0017 RET 1 R2 + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(introspect), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(members), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(get), + /* K5 */ be_nested_str_weak(class), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(Plugin_), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(register_plugin_class), + /* K10 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(register_native_classes), + &be_const_str_solidified, + ( &(const binstruction[33]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0x60140010, // 0002 GETGBL R5 G16 + 0x8C180702, // 0003 GETMET R6 R3 K2 + 0xB8220600, // 0004 GETNGBL R8 K3 + 0x7C180400, // 0005 CALL R6 2 + 0x7C140200, // 0006 CALL R5 1 + 0xA8020014, // 0007 EXBLK 0 #001D + 0x5C180A00, // 0008 MOVE R6 R5 + 0x7C180000, // 0009 CALL R6 0 + 0x8C1C0704, // 000A GETMET R7 R3 K4 + 0xB8260600, // 000B GETNGBL R9 K3 + 0x5C280C00, // 000C MOVE R10 R6 + 0x7C1C0600, // 000D CALL R7 3 + 0x60200004, // 000E GETGBL R8 G4 + 0x5C240E00, // 000F MOVE R9 R7 + 0x7C200200, // 0010 CALL R8 1 + 0x1C201105, // 0011 EQ R8 R8 K5 + 0x78220008, // 0012 JMPF R8 #001C + 0x8C200906, // 0013 GETMET R8 R4 K6 + 0x5C280C00, // 0014 MOVE R10 R6 + 0x582C0007, // 0015 LDCONST R11 K7 + 0x7C200600, // 0016 CALL R8 3 + 0x1C201108, // 0017 EQ R8 R8 K8 + 0x78220002, // 0018 JMPF R8 #001C + 0x8C200109, // 0019 GETMET R8 R0 K9 + 0x5C280E00, // 001A MOVE R10 R7 + 0x7C200400, // 001B CALL R8 2 + 0x7001FFEA, // 001C JMP #0008 + 0x5814000A, // 001D LDCONST R5 K10 + 0xAC140200, // 001E CATCH R5 1 0 + 0xB0080000, // 001F RAISE 2 R0 R0 + 0x80000000, // 0020 RET 0 }) ) ); @@ -1727,76 +1432,88 @@ be_local_closure(Matter_Device_conf_to_log, /* name */ /******************************************************************** -** Solidified function: start +** Solidified function: mdns_remove_op_discovery_all_fabrics ********************************************************************/ -be_local_closure(Matter_Device_start, /* name */ +be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */ be_nested_proto( 6, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 2, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_trigger_read_sensors), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0x80000000, // 0003 RET 0 - }) - ), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(active_fabrics), + /* K2 */ be_nested_str_weak(get_device_id), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(mdns_remove_op_discovery), + /* K5 */ be_nested_str_weak(stop_iteration), }), + be_str_weak(mdns_remove_op_discovery_all_fabrics), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x60040010, // 0000 GETGBL R1 G16 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x8C080501, // 0002 GETMET R2 R2 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x7C040200, // 0004 CALL R1 1 + 0xA802000B, // 0005 EXBLK 0 #0012 + 0x5C080200, // 0006 MOVE R2 R1 + 0x7C080000, // 0007 CALL R2 0 + 0x8C0C0502, // 0008 GETMET R3 R2 K2 + 0x7C0C0200, // 0009 CALL R3 1 + 0x780E0005, // 000A JMPF R3 #0011 + 0x8C0C0503, // 000B GETMET R3 R2 K3 + 0x7C0C0200, // 000C CALL R3 1 + 0x780E0002, // 000D JMPF R3 #0011 + 0x8C0C0104, // 000E GETMET R3 R0 K4 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x7001FFF3, // 0011 JMP #0006 + 0x58040005, // 0012 LDCONST R1 K5 + 0xAC040200, // 0013 CATCH R1 1 0 + 0xB0080000, // 0014 RAISE 2 R0 R0 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_root_commissioning_open +********************************************************************/ +be_local_closure(Matter_Device_is_root_commissioning_open, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(started), - /* K1 */ be_nested_str_weak(autoconf_device), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(add_cron), - /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A), - /* K5 */ be_nested_str_weak(matter_sensors_30s), - /* K6 */ be_nested_str_weak(_start_udp), - /* K7 */ be_nested_str_weak(UDP_PORT), - /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(commissioning_open), + /* K1 */ be_nested_str_weak(commissioning_admin_fabric), }), - be_str_weak(start), + be_str_weak(is_root_commissioning_open), &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ + ( &(const binstruction[11]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060000, // 0001 JMPF R1 #0003 - 0x80000200, // 0002 RET 0 - 0x8C040101, // 0003 GETMET R1 R0 K1 - 0x7C040200, // 0004 CALL R1 1 - 0xB8060400, // 0005 GETNGBL R1 K2 - 0x8C040303, // 0006 GETMET R1 R1 K3 - 0x580C0004, // 0007 LDCONST R3 K4 - 0x84100000, // 0008 CLOSURE R4 P0 - 0x58140005, // 0009 LDCONST R5 K5 - 0x7C040800, // 000A CALL R1 4 - 0x8C040106, // 000B GETMET R1 R0 K6 - 0x880C0107, // 000C GETMBR R3 R0 K7 - 0x7C040400, // 000D CALL R1 2 - 0x8C040108, // 000E GETMET R1 R0 K8 - 0x7C040200, // 000F CALL R1 1 - 0x50040200, // 0010 LDBOOL R1 1 0 - 0x90020001, // 0011 SETMBR R0 K0 R1 - 0xA0000000, // 0012 CLOSE R0 - 0x80000000, // 0013 RET 0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x78060003, // 0003 JMPF R1 #0008 + 0x88040101, // 0004 GETMBR R1 R0 K1 + 0x4C080000, // 0005 LDNIL R2 + 0x1C040202, // 0006 EQ R1 R1 R2 + 0x74060000, // 0007 JMPT R1 #0009 + 0x50040001, // 0008 LDBOOL R1 0 1 + 0x50040200, // 0009 LDBOOL R1 1 0 + 0x80040200, // 000A RET 1 R1 }) ) ); @@ -1804,11 +1521,11 @@ be_local_closure(Matter_Device_start, /* name */ /******************************************************************** -** Solidified function: bridge_remove_endpoint +** Solidified function: msg_send ********************************************************************/ -be_local_closure(Matter_Device_bridge_remove_endpoint, /* name */ +be_local_closure(Matter_Device_msg_send, /* name */ be_nested_proto( - 11, /* nstack */ + 5, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1816,87 +1533,18 @@ be_local_closure(Matter_Device_bridge_remove_endpoint, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(plugins_config), - /* K2 */ be_nested_str_weak(contains), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(log), - /* K5 */ be_nested_str_weak(MTR_X3A_X20Cannot_X20remove_X20an_X20enpoint_X20not_X20configured_X3A_X20), - /* K6 */ be_const_int(3), - /* K7 */ be_nested_str_weak(MTR_X3A_X20deleting_X20endpoint_X20_X3D_X20_X25i), - /* K8 */ be_const_int(2), - /* K9 */ be_nested_str_weak(remove), - /* K10 */ be_nested_str_weak(plugins_persist), - /* K11 */ be_const_int(0), - /* K12 */ be_nested_str_weak(plugins), - /* K13 */ be_nested_str_weak(get_endpoint), - /* K14 */ be_const_int(1), - /* K15 */ be_nested_str_weak(clean_remotes), - /* K16 */ be_nested_str_weak(save_param), - /* K17 */ be_nested_str_weak(signal_endpoints_changed), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(send_UDP), }), - be_str_weak(bridge_remove_endpoint), + be_str_weak(msg_send), &be_const_str_solidified, - ( &(const binstruction[58]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x600C0008, // 0001 GETGBL R3 G8 + ( &(const binstruction[ 5]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x4C100000, // 0004 LDNIL R4 - 0x4C140000, // 0005 LDNIL R5 - 0x88180101, // 0006 GETMBR R6 R0 K1 - 0x8C180D02, // 0007 GETMET R6 R6 K2 - 0x5C200600, // 0008 MOVE R8 R3 - 0x7C180400, // 0009 CALL R6 2 - 0x741A0005, // 000A JMPT R6 #0011 - 0xB81A0600, // 000B GETNGBL R6 K3 - 0x8C180D04, // 000C GETMET R6 R6 K4 - 0x00220A03, // 000D ADD R8 K5 R3 - 0x58240006, // 000E LDCONST R9 K6 - 0x7C180600, // 000F CALL R6 3 - 0x80000C00, // 0010 RET 0 - 0xB81A0600, // 0011 GETNGBL R6 K3 - 0x8C180D04, // 0012 GETMET R6 R6 K4 - 0x60200018, // 0013 GETGBL R8 G24 - 0x58240007, // 0014 LDCONST R9 K7 - 0x5C280200, // 0015 MOVE R10 R1 - 0x7C200400, // 0016 CALL R8 2 - 0x58240008, // 0017 LDCONST R9 K8 - 0x7C180600, // 0018 CALL R6 3 - 0x88180101, // 0019 GETMBR R6 R0 K1 - 0x8C180D09, // 001A GETMET R6 R6 K9 - 0x5C200600, // 001B MOVE R8 R3 - 0x7C180400, // 001C CALL R6 2 - 0x50180200, // 001D LDBOOL R6 1 0 - 0x90021406, // 001E SETMBR R0 K10 R6 - 0x5818000B, // 001F LDCONST R6 K11 - 0x601C000C, // 0020 GETGBL R7 G12 - 0x8820010C, // 0021 GETMBR R8 R0 K12 - 0x7C1C0200, // 0022 CALL R7 1 - 0x141C0C07, // 0023 LT R7 R6 R7 - 0x781E000D, // 0024 JMPF R7 #0033 - 0x881C010C, // 0025 GETMBR R7 R0 K12 - 0x941C0E06, // 0026 GETIDX R7 R7 R6 - 0x8C1C0F0D, // 0027 GETMET R7 R7 K13 - 0x7C1C0200, // 0028 CALL R7 1 - 0x1C1C0207, // 0029 EQ R7 R1 R7 - 0x781E0005, // 002A JMPF R7 #0031 - 0x881C010C, // 002B GETMBR R7 R0 K12 - 0x8C1C0F09, // 002C GETMET R7 R7 K9 - 0x5C240C00, // 002D MOVE R9 R6 - 0x7C1C0400, // 002E CALL R7 2 - 0x70020002, // 002F JMP #0033 - 0x70020000, // 0030 JMP #0032 - 0x00180D0E, // 0031 ADD R6 R6 K14 - 0x7001FFEC, // 0032 JMP #0020 - 0x8C1C010F, // 0033 GETMET R7 R0 K15 - 0x7C1C0200, // 0034 CALL R7 1 - 0x8C1C0110, // 0035 GETMET R7 R0 K16 - 0x7C1C0200, // 0036 CALL R7 1 - 0x8C1C0111, // 0037 GETMET R7 R0 K17 - 0x7C1C0200, // 0038 CALL R7 1 - 0x80000000, // 0039 RET 0 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 }) ) ); @@ -1904,11 +1552,11 @@ be_local_closure(Matter_Device_bridge_remove_endpoint, /* name */ /******************************************************************** -** Solidified function: find_plugin_by_endpoint +** Solidified function: process_attribute_read_solo ********************************************************************/ -be_local_closure(Matter_Device_find_plugin_by_endpoint, /* name */ +be_local_closure(Matter_Device_process_attribute_read_solo, /* name */ be_nested_proto( - 6, /* nstack */ + 10, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1916,32 +1564,147 @@ be_local_closure(Matter_Device_find_plugin_by_endpoint, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_int(0), + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(endpoint), + /* K1 */ be_nested_str_weak(cluster), + /* K2 */ be_nested_str_weak(attribute), + /* K3 */ be_nested_str_weak(find_plugin_by_endpoint), + /* K4 */ be_nested_str_weak(status), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), + /* K7 */ be_nested_str_weak(contains_cluster), + /* K8 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), + /* K9 */ be_nested_str_weak(contains_attribute), + /* K10 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), + }), + be_str_weak(process_attribute_read_solo), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x880C0301, // 0001 GETMBR R3 R1 K1 + 0x88100302, // 0002 GETMBR R4 R1 K2 + 0x4C140000, // 0003 LDNIL R5 + 0x1C140405, // 0004 EQ R5 R2 R5 + 0x74160005, // 0005 JMPT R5 #000C + 0x4C140000, // 0006 LDNIL R5 + 0x1C140605, // 0007 EQ R5 R3 R5 + 0x74160002, // 0008 JMPT R5 #000C + 0x4C140000, // 0009 LDNIL R5 + 0x1C140805, // 000A EQ R5 R4 R5 + 0x78160001, // 000B JMPF R5 #000E + 0x4C140000, // 000C LDNIL R5 + 0x80040A00, // 000D RET 1 R5 + 0x8C140103, // 000E GETMET R5 R0 K3 + 0x5C1C0400, // 000F MOVE R7 R2 + 0x7C140400, // 0010 CALL R5 2 + 0x4C180000, // 0011 LDNIL R6 + 0x1C180A06, // 0012 EQ R6 R5 R6 + 0x781A0004, // 0013 JMPF R6 #0019 + 0xB81A0A00, // 0014 GETNGBL R6 K5 + 0x88180D06, // 0015 GETMBR R6 R6 K6 + 0x90060806, // 0016 SETMBR R1 K4 R6 + 0x4C180000, // 0017 LDNIL R6 + 0x80040C00, // 0018 RET 1 R6 + 0x8C180B07, // 0019 GETMET R6 R5 K7 + 0x5C200600, // 001A MOVE R8 R3 + 0x7C180400, // 001B CALL R6 2 + 0x741A0004, // 001C JMPT R6 #0022 + 0xB81A0A00, // 001D GETNGBL R6 K5 + 0x88180D08, // 001E GETMBR R6 R6 K8 + 0x90060806, // 001F SETMBR R1 K4 R6 + 0x4C180000, // 0020 LDNIL R6 + 0x80040C00, // 0021 RET 1 R6 + 0x8C180B09, // 0022 GETMET R6 R5 K9 + 0x5C200600, // 0023 MOVE R8 R3 + 0x5C240800, // 0024 MOVE R9 R4 + 0x7C180600, // 0025 CALL R6 3 + 0x741A0004, // 0026 JMPT R6 #002C + 0xB81A0A00, // 0027 GETNGBL R6 K5 + 0x88180D0A, // 0028 GETMBR R6 R6 K10 + 0x90060806, // 0029 SETMBR R1 K4 R6 + 0x4C180000, // 002A LDNIL R6 + 0x80040C00, // 002B RET 1 R6 + 0x80040A00, // 002C RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: autoconf_device +********************************************************************/ +be_local_closure(Matter_Device_autoconf_device, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(json), /* K1 */ be_nested_str_weak(plugins), - /* K2 */ be_nested_str_weak(get_endpoint), - /* K3 */ be_const_int(1), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(plugins_persist), + /* K4 */ be_nested_str_weak(plugins_config), + /* K5 */ be_nested_str_weak(autoconf_device_map), + /* K6 */ be_nested_str_weak(plugins_config_remotes), + /* K7 */ be_nested_str_weak(adjust_next_ep), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(log), + /* K10 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20), + /* K11 */ be_const_int(3), + /* K12 */ be_nested_str_weak(_instantiate_plugins_from_config), + /* K13 */ be_nested_str_weak(sessions), + /* K14 */ be_nested_str_weak(count_active_fabrics), + /* K15 */ be_nested_str_weak(save_param), }), - be_str_weak(find_plugin_by_endpoint), + be_str_weak(autoconf_device), &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0x600C000C, // 0001 GETGBL R3 G12 - 0x88100101, // 0002 GETMBR R4 R0 K1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x140C0403, // 0004 LT R3 R2 R3 - 0x780E0008, // 0005 JMPF R3 #000F - 0x880C0101, // 0006 GETMBR R3 R0 K1 - 0x940C0602, // 0007 GETIDX R3 R3 R2 - 0x8C100702, // 0008 GETMET R4 R3 K2 - 0x7C100200, // 0009 CALL R4 1 - 0x1C100801, // 000A EQ R4 R4 R1 - 0x78120000, // 000B JMPF R4 #000D - 0x80040600, // 000C RET 1 R3 - 0x00080503, // 000D ADD R2 R2 K3 - 0x7001FFF1, // 000E JMP #0001 - 0x4C0C0000, // 000F LDNIL R3 - 0x80040600, // 0010 RET 1 R3 + ( &(const binstruction[40]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x6008000C, // 0001 GETGBL R2 G12 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x24080502, // 0004 GT R2 R2 K2 + 0x780A0000, // 0005 JMPF R2 #0007 + 0x80000400, // 0006 RET 0 + 0x88080103, // 0007 GETMBR R2 R0 K3 + 0x740A000F, // 0008 JMPT R2 #0019 + 0x8C080105, // 0009 GETMET R2 R0 K5 + 0x7C080200, // 000A CALL R2 1 + 0x90020802, // 000B SETMBR R0 K4 R2 + 0x60080013, // 000C GETGBL R2 G19 + 0x7C080000, // 000D CALL R2 0 + 0x90020C02, // 000E SETMBR R0 K6 R2 + 0x8C080107, // 000F GETMET R2 R0 K7 + 0x7C080200, // 0010 CALL R2 1 + 0xB80A1000, // 0011 GETNGBL R2 K8 + 0x8C080509, // 0012 GETMET R2 R2 K9 + 0x60100008, // 0013 GETGBL R4 G8 + 0x88140104, // 0014 GETMBR R5 R0 K4 + 0x7C100200, // 0015 CALL R4 1 + 0x00121404, // 0016 ADD R4 K10 R4 + 0x5814000B, // 0017 LDCONST R5 K11 + 0x7C080600, // 0018 CALL R2 3 + 0x8C08010C, // 0019 GETMET R2 R0 K12 + 0x88100104, // 001A GETMBR R4 R0 K4 + 0x7C080400, // 001B CALL R2 2 + 0x88080103, // 001C GETMBR R2 R0 K3 + 0x740A0008, // 001D JMPT R2 #0027 + 0x8808010D, // 001E GETMBR R2 R0 K13 + 0x8C08050E, // 001F GETMET R2 R2 K14 + 0x7C080200, // 0020 CALL R2 1 + 0x24080502, // 0021 GT R2 R2 K2 + 0x780A0003, // 0022 JMPF R2 #0027 + 0x50080200, // 0023 LDBOOL R2 1 0 + 0x90020602, // 0024 SETMBR R0 K3 R2 + 0x8C08010F, // 0025 GETMET R2 R0 K15 + 0x7C080200, // 0026 CALL R2 1 + 0x80000000, // 0027 RET 0 }) ) ); @@ -2023,39 +1786,50 @@ be_local_closure(Matter_Device_register_http_remote, /* name */ /******************************************************************** -** Solidified function: signal_endpoints_changed +** Solidified function: attribute_updated ********************************************************************/ -be_local_closure(Matter_Device_signal_endpoints_changed, /* name */ +be_local_closure(Matter_Device_attribute_updated, /* name */ be_nested_proto( - 7, /* nstack */ - 1, /* argc */ + 10, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - /* K2 */ be_const_int(3), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(Path), + /* K2 */ be_nested_str_weak(endpoint), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(message_handler), + /* K6 */ be_nested_str_weak(im), + /* K7 */ be_nested_str_weak(subs_shop), + /* K8 */ be_nested_str_weak(attribute_updated_ctx), }), - be_str_weak(signal_endpoints_changed), + be_str_weak(attribute_updated), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x580C0001, // 0001 LDCONST R3 K1 - 0x5412001C, // 0002 LDINT R4 29 - 0x58140002, // 0003 LDCONST R5 K2 - 0x50180000, // 0004 LDBOOL R6 0 0 - 0x7C040A00, // 0005 CALL R1 5 - 0x8C040100, // 0006 GETMET R1 R0 K0 - 0x540EFEFF, // 0007 LDINT R3 65280 - 0x5412001C, // 0008 LDINT R4 29 - 0x58140002, // 0009 LDCONST R5 K2 - 0x50180000, // 000A LDBOOL R6 0 0 - 0x7C040A00, // 000B CALL R1 5 - 0x80000000, // 000C RET 0 + ( &(const binstruction[18]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x1C140805, // 0001 EQ R5 R4 R5 + 0x78160000, // 0002 JMPF R5 #0004 + 0x50100000, // 0003 LDBOOL R4 0 0 + 0xB8160000, // 0004 GETNGBL R5 K0 + 0x8C140B01, // 0005 GETMET R5 R5 K1 + 0x7C140200, // 0006 CALL R5 1 + 0x90160401, // 0007 SETMBR R5 K2 R1 + 0x90160602, // 0008 SETMBR R5 K3 R2 + 0x90160803, // 0009 SETMBR R5 K4 R3 + 0x88180105, // 000A GETMBR R6 R0 K5 + 0x88180D06, // 000B GETMBR R6 R6 K6 + 0x88180D07, // 000C GETMBR R6 R6 K7 + 0x8C180D08, // 000D GETMET R6 R6 K8 + 0x5C200A00, // 000E MOVE R8 R5 + 0x5C240800, // 000F MOVE R9 R4 + 0x7C180600, // 0010 CALL R6 3 + 0x80000000, // 0011 RET 0 }) ) ); @@ -2063,72 +1837,44 @@ be_local_closure(Matter_Device_signal_endpoints_changed, /* name */ /******************************************************************** -** Solidified function: remove_fabric +** Solidified function: every_250ms ********************************************************************/ -be_local_closure(Matter_Device_remove_fabric, /* name */ +be_local_closure(Matter_Device_every_250ms, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 4, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), - /* K3 */ be_nested_str_weak(get_fabric_id), - /* K4 */ be_nested_str_weak(copy), - /* K5 */ be_nested_str_weak(reverse), - /* K6 */ be_nested_str_weak(tohex), - /* K7 */ be_const_int(2), - /* K8 */ be_nested_str_weak(message_handler), - /* K9 */ be_nested_str_weak(im), - /* K10 */ be_nested_str_weak(subs_shop), - /* K11 */ be_nested_str_weak(remove_by_fabric), - /* K12 */ be_nested_str_weak(mdns_remove_op_discovery), - /* K13 */ be_nested_str_weak(sessions), - /* K14 */ be_nested_str_weak(remove_fabric), - /* K15 */ be_nested_str_weak(save_fabrics), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(message_handler), + /* K1 */ be_nested_str_weak(every_250ms), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(plugins), + /* K4 */ be_const_int(1), }), - be_str_weak(remove_fabric), + be_str_weak(every_250ms), &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0019, // 0002 JMPF R2 #001D - 0xB80A0000, // 0003 GETNGBL R2 K0 - 0x8C080501, // 0004 GETMET R2 R2 K1 - 0x8C100303, // 0005 GETMET R4 R1 K3 - 0x7C100200, // 0006 CALL R4 1 - 0x8C100904, // 0007 GETMET R4 R4 K4 - 0x7C100200, // 0008 CALL R4 1 - 0x8C100905, // 0009 GETMET R4 R4 K5 - 0x7C100200, // 000A CALL R4 1 - 0x8C100906, // 000B GETMET R4 R4 K6 - 0x7C100200, // 000C CALL R4 1 - 0x00120404, // 000D ADD R4 K2 R4 - 0x58140007, // 000E LDCONST R5 K7 - 0x7C080600, // 000F CALL R2 3 - 0x88080108, // 0010 GETMBR R2 R0 K8 - 0x88080509, // 0011 GETMBR R2 R2 K9 - 0x8808050A, // 0012 GETMBR R2 R2 K10 - 0x8C08050B, // 0013 GETMET R2 R2 K11 - 0x5C100200, // 0014 MOVE R4 R1 - 0x7C080400, // 0015 CALL R2 2 - 0x8C08010C, // 0016 GETMET R2 R0 K12 - 0x5C100200, // 0017 MOVE R4 R1 - 0x7C080400, // 0018 CALL R2 2 - 0x8808010D, // 0019 GETMBR R2 R0 K13 - 0x8C08050E, // 001A GETMET R2 R2 K14 - 0x5C100200, // 001B MOVE R4 R1 - 0x7C080400, // 001C CALL R2 2 - 0x8808010D, // 001D GETMBR R2 R0 K13 - 0x8C08050F, // 001E GETMET R2 R2 K15 - 0x7C080200, // 001F CALL R2 1 - 0x80000000, // 0020 RET 0 + ( &(const binstruction[16]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x58040002, // 0003 LDCONST R1 K2 + 0x6008000C, // 0004 GETGBL R2 G12 + 0x880C0103, // 0005 GETMBR R3 R0 K3 + 0x7C080200, // 0006 CALL R2 1 + 0x14080202, // 0007 LT R2 R1 R2 + 0x780A0005, // 0008 JMPF R2 #000F + 0x88080103, // 0009 GETMBR R2 R0 K3 + 0x94080401, // 000A GETIDX R2 R2 R1 + 0x8C080501, // 000B GETMET R2 R2 K1 + 0x7C080200, // 000C CALL R2 1 + 0x00040304, // 000D ADD R1 R1 K4 + 0x7001FFF4, // 000E JMP #0004 + 0x80000000, // 000F RET 0 }) ) ); @@ -2136,50 +1882,57 @@ be_local_closure(Matter_Device_remove_fabric, /* name */ /******************************************************************** -** Solidified function: attribute_updated +** Solidified function: get_active_endpoints ********************************************************************/ -be_local_closure(Matter_Device_attribute_updated, /* name */ +be_local_closure(Matter_Device_get_active_endpoints, /* name */ be_nested_proto( - 10, /* nstack */ - 5, /* argc */ + 9, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(Path), - /* K2 */ be_nested_str_weak(endpoint), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(attribute), - /* K5 */ be_nested_str_weak(message_handler), - /* K6 */ be_nested_str_weak(im), - /* K7 */ be_nested_str_weak(subs_shop), - /* K8 */ be_nested_str_weak(attribute_updated_ctx), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(plugins), + /* K1 */ be_nested_str_weak(get_endpoint), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(attribute_updated), + be_str_weak(get_active_endpoints), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x1C140805, // 0001 EQ R5 R4 R5 - 0x78160000, // 0002 JMPF R5 #0004 - 0x50100000, // 0003 LDBOOL R4 0 0 - 0xB8160000, // 0004 GETNGBL R5 K0 - 0x8C140B01, // 0005 GETMET R5 R5 K1 - 0x7C140200, // 0006 CALL R5 1 - 0x90160401, // 0007 SETMBR R5 K2 R1 - 0x90160602, // 0008 SETMBR R5 K3 R2 - 0x90160803, // 0009 SETMBR R5 K4 R3 - 0x88180105, // 000A GETMBR R6 R0 K5 - 0x88180D06, // 000B GETMBR R6 R6 K6 - 0x88180D07, // 000C GETMBR R6 R6 K7 - 0x8C180D08, // 000D GETMET R6 R6 K8 - 0x5C200A00, // 000E MOVE R8 R5 - 0x5C240800, // 000F MOVE R9 R4 - 0x7C180600, // 0010 CALL R6 3 - 0x80000000, // 0011 RET 0 + ( &(const binstruction[28]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x88100100, // 0003 GETMBR R4 R0 K0 + 0x7C0C0200, // 0004 CALL R3 1 + 0xA8020011, // 0005 EXBLK 0 #0018 + 0x5C100600, // 0006 MOVE R4 R3 + 0x7C100000, // 0007 CALL R4 0 + 0x8C140901, // 0008 GETMET R5 R4 K1 + 0x7C140200, // 0009 CALL R5 1 + 0x78060002, // 000A JMPF R1 #000E + 0x1C180B02, // 000B EQ R6 R5 K2 + 0x781A0000, // 000C JMPF R6 #000E + 0x7001FFF7, // 000D JMP #0006 + 0x8C180503, // 000E GETMET R6 R2 K3 + 0x5C200A00, // 000F MOVE R8 R5 + 0x7C180400, // 0010 CALL R6 2 + 0x4C1C0000, // 0011 LDNIL R7 + 0x1C180C07, // 0012 EQ R6 R6 R7 + 0x781A0002, // 0013 JMPF R6 #0017 + 0x8C180504, // 0014 GETMET R6 R2 K4 + 0x5C200A00, // 0015 MOVE R8 R5 + 0x7C180400, // 0016 CALL R6 2 + 0x7001FFED, // 0017 JMP #0006 + 0x580C0005, // 0018 LDCONST R3 K5 + 0xAC0C0200, // 0019 CATCH R3 1 0 + 0xB0080000, // 001A RAISE 2 R0 R0 + 0x80040400, // 001B RET 1 R2 }) ) ); @@ -2187,136 +1940,87 @@ be_local_closure(Matter_Device_attribute_updated, /* name */ /******************************************************************** -** Solidified function: update_remotes_info +** Solidified function: _start_udp ********************************************************************/ -be_local_closure(Matter_Device_update_remotes_info, /* name */ +be_local_closure(Matter_Device__start_udp, /* name */ be_nested_proto( 7, /* nstack */ - 1, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(msg_received), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x7C0C0800, // 0005 CALL R3 4 + 0x80040600, // 0006 RET 1 R3 + }) + ), + }), 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(http_remotes), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(get_info), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(stop_iteration), - /* K5 */ be_nested_str_weak(plugins_config_remotes), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20Starting_X20UDP_X20server_X20on_X20port_X3A_X20), + /* K4 */ be_const_int(2), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(UDPServer), + /* K7 */ be_nested_str_weak(), + /* K8 */ be_nested_str_weak(start), }), - be_str_weak(update_remotes_info), + be_str_weak(_start_udp), &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0x60040013, // 0000 GETGBL R1 G19 - 0x7C040000, // 0001 CALL R1 0 - 0x88080100, // 0002 GETMBR R2 R0 K0 - 0x4C0C0000, // 0003 LDNIL R3 - 0x20080403, // 0004 NE R2 R2 R3 - 0x780A0018, // 0005 JMPF R2 #001F - 0x60080010, // 0006 GETGBL R2 G16 - 0x880C0100, // 0007 GETMBR R3 R0 K0 - 0x8C0C0701, // 0008 GETMET R3 R3 K1 - 0x7C0C0200, // 0009 CALL R3 1 - 0x7C080200, // 000A CALL R2 1 - 0xA802000F, // 000B EXBLK 0 #001C - 0x5C0C0400, // 000C MOVE R3 R2 - 0x7C0C0000, // 000D CALL R3 0 - 0x88100100, // 000E GETMBR R4 R0 K0 - 0x94100803, // 000F GETIDX R4 R4 R3 - 0x8C100902, // 0010 GETMET R4 R4 K2 - 0x7C100200, // 0011 CALL R4 1 - 0x4C140000, // 0012 LDNIL R5 - 0x20140805, // 0013 NE R5 R4 R5 - 0x78160005, // 0014 JMPF R5 #001B - 0x6014000C, // 0015 GETGBL R5 G12 - 0x5C180800, // 0016 MOVE R6 R4 - 0x7C140200, // 0017 CALL R5 1 - 0x24140B03, // 0018 GT R5 R5 K3 - 0x78160000, // 0019 JMPF R5 #001B - 0x98040604, // 001A SETIDX R1 R3 R4 - 0x7001FFEF, // 001B JMP #000C - 0x58080004, // 001C LDCONST R2 K4 - 0xAC080200, // 001D CATCH R2 1 0 - 0xB0080000, // 001E RAISE 2 R0 R0 - 0x90020A01, // 001F SETMBR R0 K5 R1 - 0x80040200, // 0020 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: MtrUpdate -********************************************************************/ -be_local_closure(Matter_Device_MtrUpdate, /* name */ - be_nested_proto( - 10, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(resp_cmnd), - /* K2 */ be_nested_str_weak(Invalid_X20JSON), - /* K3 */ be_nested_str_weak(find_key_i), - /* K4 */ be_nested_str_weak(Device), - /* K5 */ be_nested_str_weak(find_plugin_by_name_or_ep), - /* K6 */ be_nested_str_weak(Invalid_X20Device), - /* K7 */ be_nested_str_weak(virtual), - /* K8 */ be_nested_str_weak(Device_X20is_X20not_X20virtual), - /* K9 */ be_nested_str_weak(resp_cmnd_done), - }), - be_str_weak(MtrUpdate), - &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x1C140805, // 0001 EQ R5 R4 R5 - 0x78160004, // 0002 JMPF R5 #0008 - 0xB8160000, // 0003 GETNGBL R5 K0 - 0x8C140B01, // 0004 GETMET R5 R5 K1 - 0x581C0002, // 0005 LDCONST R7 K2 - 0x7C140400, // 0006 CALL R5 2 - 0x80040A00, // 0007 RET 1 R5 - 0x4C140000, // 0008 LDNIL R5 - 0xB81A0000, // 0009 GETNGBL R6 K0 - 0x8C180D03, // 000A GETMET R6 R6 K3 - 0x5C200800, // 000B MOVE R8 R4 - 0x58240004, // 000C LDCONST R9 K4 - 0x7C180600, // 000D CALL R6 3 - 0x5C140C00, // 000E MOVE R5 R6 - 0x4C1C0000, // 000F LDNIL R7 - 0x20180C07, // 0010 NE R6 R6 R7 - 0x781A0011, // 0011 JMPF R6 #0024 - 0x8C180105, // 0012 GETMET R6 R0 K5 - 0x94200605, // 0013 GETIDX R8 R3 R5 - 0x7C180400, // 0014 CALL R6 2 - 0x4C1C0000, // 0015 LDNIL R7 - 0x1C1C0C07, // 0016 EQ R7 R6 R7 - 0x781E0004, // 0017 JMPF R7 #001D - 0xB81E0000, // 0018 GETNGBL R7 K0 - 0x8C1C0F01, // 0019 GETMET R7 R7 K1 - 0x58240006, // 001A LDCONST R9 K6 - 0x7C1C0400, // 001B CALL R7 2 - 0x80040E00, // 001C RET 1 R7 - 0x881C0D07, // 001D GETMBR R7 R6 K7 - 0x741E0004, // 001E JMPT R7 #0024 - 0xB81E0000, // 001F GETNGBL R7 K0 - 0x8C1C0F01, // 0020 GETMET R7 R7 K1 - 0x58240008, // 0021 LDCONST R9 K8 - 0x7C1C0400, // 0022 CALL R7 2 - 0x80040E00, // 0023 RET 1 R7 - 0xB81A0000, // 0024 GETNGBL R6 K0 - 0x8C180D09, // 0025 GETMET R6 R6 K9 - 0x7C180200, // 0026 CALL R6 1 - 0x80000000, // 0027 RET 0 + ( &(const binstruction[28]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0000, // 0001 JMPF R2 #0003 + 0x80000400, // 0002 RET 0 + 0x4C080000, // 0003 LDNIL R2 + 0x1C080202, // 0004 EQ R2 R1 R2 + 0x780A0000, // 0005 JMPF R2 #0007 + 0x540615A3, // 0006 LDINT R1 5540 + 0xB80A0200, // 0007 GETNGBL R2 K1 + 0x8C080502, // 0008 GETMET R2 R2 K2 + 0x60100008, // 0009 GETGBL R4 G8 + 0x5C140200, // 000A MOVE R5 R1 + 0x7C100200, // 000B CALL R4 1 + 0x00120604, // 000C ADD R4 K3 R4 + 0x58140004, // 000D LDCONST R5 K4 + 0x7C080600, // 000E CALL R2 3 + 0xB80A0A00, // 000F GETNGBL R2 K5 + 0x8C080506, // 0010 GETMET R2 R2 K6 + 0x5C100000, // 0011 MOVE R4 R0 + 0x58140007, // 0012 LDCONST R5 K7 + 0x5C180200, // 0013 MOVE R6 R1 + 0x7C080800, // 0014 CALL R2 4 + 0x90020002, // 0015 SETMBR R0 K0 R2 + 0x88080100, // 0016 GETMBR R2 R0 K0 + 0x8C080508, // 0017 GETMET R2 R2 K8 + 0x84100000, // 0018 CLOSURE R4 P0 + 0x7C080400, // 0019 CALL R2 2 + 0xA0000000, // 001A CLOSE R0 + 0x80000000, // 001B RET 0 }) ) ); @@ -2324,12 +2028,12 @@ be_local_closure(Matter_Device_MtrUpdate, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: start_basic_commissioning ********************************************************************/ -be_local_closure(Matter_Device_init, /* name */ +be_local_closure(Matter_Device_start_basic_commissioning, /* name */ be_nested_proto( - 7, /* nstack */ - 1, /* argc */ + 13, /* nstack */ + 8, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -2346,12 +2050,11 @@ be_local_closure(Matter_Device_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(start), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns_announce_PASE), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(remove_rule), /* K3 */ be_nested_str_weak(Wifi_X23Connected), - /* K4 */ be_nested_str_weak(matter_start), }), be_str_weak(_anonymous_), &be_const_str_solidified, @@ -2362,7 +2065,7 @@ be_local_closure(Matter_Device_init, /* name */ 0xB8020200, // 0003 GETNGBL R0 K1 0x8C000102, // 0004 GETMET R0 R0 K2 0x58080003, // 0005 LDCONST R2 K3 - 0x580C0004, // 0006 LDCONST R3 K4 + 0x580C0000, // 0006 LDCONST R3 K0 0x7C000600, // 0007 CALL R0 3 0x80000000, // 0008 RET 0 }) @@ -2378,12 +2081,11 @@ be_local_closure(Matter_Device_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(start), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns_announce_PASE), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(remove_rule), /* K3 */ be_nested_str_weak(Eth_X23Connected), - /* K4 */ be_nested_str_weak(matter_start), }), be_str_weak(_anonymous_), &be_const_str_solidified, @@ -2394,176 +2096,74 @@ be_local_closure(Matter_Device_init, /* name */ 0xB8020200, // 0003 GETNGBL R0 K1 0x8C000102, // 0004 GETMET R0 R0 K2 0x58080003, // 0005 LDCONST R2 K3 - 0x580C0004, // 0006 LDCONST R3 K4 + 0x580C0000, // 0006 LDCONST R3 K0 0x7C000600, // 0007 CALL R0 3 0x80000000, // 0008 RET 0 }) ), }), 1, /* has constants */ - ( &(const bvalue[46]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(commissioning_open), /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(get_option), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(MATTER_OPTION), - /* K5 */ be_nested_str_weak(UI), - /* K6 */ be_nested_str_weak(profiler), - /* K7 */ be_nested_str_weak(Profiler), - /* K8 */ be_nested_str_weak(started), - /* K9 */ be_nested_str_weak(tick), - /* K10 */ be_const_int(0), - /* K11 */ be_nested_str_weak(plugins), - /* K12 */ be_nested_str_weak(plugins_persist), - /* K13 */ be_nested_str_weak(plugins_classes), - /* K14 */ be_nested_str_weak(plugins_config_remotes), - /* K15 */ be_nested_str_weak(register_native_classes), - /* K16 */ be_nested_str_weak(vendorid), - /* K17 */ be_nested_str_weak(VENDOR_ID), - /* K18 */ be_nested_str_weak(productid), - /* K19 */ be_nested_str_weak(PRODUCT_ID), - /* K20 */ be_nested_str_weak(root_iterations), - /* K21 */ be_nested_str_weak(PBKDF_ITERATIONS), - /* K22 */ be_nested_str_weak(next_ep), - /* K23 */ be_const_int(1), - /* K24 */ be_nested_str_weak(root_salt), - /* K25 */ be_nested_str_weak(random), - /* K26 */ be_nested_str_weak(ipv4only), - /* K27 */ be_nested_str_weak(disable_bridge_mode), - /* K28 */ be_nested_str_weak(load_param), - /* K29 */ be_nested_str_weak(sessions), - /* K30 */ be_nested_str_weak(Session_Store), - /* K31 */ be_nested_str_weak(load_fabrics), - /* K32 */ be_nested_str_weak(message_handler), - /* K33 */ be_nested_str_weak(MessageHandler), - /* K34 */ be_nested_str_weak(ui), - /* K35 */ be_nested_str_weak(wifi), - /* K36 */ be_nested_str_weak(up), - /* K37 */ be_nested_str_weak(eth), - /* K38 */ be_nested_str_weak(start), - /* K39 */ be_nested_str_weak(add_rule), - /* K40 */ be_nested_str_weak(Wifi_X23Connected), - /* K41 */ be_nested_str_weak(matter_start), - /* K42 */ be_nested_str_weak(Eth_X23Connected), - /* K43 */ be_nested_str_weak(_init_basic_commissioning), - /* K44 */ be_nested_str_weak(add_driver), - /* K45 */ be_nested_str_weak(register_commands), + /* K2 */ be_nested_str_weak(millis), + /* K3 */ be_nested_str_weak(commissioning_iterations), + /* K4 */ be_nested_str_weak(commissioning_discriminator), + /* K5 */ be_nested_str_weak(commissioning_salt), + /* K6 */ be_nested_str_weak(commissioning_w0), + /* K7 */ be_nested_str_weak(commissioning_L), + /* K8 */ be_nested_str_weak(commissioning_admin_fabric), + /* K9 */ be_nested_str_weak(wifi), + /* K10 */ be_nested_str_weak(up), + /* K11 */ be_nested_str_weak(eth), + /* K12 */ be_nested_str_weak(mdns_announce_PASE), + /* K13 */ be_nested_str_weak(add_rule), + /* K14 */ be_nested_str_weak(Wifi_X23Connected), + /* K15 */ be_nested_str_weak(Eth_X23Connected), }), - be_str_weak(init), + be_str_weak(start_basic_commissioning), &be_const_str_solidified, - ( &(const binstruction[112]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xB80A0200, // 0001 GETNGBL R2 K1 - 0x8C080502, // 0002 GETMET R2 R2 K2 - 0xB8120600, // 0003 GETNGBL R4 K3 - 0x88100904, // 0004 GETMBR R4 R4 K4 - 0x7C080400, // 0005 CALL R2 2 - 0x740A0004, // 0006 JMPT R2 #000C - 0xB80A0600, // 0007 GETNGBL R2 K3 - 0x8C080505, // 0008 GETMET R2 R2 K5 - 0x5C100000, // 0009 MOVE R4 R0 - 0x7C080400, // 000A CALL R2 2 - 0x80000400, // 000B RET 0 - 0xB80A0600, // 000C GETNGBL R2 K3 - 0xB80E0600, // 000D GETNGBL R3 K3 - 0x8C0C0707, // 000E GETMET R3 R3 K7 - 0x7C0C0200, // 000F CALL R3 1 - 0x900A0C03, // 0010 SETMBR R2 K6 R3 - 0x50080000, // 0011 LDBOOL R2 0 0 - 0x90021002, // 0012 SETMBR R0 K8 R2 - 0x9002130A, // 0013 SETMBR R0 K9 K10 - 0x60080012, // 0014 GETGBL R2 G18 - 0x7C080000, // 0015 CALL R2 0 - 0x90021602, // 0016 SETMBR R0 K11 R2 - 0x50080000, // 0017 LDBOOL R2 0 0 - 0x90021802, // 0018 SETMBR R0 K12 R2 - 0x60080013, // 0019 GETGBL R2 G19 - 0x7C080000, // 001A CALL R2 0 - 0x90021A02, // 001B SETMBR R0 K13 R2 - 0x60080013, // 001C GETGBL R2 G19 - 0x7C080000, // 001D CALL R2 0 - 0x90021C02, // 001E SETMBR R0 K14 R2 - 0x8C08010F, // 001F GETMET R2 R0 K15 - 0x7C080200, // 0020 CALL R2 1 - 0x88080111, // 0021 GETMBR R2 R0 K17 - 0x90022002, // 0022 SETMBR R0 K16 R2 - 0x88080113, // 0023 GETMBR R2 R0 K19 - 0x90022402, // 0024 SETMBR R0 K18 R2 - 0x88080115, // 0025 GETMBR R2 R0 K21 - 0x90022802, // 0026 SETMBR R0 K20 R2 - 0x90022D17, // 0027 SETMBR R0 K22 K23 - 0x8C080319, // 0028 GETMET R2 R1 K25 - 0x5412000F, // 0029 LDINT R4 16 - 0x7C080400, // 002A CALL R2 2 - 0x90023002, // 002B SETMBR R0 K24 R2 - 0x50080000, // 002C LDBOOL R2 0 0 - 0x90023402, // 002D SETMBR R0 K26 R2 - 0x50080000, // 002E LDBOOL R2 0 0 - 0x90023602, // 002F SETMBR R0 K27 R2 - 0x8C08011C, // 0030 GETMET R2 R0 K28 - 0x7C080200, // 0031 CALL R2 1 - 0xB80A0600, // 0032 GETNGBL R2 K3 - 0x8C08051E, // 0033 GETMET R2 R2 K30 - 0x5C100000, // 0034 MOVE R4 R0 - 0x7C080400, // 0035 CALL R2 2 - 0x90023A02, // 0036 SETMBR R0 K29 R2 - 0x8808011D, // 0037 GETMBR R2 R0 K29 - 0x8C08051F, // 0038 GETMET R2 R2 K31 - 0x7C080200, // 0039 CALL R2 1 - 0xB80A0600, // 003A GETNGBL R2 K3 - 0x8C080521, // 003B GETMET R2 R2 K33 - 0x5C100000, // 003C MOVE R4 R0 - 0x7C080400, // 003D CALL R2 2 - 0x90024002, // 003E SETMBR R0 K32 R2 - 0xB80A0600, // 003F GETNGBL R2 K3 - 0x8C080505, // 0040 GETMET R2 R2 K5 - 0x5C100000, // 0041 MOVE R4 R0 - 0x7C080400, // 0042 CALL R2 2 - 0x90024402, // 0043 SETMBR R0 K34 R2 - 0xB80A0200, // 0044 GETNGBL R2 K1 - 0x8C080523, // 0045 GETMET R2 R2 K35 - 0x7C080200, // 0046 CALL R2 1 - 0x94080524, // 0047 GETIDX R2 R2 K36 - 0x740A0004, // 0048 JMPT R2 #004E - 0xB80A0200, // 0049 GETNGBL R2 K1 - 0x8C080525, // 004A GETMET R2 R2 K37 - 0x7C080200, // 004B CALL R2 1 - 0x94080524, // 004C GETIDX R2 R2 K36 - 0x780A0001, // 004D JMPF R2 #0050 - 0x8C080126, // 004E GETMET R2 R0 K38 - 0x7C080200, // 004F CALL R2 1 - 0xB80A0200, // 0050 GETNGBL R2 K1 - 0x8C080523, // 0051 GETMET R2 R2 K35 - 0x7C080200, // 0052 CALL R2 1 - 0x94080524, // 0053 GETIDX R2 R2 K36 - 0x740A0005, // 0054 JMPT R2 #005B - 0xB80A0200, // 0055 GETNGBL R2 K1 - 0x8C080527, // 0056 GETMET R2 R2 K39 - 0x58100028, // 0057 LDCONST R4 K40 - 0x84140000, // 0058 CLOSURE R5 P0 - 0x58180029, // 0059 LDCONST R6 K41 - 0x7C080800, // 005A CALL R2 4 - 0xB80A0200, // 005B GETNGBL R2 K1 - 0x8C080525, // 005C GETMET R2 R2 K37 - 0x7C080200, // 005D CALL R2 1 - 0x94080524, // 005E GETIDX R2 R2 K36 - 0x740A0005, // 005F JMPT R2 #0066 - 0xB80A0200, // 0060 GETNGBL R2 K1 - 0x8C080527, // 0061 GETMET R2 R2 K39 - 0x5810002A, // 0062 LDCONST R4 K42 - 0x84140001, // 0063 CLOSURE R5 P1 - 0x58180029, // 0064 LDCONST R6 K41 - 0x7C080800, // 0065 CALL R2 4 - 0x8C08012B, // 0066 GETMET R2 R0 K43 - 0x7C080200, // 0067 CALL R2 1 - 0xB80A0200, // 0068 GETNGBL R2 K1 - 0x8C08052C, // 0069 GETMET R2 R2 K44 - 0x5C100000, // 006A MOVE R4 R0 - 0x7C080400, // 006B CALL R2 2 - 0x8C08012D, // 006C GETMET R2 R0 K45 - 0x7C080200, // 006D CALL R2 1 - 0xA0000000, // 006E CLOSE R0 - 0x80000000, // 006F RET 0 + ( &(const binstruction[40]) { /* code */ + 0xB8220200, // 0000 GETNGBL R8 K1 + 0x8C201102, // 0001 GETMET R8 R8 K2 + 0x7C200200, // 0002 CALL R8 1 + 0x542603E7, // 0003 LDINT R9 1000 + 0x08240209, // 0004 MUL R9 R1 R9 + 0x00201009, // 0005 ADD R8 R8 R9 + 0x90020008, // 0006 SETMBR R0 K0 R8 + 0x90020602, // 0007 SETMBR R0 K3 R2 + 0x90020803, // 0008 SETMBR R0 K4 R3 + 0x90020A04, // 0009 SETMBR R0 K5 R4 + 0x90020C05, // 000A SETMBR R0 K6 R5 + 0x90020E06, // 000B SETMBR R0 K7 R6 + 0x90021007, // 000C SETMBR R0 K8 R7 + 0xB8220200, // 000D GETNGBL R8 K1 + 0x8C201109, // 000E GETMET R8 R8 K9 + 0x7C200200, // 000F CALL R8 1 + 0x9420110A, // 0010 GETIDX R8 R8 K10 + 0x74220004, // 0011 JMPT R8 #0017 + 0xB8220200, // 0012 GETNGBL R8 K1 + 0x8C20110B, // 0013 GETMET R8 R8 K11 + 0x7C200200, // 0014 CALL R8 1 + 0x9420110A, // 0015 GETIDX R8 R8 K10 + 0x78220002, // 0016 JMPF R8 #001A + 0x8C20010C, // 0017 GETMET R8 R0 K12 + 0x7C200200, // 0018 CALL R8 1 + 0x7002000B, // 0019 JMP #0026 + 0xB8220200, // 001A GETNGBL R8 K1 + 0x8C20110D, // 001B GETMET R8 R8 K13 + 0x5828000E, // 001C LDCONST R10 K14 + 0x842C0000, // 001D CLOSURE R11 P0 + 0x5830000C, // 001E LDCONST R12 K12 + 0x7C200800, // 001F CALL R8 4 + 0xB8220200, // 0020 GETNGBL R8 K1 + 0x8C20110D, // 0021 GETMET R8 R8 K13 + 0x5828000F, // 0022 LDCONST R10 K15 + 0x842C0001, // 0023 CLOSURE R11 P1 + 0x5830000C, // 0024 LDCONST R12 K12 + 0x7C200800, // 0025 CALL R8 4 + 0xA0000000, // 0026 CLOSE R0 + 0x80000000, // 0027 RET 0 }) ) ); @@ -2571,11 +2171,11 @@ be_local_closure(Matter_Device_init, /* name */ /******************************************************************** -** Solidified function: _mdns_announce_hostname +** Solidified function: bridge_remove_endpoint ********************************************************************/ -be_local_closure(Matter_Device__mdns_announce_hostname, /* name */ +be_local_closure(Matter_Device_bridge_remove_endpoint, /* name */ be_nested_proto( - 14, /* nstack */ + 11, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2583,217 +2183,87 @@ be_local_closure(Matter_Device__mdns_announce_hostname, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[27]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(start), + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(plugins_config), + /* K2 */ be_nested_str_weak(contains), /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(eth), - /* K5 */ be_nested_str_weak(hostname_eth), - /* K6 */ be_nested_str_weak(replace), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(mac), - /* K9 */ be_nested_str_weak(_X3A), - /* K10 */ be_nested_str_weak(), - /* K11 */ be_nested_str_weak(ipv4only), - /* K12 */ be_nested_str_weak(contains), - /* K13 */ be_nested_str_weak(ip6local), - /* K14 */ be_nested_str_weak(add_hostname), - /* K15 */ be_nested_str_weak(ip), - /* K16 */ be_nested_str_weak(ip6), - /* K17 */ be_nested_str_weak(log), - /* K18 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29), - /* K19 */ be_const_int(3), - /* K20 */ be_nested_str_weak(wifi), - /* K21 */ be_nested_str_weak(hostname_wifi), - /* K22 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27), - /* K23 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K24 */ be_nested_str_weak(_X7C), - /* K25 */ be_const_int(2), - /* K26 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics), + /* K4 */ be_nested_str_weak(log), + /* K5 */ be_nested_str_weak(MTR_X3A_X20Cannot_X20remove_X20an_X20enpoint_X20not_X20configured_X3A_X20), + /* K6 */ be_const_int(3), + /* K7 */ be_nested_str_weak(MTR_X3A_X20deleting_X20endpoint_X20_X3D_X20_X25i), + /* K8 */ be_const_int(2), + /* K9 */ be_nested_str_weak(remove), + /* K10 */ be_nested_str_weak(plugins_persist), + /* K11 */ be_const_int(0), + /* K12 */ be_nested_str_weak(plugins), + /* K13 */ be_nested_str_weak(get_endpoint), + /* K14 */ be_const_int(1), + /* K15 */ be_nested_str_weak(clean_remotes), + /* K16 */ be_nested_str_weak(save_param), + /* K17 */ be_nested_str_weak(signal_endpoints_changed), }), - be_str_weak(_mdns_announce_hostname), + be_str_weak(bridge_remove_endpoint), &be_const_str_solidified, - ( &(const binstruction[148]) { /* code */ + ( &(const binstruction[58]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0x8C100502, // 0002 GETMET R4 R2 K2 - 0x7C100200, // 0003 CALL R4 1 - 0xA802007A, // 0004 EXBLK 0 #0080 - 0x78060034, // 0005 JMPF R1 #003B - 0xB8120600, // 0006 GETNGBL R4 K3 - 0x8C100904, // 0007 GETMET R4 R4 K4 - 0x7C100200, // 0008 CALL R4 1 - 0x8C140706, // 0009 GETMET R5 R3 K6 - 0x8C1C0907, // 000A GETMET R7 R4 K7 - 0x58240008, // 000B LDCONST R9 K8 - 0x7C1C0400, // 000C CALL R7 2 - 0x58200009, // 000D LDCONST R8 K9 - 0x5824000A, // 000E LDCONST R9 K10 - 0x7C140800, // 000F CALL R5 4 - 0x90020A05, // 0010 SETMBR R0 K5 R5 - 0x8814010B, // 0011 GETMBR R5 R0 K11 - 0x78160003, // 0012 JMPF R5 #0017 - 0x8C14090C, // 0013 GETMET R5 R4 K12 - 0x581C000D, // 0014 LDCONST R7 K13 - 0x7C140400, // 0015 CALL R5 2 - 0x7416000F, // 0016 JMPT R5 #0027 - 0x8C14050E, // 0017 GETMET R5 R2 K14 - 0x881C0105, // 0018 GETMBR R7 R0 K5 - 0x8C200907, // 0019 GETMET R8 R4 K7 - 0x5828000D, // 001A LDCONST R10 K13 - 0x582C000A, // 001B LDCONST R11 K10 - 0x7C200600, // 001C CALL R8 3 - 0x8C240907, // 001D GETMET R9 R4 K7 - 0x582C000F, // 001E LDCONST R11 K15 - 0x5830000A, // 001F LDCONST R12 K10 - 0x7C240600, // 0020 CALL R9 3 - 0x8C280907, // 0021 GETMET R10 R4 K7 - 0x58300010, // 0022 LDCONST R12 K16 - 0x5834000A, // 0023 LDCONST R13 K10 - 0x7C280600, // 0024 CALL R10 3 - 0x7C140A00, // 0025 CALL R5 5 - 0x70020012, // 0026 JMP #003A - 0xB8160600, // 0027 GETNGBL R5 K3 - 0x8C140B11, // 0028 GETMET R5 R5 K17 - 0x601C0018, // 0029 GETGBL R7 G24 - 0x58200012, // 002A LDCONST R8 K18 - 0x88240105, // 002B GETMBR R9 R0 K5 - 0x8C280907, // 002C GETMET R10 R4 K7 - 0x5830000F, // 002D LDCONST R12 K15 - 0x5834000A, // 002E LDCONST R13 K10 - 0x7C280600, // 002F CALL R10 3 - 0x7C1C0600, // 0030 CALL R7 3 - 0x58200013, // 0031 LDCONST R8 K19 - 0x7C140600, // 0032 CALL R5 3 - 0x8C14050E, // 0033 GETMET R5 R2 K14 - 0x881C0105, // 0034 GETMBR R7 R0 K5 - 0x8C200907, // 0035 GETMET R8 R4 K7 - 0x5828000F, // 0036 LDCONST R10 K15 - 0x582C000A, // 0037 LDCONST R11 K10 - 0x7C200600, // 0038 CALL R8 3 - 0x7C140600, // 0039 CALL R5 3 - 0x70020033, // 003A JMP #006F - 0xB8120600, // 003B GETNGBL R4 K3 - 0x8C100914, // 003C GETMET R4 R4 K20 - 0x7C100200, // 003D CALL R4 1 - 0x8C140706, // 003E GETMET R5 R3 K6 - 0x8C1C0907, // 003F GETMET R7 R4 K7 - 0x58240008, // 0040 LDCONST R9 K8 - 0x7C1C0400, // 0041 CALL R7 2 - 0x58200009, // 0042 LDCONST R8 K9 - 0x5824000A, // 0043 LDCONST R9 K10 - 0x7C140800, // 0044 CALL R5 4 - 0x90022A05, // 0045 SETMBR R0 K21 R5 - 0x8814010B, // 0046 GETMBR R5 R0 K11 - 0x78160003, // 0047 JMPF R5 #004C - 0x8C14090C, // 0048 GETMET R5 R4 K12 - 0x581C000D, // 0049 LDCONST R7 K13 - 0x7C140400, // 004A CALL R5 2 - 0x7416000F, // 004B JMPT R5 #005C - 0x8C14050E, // 004C GETMET R5 R2 K14 - 0x881C0115, // 004D GETMBR R7 R0 K21 - 0x8C200907, // 004E GETMET R8 R4 K7 - 0x5828000D, // 004F LDCONST R10 K13 - 0x582C000A, // 0050 LDCONST R11 K10 - 0x7C200600, // 0051 CALL R8 3 - 0x8C240907, // 0052 GETMET R9 R4 K7 - 0x582C000F, // 0053 LDCONST R11 K15 - 0x5830000A, // 0054 LDCONST R12 K10 - 0x7C240600, // 0055 CALL R9 3 - 0x8C280907, // 0056 GETMET R10 R4 K7 - 0x58300010, // 0057 LDCONST R12 K16 - 0x5834000A, // 0058 LDCONST R13 K10 - 0x7C280600, // 0059 CALL R10 3 - 0x7C140A00, // 005A CALL R5 5 - 0x70020012, // 005B JMP #006F - 0xB8160600, // 005C GETNGBL R5 K3 - 0x8C140B11, // 005D GETMET R5 R5 K17 - 0x601C0018, // 005E GETGBL R7 G24 - 0x58200012, // 005F LDCONST R8 K18 - 0x88240115, // 0060 GETMBR R9 R0 K21 - 0x8C280907, // 0061 GETMET R10 R4 K7 - 0x5830000F, // 0062 LDCONST R12 K15 - 0x5834000A, // 0063 LDCONST R13 K10 - 0x7C280600, // 0064 CALL R10 3 - 0x7C1C0600, // 0065 CALL R7 3 - 0x58200013, // 0066 LDCONST R8 K19 - 0x7C140600, // 0067 CALL R5 3 - 0x8C14050E, // 0068 GETMET R5 R2 K14 - 0x881C0115, // 0069 GETMBR R7 R0 K21 - 0x8C200907, // 006A GETMET R8 R4 K7 - 0x5828000F, // 006B LDCONST R10 K15 - 0x582C000A, // 006C LDCONST R11 K10 - 0x7C200600, // 006D CALL R8 3 - 0x7C140600, // 006E CALL R5 3 - 0xB8120600, // 006F GETNGBL R4 K3 - 0x8C100911, // 0070 GETMET R4 R4 K17 - 0x60180018, // 0071 GETGBL R6 G24 - 0x581C0016, // 0072 LDCONST R7 K22 - 0x78060001, // 0073 JMPF R1 #0076 - 0x58200004, // 0074 LDCONST R8 K4 - 0x70020000, // 0075 JMP #0077 - 0x58200014, // 0076 LDCONST R8 K20 - 0x78060001, // 0077 JMPF R1 #007A - 0x88240105, // 0078 GETMBR R9 R0 K5 - 0x70020000, // 0079 JMP #007B - 0x88240115, // 007A GETMBR R9 R0 K21 - 0x7C180600, // 007B CALL R6 3 - 0x581C0013, // 007C LDCONST R7 K19 - 0x7C100600, // 007D CALL R4 3 - 0xA8040001, // 007E EXBLK 1 1 - 0x70020010, // 007F JMP #0091 - 0xAC100002, // 0080 CATCH R4 0 2 - 0x7002000D, // 0081 JMP #0090 - 0xB81A0600, // 0082 GETNGBL R6 K3 - 0x8C180D11, // 0083 GETMET R6 R6 K17 - 0x60200008, // 0084 GETGBL R8 G8 - 0x5C240800, // 0085 MOVE R9 R4 - 0x7C200200, // 0086 CALL R8 1 - 0x00222E08, // 0087 ADD R8 K23 R8 - 0x00201118, // 0088 ADD R8 R8 K24 - 0x60240008, // 0089 GETGBL R9 G8 - 0x5C280A00, // 008A MOVE R10 R5 - 0x7C240200, // 008B CALL R9 1 - 0x00201009, // 008C ADD R8 R8 R9 - 0x58240019, // 008D LDCONST R9 K25 - 0x7C180600, // 008E CALL R6 3 - 0x70020000, // 008F JMP #0091 - 0xB0080000, // 0090 RAISE 2 R0 R0 - 0x8C10011A, // 0091 GETMET R4 R0 K26 - 0x7C100200, // 0092 CALL R4 1 - 0x80000000, // 0093 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: msg_send -********************************************************************/ -be_local_closure(Matter_Device_msg_send, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(send_UDP), - }), - be_str_weak(msg_send), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x600C0008, // 0001 GETGBL R3 G8 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 + 0x7C0C0200, // 0003 CALL R3 1 + 0x4C100000, // 0004 LDNIL R4 + 0x4C140000, // 0005 LDNIL R5 + 0x88180101, // 0006 GETMBR R6 R0 K1 + 0x8C180D02, // 0007 GETMET R6 R6 K2 + 0x5C200600, // 0008 MOVE R8 R3 + 0x7C180400, // 0009 CALL R6 2 + 0x741A0005, // 000A JMPT R6 #0011 + 0xB81A0600, // 000B GETNGBL R6 K3 + 0x8C180D04, // 000C GETMET R6 R6 K4 + 0x00220A03, // 000D ADD R8 K5 R3 + 0x58240006, // 000E LDCONST R9 K6 + 0x7C180600, // 000F CALL R6 3 + 0x80000C00, // 0010 RET 0 + 0xB81A0600, // 0011 GETNGBL R6 K3 + 0x8C180D04, // 0012 GETMET R6 R6 K4 + 0x60200018, // 0013 GETGBL R8 G24 + 0x58240007, // 0014 LDCONST R9 K7 + 0x5C280200, // 0015 MOVE R10 R1 + 0x7C200400, // 0016 CALL R8 2 + 0x58240008, // 0017 LDCONST R9 K8 + 0x7C180600, // 0018 CALL R6 3 + 0x88180101, // 0019 GETMBR R6 R0 K1 + 0x8C180D09, // 001A GETMET R6 R6 K9 + 0x5C200600, // 001B MOVE R8 R3 + 0x7C180400, // 001C CALL R6 2 + 0x50180200, // 001D LDBOOL R6 1 0 + 0x90021406, // 001E SETMBR R0 K10 R6 + 0x5818000B, // 001F LDCONST R6 K11 + 0x601C000C, // 0020 GETGBL R7 G12 + 0x8820010C, // 0021 GETMBR R8 R0 K12 + 0x7C1C0200, // 0022 CALL R7 1 + 0x141C0C07, // 0023 LT R7 R6 R7 + 0x781E000D, // 0024 JMPF R7 #0033 + 0x881C010C, // 0025 GETMBR R7 R0 K12 + 0x941C0E06, // 0026 GETIDX R7 R7 R6 + 0x8C1C0F0D, // 0027 GETMET R7 R7 K13 + 0x7C1C0200, // 0028 CALL R7 1 + 0x1C1C0207, // 0029 EQ R7 R1 R7 + 0x781E0005, // 002A JMPF R7 #0031 + 0x881C010C, // 002B GETMBR R7 R0 K12 + 0x8C1C0F09, // 002C GETMET R7 R7 K9 + 0x5C240C00, // 002D MOVE R9 R6 + 0x7C1C0400, // 002E CALL R7 2 + 0x70020002, // 002F JMP #0033 + 0x70020000, // 0030 JMP #0032 + 0x00180D0E, // 0031 ADD R6 R6 K14 + 0x7001FFEC, // 0032 JMP #0020 + 0x8C1C010F, // 0033 GETMET R7 R0 K15 + 0x7C1C0200, // 0034 CALL R7 1 + 0x8C1C0110, // 0035 GETMET R7 R0 K16 + 0x7C1C0200, // 0036 CALL R7 1 + 0x8C1C0111, // 0037 GETMET R7 R0 K17 + 0x7C1C0200, // 0038 CALL R7 1 + 0x80000000, // 0039 RET 0 }) ) ); @@ -2801,41 +2271,76 @@ be_local_closure(Matter_Device_msg_send, /* name */ /******************************************************************** -** Solidified function: start_operational_discovery +** Solidified function: start ********************************************************************/ -be_local_closure(Matter_Device_start_operational_discovery, /* name */ +be_local_closure(Matter_Device_start, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ + 6, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 2, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_trigger_read_sensors), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x7C000200, // 0002 CALL R0 1 + 0x80000000, // 0003 RET 0 + }) + ), + }), 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(mdns), - /* K2 */ be_nested_str_weak(stop_basic_commissioning), - /* K3 */ be_nested_str_weak(root_w0), - /* K4 */ be_nested_str_weak(root_L), - /* K5 */ be_nested_str_weak(mdns_announce_op_discovery), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(started), + /* K1 */ be_nested_str_weak(autoconf_device), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(add_cron), + /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A), + /* K5 */ be_nested_str_weak(matter_sensors_30s), + /* K6 */ be_nested_str_weak(_start_udp), + /* K7 */ be_nested_str_weak(UDP_PORT), + /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames), }), - be_str_weak(start_operational_discovery), + be_str_weak(start), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0x8C100102, // 0002 GETMET R4 R0 K2 - 0x7C100200, // 0003 CALL R4 1 - 0x4C100000, // 0004 LDNIL R4 - 0x90020604, // 0005 SETMBR R0 K3 R4 - 0x4C100000, // 0006 LDNIL R4 - 0x90020804, // 0007 SETMBR R0 K4 R4 - 0x8C100105, // 0008 GETMET R4 R0 K5 - 0x5C180200, // 0009 MOVE R6 R1 - 0x7C100400, // 000A CALL R4 2 - 0x80000000, // 000B RET 0 + ( &(const binstruction[20]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060000, // 0001 JMPF R1 #0003 + 0x80000200, // 0002 RET 0 + 0x8C040101, // 0003 GETMET R1 R0 K1 + 0x7C040200, // 0004 CALL R1 1 + 0xB8060400, // 0005 GETNGBL R1 K2 + 0x8C040303, // 0006 GETMET R1 R1 K3 + 0x580C0004, // 0007 LDCONST R3 K4 + 0x84100000, // 0008 CLOSURE R4 P0 + 0x58140005, // 0009 LDCONST R5 K5 + 0x7C040800, // 000A CALL R1 4 + 0x8C040106, // 000B GETMET R1 R0 K6 + 0x880C0107, // 000C GETMBR R3 R0 K7 + 0x7C040400, // 000D CALL R1 2 + 0x8C040108, // 000E GETMET R1 R0 K8 + 0x7C040200, // 000F CALL R1 1 + 0x50040200, // 0010 LDBOOL R1 1 0 + 0x90020001, // 0011 SETMBR R0 K0 R1 + 0xA0000000, // 0012 CLOSE R0 + 0x80000000, // 0013 RET 0 }) ) ); @@ -2843,11 +2348,11 @@ be_local_closure(Matter_Device_start_operational_discovery, /* name */ /******************************************************************** -** Solidified function: every_50ms +** Solidified function: stop_basic_commissioning ********************************************************************/ -be_local_closure(Matter_Device_every_50ms, /* name */ +be_local_closure(Matter_Device_stop_basic_commissioning, /* name */ be_nested_proto( - 2, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2855,17 +2360,49 @@ be_local_closure(Matter_Device_every_50ms, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_const_int(1), + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(is_root_commissioning_open), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(publish_result), + /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D), + /* K4 */ be_nested_str_weak(Matter), + /* K5 */ be_nested_str_weak(commissioning_open), + /* K6 */ be_nested_str_weak(mdns_remove_PASE), + /* K7 */ be_nested_str_weak(commissioning_iterations), + /* K8 */ be_nested_str_weak(commissioning_discriminator), + /* K9 */ be_nested_str_weak(commissioning_salt), + /* K10 */ be_nested_str_weak(commissioning_w0), + /* K11 */ be_nested_str_weak(commissioning_L), + /* K12 */ be_nested_str_weak(commissioning_admin_fabric), }), - be_str_weak(every_50ms), + be_str_weak(stop_basic_commissioning), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x00040301, // 0001 ADD R1 R1 K1 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x80000000, // 0003 RET 0 + ( &(const binstruction[25]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x78060004, // 0002 JMPF R1 #0008 + 0xB8060200, // 0003 GETNGBL R1 K1 + 0x8C040302, // 0004 GETMET R1 R1 K2 + 0x580C0003, // 0005 LDCONST R3 K3 + 0x58100004, // 0006 LDCONST R4 K4 + 0x7C040600, // 0007 CALL R1 3 + 0x4C040000, // 0008 LDNIL R1 + 0x90020A01, // 0009 SETMBR R0 K5 R1 + 0x8C040106, // 000A GETMET R1 R0 K6 + 0x7C040200, // 000B CALL R1 1 + 0x4C040000, // 000C LDNIL R1 + 0x90020E01, // 000D SETMBR R0 K7 R1 + 0x4C040000, // 000E LDNIL R1 + 0x90021001, // 000F SETMBR R0 K8 R1 + 0x4C040000, // 0010 LDNIL R1 + 0x90021201, // 0011 SETMBR R0 K9 R1 + 0x4C040000, // 0012 LDNIL R1 + 0x90021401, // 0013 SETMBR R0 K10 R1 + 0x4C040000, // 0014 LDNIL R1 + 0x90021601, // 0015 SETMBR R0 K11 R1 + 0x4C040000, // 0016 LDNIL R1 + 0x90021801, // 0017 SETMBR R0 K12 R1 + 0x80000000, // 0018 RET 0 }) ) ); @@ -2873,250 +2410,246 @@ be_local_closure(Matter_Device_every_50ms, /* name */ /******************************************************************** -** Solidified function: k2l_num +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Device_k2l_num, /* name */ +be_local_closure(Matter_Device_init, /* name */ be_nested_proto( - 9, /* nstack */ + 7, /* nstack */ 1, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Device), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(push), - /* K3 */ be_nested_str_weak(stop_iteration), - /* K4 */ be_const_int(1), - /* K5 */ be_const_int(0), - }), - be_str_weak(k2l_num), - &be_const_str_solidified, - ( &(const binstruction[52]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x60080012, // 0001 GETGBL R2 G18 - 0x7C080000, // 0002 CALL R2 0 - 0x4C0C0000, // 0003 LDNIL R3 - 0x1C0C0003, // 0004 EQ R3 R0 R3 - 0x780E0000, // 0005 JMPF R3 #0007 - 0x80040400, // 0006 RET 1 R2 - 0x600C0010, // 0007 GETGBL R3 G16 - 0x8C100101, // 0008 GETMET R4 R0 K1 - 0x7C100200, // 0009 CALL R4 1 - 0x7C0C0200, // 000A CALL R3 1 - 0xA8020007, // 000B EXBLK 0 #0014 - 0x5C100600, // 000C MOVE R4 R3 - 0x7C100000, // 000D CALL R4 0 - 0x8C140502, // 000E GETMET R5 R2 K2 - 0x601C0009, // 000F GETGBL R7 G9 - 0x5C200800, // 0010 MOVE R8 R4 - 0x7C1C0200, // 0011 CALL R7 1 - 0x7C140400, // 0012 CALL R5 2 - 0x7001FFF7, // 0013 JMP #000C - 0x580C0003, // 0014 LDCONST R3 K3 - 0xAC0C0200, // 0015 CATCH R3 1 0 - 0xB0080000, // 0016 RAISE 2 R0 R0 - 0x600C0010, // 0017 GETGBL R3 G16 - 0x6010000C, // 0018 GETGBL R4 G12 - 0x5C140400, // 0019 MOVE R5 R2 - 0x7C100200, // 001A CALL R4 1 - 0x04100904, // 001B SUB R4 R4 K4 - 0x40120804, // 001C CONNECT R4 K4 R4 - 0x7C0C0200, // 001D CALL R3 1 - 0xA8020010, // 001E EXBLK 0 #0030 - 0x5C100600, // 001F MOVE R4 R3 - 0x7C100000, // 0020 CALL R4 0 - 0x94140404, // 0021 GETIDX R5 R2 R4 - 0x5C180800, // 0022 MOVE R6 R4 - 0x241C0D05, // 0023 GT R7 R6 K5 - 0x781E0008, // 0024 JMPF R7 #002E - 0x041C0D04, // 0025 SUB R7 R6 K4 - 0x941C0407, // 0026 GETIDX R7 R2 R7 - 0x241C0E05, // 0027 GT R7 R7 R5 - 0x781E0004, // 0028 JMPF R7 #002E - 0x041C0D04, // 0029 SUB R7 R6 K4 - 0x941C0407, // 002A GETIDX R7 R2 R7 - 0x98080C07, // 002B SETIDX R2 R6 R7 - 0x04180D04, // 002C SUB R6 R6 K4 - 0x7001FFF4, // 002D JMP #0023 - 0x98080C05, // 002E SETIDX R2 R6 R5 - 0x7001FFEE, // 002F JMP #001F - 0x580C0003, // 0030 LDCONST R3 K3 - 0xAC0C0200, // 0031 CATCH R3 1 0 - 0xB0080000, // 0032 RAISE 2 R0 R0 - 0x80040400, // 0033 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_commissioning_complete_deferred -********************************************************************/ -be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { + ( &(const struct bproto*[ 2]) { be_nested_proto( - 3, /* nstack */ + 4, /* nstack */ 0, /* argc */ 0, /* varg */ 1, /* has upvals */ - ( &(const bupvaldesc[ 2]) { /* upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ be_local_const_upval(1, 0), - be_local_const_upval(1, 1), }), 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(start_commissioning_complete), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(start), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(remove_rule), + /* K3 */ be_nested_str_weak(Wifi_X23Connected), + /* K4 */ be_nested_str_weak(matter_start), }), - be_str_weak(_X3Clambda_X3E), + be_str_weak(_anonymous_), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ + ( &(const binstruction[ 9]) { /* code */ 0x68000000, // 0000 GETUPV R0 U0 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x68080001, // 0002 GETUPV R2 U1 - 0x7C000400, // 0003 CALL R0 2 - 0x80040000, // 0004 RET 1 R0 + 0x7C000200, // 0002 CALL R0 1 + 0xB8020200, // 0003 GETNGBL R0 K1 + 0x8C000102, // 0004 GETMET R0 R0 K2 + 0x58080003, // 0005 LDCONST R2 K3 + 0x580C0004, // 0006 LDCONST R3 K4 + 0x7C000600, // 0007 CALL R0 3 + 0x80000000, // 0008 RET 0 + }) + ), + be_nested_proto( + 4, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(start), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(remove_rule), + /* K3 */ be_nested_str_weak(Eth_X23Connected), + /* K4 */ be_nested_str_weak(matter_start), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x7C000200, // 0002 CALL R0 1 + 0xB8020200, // 0003 GETNGBL R0 K1 + 0x8C000102, // 0004 GETMET R0 R0 K2 + 0x58080003, // 0005 LDCONST R2 K3 + 0x580C0004, // 0006 LDCONST R3 K4 + 0x7C000600, // 0007 CALL R0 3 + 0x80000000, // 0008 RET 0 }) ), }), 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(set_timer), - /* K2 */ be_const_int(0), - }), - be_str_weak(start_commissioning_complete_deferred), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x84140000, // 0003 CLOSURE R5 P0 - 0x7C080600, // 0004 CALL R2 3 - 0xA0000000, // 0005 CLOSE R0 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: is_root_commissioning_open -********************************************************************/ -be_local_closure(Matter_Device_is_root_commissioning_open, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(commissioning_open), - /* K1 */ be_nested_str_weak(commissioning_admin_fabric), - }), - be_str_weak(is_root_commissioning_open), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x20040202, // 0002 NE R1 R1 R2 - 0x78060003, // 0003 JMPF R1 #0008 - 0x88040101, // 0004 GETMBR R1 R0 K1 - 0x4C080000, // 0005 LDNIL R2 - 0x1C040202, // 0006 EQ R1 R1 R2 - 0x74060000, // 0007 JMPT R1 #0009 - 0x50040001, // 0008 LDBOOL R1 0 1 - 0x50040200, // 0009 LDBOOL R1 1 0 - 0x80040200, // 000A RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _trigger_read_sensors -********************************************************************/ -be_local_closure(Matter_Device__trigger_read_sensors, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(json), + ( &(const bvalue[46]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(read_sensors), - /* K3 */ be_nested_str_weak(load), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(plugins), - /* K6 */ be_nested_str_weak(parse_sensors), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(log), - /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20), - /* K10 */ be_const_int(3), + /* K2 */ be_nested_str_weak(get_option), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(MATTER_OPTION), + /* K5 */ be_nested_str_weak(UI), + /* K6 */ be_nested_str_weak(profiler), + /* K7 */ be_nested_str_weak(Profiler), + /* K8 */ be_nested_str_weak(started), + /* K9 */ be_nested_str_weak(tick), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(plugins), + /* K12 */ be_nested_str_weak(plugins_persist), + /* K13 */ be_nested_str_weak(plugins_classes), + /* K14 */ be_nested_str_weak(plugins_config_remotes), + /* K15 */ be_nested_str_weak(register_native_classes), + /* K16 */ be_nested_str_weak(vendorid), + /* K17 */ be_nested_str_weak(VENDOR_ID), + /* K18 */ be_nested_str_weak(productid), + /* K19 */ be_nested_str_weak(PRODUCT_ID), + /* K20 */ be_nested_str_weak(root_iterations), + /* K21 */ be_nested_str_weak(PBKDF_ITERATIONS), + /* K22 */ be_nested_str_weak(next_ep), + /* K23 */ be_const_int(1), + /* K24 */ be_nested_str_weak(root_salt), + /* K25 */ be_nested_str_weak(random), + /* K26 */ be_nested_str_weak(ipv4only), + /* K27 */ be_nested_str_weak(disable_bridge_mode), + /* K28 */ be_nested_str_weak(load_param), + /* K29 */ be_nested_str_weak(sessions), + /* K30 */ be_nested_str_weak(Session_Store), + /* K31 */ be_nested_str_weak(load_fabrics), + /* K32 */ be_nested_str_weak(message_handler), + /* K33 */ be_nested_str_weak(MessageHandler), + /* K34 */ be_nested_str_weak(ui), + /* K35 */ be_nested_str_weak(wifi), + /* K36 */ be_nested_str_weak(up), + /* K37 */ be_nested_str_weak(eth), + /* K38 */ be_nested_str_weak(start), + /* K39 */ be_nested_str_weak(add_rule), + /* K40 */ be_nested_str_weak(Wifi_X23Connected), + /* K41 */ be_nested_str_weak(matter_start), + /* K42 */ be_nested_str_weak(Eth_X23Connected), + /* K43 */ be_nested_str_weak(_init_basic_commissioning), + /* K44 */ be_nested_str_weak(add_driver), + /* K45 */ be_nested_str_weak(register_commands), }), - be_str_weak(_trigger_read_sensors), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ + ( &(const binstruction[112]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xB80A0200, // 0001 GETNGBL R2 K1 0x8C080502, // 0002 GETMET R2 R2 K2 - 0x7C080200, // 0003 CALL R2 1 - 0x4C0C0000, // 0004 LDNIL R3 - 0x1C0C0403, // 0005 EQ R3 R2 R3 - 0x780E0000, // 0006 JMPF R3 #0008 - 0x80000600, // 0007 RET 0 - 0x8C0C0303, // 0008 GETMET R3 R1 K3 - 0x5C140400, // 0009 MOVE R5 R2 - 0x7C0C0400, // 000A CALL R3 2 - 0x4C100000, // 000B LDNIL R4 - 0x20100604, // 000C NE R4 R3 R4 - 0x7812000D, // 000D JMPF R4 #001C - 0x58100004, // 000E LDCONST R4 K4 - 0x6014000C, // 000F GETGBL R5 G12 - 0x88180105, // 0010 GETMBR R6 R0 K5 - 0x7C140200, // 0011 CALL R5 1 - 0x14140805, // 0012 LT R5 R4 R5 - 0x78160006, // 0013 JMPF R5 #001B - 0x88140105, // 0014 GETMBR R5 R0 K5 - 0x94140A04, // 0015 GETIDX R5 R5 R4 - 0x8C140B06, // 0016 GETMET R5 R5 K6 - 0x5C1C0600, // 0017 MOVE R7 R3 - 0x7C140400, // 0018 CALL R5 2 - 0x00100907, // 0019 ADD R4 R4 K7 - 0x7001FFF3, // 001A JMP #000F - 0x70020007, // 001B JMP #0024 - 0xB8120200, // 001C GETNGBL R4 K1 - 0x8C100908, // 001D GETMET R4 R4 K8 - 0x60180008, // 001E GETGBL R6 G8 - 0x5C1C0400, // 001F MOVE R7 R2 - 0x7C180200, // 0020 CALL R6 1 - 0x001A1206, // 0021 ADD R6 K9 R6 - 0x581C000A, // 0022 LDCONST R7 K10 - 0x7C100600, // 0023 CALL R4 3 - 0x80000000, // 0024 RET 0 + 0xB8120600, // 0003 GETNGBL R4 K3 + 0x88100904, // 0004 GETMBR R4 R4 K4 + 0x7C080400, // 0005 CALL R2 2 + 0x740A0004, // 0006 JMPT R2 #000C + 0xB80A0600, // 0007 GETNGBL R2 K3 + 0x8C080505, // 0008 GETMET R2 R2 K5 + 0x5C100000, // 0009 MOVE R4 R0 + 0x7C080400, // 000A CALL R2 2 + 0x80000400, // 000B RET 0 + 0xB80A0600, // 000C GETNGBL R2 K3 + 0xB80E0600, // 000D GETNGBL R3 K3 + 0x8C0C0707, // 000E GETMET R3 R3 K7 + 0x7C0C0200, // 000F CALL R3 1 + 0x900A0C03, // 0010 SETMBR R2 K6 R3 + 0x50080000, // 0011 LDBOOL R2 0 0 + 0x90021002, // 0012 SETMBR R0 K8 R2 + 0x9002130A, // 0013 SETMBR R0 K9 K10 + 0x60080012, // 0014 GETGBL R2 G18 + 0x7C080000, // 0015 CALL R2 0 + 0x90021602, // 0016 SETMBR R0 K11 R2 + 0x50080000, // 0017 LDBOOL R2 0 0 + 0x90021802, // 0018 SETMBR R0 K12 R2 + 0x60080013, // 0019 GETGBL R2 G19 + 0x7C080000, // 001A CALL R2 0 + 0x90021A02, // 001B SETMBR R0 K13 R2 + 0x60080013, // 001C GETGBL R2 G19 + 0x7C080000, // 001D CALL R2 0 + 0x90021C02, // 001E SETMBR R0 K14 R2 + 0x8C08010F, // 001F GETMET R2 R0 K15 + 0x7C080200, // 0020 CALL R2 1 + 0x88080111, // 0021 GETMBR R2 R0 K17 + 0x90022002, // 0022 SETMBR R0 K16 R2 + 0x88080113, // 0023 GETMBR R2 R0 K19 + 0x90022402, // 0024 SETMBR R0 K18 R2 + 0x88080115, // 0025 GETMBR R2 R0 K21 + 0x90022802, // 0026 SETMBR R0 K20 R2 + 0x90022D17, // 0027 SETMBR R0 K22 K23 + 0x8C080319, // 0028 GETMET R2 R1 K25 + 0x5412000F, // 0029 LDINT R4 16 + 0x7C080400, // 002A CALL R2 2 + 0x90023002, // 002B SETMBR R0 K24 R2 + 0x50080000, // 002C LDBOOL R2 0 0 + 0x90023402, // 002D SETMBR R0 K26 R2 + 0x50080000, // 002E LDBOOL R2 0 0 + 0x90023602, // 002F SETMBR R0 K27 R2 + 0x8C08011C, // 0030 GETMET R2 R0 K28 + 0x7C080200, // 0031 CALL R2 1 + 0xB80A0600, // 0032 GETNGBL R2 K3 + 0x8C08051E, // 0033 GETMET R2 R2 K30 + 0x5C100000, // 0034 MOVE R4 R0 + 0x7C080400, // 0035 CALL R2 2 + 0x90023A02, // 0036 SETMBR R0 K29 R2 + 0x8808011D, // 0037 GETMBR R2 R0 K29 + 0x8C08051F, // 0038 GETMET R2 R2 K31 + 0x7C080200, // 0039 CALL R2 1 + 0xB80A0600, // 003A GETNGBL R2 K3 + 0x8C080521, // 003B GETMET R2 R2 K33 + 0x5C100000, // 003C MOVE R4 R0 + 0x7C080400, // 003D CALL R2 2 + 0x90024002, // 003E SETMBR R0 K32 R2 + 0xB80A0600, // 003F GETNGBL R2 K3 + 0x8C080505, // 0040 GETMET R2 R2 K5 + 0x5C100000, // 0041 MOVE R4 R0 + 0x7C080400, // 0042 CALL R2 2 + 0x90024402, // 0043 SETMBR R0 K34 R2 + 0xB80A0200, // 0044 GETNGBL R2 K1 + 0x8C080523, // 0045 GETMET R2 R2 K35 + 0x7C080200, // 0046 CALL R2 1 + 0x94080524, // 0047 GETIDX R2 R2 K36 + 0x740A0004, // 0048 JMPT R2 #004E + 0xB80A0200, // 0049 GETNGBL R2 K1 + 0x8C080525, // 004A GETMET R2 R2 K37 + 0x7C080200, // 004B CALL R2 1 + 0x94080524, // 004C GETIDX R2 R2 K36 + 0x780A0001, // 004D JMPF R2 #0050 + 0x8C080126, // 004E GETMET R2 R0 K38 + 0x7C080200, // 004F CALL R2 1 + 0xB80A0200, // 0050 GETNGBL R2 K1 + 0x8C080523, // 0051 GETMET R2 R2 K35 + 0x7C080200, // 0052 CALL R2 1 + 0x94080524, // 0053 GETIDX R2 R2 K36 + 0x740A0005, // 0054 JMPT R2 #005B + 0xB80A0200, // 0055 GETNGBL R2 K1 + 0x8C080527, // 0056 GETMET R2 R2 K39 + 0x58100028, // 0057 LDCONST R4 K40 + 0x84140000, // 0058 CLOSURE R5 P0 + 0x58180029, // 0059 LDCONST R6 K41 + 0x7C080800, // 005A CALL R2 4 + 0xB80A0200, // 005B GETNGBL R2 K1 + 0x8C080525, // 005C GETMET R2 R2 K37 + 0x7C080200, // 005D CALL R2 1 + 0x94080524, // 005E GETIDX R2 R2 K36 + 0x740A0005, // 005F JMPT R2 #0066 + 0xB80A0200, // 0060 GETNGBL R2 K1 + 0x8C080527, // 0061 GETMET R2 R2 K39 + 0x5810002A, // 0062 LDCONST R4 K42 + 0x84140001, // 0063 CLOSURE R5 P1 + 0x58180029, // 0064 LDCONST R6 K41 + 0x7C080800, // 0065 CALL R2 4 + 0x8C08012B, // 0066 GETMET R2 R0 K43 + 0x7C080200, // 0067 CALL R2 1 + 0xB80A0200, // 0068 GETNGBL R2 K1 + 0x8C08052C, // 0069 GETMET R2 R2 K44 + 0x5C100000, // 006A MOVE R4 R0 + 0x7C080400, // 006B CALL R2 2 + 0x8C08012D, // 006C GETMET R2 R0 K45 + 0x7C080200, // 006D CALL R2 1 + 0xA0000000, // 006E CLOSE R0 + 0x80000000, // 006F RET 0 }) ) ); @@ -3124,11 +2657,11 @@ be_local_closure(Matter_Device__trigger_read_sensors, /* name */ /******************************************************************** -** Solidified function: save_param +** Solidified function: adjust_next_ep ********************************************************************/ -be_local_closure(Matter_Device_save_param, /* name */ +be_local_closure(Matter_Device_adjust_next_ep, /* name */ be_nested_proto( - 10, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -3136,175 +2669,37 @@ be_local_closure(Matter_Device_save_param, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[30]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(update_remotes_info), - /* K2 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s_X2C_X22disable_bridge_mode_X22_X3A_X25s_X2C_X22nextep_X22_X3A_X25i), - /* K3 */ be_nested_str_weak(root_discriminator), - /* K4 */ be_nested_str_weak(root_passcode), - /* K5 */ be_nested_str_weak(ipv4only), - /* K6 */ be_nested_str_weak(true), - /* K7 */ be_nested_str_weak(false), - /* K8 */ be_nested_str_weak(disable_bridge_mode), - /* K9 */ be_nested_str_weak(next_ep), - /* K10 */ be_nested_str_weak(plugins_persist), - /* K11 */ be_nested_str_weak(_X2C_X22config_X22_X3A), - /* K12 */ be_nested_str_weak(dump), - /* K13 */ be_nested_str_weak(plugins_config), - /* K14 */ be_nested_str_weak(plugins_config_remotes), - /* K15 */ be_const_int(0), - /* K16 */ be_nested_str_weak(_X2C_X22remotes_X22_X3A), - /* K17 */ be_nested_str_weak(_X7D), - /* K18 */ be_nested_str_weak(FILENAME), - /* K19 */ be_nested_str_weak(w), - /* K20 */ be_nested_str_weak(write), - /* K21 */ be_nested_str_weak(close), - /* K22 */ be_nested_str_weak(tasmota), - /* K23 */ be_nested_str_weak(log), - /* K24 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s), - /* K25 */ be_nested_str_weak(_X20and_X20configuration), - /* K26 */ be_nested_str_weak(), - /* K27 */ be_const_int(2), - /* K28 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), - /* K29 */ be_nested_str_weak(_X7C), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(plugins_config), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(next_ep), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(save_param), + be_str_weak(adjust_next_ep), &be_const_str_solidified, - ( &(const binstruction[82]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x60080018, // 0003 GETGBL R2 G24 - 0x580C0002, // 0004 LDCONST R3 K2 - 0x88100103, // 0005 GETMBR R4 R0 K3 - 0x88140104, // 0006 GETMBR R5 R0 K4 - 0x88180105, // 0007 GETMBR R6 R0 K5 - 0x781A0001, // 0008 JMPF R6 #000B - 0x58180006, // 0009 LDCONST R6 K6 - 0x70020000, // 000A JMP #000C - 0x58180007, // 000B LDCONST R6 K7 - 0x881C0108, // 000C GETMBR R7 R0 K8 - 0x781E0001, // 000D JMPF R7 #0010 - 0x581C0006, // 000E LDCONST R7 K6 - 0x70020000, // 000F JMP #0011 - 0x581C0007, // 0010 LDCONST R7 K7 - 0x88200109, // 0011 GETMBR R8 R0 K9 - 0x7C080C00, // 0012 CALL R2 6 - 0x880C010A, // 0013 GETMBR R3 R0 K10 - 0x780E000E, // 0014 JMPF R3 #0024 - 0x0008050B, // 0015 ADD R2 R2 K11 - 0x8C0C030C, // 0016 GETMET R3 R1 K12 - 0x8814010D, // 0017 GETMBR R5 R0 K13 - 0x7C0C0400, // 0018 CALL R3 2 - 0x00080403, // 0019 ADD R2 R2 R3 - 0x600C000C, // 001A GETGBL R3 G12 - 0x8810010E, // 001B GETMBR R4 R0 K14 - 0x7C0C0200, // 001C CALL R3 1 - 0x240C070F, // 001D GT R3 R3 K15 - 0x780E0004, // 001E JMPF R3 #0024 - 0x00080510, // 001F ADD R2 R2 K16 - 0x8C0C030C, // 0020 GETMET R3 R1 K12 - 0x8814010E, // 0021 GETMBR R5 R0 K14 - 0x7C0C0400, // 0022 CALL R3 2 - 0x00080403, // 0023 ADD R2 R2 R3 - 0x00080511, // 0024 ADD R2 R2 K17 - 0xA8020018, // 0025 EXBLK 0 #003F - 0x600C0011, // 0026 GETGBL R3 G17 - 0x88100112, // 0027 GETMBR R4 R0 K18 - 0x58140013, // 0028 LDCONST R5 K19 - 0x7C0C0400, // 0029 CALL R3 2 - 0x8C100714, // 002A GETMET R4 R3 K20 - 0x5C180400, // 002B MOVE R6 R2 - 0x7C100400, // 002C CALL R4 2 - 0x8C100715, // 002D GETMET R4 R3 K21 - 0x7C100200, // 002E CALL R4 1 - 0xB8122C00, // 002F GETNGBL R4 K22 - 0x8C100917, // 0030 GETMET R4 R4 K23 - 0x60180018, // 0031 GETGBL R6 G24 - 0x581C0018, // 0032 LDCONST R7 K24 - 0x8820010A, // 0033 GETMBR R8 R0 K10 - 0x78220001, // 0034 JMPF R8 #0037 - 0x58200019, // 0035 LDCONST R8 K25 - 0x70020000, // 0036 JMP #0038 - 0x5820001A, // 0037 LDCONST R8 K26 - 0x7C180400, // 0038 CALL R6 2 - 0x581C001B, // 0039 LDCONST R7 K27 - 0x7C100600, // 003A CALL R4 3 - 0xA8040001, // 003B EXBLK 1 1 - 0x80040400, // 003C RET 1 R2 - 0xA8040001, // 003D EXBLK 1 1 - 0x70020011, // 003E JMP #0051 - 0xAC0C0002, // 003F CATCH R3 0 2 - 0x7002000E, // 0040 JMP #0050 - 0xB8162C00, // 0041 GETNGBL R5 K22 - 0x8C140B17, // 0042 GETMET R5 R5 K23 - 0x601C0008, // 0043 GETGBL R7 G8 - 0x5C200600, // 0044 MOVE R8 R3 - 0x7C1C0200, // 0045 CALL R7 1 - 0x001E3807, // 0046 ADD R7 K28 R7 - 0x001C0F1D, // 0047 ADD R7 R7 K29 - 0x60200008, // 0048 GETGBL R8 G8 - 0x5C240800, // 0049 MOVE R9 R4 - 0x7C200200, // 004A CALL R8 1 - 0x001C0E08, // 004B ADD R7 R7 R8 - 0x5820001B, // 004C LDCONST R8 K27 - 0x7C140600, // 004D CALL R5 3 - 0x80040400, // 004E RET 1 R2 - 0x70020000, // 004F JMP #0051 - 0xB0080000, // 0050 RAISE 2 R0 R0 - 0x80000000, // 0051 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: mdns_announce_op_discovery_all_fabrics -********************************************************************/ -be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(active_fabrics), - /* K2 */ be_nested_str_weak(get_device_id), - /* K3 */ be_nested_str_weak(get_fabric_id), - /* K4 */ be_nested_str_weak(mdns_announce_op_discovery), - /* K5 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(mdns_announce_op_discovery_all_fabrics), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ + ( &(const binstruction[21]) { /* code */ 0x60040010, // 0000 GETGBL R1 G16 0x88080100, // 0001 GETMBR R2 R0 K0 0x8C080501, // 0002 GETMET R2 R2 K1 0x7C080200, // 0003 CALL R2 1 0x7C040200, // 0004 CALL R1 1 - 0xA802000B, // 0005 EXBLK 0 #0012 + 0xA802000A, // 0005 EXBLK 0 #0011 0x5C080200, // 0006 MOVE R2 R1 0x7C080000, // 0007 CALL R2 0 - 0x8C0C0502, // 0008 GETMET R3 R2 K2 - 0x7C0C0200, // 0009 CALL R3 1 - 0x780E0005, // 000A JMPF R3 #0011 - 0x8C0C0503, // 000B GETMET R3 R2 K3 - 0x7C0C0200, // 000C CALL R3 1 - 0x780E0002, // 000D JMPF R3 #0011 - 0x8C0C0104, // 000E GETMET R3 R0 K4 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x7001FFF3, // 0011 JMP #0006 - 0x58040005, // 0012 LDCONST R1 K5 - 0xAC040200, // 0013 CATCH R1 1 0 - 0xB0080000, // 0014 RAISE 2 R0 R0 - 0x80000000, // 0015 RET 0 + 0x600C0009, // 0008 GETGBL R3 G9 + 0x5C100400, // 0009 MOVE R4 R2 + 0x7C0C0200, // 000A CALL R3 1 + 0x88100102, // 000B GETMBR R4 R0 K2 + 0x28100604, // 000C GE R4 R3 R4 + 0x78120001, // 000D JMPF R4 #0010 + 0x00100703, // 000E ADD R4 R3 K3 + 0x90020404, // 000F SETMBR R0 K2 R4 + 0x7001FFF4, // 0010 JMP #0006 + 0x58040004, // 0011 LDCONST R1 K4 + 0xAC040200, // 0012 CATCH R1 1 0 + 0xB0080000, // 0013 RAISE 2 R0 R0 + 0x80000000, // 0014 RET 0 }) ) ); @@ -3312,57 +2707,40 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name /******************************************************************** -** Solidified function: get_active_endpoints +** Solidified function: MtrJoin ********************************************************************/ -be_local_closure(Matter_Device_get_active_endpoints, /* name */ +be_local_closure(Matter_Device_MtrJoin, /* name */ be_nested_proto( - 9, /* nstack */ - 2, /* argc */ + 8, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(plugins), - /* K1 */ be_nested_str_weak(get_endpoint), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(start_root_basic_commissioning), + /* K1 */ be_nested_str_weak(stop_basic_commissioning), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(resp_cmnd_done), }), - be_str_weak(get_active_endpoints), + be_str_weak(MtrJoin), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x88100100, // 0003 GETMBR R4 R0 K0 - 0x7C0C0200, // 0004 CALL R3 1 - 0xA8020011, // 0005 EXBLK 0 #0018 - 0x5C100600, // 0006 MOVE R4 R3 - 0x7C100000, // 0007 CALL R4 0 - 0x8C140901, // 0008 GETMET R5 R4 K1 - 0x7C140200, // 0009 CALL R5 1 - 0x78060002, // 000A JMPF R1 #000E - 0x1C180B02, // 000B EQ R6 R5 K2 - 0x781A0000, // 000C JMPF R6 #000E - 0x7001FFF7, // 000D JMP #0006 - 0x8C180503, // 000E GETMET R6 R2 K3 - 0x5C200A00, // 000F MOVE R8 R5 - 0x7C180400, // 0010 CALL R6 2 - 0x4C1C0000, // 0011 LDNIL R7 - 0x1C180C07, // 0012 EQ R6 R6 R7 - 0x781A0002, // 0013 JMPF R6 #0017 - 0x8C180504, // 0014 GETMET R6 R2 K4 - 0x5C200A00, // 0015 MOVE R8 R5 - 0x7C180400, // 0016 CALL R6 2 - 0x7001FFED, // 0017 JMP #0006 - 0x580C0005, // 0018 LDCONST R3 K5 - 0xAC0C0200, // 0019 CATCH R3 1 0 - 0xB0080000, // 001A RAISE 2 R0 R0 - 0x80040400, // 001B RET 1 R2 + ( &(const binstruction[13]) { /* code */ + 0x60140009, // 0000 GETGBL R5 G9 + 0x5C180600, // 0001 MOVE R6 R3 + 0x7C140200, // 0002 CALL R5 1 + 0x78160002, // 0003 JMPF R5 #0007 + 0x8C180100, // 0004 GETMET R6 R0 K0 + 0x7C180200, // 0005 CALL R6 1 + 0x70020001, // 0006 JMP #0009 + 0x8C180101, // 0007 GETMET R6 R0 K1 + 0x7C180200, // 0008 CALL R6 1 + 0xB81A0400, // 0009 GETNGBL R6 K2 + 0x8C180D03, // 000A GETMET R6 R6 K3 + 0x7C180200, // 000B CALL R6 1 + 0x80000000, // 000C RET 0 }) ) ); @@ -3370,36 +2748,29 @@ be_local_closure(Matter_Device_get_active_endpoints, /* name */ /******************************************************************** -** Solidified function: get_plugin_class_displayname +** Solidified function: every_50ms ********************************************************************/ -be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */ +be_local_closure(Matter_Device_every_50ms, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(plugins_classes), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(NAME), - /* K3 */ be_nested_str_weak(), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_const_int(1), }), - be_str_weak(get_plugin_class_displayname), + be_str_weak(every_50ms), &be_const_str_solidified, - ( &(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 - 0x780A0001, // 0004 JMPF R2 #0007 - 0x880C0502, // 0005 GETMBR R3 R2 K2 - 0x70020000, // 0006 JMP #0008 - 0x580C0003, // 0007 LDCONST R3 K3 - 0x80040600, // 0008 RET 1 R3 + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x00040301, // 0001 ADD R1 R1 K1 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x80000000, // 0003 RET 0 }) ) ); @@ -3407,40 +2778,81 @@ be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */ /******************************************************************** -** Solidified function: event_fabrics_saved +** Solidified function: k2l_num ********************************************************************/ -be_local_closure(Matter_Device_event_fabrics_saved, /* name */ +be_local_closure(Matter_Device_k2l_num, /* name */ be_nested_proto( - 3, /* nstack */ + 9, /* nstack */ 1, /* argc */ - 2, /* varg */ + 4, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(count_active_fabrics), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(plugins_persist), - /* K4 */ be_nested_str_weak(save_param), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Device), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(push), + /* K3 */ be_nested_str_weak(stop_iteration), + /* K4 */ be_const_int(1), + /* K5 */ be_const_int(0), }), - be_str_weak(event_fabrics_saved), + be_str_weak(k2l_num), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x24040302, // 0003 GT R1 R1 K2 - 0x78060005, // 0004 JMPF R1 #000B - 0x88040103, // 0005 GETMBR R1 R0 K3 - 0x74060003, // 0006 JMPT R1 #000B - 0x50040200, // 0007 LDBOOL R1 1 0 - 0x90020601, // 0008 SETMBR R0 K3 R1 - 0x8C040104, // 0009 GETMET R1 R0 K4 - 0x7C040200, // 000A CALL R1 1 - 0x80000000, // 000B RET 0 + ( &(const binstruction[52]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x60080012, // 0001 GETGBL R2 G18 + 0x7C080000, // 0002 CALL R2 0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C0C0003, // 0004 EQ R3 R0 R3 + 0x780E0000, // 0005 JMPF R3 #0007 + 0x80040400, // 0006 RET 1 R2 + 0x600C0010, // 0007 GETGBL R3 G16 + 0x8C100101, // 0008 GETMET R4 R0 K1 + 0x7C100200, // 0009 CALL R4 1 + 0x7C0C0200, // 000A CALL R3 1 + 0xA8020007, // 000B EXBLK 0 #0014 + 0x5C100600, // 000C MOVE R4 R3 + 0x7C100000, // 000D CALL R4 0 + 0x8C140502, // 000E GETMET R5 R2 K2 + 0x601C0009, // 000F GETGBL R7 G9 + 0x5C200800, // 0010 MOVE R8 R4 + 0x7C1C0200, // 0011 CALL R7 1 + 0x7C140400, // 0012 CALL R5 2 + 0x7001FFF7, // 0013 JMP #000C + 0x580C0003, // 0014 LDCONST R3 K3 + 0xAC0C0200, // 0015 CATCH R3 1 0 + 0xB0080000, // 0016 RAISE 2 R0 R0 + 0x600C0010, // 0017 GETGBL R3 G16 + 0x6010000C, // 0018 GETGBL R4 G12 + 0x5C140400, // 0019 MOVE R5 R2 + 0x7C100200, // 001A CALL R4 1 + 0x04100904, // 001B SUB R4 R4 K4 + 0x40120804, // 001C CONNECT R4 K4 R4 + 0x7C0C0200, // 001D CALL R3 1 + 0xA8020010, // 001E EXBLK 0 #0030 + 0x5C100600, // 001F MOVE R4 R3 + 0x7C100000, // 0020 CALL R4 0 + 0x94140404, // 0021 GETIDX R5 R2 R4 + 0x5C180800, // 0022 MOVE R6 R4 + 0x241C0D05, // 0023 GT R7 R6 K5 + 0x781E0008, // 0024 JMPF R7 #002E + 0x041C0D04, // 0025 SUB R7 R6 K4 + 0x941C0407, // 0026 GETIDX R7 R2 R7 + 0x241C0E05, // 0027 GT R7 R7 R5 + 0x781E0004, // 0028 JMPF R7 #002E + 0x041C0D04, // 0029 SUB R7 R6 K4 + 0x941C0407, // 002A GETIDX R7 R2 R7 + 0x98080C07, // 002B SETIDX R2 R6 R7 + 0x04180D04, // 002C SUB R6 R6 K4 + 0x7001FFF4, // 002D JMP #0023 + 0x98080C05, // 002E SETIDX R2 R6 R5 + 0x7001FFEE, // 002F JMP #001F + 0x580C0003, // 0030 LDCONST R3 K3 + 0xAC0C0200, // 0031 CATCH R3 1 0 + 0xB0080000, // 0032 RAISE 2 R0 R0 + 0x80040400, // 0033 RET 1 R2 }) ) ); @@ -3448,59 +2860,160 @@ be_local_closure(Matter_Device_event_fabrics_saved, /* name */ /******************************************************************** -** Solidified function: compute_manual_pairing_code +** Solidified function: autoconf_sensors_list ********************************************************************/ -be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */ +be_local_closure(Matter_Device_autoconf_sensors_list, /* name */ be_nested_proto( - 9, /* nstack */ - 1, /* argc */ + 10, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(root_discriminator), - /* K1 */ be_nested_str_weak(root_passcode), - /* K2 */ be_nested_str_weak(_X251i_X2505i_X2504i), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(Verhoeff), - /* K5 */ be_nested_str_weak(checksum), + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(k2l), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(Temperature), + /* K3 */ be_nested_str_weak(_X23Temperature), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_nested_str_weak(type), + /* K6 */ be_nested_str_weak(temperature), + /* K7 */ be_nested_str_weak(filter), + /* K8 */ be_nested_str_weak(stop_iteration), + /* K9 */ be_nested_str_weak(Pressure), + /* K10 */ be_nested_str_weak(_X23Pressure), + /* K11 */ be_nested_str_weak(pressure), + /* K12 */ be_nested_str_weak(Illuminance), + /* K13 */ be_nested_str_weak(_X23Illuminance), + /* K14 */ be_nested_str_weak(illuminance), + /* K15 */ be_nested_str_weak(Humidity), + /* K16 */ be_nested_str_weak(_X23Humidity), + /* K17 */ be_nested_str_weak(humidity), }), - be_str_weak(compute_manual_pairing_code), + be_str_weak(autoconf_sensors_list), &be_const_str_solidified, - ( &(const binstruction[30]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x540A0FFE, // 0001 LDINT R2 4095 - 0x2C040202, // 0002 AND R1 R1 R2 - 0x540A0009, // 0003 LDINT R2 10 - 0x3C040202, // 0004 SHR R1 R1 R2 - 0x88080100, // 0005 GETMBR R2 R0 K0 - 0x540E02FF, // 0006 LDINT R3 768 - 0x2C080403, // 0007 AND R2 R2 R3 - 0x540E0005, // 0008 LDINT R3 6 - 0x38080403, // 0009 SHL R2 R2 R3 - 0x880C0101, // 000A GETMBR R3 R0 K1 - 0x54123FFE, // 000B LDINT R4 16383 - 0x2C0C0604, // 000C AND R3 R3 R4 - 0x30080403, // 000D OR R2 R2 R3 - 0x880C0101, // 000E GETMBR R3 R0 K1 - 0x5412000D, // 000F LDINT R4 14 - 0x3C0C0604, // 0010 SHR R3 R3 R4 - 0x60100018, // 0011 GETGBL R4 G24 - 0x58140002, // 0012 LDCONST R5 K2 - 0x5C180200, // 0013 MOVE R6 R1 - 0x5C1C0400, // 0014 MOVE R7 R2 - 0x5C200600, // 0015 MOVE R8 R3 - 0x7C100800, // 0016 CALL R4 4 - 0xB8160600, // 0017 GETNGBL R5 K3 - 0x88140B04, // 0018 GETMBR R5 R5 K4 - 0x8C140B05, // 0019 GETMET R5 R5 K5 - 0x5C1C0800, // 001A MOVE R7 R4 - 0x7C140400, // 001B CALL R5 2 - 0x00100805, // 001C ADD R4 R4 R5 - 0x80040800, // 001D RET 1 R4 + ( &(const binstruction[119]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x8C100100, // 0003 GETMET R4 R0 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x7C100400, // 0005 CALL R4 2 + 0x7C0C0200, // 0006 CALL R3 1 + 0xA8020013, // 0007 EXBLK 0 #001C + 0x5C100600, // 0008 MOVE R4 R3 + 0x7C100000, // 0009 CALL R4 0 + 0x94140204, // 000A GETIDX R5 R1 R4 + 0x6018000F, // 000B GETGBL R6 G15 + 0x5C1C0A00, // 000C MOVE R7 R5 + 0x60200013, // 000D GETGBL R8 G19 + 0x7C180400, // 000E CALL R6 2 + 0x781A000A, // 000F JMPF R6 #001B + 0x8C180B01, // 0010 GETMET R6 R5 K1 + 0x58200002, // 0011 LDCONST R8 K2 + 0x7C180400, // 0012 CALL R6 2 + 0x781A0006, // 0013 JMPF R6 #001B + 0x00180903, // 0014 ADD R6 R4 K3 + 0x8C1C0504, // 0015 GETMET R7 R2 K4 + 0x60240013, // 0016 GETGBL R9 G19 + 0x7C240000, // 0017 CALL R9 0 + 0x98260B06, // 0018 SETIDX R9 K5 K6 + 0x98260E06, // 0019 SETIDX R9 K7 R6 + 0x7C1C0400, // 001A CALL R7 2 + 0x7001FFEB, // 001B JMP #0008 + 0x580C0008, // 001C LDCONST R3 K8 + 0xAC0C0200, // 001D CATCH R3 1 0 + 0xB0080000, // 001E RAISE 2 R0 R0 + 0x600C0010, // 001F GETGBL R3 G16 + 0x8C100100, // 0020 GETMET R4 R0 K0 + 0x5C180200, // 0021 MOVE R6 R1 + 0x7C100400, // 0022 CALL R4 2 + 0x7C0C0200, // 0023 CALL R3 1 + 0xA8020013, // 0024 EXBLK 0 #0039 + 0x5C100600, // 0025 MOVE R4 R3 + 0x7C100000, // 0026 CALL R4 0 + 0x94140204, // 0027 GETIDX R5 R1 R4 + 0x6018000F, // 0028 GETGBL R6 G15 + 0x5C1C0A00, // 0029 MOVE R7 R5 + 0x60200013, // 002A GETGBL R8 G19 + 0x7C180400, // 002B CALL R6 2 + 0x781A000A, // 002C JMPF R6 #0038 + 0x8C180B01, // 002D GETMET R6 R5 K1 + 0x58200009, // 002E LDCONST R8 K9 + 0x7C180400, // 002F CALL R6 2 + 0x781A0006, // 0030 JMPF R6 #0038 + 0x0018090A, // 0031 ADD R6 R4 K10 + 0x8C1C0504, // 0032 GETMET R7 R2 K4 + 0x60240013, // 0033 GETGBL R9 G19 + 0x7C240000, // 0034 CALL R9 0 + 0x98260B0B, // 0035 SETIDX R9 K5 K11 + 0x98260E06, // 0036 SETIDX R9 K7 R6 + 0x7C1C0400, // 0037 CALL R7 2 + 0x7001FFEB, // 0038 JMP #0025 + 0x580C0008, // 0039 LDCONST R3 K8 + 0xAC0C0200, // 003A CATCH R3 1 0 + 0xB0080000, // 003B RAISE 2 R0 R0 + 0x600C0010, // 003C GETGBL R3 G16 + 0x8C100100, // 003D GETMET R4 R0 K0 + 0x5C180200, // 003E MOVE R6 R1 + 0x7C100400, // 003F CALL R4 2 + 0x7C0C0200, // 0040 CALL R3 1 + 0xA8020013, // 0041 EXBLK 0 #0056 + 0x5C100600, // 0042 MOVE R4 R3 + 0x7C100000, // 0043 CALL R4 0 + 0x94140204, // 0044 GETIDX R5 R1 R4 + 0x6018000F, // 0045 GETGBL R6 G15 + 0x5C1C0A00, // 0046 MOVE R7 R5 + 0x60200013, // 0047 GETGBL R8 G19 + 0x7C180400, // 0048 CALL R6 2 + 0x781A000A, // 0049 JMPF R6 #0055 + 0x8C180B01, // 004A GETMET R6 R5 K1 + 0x5820000C, // 004B LDCONST R8 K12 + 0x7C180400, // 004C CALL R6 2 + 0x781A0006, // 004D JMPF R6 #0055 + 0x0018090D, // 004E ADD R6 R4 K13 + 0x8C1C0504, // 004F GETMET R7 R2 K4 + 0x60240013, // 0050 GETGBL R9 G19 + 0x7C240000, // 0051 CALL R9 0 + 0x98260B0E, // 0052 SETIDX R9 K5 K14 + 0x98260E06, // 0053 SETIDX R9 K7 R6 + 0x7C1C0400, // 0054 CALL R7 2 + 0x7001FFEB, // 0055 JMP #0042 + 0x580C0008, // 0056 LDCONST R3 K8 + 0xAC0C0200, // 0057 CATCH R3 1 0 + 0xB0080000, // 0058 RAISE 2 R0 R0 + 0x600C0010, // 0059 GETGBL R3 G16 + 0x8C100100, // 005A GETMET R4 R0 K0 + 0x5C180200, // 005B MOVE R6 R1 + 0x7C100400, // 005C CALL R4 2 + 0x7C0C0200, // 005D CALL R3 1 + 0xA8020013, // 005E EXBLK 0 #0073 + 0x5C100600, // 005F MOVE R4 R3 + 0x7C100000, // 0060 CALL R4 0 + 0x94140204, // 0061 GETIDX R5 R1 R4 + 0x6018000F, // 0062 GETGBL R6 G15 + 0x5C1C0A00, // 0063 MOVE R7 R5 + 0x60200013, // 0064 GETGBL R8 G19 + 0x7C180400, // 0065 CALL R6 2 + 0x781A000A, // 0066 JMPF R6 #0072 + 0x8C180B01, // 0067 GETMET R6 R5 K1 + 0x5820000F, // 0068 LDCONST R8 K15 + 0x7C180400, // 0069 CALL R6 2 + 0x781A0006, // 006A JMPF R6 #0072 + 0x00180910, // 006B ADD R6 R4 K16 + 0x8C1C0504, // 006C GETMET R7 R2 K4 + 0x60240013, // 006D GETGBL R9 G19 + 0x7C240000, // 006E CALL R9 0 + 0x98260B11, // 006F SETIDX R9 K5 K17 + 0x98260E06, // 0070 SETIDX R9 K7 R6 + 0x7C1C0400, // 0071 CALL R7 2 + 0x7001FFEB, // 0072 JMP #005F + 0x580C0008, // 0073 LDCONST R3 K8 + 0xAC0C0200, // 0074 CATCH R3 1 0 + 0xB0080000, // 0075 RAISE 2 R0 R0 + 0x80040400, // 0076 RET 1 R2 }) ) ); @@ -3508,300 +3021,32 @@ be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */ /******************************************************************** -** Solidified function: mdns_announce_PASE +** Solidified function: msg_received ********************************************************************/ -be_local_closure(Matter_Device_mdns_announce_PASE, /* name */ +be_local_closure(Matter_Device_msg_received, /* name */ be_nested_proto( - 12, /* nstack */ - 1, /* argc */ + 9, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[41]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(crypto), - /* K2 */ be_nested_str_weak(VP), - /* K3 */ be_nested_str_weak(vendorid), - /* K4 */ be_nested_str_weak(_X2B), - /* K5 */ be_nested_str_weak(productid), - /* K6 */ be_nested_str_weak(D), - /* K7 */ be_nested_str_weak(commissioning_discriminator), - /* K8 */ be_nested_str_weak(CM), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(T), - /* K11 */ be_const_int(0), - /* K12 */ be_nested_str_weak(SII), - /* K13 */ be_nested_str_weak(SAI), - /* K14 */ be_nested_str_weak(commissioning_instance_wifi), - /* K15 */ be_nested_str_weak(random), - /* K16 */ be_nested_str_weak(tohex), - /* K17 */ be_nested_str_weak(commissioning_instance_eth), - /* K18 */ be_nested_str_weak(hostname_eth), - /* K19 */ be_nested_str_weak(add_service), - /* K20 */ be_nested_str_weak(_matterc), - /* K21 */ be_nested_str_weak(_udp), - /* K22 */ be_nested_str_weak(mdns_pase_eth), - /* K23 */ be_nested_str_weak(tasmota), - /* K24 */ be_nested_str_weak(log), - /* K25 */ be_nested_str_weak(MTR_X3A_X20announce_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), - /* K26 */ be_nested_str_weak(eth), - /* K27 */ be_const_int(2), - /* K28 */ be_nested_str_weak(_L), - /* K29 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), - /* K30 */ be_const_int(3), - /* K31 */ be_nested_str_weak(add_subtype), - /* K32 */ be_nested_str_weak(_S), - /* K33 */ be_nested_str_weak(_V), - /* K34 */ be_nested_str_weak(_CM1), - /* K35 */ be_nested_str_weak(hostname_wifi), - /* K36 */ be_nested_str_weak(mdns_pase_wifi), - /* K37 */ be_nested_str_weak(MTR_X3A_X20starting_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), - /* K38 */ be_nested_str_weak(wifi), - /* K39 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K40 */ be_nested_str_weak(_X7C), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(message_handler), + /* K1 */ be_nested_str_weak(msg_received), }), - be_str_weak(mdns_announce_PASE), + be_str_weak(msg_received), &be_const_str_solidified, - ( &(const binstruction[236]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0x600C0013, // 0002 GETGBL R3 G19 - 0x7C0C0000, // 0003 CALL R3 0 - 0x60100008, // 0004 GETGBL R4 G8 - 0x88140103, // 0005 GETMBR R5 R0 K3 - 0x7C100200, // 0006 CALL R4 1 - 0x00100904, // 0007 ADD R4 R4 K4 - 0x60140008, // 0008 GETGBL R5 G8 - 0x88180105, // 0009 GETMBR R6 R0 K5 - 0x7C140200, // 000A CALL R5 1 - 0x00100805, // 000B ADD R4 R4 R5 - 0x980E0404, // 000C SETIDX R3 K2 R4 - 0x88100107, // 000D GETMBR R4 R0 K7 - 0x980E0C04, // 000E SETIDX R3 K6 R4 - 0x980E1109, // 000F SETIDX R3 K8 K9 - 0x980E150B, // 0010 SETIDX R3 K10 K11 - 0x54121387, // 0011 LDINT R4 5000 - 0x980E1804, // 0012 SETIDX R3 K12 R4 - 0x5412012B, // 0013 LDINT R4 300 - 0x980E1A04, // 0014 SETIDX R3 K13 R4 - 0x8C10050F, // 0015 GETMET R4 R2 K15 - 0x541A0007, // 0016 LDINT R6 8 - 0x7C100400, // 0017 CALL R4 2 - 0x8C100910, // 0018 GETMET R4 R4 K16 - 0x7C100200, // 0019 CALL R4 1 - 0x90021C04, // 001A SETMBR R0 K14 R4 - 0x8C10050F, // 001B GETMET R4 R2 K15 - 0x541A0007, // 001C LDINT R6 8 - 0x7C100400, // 001D CALL R4 2 - 0x8C100910, // 001E GETMET R4 R4 K16 - 0x7C100200, // 001F CALL R4 1 - 0x90022204, // 0020 SETMBR R0 K17 R4 - 0xA80200B7, // 0021 EXBLK 0 #00DA - 0x88100112, // 0022 GETMBR R4 R0 K18 - 0x78120058, // 0023 JMPF R4 #007D - 0x8C100313, // 0024 GETMET R4 R1 K19 - 0x58180014, // 0025 LDCONST R6 K20 - 0x581C0015, // 0026 LDCONST R7 K21 - 0x542215A3, // 0027 LDINT R8 5540 - 0x5C240600, // 0028 MOVE R9 R3 - 0x88280111, // 0029 GETMBR R10 R0 K17 - 0x882C0112, // 002A GETMBR R11 R0 K18 - 0x7C100E00, // 002B CALL R4 7 - 0x50100200, // 002C LDBOOL R4 1 0 - 0x90022C04, // 002D SETMBR R0 K22 R4 - 0xB8122E00, // 002E GETNGBL R4 K23 - 0x8C100918, // 002F GETMET R4 R4 K24 - 0x60180018, // 0030 GETGBL R6 G24 - 0x581C0019, // 0031 LDCONST R7 K25 - 0x5820001A, // 0032 LDCONST R8 K26 - 0x88240111, // 0033 GETMBR R9 R0 K17 - 0x88280112, // 0034 GETMBR R10 R0 K18 - 0x7C180800, // 0035 CALL R6 4 - 0x581C001B, // 0036 LDCONST R7 K27 - 0x7C100600, // 0037 CALL R4 3 - 0x60100008, // 0038 GETGBL R4 G8 - 0x88140107, // 0039 GETMBR R5 R0 K7 - 0x541A0FFE, // 003A LDINT R6 4095 - 0x2C140A06, // 003B AND R5 R5 R6 - 0x7C100200, // 003C CALL R4 1 - 0x00123804, // 003D ADD R4 K28 R4 - 0xB8162E00, // 003E GETNGBL R5 K23 - 0x8C140B18, // 003F GETMET R5 R5 K24 - 0x001E3A04, // 0040 ADD R7 K29 R4 - 0x5820001E, // 0041 LDCONST R8 K30 - 0x7C140600, // 0042 CALL R5 3 - 0x8C14031F, // 0043 GETMET R5 R1 K31 - 0x581C0014, // 0044 LDCONST R7 K20 - 0x58200015, // 0045 LDCONST R8 K21 - 0x88240111, // 0046 GETMBR R9 R0 K17 - 0x88280112, // 0047 GETMBR R10 R0 K18 - 0x5C2C0800, // 0048 MOVE R11 R4 - 0x7C140C00, // 0049 CALL R5 6 - 0x60140008, // 004A GETGBL R5 G8 - 0x88180107, // 004B GETMBR R6 R0 K7 - 0x541E0EFF, // 004C LDINT R7 3840 - 0x2C180C07, // 004D AND R6 R6 R7 - 0x541E0007, // 004E LDINT R7 8 - 0x3C180C07, // 004F SHR R6 R6 R7 - 0x7C140200, // 0050 CALL R5 1 - 0x00164005, // 0051 ADD R5 K32 R5 - 0x5C100A00, // 0052 MOVE R4 R5 - 0xB8162E00, // 0053 GETNGBL R5 K23 - 0x8C140B18, // 0054 GETMET R5 R5 K24 - 0x001E3A04, // 0055 ADD R7 K29 R4 - 0x5820001E, // 0056 LDCONST R8 K30 - 0x7C140600, // 0057 CALL R5 3 - 0x8C14031F, // 0058 GETMET R5 R1 K31 - 0x581C0014, // 0059 LDCONST R7 K20 - 0x58200015, // 005A LDCONST R8 K21 - 0x88240111, // 005B GETMBR R9 R0 K17 - 0x88280112, // 005C GETMBR R10 R0 K18 - 0x5C2C0800, // 005D MOVE R11 R4 - 0x7C140C00, // 005E CALL R5 6 - 0x60140008, // 005F GETGBL R5 G8 - 0x88180103, // 0060 GETMBR R6 R0 K3 - 0x7C140200, // 0061 CALL R5 1 - 0x00164205, // 0062 ADD R5 K33 R5 - 0x5C100A00, // 0063 MOVE R4 R5 - 0xB8162E00, // 0064 GETNGBL R5 K23 - 0x8C140B18, // 0065 GETMET R5 R5 K24 - 0x001E3A04, // 0066 ADD R7 K29 R4 - 0x5820001E, // 0067 LDCONST R8 K30 - 0x7C140600, // 0068 CALL R5 3 - 0x8C14031F, // 0069 GETMET R5 R1 K31 - 0x581C0014, // 006A LDCONST R7 K20 - 0x58200015, // 006B LDCONST R8 K21 - 0x88240111, // 006C GETMBR R9 R0 K17 - 0x88280112, // 006D GETMBR R10 R0 K18 - 0x5C2C0800, // 006E MOVE R11 R4 - 0x7C140C00, // 006F CALL R5 6 - 0x58100022, // 0070 LDCONST R4 K34 - 0xB8162E00, // 0071 GETNGBL R5 K23 - 0x8C140B18, // 0072 GETMET R5 R5 K24 - 0x001E3A04, // 0073 ADD R7 K29 R4 - 0x5820001E, // 0074 LDCONST R8 K30 - 0x7C140600, // 0075 CALL R5 3 - 0x8C14031F, // 0076 GETMET R5 R1 K31 - 0x581C0014, // 0077 LDCONST R7 K20 - 0x58200015, // 0078 LDCONST R8 K21 - 0x88240111, // 0079 GETMBR R9 R0 K17 - 0x88280112, // 007A GETMBR R10 R0 K18 - 0x5C2C0800, // 007B MOVE R11 R4 - 0x7C140C00, // 007C CALL R5 6 - 0x88100123, // 007D GETMBR R4 R0 K35 - 0x78120058, // 007E JMPF R4 #00D8 - 0x8C100313, // 007F GETMET R4 R1 K19 - 0x58180014, // 0080 LDCONST R6 K20 - 0x581C0015, // 0081 LDCONST R7 K21 - 0x542215A3, // 0082 LDINT R8 5540 - 0x5C240600, // 0083 MOVE R9 R3 - 0x8828010E, // 0084 GETMBR R10 R0 K14 - 0x882C0123, // 0085 GETMBR R11 R0 K35 - 0x7C100E00, // 0086 CALL R4 7 - 0x50100200, // 0087 LDBOOL R4 1 0 - 0x90024804, // 0088 SETMBR R0 K36 R4 - 0xB8122E00, // 0089 GETNGBL R4 K23 - 0x8C100918, // 008A GETMET R4 R4 K24 - 0x60180018, // 008B GETGBL R6 G24 - 0x581C0025, // 008C LDCONST R7 K37 - 0x58200026, // 008D LDCONST R8 K38 - 0x8824010E, // 008E GETMBR R9 R0 K14 - 0x88280123, // 008F GETMBR R10 R0 K35 - 0x7C180800, // 0090 CALL R6 4 - 0x581C001E, // 0091 LDCONST R7 K30 - 0x7C100600, // 0092 CALL R4 3 - 0x60100008, // 0093 GETGBL R4 G8 - 0x88140107, // 0094 GETMBR R5 R0 K7 - 0x541A0FFE, // 0095 LDINT R6 4095 - 0x2C140A06, // 0096 AND R5 R5 R6 - 0x7C100200, // 0097 CALL R4 1 - 0x00123804, // 0098 ADD R4 K28 R4 - 0xB8162E00, // 0099 GETNGBL R5 K23 - 0x8C140B18, // 009A GETMET R5 R5 K24 - 0x001E3A04, // 009B ADD R7 K29 R4 - 0x5820001E, // 009C LDCONST R8 K30 - 0x7C140600, // 009D CALL R5 3 - 0x8C14031F, // 009E GETMET R5 R1 K31 - 0x581C0014, // 009F LDCONST R7 K20 - 0x58200015, // 00A0 LDCONST R8 K21 - 0x8824010E, // 00A1 GETMBR R9 R0 K14 - 0x88280123, // 00A2 GETMBR R10 R0 K35 - 0x5C2C0800, // 00A3 MOVE R11 R4 - 0x7C140C00, // 00A4 CALL R5 6 - 0x60140008, // 00A5 GETGBL R5 G8 - 0x88180107, // 00A6 GETMBR R6 R0 K7 - 0x541E0EFF, // 00A7 LDINT R7 3840 - 0x2C180C07, // 00A8 AND R6 R6 R7 - 0x541E0007, // 00A9 LDINT R7 8 - 0x3C180C07, // 00AA SHR R6 R6 R7 - 0x7C140200, // 00AB CALL R5 1 - 0x00164005, // 00AC ADD R5 K32 R5 - 0x5C100A00, // 00AD MOVE R4 R5 - 0xB8162E00, // 00AE GETNGBL R5 K23 - 0x8C140B18, // 00AF GETMET R5 R5 K24 - 0x001E3A04, // 00B0 ADD R7 K29 R4 - 0x5820001E, // 00B1 LDCONST R8 K30 - 0x7C140600, // 00B2 CALL R5 3 - 0x8C14031F, // 00B3 GETMET R5 R1 K31 - 0x581C0014, // 00B4 LDCONST R7 K20 - 0x58200015, // 00B5 LDCONST R8 K21 - 0x8824010E, // 00B6 GETMBR R9 R0 K14 - 0x88280123, // 00B7 GETMBR R10 R0 K35 - 0x5C2C0800, // 00B8 MOVE R11 R4 - 0x7C140C00, // 00B9 CALL R5 6 - 0x60140008, // 00BA GETGBL R5 G8 - 0x88180103, // 00BB GETMBR R6 R0 K3 - 0x7C140200, // 00BC CALL R5 1 - 0x00164205, // 00BD ADD R5 K33 R5 - 0x5C100A00, // 00BE MOVE R4 R5 - 0xB8162E00, // 00BF GETNGBL R5 K23 - 0x8C140B18, // 00C0 GETMET R5 R5 K24 - 0x001E3A04, // 00C1 ADD R7 K29 R4 - 0x5820001E, // 00C2 LDCONST R8 K30 - 0x7C140600, // 00C3 CALL R5 3 - 0x8C14031F, // 00C4 GETMET R5 R1 K31 - 0x581C0014, // 00C5 LDCONST R7 K20 - 0x58200015, // 00C6 LDCONST R8 K21 - 0x8824010E, // 00C7 GETMBR R9 R0 K14 - 0x88280123, // 00C8 GETMBR R10 R0 K35 - 0x5C2C0800, // 00C9 MOVE R11 R4 - 0x7C140C00, // 00CA CALL R5 6 - 0x58100022, // 00CB LDCONST R4 K34 - 0xB8162E00, // 00CC GETNGBL R5 K23 - 0x8C140B18, // 00CD GETMET R5 R5 K24 - 0x001E3A04, // 00CE ADD R7 K29 R4 - 0x5820001E, // 00CF LDCONST R8 K30 - 0x7C140600, // 00D0 CALL R5 3 - 0x8C14031F, // 00D1 GETMET R5 R1 K31 - 0x581C0014, // 00D2 LDCONST R7 K20 - 0x58200015, // 00D3 LDCONST R8 K21 - 0x8824010E, // 00D4 GETMBR R9 R0 K14 - 0x88280123, // 00D5 GETMBR R10 R0 K35 - 0x5C2C0800, // 00D6 MOVE R11 R4 - 0x7C140C00, // 00D7 CALL R5 6 - 0xA8040001, // 00D8 EXBLK 1 1 - 0x70020010, // 00D9 JMP #00EB - 0xAC100002, // 00DA CATCH R4 0 2 - 0x7002000D, // 00DB JMP #00EA - 0xB81A2E00, // 00DC GETNGBL R6 K23 - 0x8C180D18, // 00DD GETMET R6 R6 K24 - 0x60200008, // 00DE GETGBL R8 G8 - 0x5C240800, // 00DF MOVE R9 R4 - 0x7C200200, // 00E0 CALL R8 1 - 0x00224E08, // 00E1 ADD R8 K39 R8 - 0x00201128, // 00E2 ADD R8 R8 K40 - 0x60240008, // 00E3 GETGBL R9 G8 - 0x5C280A00, // 00E4 MOVE R10 R5 - 0x7C240200, // 00E5 CALL R9 1 - 0x00201009, // 00E6 ADD R8 R8 R9 - 0x5824001B, // 00E7 LDCONST R9 K27 - 0x7C180600, // 00E8 CALL R6 3 - 0x70020000, // 00E9 JMP #00EB - 0xB0080000, // 00EA RAISE 2 R0 R0 - 0x80000000, // 00EB RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x5C180200, // 0002 MOVE R6 R1 + 0x5C1C0400, // 0003 MOVE R7 R2 + 0x5C200600, // 0004 MOVE R8 R3 + 0x7C100800, // 0005 CALL R4 4 + 0x80040800, // 0006 RET 1 R4 }) ) ); @@ -3809,87 +3054,62 @@ be_local_closure(Matter_Device_mdns_announce_PASE, /* name */ /******************************************************************** -** Solidified function: _start_udp +** Solidified function: update_remotes_info ********************************************************************/ -be_local_closure(Matter_Device__start_udp, /* name */ +be_local_closure(Matter_Device_update_remotes_info, /* name */ be_nested_proto( 7, /* nstack */ - 2, /* argc */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(msg_received), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - }), + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20Starting_X20UDP_X20server_X20on_X20port_X3A_X20), - /* K4 */ be_const_int(2), - /* K5 */ be_nested_str_weak(matter), - /* K6 */ be_nested_str_weak(UDPServer), - /* K7 */ be_nested_str_weak(), - /* K8 */ be_nested_str_weak(start), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(http_remotes), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(get_info), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(stop_iteration), + /* K5 */ be_nested_str_weak(plugins_config_remotes), }), - be_str_weak(_start_udp), + be_str_weak(update_remotes_info), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0000, // 0001 JMPF R2 #0003 - 0x80000400, // 0002 RET 0 - 0x4C080000, // 0003 LDNIL R2 - 0x1C080202, // 0004 EQ R2 R1 R2 - 0x780A0000, // 0005 JMPF R2 #0007 - 0x540615A3, // 0006 LDINT R1 5540 - 0xB80A0200, // 0007 GETNGBL R2 K1 - 0x8C080502, // 0008 GETMET R2 R2 K2 - 0x60100008, // 0009 GETGBL R4 G8 - 0x5C140200, // 000A MOVE R5 R1 - 0x7C100200, // 000B CALL R4 1 - 0x00120604, // 000C ADD R4 K3 R4 - 0x58140004, // 000D LDCONST R5 K4 - 0x7C080600, // 000E CALL R2 3 - 0xB80A0A00, // 000F GETNGBL R2 K5 - 0x8C080506, // 0010 GETMET R2 R2 K6 - 0x5C100000, // 0011 MOVE R4 R0 - 0x58140007, // 0012 LDCONST R5 K7 - 0x5C180200, // 0013 MOVE R6 R1 - 0x7C080800, // 0014 CALL R2 4 - 0x90020002, // 0015 SETMBR R0 K0 R2 - 0x88080100, // 0016 GETMBR R2 R0 K0 - 0x8C080508, // 0017 GETMET R2 R2 K8 - 0x84100000, // 0018 CLOSURE R4 P0 - 0x7C080400, // 0019 CALL R2 2 - 0xA0000000, // 001A CLOSE R0 - 0x80000000, // 001B RET 0 + ( &(const binstruction[33]) { /* code */ + 0x60040013, // 0000 GETGBL R1 G19 + 0x7C040000, // 0001 CALL R1 0 + 0x88080100, // 0002 GETMBR R2 R0 K0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x20080403, // 0004 NE R2 R2 R3 + 0x780A0018, // 0005 JMPF R2 #001F + 0x60080010, // 0006 GETGBL R2 G16 + 0x880C0100, // 0007 GETMBR R3 R0 K0 + 0x8C0C0701, // 0008 GETMET R3 R3 K1 + 0x7C0C0200, // 0009 CALL R3 1 + 0x7C080200, // 000A CALL R2 1 + 0xA802000F, // 000B EXBLK 0 #001C + 0x5C0C0400, // 000C MOVE R3 R2 + 0x7C0C0000, // 000D CALL R3 0 + 0x88100100, // 000E GETMBR R4 R0 K0 + 0x94100803, // 000F GETIDX R4 R4 R3 + 0x8C100902, // 0010 GETMET R4 R4 K2 + 0x7C100200, // 0011 CALL R4 1 + 0x4C140000, // 0012 LDNIL R5 + 0x20140805, // 0013 NE R5 R4 R5 + 0x78160005, // 0014 JMPF R5 #001B + 0x6014000C, // 0015 GETGBL R5 G12 + 0x5C180800, // 0016 MOVE R6 R4 + 0x7C140200, // 0017 CALL R5 1 + 0x24140B03, // 0018 GT R5 R5 K3 + 0x78160000, // 0019 JMPF R5 #001B + 0x98040604, // 001A SETIDX R1 R3 R4 + 0x7001FFEF, // 001B JMP #000C + 0x58080004, // 001C LDCONST R2 K4 + 0xAC080200, // 001D CATCH R2 1 0 + 0xB0080000, // 001E RAISE 2 R0 R0 + 0x90020A01, // 001F SETMBR R0 K5 R1 + 0x80040200, // 0020 RET 1 R1 }) ) ); @@ -3897,11 +3117,11 @@ be_local_closure(Matter_Device__start_udp, /* name */ /******************************************************************** -** Solidified function: stop +** Solidified function: _trigger_read_sensors ********************************************************************/ -be_local_closure(Matter_Device_stop, /* name */ +be_local_closure(Matter_Device__trigger_read_sensors, /* name */ be_nested_proto( - 4, /* nstack */ + 8, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -3909,25 +3129,59 @@ be_local_closure(Matter_Device_stop, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(remove_driver), - /* K2 */ be_nested_str_weak(udp_server), - /* K3 */ be_nested_str_weak(stop), + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(read_sensors), + /* K3 */ be_nested_str_weak(load), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(plugins), + /* K6 */ be_nested_str_weak(parse_sensors), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(log), + /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20), + /* K10 */ be_const_int(3), }), - be_str_weak(stop), + be_str_weak(_trigger_read_sensors), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x88040102, // 0004 GETMBR R1 R0 K2 - 0x78060002, // 0005 JMPF R1 #0009 - 0x88040102, // 0006 GETMBR R1 R0 K2 - 0x8C040303, // 0007 GETMET R1 R1 K3 - 0x7C040200, // 0008 CALL R1 1 - 0x80000000, // 0009 RET 0 + ( &(const binstruction[37]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xB80A0200, // 0001 GETNGBL R2 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0x7C080200, // 0003 CALL R2 1 + 0x4C0C0000, // 0004 LDNIL R3 + 0x1C0C0403, // 0005 EQ R3 R2 R3 + 0x780E0000, // 0006 JMPF R3 #0008 + 0x80000600, // 0007 RET 0 + 0x8C0C0303, // 0008 GETMET R3 R1 K3 + 0x5C140400, // 0009 MOVE R5 R2 + 0x7C0C0400, // 000A CALL R3 2 + 0x4C100000, // 000B LDNIL R4 + 0x20100604, // 000C NE R4 R3 R4 + 0x7812000D, // 000D JMPF R4 #001C + 0x58100004, // 000E LDCONST R4 K4 + 0x6014000C, // 000F GETGBL R5 G12 + 0x88180105, // 0010 GETMBR R6 R0 K5 + 0x7C140200, // 0011 CALL R5 1 + 0x14140805, // 0012 LT R5 R4 R5 + 0x78160006, // 0013 JMPF R5 #001B + 0x88140105, // 0014 GETMBR R5 R0 K5 + 0x94140A04, // 0015 GETIDX R5 R5 R4 + 0x8C140B06, // 0016 GETMET R5 R5 K6 + 0x5C1C0600, // 0017 MOVE R7 R3 + 0x7C140400, // 0018 CALL R5 2 + 0x00100907, // 0019 ADD R4 R4 K7 + 0x7001FFF3, // 001A JMP #000F + 0x70020007, // 001B JMP #0024 + 0xB8120200, // 001C GETNGBL R4 K1 + 0x8C100908, // 001D GETMET R4 R4 K8 + 0x60180008, // 001E GETGBL R6 G8 + 0x5C1C0400, // 001F MOVE R7 R2 + 0x7C180200, // 0020 CALL R6 1 + 0x001A1206, // 0021 ADD R6 K9 R6 + 0x581C000A, // 0022 LDCONST R7 K10 + 0x7C100600, // 0023 CALL R4 3 + 0x80000000, // 0024 RET 0 }) ) ); @@ -3935,70 +3189,79 @@ be_local_closure(Matter_Device_stop, /* name */ /******************************************************************** -** Solidified function: find_plugin_by_name_or_ep +** Solidified function: k2l ********************************************************************/ -be_local_closure(Matter_Device_find_plugin_by_name_or_ep, /* name */ +be_local_closure(Matter_Device_k2l, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ + 8, /* nstack */ + 1, /* argc */ + 4, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(int), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(find_plugin_by_endpoint), - /* K3 */ be_nested_str_weak(string), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Device), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(push), + /* K3 */ be_nested_str_weak(stop_iteration), /* K4 */ be_const_int(1), - /* K5 */ be_nested_str_weak(ep), - /* K6 */ be_const_int(2), - /* K7 */ be_const_int(2147483647), - /* K8 */ be_nested_str_weak(find_plugin_by_friendly_name), + /* K5 */ be_const_int(0), }), - be_str_weak(find_plugin_by_name_or_ep), + be_str_weak(k2l), &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x60080004, // 0000 GETGBL R2 G4 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x1C080500, // 0003 EQ R2 R2 K0 - 0x780A0006, // 0004 JMPF R2 #000C - 0x24080301, // 0005 GT R2 R1 K1 - 0x780A0003, // 0006 JMPF R2 #000B - 0x8C080102, // 0007 GETMET R2 R0 K2 - 0x5C100200, // 0008 MOVE R4 R1 - 0x7C080400, // 0009 CALL R2 2 - 0x80040400, // 000A RET 1 R2 - 0x70020017, // 000B JMP #0024 - 0x60080004, // 000C GETGBL R2 G4 - 0x5C0C0200, // 000D MOVE R3 R1 - 0x7C080200, // 000E CALL R2 1 - 0x1C080503, // 000F EQ R2 R2 K3 - 0x780A0012, // 0010 JMPF R2 #0024 - 0x400A0304, // 0011 CONNECT R2 K1 K4 - 0x94080202, // 0012 GETIDX R2 R1 R2 - 0x1C080505, // 0013 EQ R2 R2 K5 - 0x780A000A, // 0014 JMPF R2 #0020 - 0x60080009, // 0015 GETGBL R2 G9 - 0x400E0D07, // 0016 CONNECT R3 K6 K7 - 0x940C0203, // 0017 GETIDX R3 R1 R3 - 0x7C080200, // 0018 CALL R2 1 - 0x240C0501, // 0019 GT R3 R2 K1 - 0x780E0003, // 001A JMPF R3 #001F - 0x8C0C0102, // 001B GETMET R3 R0 K2 - 0x5C140400, // 001C MOVE R5 R2 - 0x7C0C0400, // 001D CALL R3 2 - 0x80040600, // 001E RET 1 R3 - 0x70020003, // 001F JMP #0024 - 0x8C080108, // 0020 GETMET R2 R0 K8 - 0x5C100200, // 0021 MOVE R4 R1 - 0x7C080400, // 0022 CALL R2 2 - 0x80040400, // 0023 RET 1 R2 - 0x4C080000, // 0024 LDNIL R2 - 0x80040400, // 0025 RET 1 R2 + ( &(const binstruction[50]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x60080012, // 0001 GETGBL R2 G18 + 0x7C080000, // 0002 CALL R2 0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C0C0003, // 0004 EQ R3 R0 R3 + 0x780E0000, // 0005 JMPF R3 #0007 + 0x80040400, // 0006 RET 1 R2 + 0x600C0010, // 0007 GETGBL R3 G16 + 0x8C100101, // 0008 GETMET R4 R0 K1 + 0x7C100200, // 0009 CALL R4 1 + 0x7C0C0200, // 000A CALL R3 1 + 0xA8020005, // 000B EXBLK 0 #0012 + 0x5C100600, // 000C MOVE R4 R3 + 0x7C100000, // 000D CALL R4 0 + 0x8C140502, // 000E GETMET R5 R2 K2 + 0x5C1C0800, // 000F MOVE R7 R4 + 0x7C140400, // 0010 CALL R5 2 + 0x7001FFF9, // 0011 JMP #000C + 0x580C0003, // 0012 LDCONST R3 K3 + 0xAC0C0200, // 0013 CATCH R3 1 0 + 0xB0080000, // 0014 RAISE 2 R0 R0 + 0x600C0010, // 0015 GETGBL R3 G16 + 0x6010000C, // 0016 GETGBL R4 G12 + 0x5C140400, // 0017 MOVE R5 R2 + 0x7C100200, // 0018 CALL R4 1 + 0x04100904, // 0019 SUB R4 R4 K4 + 0x40120804, // 001A CONNECT R4 K4 R4 + 0x7C0C0200, // 001B CALL R3 1 + 0xA8020010, // 001C EXBLK 0 #002E + 0x5C100600, // 001D MOVE R4 R3 + 0x7C100000, // 001E CALL R4 0 + 0x94140404, // 001F GETIDX R5 R2 R4 + 0x5C180800, // 0020 MOVE R6 R4 + 0x241C0D05, // 0021 GT R7 R6 K5 + 0x781E0008, // 0022 JMPF R7 #002C + 0x041C0D04, // 0023 SUB R7 R6 K4 + 0x941C0407, // 0024 GETIDX R7 R2 R7 + 0x241C0E05, // 0025 GT R7 R7 R5 + 0x781E0004, // 0026 JMPF R7 #002C + 0x041C0D04, // 0027 SUB R7 R6 K4 + 0x941C0407, // 0028 GETIDX R7 R2 R7 + 0x98080C07, // 0029 SETIDX R2 R6 R7 + 0x04180D04, // 002A SUB R6 R6 K4 + 0x7001FFF4, // 002B JMP #0021 + 0x98080C05, // 002C SETIDX R2 R6 R5 + 0x7001FFEE, // 002D JMP #001D + 0x580C0003, // 002E LDCONST R3 K3 + 0xAC0C0200, // 002F CATCH R3 1 0 + 0xB0080000, // 0030 RAISE 2 R0 R0 + 0x80040400, // 0031 RET 1 R2 }) ) ); @@ -4006,11 +3269,11 @@ be_local_closure(Matter_Device_find_plugin_by_name_or_ep, /* name */ /******************************************************************** -** Solidified function: stop_basic_commissioning +** Solidified function: signal_endpoints_changed ********************************************************************/ -be_local_closure(Matter_Device_stop_basic_commissioning, /* name */ +be_local_closure(Matter_Device_signal_endpoints_changed, /* name */ be_nested_proto( - 5, /* nstack */ + 7, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4018,123 +3281,27 @@ be_local_closure(Matter_Device_stop_basic_commissioning, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(is_root_commissioning_open), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(publish_result), - /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D), - /* K4 */ be_nested_str_weak(Matter), - /* K5 */ be_nested_str_weak(commissioning_open), - /* K6 */ be_nested_str_weak(mdns_remove_PASE), - /* K7 */ be_nested_str_weak(commissioning_iterations), - /* K8 */ be_nested_str_weak(commissioning_discriminator), - /* K9 */ be_nested_str_weak(commissioning_salt), - /* K10 */ be_nested_str_weak(commissioning_w0), - /* K11 */ be_nested_str_weak(commissioning_L), - /* K12 */ be_nested_str_weak(commissioning_admin_fabric), - }), - be_str_weak(stop_basic_commissioning), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x78060004, // 0002 JMPF R1 #0008 - 0xB8060200, // 0003 GETNGBL R1 K1 - 0x8C040302, // 0004 GETMET R1 R1 K2 - 0x580C0003, // 0005 LDCONST R3 K3 - 0x58100004, // 0006 LDCONST R4 K4 - 0x7C040600, // 0007 CALL R1 3 - 0x4C040000, // 0008 LDNIL R1 - 0x90020A01, // 0009 SETMBR R0 K5 R1 - 0x8C040106, // 000A GETMET R1 R0 K6 - 0x7C040200, // 000B CALL R1 1 - 0x4C040000, // 000C LDNIL R1 - 0x90020E01, // 000D SETMBR R0 K7 R1 - 0x4C040000, // 000E LDNIL R1 - 0x90021001, // 000F SETMBR R0 K8 R1 - 0x4C040000, // 0010 LDNIL R1 - 0x90021201, // 0011 SETMBR R0 K9 R1 - 0x4C040000, // 0012 LDNIL R1 - 0x90021401, // 0013 SETMBR R0 K10 R1 - 0x4C040000, // 0014 LDNIL R1 - 0x90021601, // 0015 SETMBR R0 K11 R1 - 0x4C040000, // 0016 LDNIL R1 - 0x90021801, // 0017 SETMBR R0 K12 R1 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_plugin_class_arg -********************************************************************/ -be_local_closure(Matter_Device_get_plugin_class_arg, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(plugins_classes), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_nested_str_weak(), - }), - be_str_weak(get_plugin_class_arg), - &be_const_str_solidified, - ( &(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 - 0x780A0001, // 0004 JMPF R2 #0007 - 0x880C0502, // 0005 GETMBR R3 R2 K2 - 0x70020000, // 0006 JMP #0008 - 0x580C0003, // 0007 LDCONST R3 K3 - 0x80040600, // 0008 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: register_plugin_class -********************************************************************/ -be_local_closure(Matter_Device_register_plugin_class, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), - /* K1 */ be_nested_str_weak(get), - /* K2 */ be_nested_str_weak(TYPE), - /* K3 */ be_nested_str_weak(plugins_classes), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + /* K2 */ be_const_int(3), }), - be_str_weak(register_plugin_class), + be_str_weak(signal_endpoints_changed), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0501, // 0001 GETMET R3 R2 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x58180002, // 0003 LDCONST R6 K2 - 0x7C0C0600, // 0004 CALL R3 3 - 0x780E0001, // 0005 JMPF R3 #0008 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x98100601, // 0007 SETIDX R4 R3 R1 - 0x80000000, // 0008 RET 0 + ( &(const binstruction[13]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x580C0001, // 0001 LDCONST R3 K1 + 0x5412001C, // 0002 LDINT R4 29 + 0x58140002, // 0003 LDCONST R5 K2 + 0x50180000, // 0004 LDBOOL R6 0 0 + 0x7C040A00, // 0005 CALL R1 5 + 0x8C040100, // 0006 GETMET R1 R0 K0 + 0x540EFEFF, // 0007 LDINT R3 65280 + 0x5412001C, // 0008 LDINT R4 29 + 0x58140002, // 0009 LDCONST R5 K2 + 0x50180000, // 000A LDBOOL R6 0 0 + 0x7C040A00, // 000B CALL R1 5 + 0x80000000, // 000C RET 0 }) ) ); @@ -4224,171 +3391,30 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */ /******************************************************************** -** Solidified function: mdns_announce_op_discovery +** Solidified function: save_before_restart ********************************************************************/ -be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ +be_local_closure(Matter_Device_save_before_restart, /* name */ be_nested_proto( - 14, /* nstack */ - 2, /* argc */ + 3, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[27]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(get_device_id), - /* K2 */ be_nested_str_weak(copy), - /* K3 */ be_nested_str_weak(reverse), - /* K4 */ be_nested_str_weak(get_fabric_compressed), - /* K5 */ be_nested_str_weak(tohex), - /* K6 */ be_nested_str_weak(_X2D), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(log), - /* K9 */ be_nested_str_weak(MTR_X3A_X20Operational_X20Discovery_X20node_X20_X3D_X20), - /* K10 */ be_const_int(3), - /* K11 */ be_nested_str_weak(eth), - /* K12 */ be_nested_str_weak(find), - /* K13 */ be_nested_str_weak(up), - /* K14 */ be_nested_str_weak(MTR_X3A_X20adding_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), - /* K15 */ be_nested_str_weak(hostname_eth), - /* K16 */ be_nested_str_weak(add_service), - /* K17 */ be_nested_str_weak(_matter), - /* K18 */ be_nested_str_weak(_tcp), - /* K19 */ be_nested_str_weak(_I), - /* K20 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), - /* K21 */ be_nested_str_weak(add_subtype), - /* K22 */ be_nested_str_weak(wifi), - /* K23 */ be_nested_str_weak(hostname_wifi), - /* K24 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K25 */ be_nested_str_weak(_X7C), - /* K26 */ be_const_int(2), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(stop_basic_commissioning), + /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics), }), - be_str_weak(mdns_announce_op_discovery), + be_str_weak(save_before_restart), &be_const_str_solidified, - ( &(const binstruction[121]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA8020064, // 0001 EXBLK 0 #0067 - 0x8C0C0301, // 0002 GETMET R3 R1 K1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x8C0C0702, // 0004 GETMET R3 R3 K2 - 0x7C0C0200, // 0005 CALL R3 1 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x8C100304, // 0008 GETMET R4 R1 K4 - 0x7C100200, // 0009 CALL R4 1 - 0x8C140905, // 000A GETMET R5 R4 K5 - 0x7C140200, // 000B CALL R5 1 - 0x00140B06, // 000C ADD R5 R5 K6 - 0x8C180705, // 000D GETMET R6 R3 K5 - 0x7C180200, // 000E CALL R6 1 - 0x00140A06, // 000F ADD R5 R5 R6 - 0xB81A0E00, // 0010 GETNGBL R6 K7 - 0x8C180D08, // 0011 GETMET R6 R6 K8 - 0x00221205, // 0012 ADD R8 K9 R5 - 0x5824000A, // 0013 LDCONST R9 K10 - 0x7C180600, // 0014 CALL R6 3 - 0xB81A0E00, // 0015 GETNGBL R6 K7 - 0x8C180D0B, // 0016 GETMET R6 R6 K11 - 0x7C180200, // 0017 CALL R6 1 - 0x8C180D0C, // 0018 GETMET R6 R6 K12 - 0x5820000D, // 0019 LDCONST R8 K13 - 0x7C180400, // 001A CALL R6 2 - 0x781A0020, // 001B JMPF R6 #003D - 0xB81A0E00, // 001C GETNGBL R6 K7 - 0x8C180D08, // 001D GETMET R6 R6 K8 - 0x60200018, // 001E GETGBL R8 G24 - 0x5824000E, // 001F LDCONST R9 K14 - 0x5828000B, // 0020 LDCONST R10 K11 - 0x5C2C0A00, // 0021 MOVE R11 R5 - 0x8830010F, // 0022 GETMBR R12 R0 K15 - 0x7C200800, // 0023 CALL R8 4 - 0x5824000A, // 0024 LDCONST R9 K10 - 0x7C180600, // 0025 CALL R6 3 - 0x8C180510, // 0026 GETMET R6 R2 K16 - 0x58200011, // 0027 LDCONST R8 K17 - 0x58240012, // 0028 LDCONST R9 K18 - 0x542A15A3, // 0029 LDINT R10 5540 - 0x4C2C0000, // 002A LDNIL R11 - 0x5C300A00, // 002B MOVE R12 R5 - 0x8834010F, // 002C GETMBR R13 R0 K15 - 0x7C180E00, // 002D CALL R6 7 - 0x8C180905, // 002E GETMET R6 R4 K5 - 0x7C180200, // 002F CALL R6 1 - 0x001A2606, // 0030 ADD R6 K19 R6 - 0xB81E0E00, // 0031 GETNGBL R7 K7 - 0x8C1C0F08, // 0032 GETMET R7 R7 K8 - 0x00262806, // 0033 ADD R9 K20 R6 - 0x5828000A, // 0034 LDCONST R10 K10 - 0x7C1C0600, // 0035 CALL R7 3 - 0x8C1C0515, // 0036 GETMET R7 R2 K21 - 0x58240011, // 0037 LDCONST R9 K17 - 0x58280012, // 0038 LDCONST R10 K18 - 0x5C2C0A00, // 0039 MOVE R11 R5 - 0x8830010F, // 003A GETMBR R12 R0 K15 - 0x5C340C00, // 003B MOVE R13 R6 - 0x7C1C0C00, // 003C CALL R7 6 - 0xB81A0E00, // 003D GETNGBL R6 K7 - 0x8C180D16, // 003E GETMET R6 R6 K22 - 0x7C180200, // 003F CALL R6 1 - 0x8C180D0C, // 0040 GETMET R6 R6 K12 - 0x5820000D, // 0041 LDCONST R8 K13 - 0x7C180400, // 0042 CALL R6 2 - 0x781A0020, // 0043 JMPF R6 #0065 - 0xB81A0E00, // 0044 GETNGBL R6 K7 - 0x8C180D08, // 0045 GETMET R6 R6 K8 - 0x60200018, // 0046 GETGBL R8 G24 - 0x5824000E, // 0047 LDCONST R9 K14 - 0x58280016, // 0048 LDCONST R10 K22 - 0x5C2C0A00, // 0049 MOVE R11 R5 - 0x88300117, // 004A GETMBR R12 R0 K23 - 0x7C200800, // 004B CALL R8 4 - 0x5824000A, // 004C LDCONST R9 K10 - 0x7C180600, // 004D CALL R6 3 - 0x8C180510, // 004E GETMET R6 R2 K16 - 0x58200011, // 004F LDCONST R8 K17 - 0x58240012, // 0050 LDCONST R9 K18 - 0x542A15A3, // 0051 LDINT R10 5540 - 0x4C2C0000, // 0052 LDNIL R11 - 0x5C300A00, // 0053 MOVE R12 R5 - 0x88340117, // 0054 GETMBR R13 R0 K23 - 0x7C180E00, // 0055 CALL R6 7 - 0x8C180905, // 0056 GETMET R6 R4 K5 - 0x7C180200, // 0057 CALL R6 1 - 0x001A2606, // 0058 ADD R6 K19 R6 - 0xB81E0E00, // 0059 GETNGBL R7 K7 - 0x8C1C0F08, // 005A GETMET R7 R7 K8 - 0x00262806, // 005B ADD R9 K20 R6 - 0x5828000A, // 005C LDCONST R10 K10 - 0x7C1C0600, // 005D CALL R7 3 - 0x8C1C0515, // 005E GETMET R7 R2 K21 - 0x58240011, // 005F LDCONST R9 K17 - 0x58280012, // 0060 LDCONST R10 K18 - 0x5C2C0A00, // 0061 MOVE R11 R5 - 0x88300117, // 0062 GETMBR R12 R0 K23 - 0x5C340C00, // 0063 MOVE R13 R6 - 0x7C1C0C00, // 0064 CALL R7 6 - 0xA8040001, // 0065 EXBLK 1 1 - 0x70020010, // 0066 JMP #0078 - 0xAC0C0002, // 0067 CATCH R3 0 2 - 0x7002000D, // 0068 JMP #0077 - 0xB8160E00, // 0069 GETNGBL R5 K7 - 0x8C140B08, // 006A GETMET R5 R5 K8 - 0x601C0008, // 006B GETGBL R7 G8 - 0x5C200600, // 006C MOVE R8 R3 - 0x7C1C0200, // 006D CALL R7 1 - 0x001E3007, // 006E ADD R7 K24 R7 - 0x001C0F19, // 006F ADD R7 R7 K25 - 0x60200008, // 0070 GETGBL R8 G8 - 0x5C240800, // 0071 MOVE R9 R4 - 0x7C200200, // 0072 CALL R8 1 - 0x001C0E08, // 0073 ADD R7 R7 R8 - 0x5820001A, // 0074 LDCONST R8 K26 - 0x7C140600, // 0075 CALL R5 3 - 0x70020000, // 0076 JMP #0078 - 0xB0080000, // 0077 RAISE 2 R0 R0 - 0x80000000, // 0078 RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x8C040101, // 0002 GETMET R1 R0 K1 + 0x7C040200, // 0003 CALL R1 1 + 0x80000000, // 0004 RET 0 }) ) ); @@ -4396,51 +3422,127 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ /******************************************************************** -** Solidified function: mdns_remove_op_discovery_all_fabrics +** Solidified function: register_commands ********************************************************************/ -be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */ +be_local_closure(Matter_Device_register_commands, /* name */ be_nested_proto( - 6, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 3]) { + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(MtrJoin), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x68100000, // 0000 GETUPV R4 U0 + 0x8C100900, // 0001 GETMET R4 R4 K0 + 0x5C180000, // 0002 MOVE R6 R0 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80040800, // 0007 RET 1 R4 + }) + ), + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(MtrUpdate), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x68100000, // 0000 GETUPV R4 U0 + 0x8C100900, // 0001 GETMET R4 R4 K0 + 0x5C180000, // 0002 MOVE R6 R0 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80040800, // 0007 RET 1 R4 + }) + ), + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(MtrInfo), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x68100000, // 0000 GETUPV R4 U0 + 0x8C100900, // 0001 GETMET R4 R4 K0 + 0x5C180000, // 0002 MOVE R6 R0 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80040800, // 0007 RET 1 R4 + }) + ), + }), 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_nested_str_weak(active_fabrics), - /* K2 */ be_nested_str_weak(get_device_id), - /* K3 */ be_nested_str_weak(get_fabric_id), - /* K4 */ be_nested_str_weak(mdns_remove_op_discovery), - /* K5 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(add_cmd), + /* K2 */ be_nested_str_weak(MtrJoin), + /* K3 */ be_nested_str_weak(MtrUpdate), + /* K4 */ be_nested_str_weak(MtrInfo), }), - be_str_weak(mdns_remove_op_discovery_all_fabrics), + be_str_weak(register_commands), &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x60040010, // 0000 GETGBL R1 G16 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x8C080501, // 0002 GETMET R2 R2 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x7C040200, // 0004 CALL R1 1 - 0xA802000B, // 0005 EXBLK 0 #0012 - 0x5C080200, // 0006 MOVE R2 R1 - 0x7C080000, // 0007 CALL R2 0 - 0x8C0C0502, // 0008 GETMET R3 R2 K2 - 0x7C0C0200, // 0009 CALL R3 1 - 0x780E0005, // 000A JMPF R3 #0011 - 0x8C0C0503, // 000B GETMET R3 R2 K3 - 0x7C0C0200, // 000C CALL R3 1 - 0x780E0002, // 000D JMPF R3 #0011 - 0x8C0C0104, // 000E GETMET R3 R0 K4 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x7001FFF3, // 0011 JMP #0006 - 0x58040005, // 0012 LDCONST R1 K5 - 0xAC040200, // 0013 CATCH R1 1 0 - 0xB0080000, // 0014 RAISE 2 R0 R0 - 0x80000000, // 0015 RET 0 + ( &(const binstruction[17]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x580C0002, // 0002 LDCONST R3 K2 + 0x84100000, // 0003 CLOSURE R4 P0 + 0x7C040600, // 0004 CALL R1 3 + 0xB8060000, // 0005 GETNGBL R1 K0 + 0x8C040301, // 0006 GETMET R1 R1 K1 + 0x580C0003, // 0007 LDCONST R3 K3 + 0x84100001, // 0008 CLOSURE R4 P1 + 0x7C040600, // 0009 CALL R1 3 + 0xB8060000, // 000A GETNGBL R1 K0 + 0x8C040301, // 000B GETMET R1 R1 K1 + 0x580C0004, // 000C LDCONST R3 K4 + 0x84100002, // 000D CLOSURE R4 P2 + 0x7C040600, // 000E CALL R1 3 + 0xA0000000, // 000F CLOSE R0 + 0x80000000, // 0010 RET 0 }) ) ); @@ -4448,40 +3550,49 @@ be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name * /******************************************************************** -** Solidified function: MtrJoin +** Solidified function: MtrInfo_one ********************************************************************/ -be_local_closure(Matter_Device_MtrJoin, /* name */ +be_local_closure(Matter_Device_MtrInfo_one, /* name */ be_nested_proto( - 8, /* nstack */ - 5, /* argc */ + 9, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(start_root_basic_commissioning), - /* K1 */ be_nested_str_weak(stop_basic_commissioning), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(resp_cmnd_done), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(find_plugin_by_endpoint), + /* K1 */ be_nested_str_weak(state_json), + /* K2 */ be_nested_str_weak(_X7B_X22MtrInfo_X22_X3A_X25s_X7D), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(publish_result), + /* K5 */ be_nested_str_weak(), }), - be_str_weak(MtrJoin), + be_str_weak(MtrInfo_one), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x60140009, // 0000 GETGBL R5 G9 - 0x5C180600, // 0001 MOVE R6 R3 - 0x7C140200, // 0002 CALL R5 1 - 0x78160002, // 0003 JMPF R5 #0007 - 0x8C180100, // 0004 GETMET R6 R0 K0 - 0x7C180200, // 0005 CALL R6 1 - 0x70020001, // 0006 JMP #0009 - 0x8C180101, // 0007 GETMET R6 R0 K1 - 0x7C180200, // 0008 CALL R6 1 - 0xB81A0400, // 0009 GETNGBL R6 K2 - 0x8C180D03, // 000A GETMET R6 R6 K3 - 0x7C180200, // 000B CALL R6 1 - 0x80000000, // 000C RET 0 + ( &(const binstruction[20]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C0C0403, // 0004 EQ R3 R2 R3 + 0x780E0000, // 0005 JMPF R3 #0007 + 0x80000600, // 0006 RET 0 + 0x8C0C0501, // 0007 GETMET R3 R2 K1 + 0x7C0C0200, // 0008 CALL R3 1 + 0x780E0008, // 0009 JMPF R3 #0013 + 0x60100018, // 000A GETGBL R4 G24 + 0x58140002, // 000B LDCONST R5 K2 + 0x5C180600, // 000C MOVE R6 R3 + 0x7C100400, // 000D CALL R4 2 + 0xB8160600, // 000E GETNGBL R5 K3 + 0x8C140B04, // 000F GETMET R5 R5 K4 + 0x5C1C0800, // 0010 MOVE R7 R4 + 0x58200005, // 0011 LDCONST R8 K5 + 0x7C140600, // 0012 CALL R5 3 + 0x80000000, // 0013 RET 0 }) ) ); @@ -4489,11 +3600,11 @@ be_local_closure(Matter_Device_MtrJoin, /* name */ /******************************************************************** -** Solidified function: start_commissioning_complete +** Solidified function: find_plugin_by_friendly_name ********************************************************************/ -be_local_closure(Matter_Device_start_commissioning_complete, /* name */ +be_local_closure(Matter_Device_find_plugin_by_friendly_name, /* name */ be_nested_proto( - 11, /* nstack */ + 7, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4501,72 +3612,13 @@ be_local_closure(Matter_Device_start_commissioning_complete, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(get_fabric), - /* K1 */ be_nested_str_weak(get_fabric_id), - /* K2 */ be_nested_str_weak(copy), - /* K3 */ be_nested_str_weak(reverse), - /* K4 */ be_nested_str_weak(tohex), - /* K5 */ be_nested_str_weak(get_admin_vendor_name), - /* K6 */ be_nested_str_weak(tasmota), - /* K7 */ be_nested_str_weak(log), - /* K8 */ be_nested_str_weak(MTR_X3A_X20_X2D_X2D_X2D_X20Commissioning_X20complete_X20for_X20Fabric_X20_X27_X25s_X27_X20_X28Vendor_X20_X25s_X29_X20_X2D_X2D_X2D), - /* K9 */ be_const_int(2), - /* K10 */ be_nested_str_weak(stop_basic_commissioning), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(plugins), + /* K2 */ be_nested_str_weak(get_name), + /* K3 */ be_const_int(1), }), - be_str_weak(start_commissioning_complete), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x8C080300, // 0000 GETMET R2 R1 K0 - 0x7C080200, // 0001 CALL R2 1 - 0x8C0C0501, // 0002 GETMET R3 R2 K1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x8C0C0702, // 0004 GETMET R3 R3 K2 - 0x7C0C0200, // 0005 CALL R3 1 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x8C0C0704, // 0008 GETMET R3 R3 K4 - 0x7C0C0200, // 0009 CALL R3 1 - 0x8C100505, // 000A GETMET R4 R2 K5 - 0x7C100200, // 000B CALL R4 1 - 0xB8160C00, // 000C GETNGBL R5 K6 - 0x8C140B07, // 000D GETMET R5 R5 K7 - 0x601C0018, // 000E GETGBL R7 G24 - 0x58200008, // 000F LDCONST R8 K8 - 0x5C240600, // 0010 MOVE R9 R3 - 0x5C280800, // 0011 MOVE R10 R4 - 0x7C1C0600, // 0012 CALL R7 3 - 0x58200009, // 0013 LDCONST R8 K9 - 0x7C140600, // 0014 CALL R5 3 - 0x8C14010A, // 0015 GETMET R5 R0 K10 - 0x7C140200, // 0016 CALL R5 1 - 0x80000000, // 0017 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: find_plugin_by_friendly_name -********************************************************************/ -be_local_closure(Matter_Device_find_plugin_by_friendly_name, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(plugins), - /* K2 */ be_nested_str_weak(get_name), - /* K3 */ be_const_int(1), - }), - be_str_weak(find_plugin_by_friendly_name), + be_str_weak(find_plugin_by_friendly_name), &be_const_str_solidified, ( &(const binstruction[35]) { /* code */ 0x4C080000, // 0000 LDNIL R2 @@ -4611,91 +3663,11 @@ be_local_closure(Matter_Device_find_plugin_by_friendly_name, /* name */ /******************************************************************** -** Solidified function: k2l -********************************************************************/ -be_local_closure(Matter_Device_k2l, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Device), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(push), - /* K3 */ be_nested_str_weak(stop_iteration), - /* K4 */ be_const_int(1), - /* K5 */ be_const_int(0), - }), - be_str_weak(k2l), - &be_const_str_solidified, - ( &(const binstruction[50]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x60080012, // 0001 GETGBL R2 G18 - 0x7C080000, // 0002 CALL R2 0 - 0x4C0C0000, // 0003 LDNIL R3 - 0x1C0C0003, // 0004 EQ R3 R0 R3 - 0x780E0000, // 0005 JMPF R3 #0007 - 0x80040400, // 0006 RET 1 R2 - 0x600C0010, // 0007 GETGBL R3 G16 - 0x8C100101, // 0008 GETMET R4 R0 K1 - 0x7C100200, // 0009 CALL R4 1 - 0x7C0C0200, // 000A CALL R3 1 - 0xA8020005, // 000B EXBLK 0 #0012 - 0x5C100600, // 000C MOVE R4 R3 - 0x7C100000, // 000D CALL R4 0 - 0x8C140502, // 000E GETMET R5 R2 K2 - 0x5C1C0800, // 000F MOVE R7 R4 - 0x7C140400, // 0010 CALL R5 2 - 0x7001FFF9, // 0011 JMP #000C - 0x580C0003, // 0012 LDCONST R3 K3 - 0xAC0C0200, // 0013 CATCH R3 1 0 - 0xB0080000, // 0014 RAISE 2 R0 R0 - 0x600C0010, // 0015 GETGBL R3 G16 - 0x6010000C, // 0016 GETGBL R4 G12 - 0x5C140400, // 0017 MOVE R5 R2 - 0x7C100200, // 0018 CALL R4 1 - 0x04100904, // 0019 SUB R4 R4 K4 - 0x40120804, // 001A CONNECT R4 K4 R4 - 0x7C0C0200, // 001B CALL R3 1 - 0xA8020010, // 001C EXBLK 0 #002E - 0x5C100600, // 001D MOVE R4 R3 - 0x7C100000, // 001E CALL R4 0 - 0x94140404, // 001F GETIDX R5 R2 R4 - 0x5C180800, // 0020 MOVE R6 R4 - 0x241C0D05, // 0021 GT R7 R6 K5 - 0x781E0008, // 0022 JMPF R7 #002C - 0x041C0D04, // 0023 SUB R7 R6 K4 - 0x941C0407, // 0024 GETIDX R7 R2 R7 - 0x241C0E05, // 0025 GT R7 R7 R5 - 0x781E0004, // 0026 JMPF R7 #002C - 0x041C0D04, // 0027 SUB R7 R6 K4 - 0x941C0407, // 0028 GETIDX R7 R2 R7 - 0x98080C07, // 0029 SETIDX R2 R6 R7 - 0x04180D04, // 002A SUB R6 R6 K4 - 0x7001FFF4, // 002B JMP #0021 - 0x98080C05, // 002C SETIDX R2 R6 R5 - 0x7001FFEE, // 002D JMP #001D - 0x580C0003, // 002E LDCONST R3 K3 - 0xAC0C0200, // 002F CATCH R3 1 0 - 0xB0080000, // 0030 RAISE 2 R0 R0 - 0x80040400, // 0031 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: generate_random_passcode +** Solidified function: every_second ********************************************************************/ -be_local_closure(Matter_Device_generate_random_passcode, /* name */ +be_local_closure(Matter_Device_every_second, /* name */ be_nested_proto( - 7, /* nstack */ + 4, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4703,54 +3675,35 @@ be_local_closure(Matter_Device_generate_random_passcode, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(random), - /* K2 */ be_nested_str_weak(get), - /* K3 */ be_const_int(0), - /* K4 */ be_const_int(134217727), - /* K5 */ be_const_int(99999998), - /* K6 */ be_nested_str_weak(PASSCODE_INVALID), - /* K7 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(every_second), + /* K2 */ be_nested_str_weak(message_handler), + /* K3 */ be_nested_str_weak(commissioning_open), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(time_reached), }), - be_str_weak(generate_random_passcode), + be_str_weak(every_second), &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x500C0200, // 0002 LDBOOL R3 1 0 - 0x780E001D, // 0003 JMPF R3 #0022 - 0x8C0C0301, // 0004 GETMET R3 R1 K1 - 0x54160003, // 0005 LDINT R5 4 - 0x7C0C0400, // 0006 CALL R3 2 - 0x8C0C0702, // 0007 GETMET R3 R3 K2 - 0x58140003, // 0008 LDCONST R5 K3 - 0x541A0003, // 0009 LDINT R6 4 - 0x7C0C0600, // 000A CALL R3 3 - 0x2C0C0704, // 000B AND R3 R3 K4 - 0x5C080600, // 000C MOVE R2 R3 - 0x240C0505, // 000D GT R3 R2 K5 - 0x780E0000, // 000E JMPF R3 #0010 - 0x7001FFF1, // 000F JMP #0002 - 0x600C0010, // 0010 GETGBL R3 G16 - 0x88100106, // 0011 GETMBR R4 R0 K6 - 0x7C0C0200, // 0012 CALL R3 1 - 0xA8020005, // 0013 EXBLK 0 #001A - 0x5C100600, // 0014 MOVE R4 R3 - 0x7C100000, // 0015 CALL R4 0 - 0x1C140404, // 0016 EQ R5 R2 R4 - 0x78160000, // 0017 JMPF R5 #0019 - 0x4C080000, // 0018 LDNIL R2 - 0x7001FFF9, // 0019 JMP #0014 - 0x580C0007, // 001A LDCONST R3 K7 - 0xAC0C0200, // 001B CATCH R3 1 0 - 0xB0080000, // 001C RAISE 2 R0 R0 - 0x4C0C0000, // 001D LDNIL R3 - 0x200C0403, // 001E NE R3 R2 R3 - 0x780E0000, // 001F JMPF R3 #0021 - 0x80040400, // 0020 RET 1 R2 - 0x7001FFDF, // 0021 JMP #0002 - 0x80000000, // 0022 RET 0 + ( &(const binstruction[18]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x88040102, // 0003 GETMBR R1 R0 K2 + 0x8C040301, // 0004 GETMET R1 R1 K1 + 0x7C040200, // 0005 CALL R1 1 + 0x88040103, // 0006 GETMBR R1 R0 K3 + 0x4C080000, // 0007 LDNIL R2 + 0x20040202, // 0008 NE R1 R1 R2 + 0x78060006, // 0009 JMPF R1 #0011 + 0xB8060800, // 000A GETNGBL R1 K4 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x880C0103, // 000C GETMBR R3 R0 K3 + 0x7C040400, // 000D CALL R1 2 + 0x78060001, // 000E JMPF R1 #0011 + 0x4C040000, // 000F LDNIL R1 + 0x90020601, // 0010 SETMBR R0 K3 R1 + 0x80000000, // 0011 RET 0 }) ) ); @@ -4944,11 +3897,11 @@ be_local_closure(Matter_Device_load_param, /* name */ /******************************************************************** -** Solidified function: received_ack +** Solidified function: register_plugin_class ********************************************************************/ -be_local_closure(Matter_Device_received_ack, /* name */ +be_local_closure(Matter_Device_register_plugin_class, /* name */ be_nested_proto( - 5, /* nstack */ + 7, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4956,18 +3909,24 @@ be_local_closure(Matter_Device_received_ack, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(received_ack), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(introspect), + /* K1 */ be_nested_str_weak(get), + /* K2 */ be_nested_str_weak(TYPE), + /* K3 */ be_nested_str_weak(plugins_classes), }), - be_str_weak(received_ack), + be_str_weak(register_plugin_class), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* 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 + ( &(const binstruction[ 9]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x58180002, // 0003 LDCONST R6 K2 + 0x7C0C0600, // 0004 CALL R3 3 + 0x780E0001, // 0005 JMPF R3 #0008 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x98100601, // 0007 SETIDX R4 R3 R1 + 0x80000000, // 0008 RET 0 }) ) ); @@ -4975,257 +3934,1258 @@ be_local_closure(Matter_Device_received_ack, /* name */ /******************************************************************** -** Solidified function: autoconf_device_map +** Solidified function: process_attribute_expansion ********************************************************************/ -be_local_closure(Matter_Device_autoconf_device_map, /* name */ +be_local_closure(Matter_Device_process_attribute_expansion, /* name */ be_nested_proto( - 20, /* nstack */ - 1, /* argc */ + 24, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[36]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_const_int(1), - /* K2 */ be_nested_str_weak(light), - /* K3 */ be_nested_str_weak(get), - /* K4 */ be_nested_str_weak(find), - /* K5 */ be_nested_str_weak(channels), - /* K6 */ be_nested_str_weak(), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(type), - /* K9 */ be_nested_str_weak(light1), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(light2), - /* K12 */ be_nested_str_weak(light3), - /* K13 */ be_nested_str_weak(tasmota), - /* K14 */ be_nested_str_weak(cmd), - /* K15 */ be_nested_str_weak(Status_X2013), - /* K16 */ be_nested_str_weak(log), - /* K17 */ be_nested_str_weak(MTR_X3A_X20Status_X2013_X20_X3D_X20), - /* K18 */ be_const_int(3), - /* K19 */ be_nested_str_weak(contains), - /* K20 */ be_nested_str_weak(StatusSHT), - /* K21 */ be_nested_str_weak(SHT), - /* K22 */ be_nested_str_weak(MTR_X3A_X20_X27_X25s_X27_X20_X3D_X20_X25s), - /* K23 */ be_nested_str_weak(Relay1), - /* K24 */ be_nested_str_weak(Relay2), - /* K25 */ be_nested_str_weak(push), - /* K26 */ be_nested_str_weak(MTR_X3A_X20relay1_X3D_X25s_X20relay2_X3D_X25s), - /* K27 */ be_nested_str_weak(TiltConfig), - /* K28 */ be_nested_str_weak(shutter_X2Btilt), - /* K29 */ be_nested_str_weak(shutter), - /* K30 */ be_nested_str_weak(get_power), - /* K31 */ be_nested_str_weak(relay), - /* K32 */ be_nested_str_weak(load), - /* K33 */ be_nested_str_weak(read_sensors), - /* K34 */ be_nested_str_weak(autoconf_sensors_list), - /* K35 */ be_nested_str_weak(stop_iteration), + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(keys), + /* K1 */ be_nested_str_weak(push), + /* K2 */ be_nested_str_weak(stop_iteration), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(keys_sorted), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0x60040012, // 0000 GETGBL R1 G18 + 0x7C040000, // 0001 CALL R1 0 + 0x60080010, // 0002 GETGBL R2 G16 + 0x8C0C0100, // 0003 GETMET R3 R0 K0 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C080200, // 0005 CALL R2 1 + 0xA8020005, // 0006 EXBLK 0 #000D + 0x5C0C0400, // 0007 MOVE R3 R2 + 0x7C0C0000, // 0008 CALL R3 0 + 0x8C100301, // 0009 GETMET R4 R1 K1 + 0x5C180600, // 000A MOVE R6 R3 + 0x7C100400, // 000B CALL R4 2 + 0x7001FFF9, // 000C JMP #0007 + 0x58080002, // 000D LDCONST R2 K2 + 0xAC080200, // 000E CATCH R2 1 0 + 0xB0080000, // 000F RAISE 2 R0 R0 + 0x60080010, // 0010 GETGBL R2 G16 + 0x600C000C, // 0011 GETGBL R3 G12 + 0x5C100200, // 0012 MOVE R4 R1 + 0x7C0C0200, // 0013 CALL R3 1 + 0x040C0703, // 0014 SUB R3 R3 K3 + 0x400E0603, // 0015 CONNECT R3 K3 R3 + 0x7C080200, // 0016 CALL R2 1 + 0xA8020010, // 0017 EXBLK 0 #0029 + 0x5C0C0400, // 0018 MOVE R3 R2 + 0x7C0C0000, // 0019 CALL R3 0 + 0x94100203, // 001A GETIDX R4 R1 R3 + 0x5C140600, // 001B MOVE R5 R3 + 0x24180B04, // 001C GT R6 R5 K4 + 0x781A0008, // 001D JMPF R6 #0027 + 0x04180B03, // 001E SUB R6 R5 K3 + 0x94180206, // 001F GETIDX R6 R1 R6 + 0x24180C04, // 0020 GT R6 R6 R4 + 0x781A0004, // 0021 JMPF R6 #0027 + 0x04180B03, // 0022 SUB R6 R5 K3 + 0x94180206, // 0023 GETIDX R6 R1 R6 + 0x98040A06, // 0024 SETIDX R1 R5 R6 + 0x04140B03, // 0025 SUB R5 R5 K3 + 0x7001FFF4, // 0026 JMP #001C + 0x98040A04, // 0027 SETIDX R1 R5 R4 + 0x7001FFEE, // 0028 JMP #0018 + 0x58080002, // 0029 LDCONST R2 K2 + 0xAC080200, // 002A CATCH R2 1 0 + 0xB0080000, // 002B RAISE 2 R0 R0 + 0x80040200, // 002C RET 1 R1 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(endpoint), + /* K1 */ be_nested_str_weak(cluster), + /* K2 */ be_nested_str_weak(attribute), + /* K3 */ be_nested_str_weak(plugins), + /* K4 */ be_nested_str_weak(get_endpoint), + /* K5 */ be_nested_str_weak(contains), + /* K6 */ be_nested_str_weak(get_cluster_list), + /* K7 */ be_nested_str_weak(get_attribute_list), + /* K8 */ be_nested_str_weak(push), + /* K9 */ be_nested_str_weak(stop_iteration), + /* K10 */ be_nested_str_weak(status), + /* K11 */ be_nested_str_weak(matter), + /* K12 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), + /* K13 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), + /* K14 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), + /* K15 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE), + }), + be_str_weak(process_attribute_expansion), + &be_const_str_solidified, + ( &(const binstruction[203]) { /* code */ + 0x840C0000, // 0000 CLOSURE R3 P0 + 0x88100300, // 0001 GETMBR R4 R1 K0 + 0x88140301, // 0002 GETMBR R5 R1 K1 + 0x88180302, // 0003 GETMBR R6 R1 K2 + 0x501C0000, // 0004 LDBOOL R7 0 0 + 0x50200000, // 0005 LDBOOL R8 0 0 + 0x50240000, // 0006 LDBOOL R9 0 0 + 0x88280300, // 0007 GETMBR R10 R1 K0 + 0x4C2C0000, // 0008 LDNIL R11 + 0x2028140B, // 0009 NE R10 R10 R11 + 0x782A0007, // 000A JMPF R10 #0013 + 0x88280301, // 000B GETMBR R10 R1 K1 + 0x4C2C0000, // 000C LDNIL R11 + 0x2028140B, // 000D NE R10 R10 R11 + 0x782A0003, // 000E JMPF R10 #0013 + 0x88280302, // 000F GETMBR R10 R1 K2 + 0x4C2C0000, // 0010 LDNIL R11 + 0x2028140B, // 0011 NE R10 R10 R11 + 0x742A0000, // 0012 JMPT R10 #0014 + 0x50280001, // 0013 LDBOOL R10 0 1 + 0x50280200, // 0014 LDBOOL R10 1 0 + 0x602C0013, // 0015 GETGBL R11 G19 + 0x7C2C0000, // 0016 CALL R11 0 + 0x60300010, // 0017 GETGBL R12 G16 + 0x88340103, // 0018 GETMBR R13 R0 K3 + 0x7C300200, // 0019 CALL R12 1 + 0xA8020053, // 001A EXBLK 0 #006F + 0x5C341800, // 001B MOVE R13 R12 + 0x7C340000, // 001C CALL R13 0 + 0x8C381B04, // 001D GETMET R14 R13 K4 + 0x7C380200, // 001E CALL R14 1 + 0x4C3C0000, // 001F LDNIL R15 + 0x203C080F, // 0020 NE R15 R4 R15 + 0x783E0002, // 0021 JMPF R15 #0025 + 0x203C1C04, // 0022 NE R15 R14 R4 + 0x783E0000, // 0023 JMPF R15 #0025 + 0x7001FFF5, // 0024 JMP #001B + 0x8C3C1705, // 0025 GETMET R15 R11 K5 + 0x5C441C00, // 0026 MOVE R17 R14 + 0x7C3C0400, // 0027 CALL R15 2 + 0x743E0002, // 0028 JMPT R15 #002C + 0x603C0013, // 0029 GETGBL R15 G19 + 0x7C3C0000, // 002A CALL R15 0 + 0x982C1C0F, // 002B SETIDX R11 R14 R15 + 0x501C0200, // 002C LDBOOL R7 1 0 + 0x8C3C1B06, // 002D GETMET R15 R13 K6 + 0x7C3C0200, // 002E CALL R15 1 + 0x60400010, // 002F GETGBL R16 G16 + 0x5C441E00, // 0030 MOVE R17 R15 + 0x7C400200, // 0031 CALL R16 1 + 0xA8020037, // 0032 EXBLK 0 #006B + 0x5C442000, // 0033 MOVE R17 R16 + 0x7C440000, // 0034 CALL R17 0 + 0x4C480000, // 0035 LDNIL R18 + 0x20480A12, // 0036 NE R18 R5 R18 + 0x784A0002, // 0037 JMPF R18 #003B + 0x20482205, // 0038 NE R18 R17 R5 + 0x784A0000, // 0039 JMPF R18 #003B + 0x7001FFF7, // 003A JMP #0033 + 0x9448160E, // 003B GETIDX R18 R11 R14 + 0x8C482505, // 003C GETMET R18 R18 K5 + 0x5C502200, // 003D MOVE R20 R17 + 0x7C480400, // 003E CALL R18 2 + 0x744A0003, // 003F JMPT R18 #0044 + 0x9448160E, // 0040 GETIDX R18 R11 R14 + 0x604C0013, // 0041 GETGBL R19 G19 + 0x7C4C0000, // 0042 CALL R19 0 + 0x98482213, // 0043 SETIDX R18 R17 R19 + 0x50200200, // 0044 LDBOOL R8 1 0 + 0x8C481B07, // 0045 GETMET R18 R13 K7 + 0x5C502200, // 0046 MOVE R20 R17 + 0x7C480400, // 0047 CALL R18 2 + 0x604C0010, // 0048 GETGBL R19 G16 + 0x5C502400, // 0049 MOVE R20 R18 + 0x7C4C0200, // 004A CALL R19 1 + 0xA802001A, // 004B EXBLK 0 #0067 + 0x5C502600, // 004C MOVE R20 R19 + 0x7C500000, // 004D CALL R20 0 + 0x4C540000, // 004E LDNIL R21 + 0x20540C15, // 004F NE R21 R6 R21 + 0x78560002, // 0050 JMPF R21 #0054 + 0x20542806, // 0051 NE R21 R20 R6 + 0x78560000, // 0052 JMPF R21 #0054 + 0x7001FFF7, // 0053 JMP #004C + 0x9454160E, // 0054 GETIDX R21 R11 R14 + 0x94542A11, // 0055 GETIDX R21 R21 R17 + 0x8C542B05, // 0056 GETMET R21 R21 K5 + 0x5C5C2800, // 0057 MOVE R23 R20 + 0x7C540400, // 0058 CALL R21 2 + 0x74560004, // 0059 JMPT R21 #005F + 0x9454160E, // 005A GETIDX R21 R11 R14 + 0x94542A11, // 005B GETIDX R21 R21 R17 + 0x60580012, // 005C GETGBL R22 G18 + 0x7C580000, // 005D CALL R22 0 + 0x98542816, // 005E SETIDX R21 R20 R22 + 0x50240200, // 005F LDBOOL R9 1 0 + 0x9454160E, // 0060 GETIDX R21 R11 R14 + 0x94542A11, // 0061 GETIDX R21 R21 R17 + 0x94542A14, // 0062 GETIDX R21 R21 R20 + 0x8C542B08, // 0063 GETMET R21 R21 K8 + 0x5C5C1A00, // 0064 MOVE R23 R13 + 0x7C540400, // 0065 CALL R21 2 + 0x7001FFE4, // 0066 JMP #004C + 0x584C0009, // 0067 LDCONST R19 K9 + 0xAC4C0200, // 0068 CATCH R19 1 0 + 0xB0080000, // 0069 RAISE 2 R0 R0 + 0x7001FFC7, // 006A JMP #0033 + 0x58400009, // 006B LDCONST R16 K9 + 0xAC400200, // 006C CATCH R16 1 0 + 0xB0080000, // 006D RAISE 2 R0 R0 + 0x7001FFAB, // 006E JMP #001B + 0x58300009, // 006F LDCONST R12 K9 + 0xAC300200, // 0070 CATCH R12 1 0 + 0xB0080000, // 0071 RAISE 2 R0 R0 + 0x60300010, // 0072 GETGBL R12 G16 + 0x5C340600, // 0073 MOVE R13 R3 + 0x5C381600, // 0074 MOVE R14 R11 + 0x7C340200, // 0075 CALL R13 1 + 0x7C300200, // 0076 CALL R12 1 + 0xA8020033, // 0077 EXBLK 0 #00AC + 0x5C341800, // 0078 MOVE R13 R12 + 0x7C340000, // 0079 CALL R13 0 + 0x60380010, // 007A GETGBL R14 G16 + 0x5C3C0600, // 007B MOVE R15 R3 + 0x9440160D, // 007C GETIDX R16 R11 R13 + 0x7C3C0200, // 007D CALL R15 1 + 0x7C380200, // 007E CALL R14 1 + 0xA8020027, // 007F EXBLK 0 #00A8 + 0x5C3C1C00, // 0080 MOVE R15 R14 + 0x7C3C0000, // 0081 CALL R15 0 + 0x60400010, // 0082 GETGBL R16 G16 + 0x5C440600, // 0083 MOVE R17 R3 + 0x9448160D, // 0084 GETIDX R18 R11 R13 + 0x9448240F, // 0085 GETIDX R18 R18 R15 + 0x7C440200, // 0086 CALL R17 1 + 0x7C400200, // 0087 CALL R16 1 + 0xA802001A, // 0088 EXBLK 0 #00A4 + 0x5C442000, // 0089 MOVE R17 R16 + 0x7C440000, // 008A CALL R17 0 + 0x60480010, // 008B GETGBL R18 G16 + 0x944C160D, // 008C GETIDX R19 R11 R13 + 0x944C260F, // 008D GETIDX R19 R19 R15 + 0x944C2611, // 008E GETIDX R19 R19 R17 + 0x7C480200, // 008F CALL R18 1 + 0xA802000E, // 0090 EXBLK 0 #00A0 + 0x5C4C2400, // 0091 MOVE R19 R18 + 0x7C4C0000, // 0092 CALL R19 0 + 0x9006000D, // 0093 SETMBR R1 K0 R13 + 0x9006020F, // 0094 SETMBR R1 K1 R15 + 0x90060411, // 0095 SETMBR R1 K2 R17 + 0x5C500400, // 0096 MOVE R20 R2 + 0x5C542600, // 0097 MOVE R21 R19 + 0x5C580200, // 0098 MOVE R22 R1 + 0x5C5C1400, // 0099 MOVE R23 R10 + 0x7C500600, // 009A CALL R20 3 + 0x782A0002, // 009B JMPF R10 #009F + 0x78520001, // 009C JMPF R20 #009F + 0xA8040004, // 009D EXBLK 1 4 + 0x80002A00, // 009E RET 0 + 0x7001FFF0, // 009F JMP #0091 + 0x58480009, // 00A0 LDCONST R18 K9 + 0xAC480200, // 00A1 CATCH R18 1 0 + 0xB0080000, // 00A2 RAISE 2 R0 R0 + 0x7001FFE4, // 00A3 JMP #0089 + 0x58400009, // 00A4 LDCONST R16 K9 + 0xAC400200, // 00A5 CATCH R16 1 0 + 0xB0080000, // 00A6 RAISE 2 R0 R0 + 0x7001FFD7, // 00A7 JMP #0080 + 0x58380009, // 00A8 LDCONST R14 K9 + 0xAC380200, // 00A9 CATCH R14 1 0 + 0xB0080000, // 00AA RAISE 2 R0 R0 + 0x7001FFCB, // 00AB JMP #0078 + 0x58300009, // 00AC LDCONST R12 K9 + 0xAC300200, // 00AD CATCH R12 1 0 + 0xB0080000, // 00AE RAISE 2 R0 R0 + 0x782A0019, // 00AF JMPF R10 #00CA + 0x5C300E00, // 00B0 MOVE R12 R7 + 0x74320003, // 00B1 JMPT R12 #00B6 + 0xB8321600, // 00B2 GETNGBL R12 K11 + 0x8830190C, // 00B3 GETMBR R12 R12 K12 + 0x9006140C, // 00B4 SETMBR R1 K10 R12 + 0x7002000E, // 00B5 JMP #00C5 + 0x5C301000, // 00B6 MOVE R12 R8 + 0x74320003, // 00B7 JMPT R12 #00BC + 0xB8321600, // 00B8 GETNGBL R12 K11 + 0x8830190D, // 00B9 GETMBR R12 R12 K13 + 0x9006140C, // 00BA SETMBR R1 K10 R12 + 0x70020008, // 00BB JMP #00C5 + 0x5C301200, // 00BC MOVE R12 R9 + 0x74320003, // 00BD JMPT R12 #00C2 + 0xB8321600, // 00BE GETNGBL R12 K11 + 0x8830190E, // 00BF GETMBR R12 R12 K14 + 0x9006140C, // 00C0 SETMBR R1 K10 R12 + 0x70020002, // 00C1 JMP #00C5 + 0xB8321600, // 00C2 GETNGBL R12 K11 + 0x8830190F, // 00C3 GETMBR R12 R12 K15 + 0x9006140C, // 00C4 SETMBR R1 K10 R12 + 0x5C300400, // 00C5 MOVE R12 R2 + 0x4C340000, // 00C6 LDNIL R13 + 0x5C380200, // 00C7 MOVE R14 R1 + 0x503C0200, // 00C8 LDBOOL R15 1 0 + 0x7C300600, // 00C9 CALL R12 3 + 0x80000000, // 00CA RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_commissioning_open +********************************************************************/ +be_local_closure(Matter_Device_is_commissioning_open, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(commissioning_open), + }), + be_str_weak(is_commissioning_open), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_commissioning_complete_deferred +********************************************************************/ +be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 3, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 2]) { /* upvals */ + be_local_const_upval(1, 0), + be_local_const_upval(1, 1), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(start_commissioning_complete), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x68080001, // 0002 GETUPV R2 U1 + 0x7C000400, // 0003 CALL R0 2 + 0x80040000, // 0004 RET 1 R0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(set_timer), + /* K2 */ be_const_int(0), + }), + be_str_weak(start_commissioning_complete_deferred), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x84140000, // 0003 CLOSURE R5 P0 + 0x7C080600, // 0004 CALL R2 3 + 0xA0000000, // 0005 CLOSE R0 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_operational_discovery +********************************************************************/ +be_local_closure(Matter_Device_start_operational_discovery, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(mdns), + /* K2 */ be_nested_str_weak(stop_basic_commissioning), + /* K3 */ be_nested_str_weak(root_w0), + /* K4 */ be_nested_str_weak(root_L), + /* K5 */ be_nested_str_weak(mdns_announce_op_discovery), + }), + be_str_weak(start_operational_discovery), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x8C100102, // 0002 GETMET R4 R0 K2 + 0x7C100200, // 0003 CALL R4 1 + 0x4C100000, // 0004 LDNIL R4 + 0x90020604, // 0005 SETMBR R0 K3 R4 + 0x4C100000, // 0006 LDNIL R4 + 0x90020804, // 0007 SETMBR R0 K4 R4 + 0x8C100105, // 0008 GETMET R4 R0 K5 + 0x5C180200, // 0009 MOVE R6 R1 + 0x7C100400, // 000A CALL R4 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: MtrInfo +********************************************************************/ +be_local_closure(Matter_Device_MtrInfo, /* name */ + be_nested_proto( + 10, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(), + /* K1 */ be_nested_str_weak(plugins), + /* K2 */ be_nested_str_weak(MtrInfo_one), + /* K3 */ be_nested_str_weak(endpoint), + /* K4 */ be_nested_str_weak(stop_iteration), + /* K5 */ be_nested_str_weak(int), + /* K6 */ be_nested_str_weak(find_plugin_by_friendly_name), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(resp_cmnd_done), + }), + be_str_weak(MtrInfo), + &be_const_str_solidified, + ( &(const binstruction[40]) { /* code */ + 0x1C140700, // 0000 EQ R5 R3 K0 + 0x7815FFFF, // 0001 JMPF R5 #0002 + 0x1C140700, // 0002 EQ R5 R3 K0 + 0x7816000D, // 0003 JMPF R5 #0012 + 0x60140010, // 0004 GETGBL R5 G16 + 0x88180101, // 0005 GETMBR R6 R0 K1 + 0x7C140200, // 0006 CALL R5 1 + 0xA8020005, // 0007 EXBLK 0 #000E + 0x5C180A00, // 0008 MOVE R6 R5 + 0x7C180000, // 0009 CALL R6 0 + 0x8C1C0102, // 000A GETMET R7 R0 K2 + 0x88240D03, // 000B GETMBR R9 R6 K3 + 0x7C1C0400, // 000C CALL R7 2 + 0x7001FFF9, // 000D JMP #0008 + 0x58140004, // 000E LDCONST R5 K4 + 0xAC140200, // 000F CATCH R5 1 0 + 0xB0080000, // 0010 RAISE 2 R0 R0 + 0x70020011, // 0011 JMP #0024 + 0x60140004, // 0012 GETGBL R5 G4 + 0x5C180800, // 0013 MOVE R6 R4 + 0x7C140200, // 0014 CALL R5 1 + 0x1C140B05, // 0015 EQ R5 R5 K5 + 0x78160003, // 0016 JMPF R5 #001B + 0x8C140102, // 0017 GETMET R5 R0 K2 + 0x5C1C0800, // 0018 MOVE R7 R4 + 0x7C140400, // 0019 CALL R5 2 + 0x70020008, // 001A JMP #0024 + 0x8C140106, // 001B GETMET R5 R0 K6 + 0x5C1C0600, // 001C MOVE R7 R3 + 0x7C140400, // 001D CALL R5 2 + 0x4C180000, // 001E LDNIL R6 + 0x20180A06, // 001F NE R6 R5 R6 + 0x781A0002, // 0020 JMPF R6 #0024 + 0x8C180102, // 0021 GETMET R6 R0 K2 + 0x88200B03, // 0022 GETMBR R8 R5 K3 + 0x7C180400, // 0023 CALL R6 2 + 0xB8160E00, // 0024 GETNGBL R5 K7 + 0x8C140B08, // 0025 GETMET R5 R5 K8 + 0x7C140200, // 0026 CALL R5 1 + 0x80000000, // 0027 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_announce_op_discovery +********************************************************************/ +be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ + be_nested_proto( + 14, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[27]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(get_device_id), + /* K2 */ be_nested_str_weak(copy), + /* K3 */ be_nested_str_weak(reverse), + /* K4 */ be_nested_str_weak(get_fabric_compressed), + /* K5 */ be_nested_str_weak(tohex), + /* K6 */ be_nested_str_weak(_X2D), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(log), + /* K9 */ be_nested_str_weak(MTR_X3A_X20Operational_X20Discovery_X20node_X20_X3D_X20), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(eth), + /* K12 */ be_nested_str_weak(find), + /* K13 */ be_nested_str_weak(up), + /* K14 */ be_nested_str_weak(MTR_X3A_X20adding_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), + /* K15 */ be_nested_str_weak(hostname_eth), + /* K16 */ be_nested_str_weak(add_service), + /* K17 */ be_nested_str_weak(_matter), + /* K18 */ be_nested_str_weak(_tcp), + /* K19 */ be_nested_str_weak(_I), + /* K20 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), + /* K21 */ be_nested_str_weak(add_subtype), + /* K22 */ be_nested_str_weak(wifi), + /* K23 */ be_nested_str_weak(hostname_wifi), + /* K24 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K25 */ be_nested_str_weak(_X7C), + /* K26 */ be_const_int(2), + }), + be_str_weak(mdns_announce_op_discovery), + &be_const_str_solidified, + ( &(const binstruction[121]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA8020064, // 0001 EXBLK 0 #0067 + 0x8C0C0301, // 0002 GETMET R3 R1 K1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x8C0C0702, // 0004 GETMET R3 R3 K2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x8C100304, // 0008 GETMET R4 R1 K4 + 0x7C100200, // 0009 CALL R4 1 + 0x8C140905, // 000A GETMET R5 R4 K5 + 0x7C140200, // 000B CALL R5 1 + 0x00140B06, // 000C ADD R5 R5 K6 + 0x8C180705, // 000D GETMET R6 R3 K5 + 0x7C180200, // 000E CALL R6 1 + 0x00140A06, // 000F ADD R5 R5 R6 + 0xB81A0E00, // 0010 GETNGBL R6 K7 + 0x8C180D08, // 0011 GETMET R6 R6 K8 + 0x00221205, // 0012 ADD R8 K9 R5 + 0x5824000A, // 0013 LDCONST R9 K10 + 0x7C180600, // 0014 CALL R6 3 + 0xB81A0E00, // 0015 GETNGBL R6 K7 + 0x8C180D0B, // 0016 GETMET R6 R6 K11 + 0x7C180200, // 0017 CALL R6 1 + 0x8C180D0C, // 0018 GETMET R6 R6 K12 + 0x5820000D, // 0019 LDCONST R8 K13 + 0x7C180400, // 001A CALL R6 2 + 0x781A0020, // 001B JMPF R6 #003D + 0xB81A0E00, // 001C GETNGBL R6 K7 + 0x8C180D08, // 001D GETMET R6 R6 K8 + 0x60200018, // 001E GETGBL R8 G24 + 0x5824000E, // 001F LDCONST R9 K14 + 0x5828000B, // 0020 LDCONST R10 K11 + 0x5C2C0A00, // 0021 MOVE R11 R5 + 0x8830010F, // 0022 GETMBR R12 R0 K15 + 0x7C200800, // 0023 CALL R8 4 + 0x5824000A, // 0024 LDCONST R9 K10 + 0x7C180600, // 0025 CALL R6 3 + 0x8C180510, // 0026 GETMET R6 R2 K16 + 0x58200011, // 0027 LDCONST R8 K17 + 0x58240012, // 0028 LDCONST R9 K18 + 0x542A15A3, // 0029 LDINT R10 5540 + 0x4C2C0000, // 002A LDNIL R11 + 0x5C300A00, // 002B MOVE R12 R5 + 0x8834010F, // 002C GETMBR R13 R0 K15 + 0x7C180E00, // 002D CALL R6 7 + 0x8C180905, // 002E GETMET R6 R4 K5 + 0x7C180200, // 002F CALL R6 1 + 0x001A2606, // 0030 ADD R6 K19 R6 + 0xB81E0E00, // 0031 GETNGBL R7 K7 + 0x8C1C0F08, // 0032 GETMET R7 R7 K8 + 0x00262806, // 0033 ADD R9 K20 R6 + 0x5828000A, // 0034 LDCONST R10 K10 + 0x7C1C0600, // 0035 CALL R7 3 + 0x8C1C0515, // 0036 GETMET R7 R2 K21 + 0x58240011, // 0037 LDCONST R9 K17 + 0x58280012, // 0038 LDCONST R10 K18 + 0x5C2C0A00, // 0039 MOVE R11 R5 + 0x8830010F, // 003A GETMBR R12 R0 K15 + 0x5C340C00, // 003B MOVE R13 R6 + 0x7C1C0C00, // 003C CALL R7 6 + 0xB81A0E00, // 003D GETNGBL R6 K7 + 0x8C180D16, // 003E GETMET R6 R6 K22 + 0x7C180200, // 003F CALL R6 1 + 0x8C180D0C, // 0040 GETMET R6 R6 K12 + 0x5820000D, // 0041 LDCONST R8 K13 + 0x7C180400, // 0042 CALL R6 2 + 0x781A0020, // 0043 JMPF R6 #0065 + 0xB81A0E00, // 0044 GETNGBL R6 K7 + 0x8C180D08, // 0045 GETMET R6 R6 K8 + 0x60200018, // 0046 GETGBL R8 G24 + 0x5824000E, // 0047 LDCONST R9 K14 + 0x58280016, // 0048 LDCONST R10 K22 + 0x5C2C0A00, // 0049 MOVE R11 R5 + 0x88300117, // 004A GETMBR R12 R0 K23 + 0x7C200800, // 004B CALL R8 4 + 0x5824000A, // 004C LDCONST R9 K10 + 0x7C180600, // 004D CALL R6 3 + 0x8C180510, // 004E GETMET R6 R2 K16 + 0x58200011, // 004F LDCONST R8 K17 + 0x58240012, // 0050 LDCONST R9 K18 + 0x542A15A3, // 0051 LDINT R10 5540 + 0x4C2C0000, // 0052 LDNIL R11 + 0x5C300A00, // 0053 MOVE R12 R5 + 0x88340117, // 0054 GETMBR R13 R0 K23 + 0x7C180E00, // 0055 CALL R6 7 + 0x8C180905, // 0056 GETMET R6 R4 K5 + 0x7C180200, // 0057 CALL R6 1 + 0x001A2606, // 0058 ADD R6 K19 R6 + 0xB81E0E00, // 0059 GETNGBL R7 K7 + 0x8C1C0F08, // 005A GETMET R7 R7 K8 + 0x00262806, // 005B ADD R9 K20 R6 + 0x5828000A, // 005C LDCONST R10 K10 + 0x7C1C0600, // 005D CALL R7 3 + 0x8C1C0515, // 005E GETMET R7 R2 K21 + 0x58240011, // 005F LDCONST R9 K17 + 0x58280012, // 0060 LDCONST R10 K18 + 0x5C2C0A00, // 0061 MOVE R11 R5 + 0x88300117, // 0062 GETMBR R12 R0 K23 + 0x5C340C00, // 0063 MOVE R13 R6 + 0x7C1C0C00, // 0064 CALL R7 6 + 0xA8040001, // 0065 EXBLK 1 1 + 0x70020010, // 0066 JMP #0078 + 0xAC0C0002, // 0067 CATCH R3 0 2 + 0x7002000D, // 0068 JMP #0077 + 0xB8160E00, // 0069 GETNGBL R5 K7 + 0x8C140B08, // 006A GETMET R5 R5 K8 + 0x601C0008, // 006B GETGBL R7 G8 + 0x5C200600, // 006C MOVE R8 R3 + 0x7C1C0200, // 006D CALL R7 1 + 0x001E3007, // 006E ADD R7 K24 R7 + 0x001C0F19, // 006F ADD R7 R7 K25 + 0x60200008, // 0070 GETGBL R8 G8 + 0x5C240800, // 0071 MOVE R9 R4 + 0x7C200200, // 0072 CALL R8 1 + 0x001C0E08, // 0073 ADD R7 R7 R8 + 0x5820001A, // 0074 LDCONST R8 K26 + 0x7C140600, // 0075 CALL R5 3 + 0x70020000, // 0076 JMP #0078 + 0xB0080000, // 0077 RAISE 2 R0 R0 + 0x80000000, // 0078 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_operational_discovery_deferred +********************************************************************/ +be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 3, /* nstack */ + 0, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 2]) { /* upvals */ + be_local_const_upval(1, 0), + be_local_const_upval(1, 1), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(start_operational_discovery), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x68080001, // 0002 GETUPV R2 U1 + 0x7C000400, // 0003 CALL R0 2 + 0x80040000, // 0004 RET 1 R0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(set_timer), + /* K2 */ be_const_int(0), + }), + be_str_weak(start_operational_discovery_deferred), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x84140000, // 0003 CLOSURE R5 P0 + 0x7C080600, // 0004 CALL R2 3 + 0xA0000000, // 0005 CLOSE R0 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_commissioning_complete +********************************************************************/ +be_local_closure(Matter_Device_start_commissioning_complete, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(get_fabric), + /* K1 */ be_nested_str_weak(get_fabric_id), + /* K2 */ be_nested_str_weak(copy), + /* K3 */ be_nested_str_weak(reverse), + /* K4 */ be_nested_str_weak(tohex), + /* K5 */ be_nested_str_weak(get_admin_vendor_name), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(log), + /* K8 */ be_nested_str_weak(MTR_X3A_X20_X2D_X2D_X2D_X20Commissioning_X20complete_X20for_X20Fabric_X20_X27_X25s_X27_X20_X28Vendor_X20_X25s_X29_X20_X2D_X2D_X2D), + /* K9 */ be_const_int(2), + /* K10 */ be_nested_str_weak(stop_basic_commissioning), + }), + be_str_weak(start_commissioning_complete), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x8C080300, // 0000 GETMET R2 R1 K0 + 0x7C080200, // 0001 CALL R2 1 + 0x8C0C0501, // 0002 GETMET R3 R2 K1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x8C0C0702, // 0004 GETMET R3 R3 K2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x8C0C0704, // 0008 GETMET R3 R3 K4 + 0x7C0C0200, // 0009 CALL R3 1 + 0x8C100505, // 000A GETMET R4 R2 K5 + 0x7C100200, // 000B CALL R4 1 + 0xB8160C00, // 000C GETNGBL R5 K6 + 0x8C140B07, // 000D GETMET R5 R5 K7 + 0x601C0018, // 000E GETGBL R7 G24 + 0x58200008, // 000F LDCONST R8 K8 + 0x5C240600, // 0010 MOVE R9 R3 + 0x5C280800, // 0011 MOVE R10 R4 + 0x7C1C0600, // 0012 CALL R7 3 + 0x58200009, // 0013 LDCONST R8 K9 + 0x7C140600, // 0014 CALL R5 3 + 0x8C14010A, // 0015 GETMET R5 R0 K10 + 0x7C140200, // 0016 CALL R5 1 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: MtrUpdate +********************************************************************/ +be_local_closure(Matter_Device_MtrUpdate, /* name */ + be_nested_proto( + 18, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[25]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(resp_cmnd_str), + /* K2 */ be_nested_str_weak(Invalid_X20JSON), + /* K3 */ be_nested_str_weak(find_key_i), + /* K4 */ be_nested_str_weak(Ep), + /* K5 */ be_nested_str_weak(Name), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(Invalid_X20_X27Ep_X27_X20attribute), + /* K8 */ be_nested_str_weak(find_plugin_by_endpoint), + /* K9 */ be_nested_str_weak(remove), + /* K10 */ be_nested_str_weak(find_plugin_by_friendly_name), + /* K11 */ be_nested_str_weak(Invalid_X20Device), + /* K12 */ be_nested_str_weak(virtual), + /* K13 */ be_nested_str_weak(Device_X20is_X20not_X20virtual), + /* K14 */ be_nested_str_weak(consolidate_update_commands), + /* K15 */ be_nested_str_weak(keys), + /* K16 */ be_nested_str_weak(find_list_i), + /* K17 */ be_nested_str_weak(Invalid_X20command_X20_X27_X25s_X27), + /* K18 */ be_nested_str_weak(stop_iteration), + /* K19 */ be_nested_str_weak(update_virtual), + /* K20 */ be_nested_str_weak(state_json), + /* K21 */ be_nested_str_weak(_X7B_X22_X25s_X22_X3A_X25s_X7D), + /* K22 */ be_nested_str_weak(resp_cmnd), + /* K23 */ be_nested_str_weak(resp_cmnd_done), + /* K24 */ be_nested_str_weak(Missing_X20_X27Device_X27_X20attribute), + }), + be_str_weak(MtrUpdate), + &be_const_str_solidified, + ( &(const binstruction[126]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x1C140805, // 0001 EQ R5 R4 R5 + 0x78160004, // 0002 JMPF R5 #0008 + 0xB8160000, // 0003 GETNGBL R5 K0 + 0x8C140B01, // 0004 GETMET R5 R5 K1 + 0x581C0002, // 0005 LDCONST R7 K2 + 0x7C140400, // 0006 CALL R5 2 + 0x80040A00, // 0007 RET 1 R5 + 0xB8160000, // 0008 GETNGBL R5 K0 + 0x8C140B03, // 0009 GETMET R5 R5 K3 + 0x5C1C0800, // 000A MOVE R7 R4 + 0x58200004, // 000B LDCONST R8 K4 + 0x7C140600, // 000C CALL R5 3 + 0xB81A0000, // 000D GETNGBL R6 K0 + 0x8C180D03, // 000E GETMET R6 R6 K3 + 0x5C200800, // 000F MOVE R8 R4 + 0x58240005, // 0010 LDCONST R9 K5 + 0x7C180600, // 0011 CALL R6 3 + 0x74160000, // 0012 JMPT R5 #0014 + 0x781A0064, // 0013 JMPF R6 #0079 + 0x4C1C0000, // 0014 LDNIL R7 + 0x78160010, // 0015 JMPF R5 #0027 + 0x60200009, // 0016 GETGBL R8 G9 + 0x94240805, // 0017 GETIDX R9 R4 R5 + 0x7C200200, // 0018 CALL R8 1 + 0x18241106, // 0019 LE R9 R8 K6 + 0x78260004, // 001A JMPF R9 #0020 + 0xB8260000, // 001B GETNGBL R9 K0 + 0x8C241301, // 001C GETMET R9 R9 K1 + 0x582C0007, // 001D LDCONST R11 K7 + 0x7C240400, // 001E CALL R9 2 + 0x80041200, // 001F RET 1 R9 + 0x8C240108, // 0020 GETMET R9 R0 K8 + 0x5C2C1000, // 0021 MOVE R11 R8 + 0x7C240400, // 0022 CALL R9 2 + 0x5C1C1200, // 0023 MOVE R7 R9 + 0x8C240909, // 0024 GETMET R9 R4 K9 + 0x5C2C0A00, // 0025 MOVE R11 R5 + 0x7C240400, // 0026 CALL R9 2 + 0x781A0009, // 0027 JMPF R6 #0032 + 0x4C200000, // 0028 LDNIL R8 + 0x1C200E08, // 0029 EQ R8 R7 R8 + 0x78220003, // 002A JMPF R8 #002F + 0x8C20010A, // 002B GETMET R8 R0 K10 + 0x94280806, // 002C GETIDX R10 R4 R6 + 0x7C200400, // 002D CALL R8 2 + 0x5C1C1000, // 002E MOVE R7 R8 + 0x8C200909, // 002F GETMET R8 R4 K9 + 0x5C280C00, // 0030 MOVE R10 R6 + 0x7C200400, // 0031 CALL R8 2 + 0x4C200000, // 0032 LDNIL R8 + 0x1C200E08, // 0033 EQ R8 R7 R8 + 0x78220004, // 0034 JMPF R8 #003A + 0xB8220000, // 0035 GETNGBL R8 K0 + 0x8C201101, // 0036 GETMET R8 R8 K1 + 0x5828000B, // 0037 LDCONST R10 K11 + 0x7C200400, // 0038 CALL R8 2 + 0x80041000, // 0039 RET 1 R8 + 0x88200F0C, // 003A GETMBR R8 R7 K12 + 0x74220004, // 003B JMPT R8 #0041 + 0xB8220000, // 003C GETNGBL R8 K0 + 0x8C201101, // 003D GETMET R8 R8 K1 + 0x5828000D, // 003E LDCONST R10 K13 + 0x7C200400, // 003F CALL R8 2 + 0x80041000, // 0040 RET 1 R8 + 0x8C200F0E, // 0041 GETMET R8 R7 K14 + 0x7C200200, // 0042 CALL R8 1 + 0x60240013, // 0043 GETGBL R9 G19 + 0x7C240000, // 0044 CALL R9 0 + 0x60280010, // 0045 GETGBL R10 G16 + 0x8C2C090F, // 0046 GETMET R11 R4 K15 + 0x7C2C0200, // 0047 CALL R11 1 + 0x7C280200, // 0048 CALL R10 1 + 0xA8020016, // 0049 EXBLK 0 #0061 + 0x5C2C1400, // 004A MOVE R11 R10 + 0x7C2C0000, // 004B CALL R11 0 + 0xB8320000, // 004C GETNGBL R12 K0 + 0x8C301910, // 004D GETMET R12 R12 K16 + 0x5C381000, // 004E MOVE R14 R8 + 0x5C3C1600, // 004F MOVE R15 R11 + 0x7C300600, // 0050 CALL R12 3 + 0x4C340000, // 0051 LDNIL R13 + 0x1C34180D, // 0052 EQ R13 R12 R13 + 0x78360008, // 0053 JMPF R13 #005D + 0xB8360000, // 0054 GETNGBL R13 K0 + 0x8C341B01, // 0055 GETMET R13 R13 K1 + 0x603C0018, // 0056 GETGBL R15 G24 + 0x58400011, // 0057 LDCONST R16 K17 + 0x9444080B, // 0058 GETIDX R17 R4 R11 + 0x7C3C0400, // 0059 CALL R15 2 + 0x7C340400, // 005A CALL R13 2 + 0xA8040001, // 005B EXBLK 1 1 + 0x80001A00, // 005C RET 0 + 0x9434100C, // 005D GETIDX R13 R8 R12 + 0x9438080B, // 005E GETIDX R14 R4 R11 + 0x98241A0E, // 005F SETIDX R9 R13 R14 + 0x7001FFE8, // 0060 JMP #004A + 0x58280012, // 0061 LDCONST R10 K18 + 0xAC280200, // 0062 CATCH R10 1 0 + 0xB0080000, // 0063 RAISE 2 R0 R0 + 0x8C280F13, // 0064 GETMET R10 R7 K19 + 0x5C301200, // 0065 MOVE R12 R9 + 0x7C280400, // 0066 CALL R10 2 + 0x8C280F14, // 0067 GETMET R10 R7 K20 + 0x7C280200, // 0068 CALL R10 1 + 0x782A000A, // 0069 JMPF R10 #0075 + 0x602C0018, // 006A GETGBL R11 G24 + 0x58300015, // 006B LDCONST R12 K21 + 0x5C340200, // 006C MOVE R13 R1 + 0x5C381400, // 006D MOVE R14 R10 + 0x7C2C0600, // 006E CALL R11 3 + 0xB8320000, // 006F GETNGBL R12 K0 + 0x8C301916, // 0070 GETMET R12 R12 K22 + 0x5C381600, // 0071 MOVE R14 R11 + 0x7C300400, // 0072 CALL R12 2 + 0x80041800, // 0073 RET 1 R12 + 0x70020003, // 0074 JMP #0079 + 0xB82E0000, // 0075 GETNGBL R11 K0 + 0x8C2C1717, // 0076 GETMET R11 R11 K23 + 0x7C2C0200, // 0077 CALL R11 1 + 0x80041600, // 0078 RET 1 R11 + 0xB81E0000, // 0079 GETNGBL R7 K0 + 0x8C1C0F01, // 007A GETMET R7 R7 K1 + 0x58240018, // 007B LDCONST R9 K24 + 0x7C1C0400, // 007C CALL R7 2 + 0x80000000, // 007D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sort_distinct +********************************************************************/ +be_local_closure(Matter_Device_sort_distinct, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Device), + /* K1 */ be_const_int(1), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(stop_iteration), + /* K4 */ be_nested_str_weak(remove), + }), + be_str_weak(sort_distinct), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* 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 + 0xA8020010, // 0008 EXBLK 0 #001A + 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 + 0x781A0008, // 000E JMPF R6 #0018 + 0x04180B01, // 000F SUB R6 R5 K1 + 0x94180006, // 0010 GETIDX R6 R0 R6 + 0x24180C04, // 0011 GT R6 R6 R4 + 0x781A0004, // 0012 JMPF R6 #0018 + 0x04180B01, // 0013 SUB R6 R5 K1 + 0x94180006, // 0014 GETIDX R6 R0 R6 + 0x98000A06, // 0015 SETIDX R0 R5 R6 + 0x04140B01, // 0016 SUB R5 R5 K1 + 0x7001FFF4, // 0017 JMP #000D + 0x98000A04, // 0018 SETIDX R0 R5 R4 + 0x7001FFEE, // 0019 JMP #0009 + 0x58080003, // 001A LDCONST R2 K3 + 0xAC080200, // 001B CATCH R2 1 0 + 0xB0080000, // 001C RAISE 2 R0 R0 + 0x58080001, // 001D LDCONST R2 K1 + 0x600C000C, // 001E GETGBL R3 G12 + 0x5C100000, // 001F MOVE R4 R0 + 0x7C0C0200, // 0020 CALL R3 1 + 0x180C0701, // 0021 LE R3 R3 K1 + 0x780E0000, // 0022 JMPF R3 #0024 + 0x80040000, // 0023 RET 1 R0 + 0x940C0102, // 0024 GETIDX R3 R0 K2 + 0x6010000C, // 0025 GETGBL R4 G12 + 0x5C140000, // 0026 MOVE R5 R0 + 0x7C100200, // 0027 CALL R4 1 + 0x14100404, // 0028 LT R4 R2 R4 + 0x78120009, // 0029 JMPF R4 #0034 + 0x94100002, // 002A GETIDX R4 R0 R2 + 0x1C100803, // 002B EQ R4 R4 R3 + 0x78120003, // 002C JMPF R4 #0031 + 0x8C100104, // 002D GETMET R4 R0 K4 + 0x5C180400, // 002E MOVE R6 R2 + 0x7C100400, // 002F CALL R4 2 + 0x70020001, // 0030 JMP #0033 + 0x940C0002, // 0031 GETIDX R3 R0 R2 + 0x00080501, // 0032 ADD R2 R2 K1 + 0x7001FFF0, // 0033 JMP #0025 + 0x80040000, // 0034 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: conf_to_log +********************************************************************/ +be_local_closure(Matter_Device_conf_to_log, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Device), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(k2l), + /* K3 */ be_nested_str_weak(type), + /* K4 */ be_nested_str_weak(_X20_X25s_X3A_X25s), + /* K5 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(conf_to_log), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x58080001, // 0001 LDCONST R2 K1 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x8C100302, // 0003 GETMET R4 R1 K2 + 0x5C180000, // 0004 MOVE R6 R0 + 0x7C100400, // 0005 CALL R4 2 + 0x7C0C0200, // 0006 CALL R3 1 + 0xA802000B, // 0007 EXBLK 0 #0014 + 0x5C100600, // 0008 MOVE R4 R3 + 0x7C100000, // 0009 CALL R4 0 + 0x1C140903, // 000A EQ R5 R4 K3 + 0x78160000, // 000B JMPF R5 #000D + 0x7001FFFA, // 000C JMP #0008 + 0x60140018, // 000D GETGBL R5 G24 + 0x58180004, // 000E LDCONST R6 K4 + 0x5C1C0800, // 000F MOVE R7 R4 + 0x94200004, // 0010 GETIDX R8 R0 R4 + 0x7C140600, // 0011 CALL R5 3 + 0x00080405, // 0012 ADD R2 R2 R5 + 0x7001FFF3, // 0013 JMP #0008 + 0x580C0005, // 0014 LDCONST R3 K5 + 0xAC0C0200, // 0015 CATCH R3 1 0 + 0xB0080000, // 0016 RAISE 2 R0 R0 + 0x80040400, // 0017 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_plugin_by_endpoint +********************************************************************/ +be_local_closure(Matter_Device_find_plugin_by_endpoint, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(plugins), + /* K2 */ be_nested_str_weak(get_endpoint), + /* K3 */ be_const_int(1), + }), + be_str_weak(find_plugin_by_endpoint), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x600C000C, // 0001 GETGBL R3 G12 + 0x88100101, // 0002 GETMBR R4 R0 K1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x140C0403, // 0004 LT R3 R2 R3 + 0x780E0008, // 0005 JMPF R3 #000F + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x940C0602, // 0007 GETIDX R3 R3 R2 + 0x8C100702, // 0008 GETMET R4 R3 K2 + 0x7C100200, // 0009 CALL R4 1 + 0x1C100801, // 000A EQ R4 R4 R1 + 0x78120000, // 000B JMPF R4 #000D + 0x80040600, // 000C RET 1 R3 + 0x00080503, // 000D ADD R2 R2 K3 + 0x7001FFF1, // 000E JMP #0001 + 0x4C0C0000, // 000F LDNIL R3 + 0x80040600, // 0010 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: received_ack +********************************************************************/ +be_local_closure(Matter_Device_received_ack, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(received_ack), + }), + be_str_weak(received_ack), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* 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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: generate_random_passcode +********************************************************************/ +be_local_closure(Matter_Device_generate_random_passcode, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(random), + /* K2 */ be_nested_str_weak(get), + /* K3 */ be_const_int(0), + /* K4 */ be_const_int(134217727), + /* K5 */ be_const_int(99999998), + /* K6 */ be_nested_str_weak(PASSCODE_INVALID), + /* K7 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(autoconf_device_map), + be_str_weak(generate_random_passcode), &be_const_str_solidified, - ( &(const binstruction[198]) { /* code */ + ( &(const binstruction[35]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 - 0x60080013, // 0001 GETGBL R2 G19 - 0x7C080000, // 0002 CALL R2 0 - 0x580C0001, // 0003 LDCONST R3 K1 - 0x50100000, // 0004 LDBOOL R4 0 0 - 0xA4160400, // 0005 IMPORT R5 K2 - 0x8C180B03, // 0006 GETMET R6 R5 K3 - 0x7C180200, // 0007 CALL R6 1 - 0x4C1C0000, // 0008 LDNIL R7 - 0x201C0C07, // 0009 NE R7 R6 R7 - 0x781E0024, // 000A JMPF R7 #0030 - 0x601C000C, // 000B GETGBL R7 G12 - 0x8C200D04, // 000C GETMET R8 R6 K4 - 0x58280005, // 000D LDCONST R10 K5 - 0x582C0006, // 000E LDCONST R11 K6 - 0x7C200600, // 000F CALL R8 3 - 0x7C1C0200, // 0010 CALL R7 1 - 0x24200F07, // 0011 GT R8 R7 K7 - 0x7822001C, // 0012 JMPF R8 #0030 - 0x1C200F01, // 0013 EQ R8 R7 K1 - 0x78220007, // 0014 JMPF R8 #001D - 0x60200008, // 0015 GETGBL R8 G8 - 0x5C240600, // 0016 MOVE R9 R3 - 0x7C200200, // 0017 CALL R8 1 - 0x60240013, // 0018 GETGBL R9 G19 - 0x7C240000, // 0019 CALL R9 0 - 0x98261109, // 001A SETIDX R9 K8 K9 - 0x98081009, // 001B SETIDX R2 R8 R9 - 0x70020010, // 001C JMP #002E - 0x1C200F0A, // 001D EQ R8 R7 K10 - 0x78220007, // 001E JMPF R8 #0027 - 0x60200008, // 001F GETGBL R8 G8 - 0x5C240600, // 0020 MOVE R9 R3 - 0x7C200200, // 0021 CALL R8 1 - 0x60240013, // 0022 GETGBL R9 G19 - 0x7C240000, // 0023 CALL R9 0 - 0x9826110B, // 0024 SETIDX R9 K8 K11 - 0x98081009, // 0025 SETIDX R2 R8 R9 - 0x70020006, // 0026 JMP #002E - 0x60200008, // 0027 GETGBL R8 G8 - 0x5C240600, // 0028 MOVE R9 R3 - 0x7C200200, // 0029 CALL R8 1 - 0x60240013, // 002A GETGBL R9 G19 - 0x7C240000, // 002B CALL R9 0 - 0x9826110C, // 002C SETIDX R9 K8 K12 - 0x98081009, // 002D SETIDX R2 R8 R9 - 0x50100200, // 002E LDBOOL R4 1 0 - 0x000C0701, // 002F ADD R3 R3 K1 - 0xB81E1A00, // 0030 GETNGBL R7 K13 - 0x8C1C0F0E, // 0031 GETMET R7 R7 K14 - 0x5824000F, // 0032 LDCONST R9 K15 - 0x50280200, // 0033 LDBOOL R10 1 0 - 0x7C1C0600, // 0034 CALL R7 3 - 0x60200012, // 0035 GETGBL R8 G18 - 0x7C200000, // 0036 CALL R8 0 - 0xB8261A00, // 0037 GETNGBL R9 K13 - 0x8C241310, // 0038 GETMET R9 R9 K16 - 0x602C0008, // 0039 GETGBL R11 G8 - 0x5C300E00, // 003A MOVE R12 R7 - 0x7C2C0200, // 003B CALL R11 1 - 0x002E220B, // 003C ADD R11 K17 R11 - 0x58300012, // 003D LDCONST R12 K18 - 0x7C240600, // 003E CALL R9 3 - 0x4C240000, // 003F LDNIL R9 - 0x20240E09, // 0040 NE R9 R7 R9 - 0x7826004F, // 0041 JMPF R9 #0092 - 0x8C240F13, // 0042 GETMET R9 R7 K19 - 0x582C0014, // 0043 LDCONST R11 K20 - 0x7C240400, // 0044 CALL R9 2 - 0x7826004B, // 0045 JMPF R9 #0092 - 0x941C0F14, // 0046 GETIDX R7 R7 K20 - 0x58240007, // 0047 LDCONST R9 K7 - 0x50280200, // 0048 LDBOOL R10 1 0 - 0x782A0047, // 0049 JMPF R10 #0092 - 0x60280008, // 004A GETGBL R10 G8 - 0x5C2C1200, // 004B MOVE R11 R9 - 0x7C280200, // 004C CALL R10 1 - 0x002A2A0A, // 004D ADD R10 K21 R10 - 0x8C2C0F13, // 004E GETMET R11 R7 K19 - 0x5C341400, // 004F MOVE R13 R10 - 0x7C2C0400, // 0050 CALL R11 2 - 0x742E0000, // 0051 JMPT R11 #0053 - 0x7002003E, // 0052 JMP #0092 - 0x942C0E0A, // 0053 GETIDX R11 R7 R10 - 0xB8321A00, // 0054 GETNGBL R12 K13 - 0x8C301910, // 0055 GETMET R12 R12 K16 - 0x60380018, // 0056 GETGBL R14 G24 - 0x583C0016, // 0057 LDCONST R15 K22 - 0x5C401400, // 0058 MOVE R16 R10 - 0x60440008, // 0059 GETGBL R17 G8 - 0x5C481600, // 005A MOVE R18 R11 - 0x7C440200, // 005B CALL R17 1 - 0x7C380600, // 005C CALL R14 3 - 0x583C0012, // 005D LDCONST R15 K18 - 0x7C300600, // 005E CALL R12 3 - 0x8C301704, // 005F GETMET R12 R11 K4 - 0x58380017, // 0060 LDCONST R14 K23 - 0x543DFFFE, // 0061 LDINT R15 -1 - 0x7C300600, // 0062 CALL R12 3 - 0x8C341704, // 0063 GETMET R13 R11 K4 - 0x583C0018, // 0064 LDCONST R15 K24 - 0x5441FFFE, // 0065 LDINT R16 -1 - 0x7C340600, // 0066 CALL R13 3 - 0x24381907, // 0067 GT R14 R12 K7 - 0x783A0002, // 0068 JMPF R14 #006C - 0x8C381119, // 0069 GETMET R14 R8 K25 - 0x04401901, // 006A SUB R16 R12 K1 - 0x7C380400, // 006B CALL R14 2 - 0x24381B07, // 006C GT R14 R13 K7 - 0x783A0002, // 006D JMPF R14 #0071 - 0x8C381119, // 006E GETMET R14 R8 K25 - 0x04401B01, // 006F SUB R16 R13 K1 - 0x7C380400, // 0070 CALL R14 2 - 0xB83A1A00, // 0071 GETNGBL R14 K13 - 0x8C381D10, // 0072 GETMET R14 R14 K16 - 0x60400018, // 0073 GETGBL R16 G24 - 0x5844001A, // 0074 LDCONST R17 K26 - 0x5C481800, // 0075 MOVE R18 R12 - 0x5C4C1A00, // 0076 MOVE R19 R13 - 0x7C400600, // 0077 CALL R16 3 - 0x58440012, // 0078 LDCONST R17 K18 - 0x7C380600, // 0079 CALL R14 3 - 0x8C381704, // 007A GETMET R14 R11 K4 - 0x5840001B, // 007B LDCONST R16 K27 - 0x7C380400, // 007C CALL R14 2 - 0x783A0002, // 007D JMPF R14 #0081 - 0x943C1D0A, // 007E GETIDX R15 R14 K10 - 0x243C1F07, // 007F GT R15 R15 K7 - 0x743E0000, // 0080 JMPT R15 #0082 - 0x503C0001, // 0081 LDBOOL R15 0 1 - 0x503C0200, // 0082 LDBOOL R15 1 0 - 0x60400008, // 0083 GETGBL R16 G8 - 0x5C440600, // 0084 MOVE R17 R3 - 0x7C400200, // 0085 CALL R16 1 - 0x60440013, // 0086 GETGBL R17 G19 - 0x7C440000, // 0087 CALL R17 0 - 0x783E0001, // 0088 JMPF R15 #008B - 0x5848001C, // 0089 LDCONST R18 K28 - 0x70020000, // 008A JMP #008C - 0x5848001D, // 008B LDCONST R18 K29 - 0x98461012, // 008C SETIDX R17 K8 R18 - 0x98463A09, // 008D SETIDX R17 K29 R9 - 0x98082011, // 008E SETIDX R2 R16 R17 - 0x000C0701, // 008F ADD R3 R3 K1 - 0x00241301, // 0090 ADD R9 R9 K1 - 0x7001FFB5, // 0091 JMP #0048 - 0x6024000C, // 0092 GETGBL R9 G12 - 0xB82A1A00, // 0093 GETNGBL R10 K13 - 0x8C28151E, // 0094 GETMET R10 R10 K30 - 0x7C280200, // 0095 CALL R10 1 - 0x7C240200, // 0096 CALL R9 1 - 0x58280007, // 0097 LDCONST R10 K7 - 0x78120000, // 0098 JMPF R4 #009A - 0x04241301, // 0099 SUB R9 R9 K1 - 0x142C1409, // 009A LT R11 R10 R9 - 0x782E0011, // 009B JMPF R11 #00AE - 0x8C2C1104, // 009C GETMET R11 R8 K4 - 0x5C341400, // 009D MOVE R13 R10 - 0x7C2C0400, // 009E CALL R11 2 - 0x4C300000, // 009F LDNIL R12 - 0x1C2C160C, // 00A0 EQ R11 R11 R12 - 0x782E0009, // 00A1 JMPF R11 #00AC - 0x602C0008, // 00A2 GETGBL R11 G8 - 0x5C300600, // 00A3 MOVE R12 R3 - 0x7C2C0200, // 00A4 CALL R11 1 - 0x60300013, // 00A5 GETGBL R12 G19 - 0x7C300000, // 00A6 CALL R12 0 - 0x9832111F, // 00A7 SETIDX R12 K8 K31 - 0x00341501, // 00A8 ADD R13 R10 K1 - 0x98323E0D, // 00A9 SETIDX R12 K31 R13 - 0x9808160C, // 00AA SETIDX R2 R11 R12 - 0x000C0701, // 00AB ADD R3 R3 K1 - 0x00281501, // 00AC ADD R10 R10 K1 - 0x7001FFEB, // 00AD JMP #009A - 0x8C2C0320, // 00AE GETMET R11 R1 K32 - 0xB8361A00, // 00AF GETNGBL R13 K13 - 0x8C341B21, // 00B0 GETMET R13 R13 K33 - 0x7C340200, // 00B1 CALL R13 1 - 0x7C2C0400, // 00B2 CALL R11 2 - 0x8C300122, // 00B3 GETMET R12 R0 K34 - 0x5C381600, // 00B4 MOVE R14 R11 - 0x7C300400, // 00B5 CALL R12 2 - 0x60340010, // 00B6 GETGBL R13 G16 - 0x5C381800, // 00B7 MOVE R14 R12 - 0x7C340200, // 00B8 CALL R13 1 - 0xA8020007, // 00B9 EXBLK 0 #00C2 - 0x5C381A00, // 00BA MOVE R14 R13 - 0x7C380000, // 00BB CALL R14 0 - 0x603C0008, // 00BC GETGBL R15 G8 - 0x5C400600, // 00BD MOVE R16 R3 - 0x7C3C0200, // 00BE CALL R15 1 - 0x98081E0E, // 00BF SETIDX R2 R15 R14 - 0x000C0701, // 00C0 ADD R3 R3 K1 - 0x7001FFF7, // 00C1 JMP #00BA - 0x58340023, // 00C2 LDCONST R13 K35 - 0xAC340200, // 00C3 CATCH R13 1 0 - 0xB0080000, // 00C4 RAISE 2 R0 R0 - 0x80040400, // 00C5 RET 1 R2 + 0x4C080000, // 0001 LDNIL R2 + 0x500C0200, // 0002 LDBOOL R3 1 0 + 0x780E001D, // 0003 JMPF R3 #0022 + 0x8C0C0301, // 0004 GETMET R3 R1 K1 + 0x54160003, // 0005 LDINT R5 4 + 0x7C0C0400, // 0006 CALL R3 2 + 0x8C0C0702, // 0007 GETMET R3 R3 K2 + 0x58140003, // 0008 LDCONST R5 K3 + 0x541A0003, // 0009 LDINT R6 4 + 0x7C0C0600, // 000A CALL R3 3 + 0x2C0C0704, // 000B AND R3 R3 K4 + 0x5C080600, // 000C MOVE R2 R3 + 0x240C0505, // 000D GT R3 R2 K5 + 0x780E0000, // 000E JMPF R3 #0010 + 0x7001FFF1, // 000F JMP #0002 + 0x600C0010, // 0010 GETGBL R3 G16 + 0x88100106, // 0011 GETMBR R4 R0 K6 + 0x7C0C0200, // 0012 CALL R3 1 + 0xA8020005, // 0013 EXBLK 0 #001A + 0x5C100600, // 0014 MOVE R4 R3 + 0x7C100000, // 0015 CALL R4 0 + 0x1C140404, // 0016 EQ R5 R2 R4 + 0x78160000, // 0017 JMPF R5 #0019 + 0x4C080000, // 0018 LDNIL R2 + 0x7001FFF9, // 0019 JMP #0014 + 0x580C0007, // 001A LDCONST R3 K7 + 0xAC0C0200, // 001B CATCH R3 1 0 + 0xB0080000, // 001C RAISE 2 R0 R0 + 0x4C0C0000, // 001D LDNIL R3 + 0x200C0403, // 001E NE R3 R2 R3 + 0x780E0000, // 001F JMPF R3 #0021 + 0x80040400, // 0020 RET 1 R2 + 0x7001FFDF, // 0021 JMP #0002 + 0x80000000, // 0022 RET 0 }) ) ); @@ -5233,11 +5193,11 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */ /******************************************************************** -** Solidified function: mdns_remove_op_discovery +** Solidified function: _instantiate_plugins_from_config ********************************************************************/ -be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */ +be_local_closure(Matter_Device__instantiate_plugins_from_config, /* name */ be_nested_proto( - 12, /* nstack */ + 18, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -5245,114 +5205,193 @@ be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[23]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(get_device_id), - /* K2 */ be_nested_str_weak(copy), - /* K3 */ be_nested_str_weak(reverse), - /* K4 */ be_nested_str_weak(get_fabric_compressed), - /* K5 */ be_nested_str_weak(tohex), - /* K6 */ be_nested_str_weak(_X2D), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(eth), - /* K9 */ be_nested_str_weak(find), - /* K10 */ be_nested_str_weak(up), - /* K11 */ be_nested_str_weak(log), - /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), - /* K13 */ be_const_int(3), - /* K14 */ be_nested_str_weak(remove_service), - /* K15 */ be_nested_str_weak(_matter), - /* K16 */ be_nested_str_weak(_tcp), - /* K17 */ be_nested_str_weak(hostname_eth), - /* K18 */ be_nested_str_weak(wifi), - /* K19 */ be_nested_str_weak(hostname_wifi), - /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K21 */ be_nested_str_weak(_X7C), - /* K22 */ be_const_int(2), + ( &(const bvalue[30]) { /* constants */ + /* K0 */ be_nested_str_weak(k2l_num), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20Configuring_X20endpoints), + /* K4 */ be_const_int(2), + /* K5 */ be_nested_str_weak(plugins), + /* K6 */ be_nested_str_weak(push), + /* K7 */ be_nested_str_weak(matter), + /* K8 */ be_nested_str_weak(Plugin_Root), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(MTR_X3A_X20_X20_X20endpoint_X20_X3D_X20_X255i_X20type_X3A_X25s_X25s), + /* K11 */ be_nested_str_weak(root), + /* K12 */ be_nested_str_weak(), + /* K13 */ be_nested_str_weak(Plugin_Aggregator), + /* K14 */ be_nested_str_weak(find), + /* K15 */ be_nested_str_weak(type), + /* K16 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping), + /* K17 */ be_const_int(3), + /* K18 */ be_nested_str_weak(MTR_X3A_X20only_X20one_X20root_X20node_X20allowed), + /* K19 */ be_nested_str_weak(plugins_classes), + /* K20 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), + /* K21 */ be_nested_str_weak(_X27_X20skipping), + /* K22 */ be_nested_str_weak(conf_to_log), + /* K23 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K24 */ be_nested_str_weak(_X7C), + /* K25 */ be_nested_str_weak(stop_iteration), + /* K26 */ be_nested_str_weak(aggregator), + /* K27 */ be_nested_str_weak(publish_result), + /* K28 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D), + /* K29 */ be_nested_str_weak(Matter), }), - be_str_weak(mdns_remove_op_discovery), + be_str_weak(_instantiate_plugins_from_config), &be_const_str_solidified, - ( &(const binstruction[80]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA802003B, // 0001 EXBLK 0 #003E - 0x8C0C0301, // 0002 GETMET R3 R1 K1 - 0x7C0C0200, // 0003 CALL R3 1 + ( &(const binstruction[152]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0xB80E0200, // 0003 GETNGBL R3 K1 0x8C0C0702, // 0004 GETMET R3 R3 K2 - 0x7C0C0200, // 0005 CALL R3 1 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x8C100304, // 0008 GETMET R4 R1 K4 - 0x7C100200, // 0009 CALL R4 1 - 0x8C140905, // 000A GETMET R5 R4 K5 - 0x7C140200, // 000B CALL R5 1 - 0x00140B06, // 000C ADD R5 R5 K6 - 0x8C180705, // 000D GETMET R6 R3 K5 - 0x7C180200, // 000E CALL R6 1 - 0x00140A06, // 000F ADD R5 R5 R6 - 0xB81A0E00, // 0010 GETNGBL R6 K7 - 0x8C180D08, // 0011 GETMET R6 R6 K8 - 0x7C180200, // 0012 CALL R6 1 - 0x8C180D09, // 0013 GETMET R6 R6 K9 - 0x5820000A, // 0014 LDCONST R8 K10 - 0x7C180400, // 0015 CALL R6 2 - 0x781A000E, // 0016 JMPF R6 #0026 - 0xB81A0E00, // 0017 GETNGBL R6 K7 - 0x8C180D0B, // 0018 GETMET R6 R6 K11 - 0x60200018, // 0019 GETGBL R8 G24 - 0x5824000C, // 001A LDCONST R9 K12 - 0x58280008, // 001B LDCONST R10 K8 - 0x5C2C0A00, // 001C MOVE R11 R5 - 0x7C200600, // 001D CALL R8 3 - 0x5824000D, // 001E LDCONST R9 K13 - 0x7C180600, // 001F CALL R6 3 - 0x8C18050E, // 0020 GETMET R6 R2 K14 - 0x5820000F, // 0021 LDCONST R8 K15 - 0x58240010, // 0022 LDCONST R9 K16 - 0x5C280A00, // 0023 MOVE R10 R5 - 0x882C0111, // 0024 GETMBR R11 R0 K17 - 0x7C180A00, // 0025 CALL R6 5 - 0xB81A0E00, // 0026 GETNGBL R6 K7 - 0x8C180D12, // 0027 GETMET R6 R6 K18 - 0x7C180200, // 0028 CALL R6 1 - 0x8C180D09, // 0029 GETMET R6 R6 K9 - 0x5820000A, // 002A LDCONST R8 K10 - 0x7C180400, // 002B CALL R6 2 - 0x781A000E, // 002C JMPF R6 #003C - 0xB81A0E00, // 002D GETNGBL R6 K7 - 0x8C180D0B, // 002E GETMET R6 R6 K11 - 0x60200018, // 002F GETGBL R8 G24 - 0x5824000C, // 0030 LDCONST R9 K12 - 0x58280012, // 0031 LDCONST R10 K18 - 0x5C2C0A00, // 0032 MOVE R11 R5 - 0x7C200600, // 0033 CALL R8 3 - 0x5824000D, // 0034 LDCONST R9 K13 - 0x7C180600, // 0035 CALL R6 3 - 0x8C18050E, // 0036 GETMET R6 R2 K14 - 0x5820000F, // 0037 LDCONST R8 K15 - 0x58240010, // 0038 LDCONST R9 K16 - 0x5C280A00, // 0039 MOVE R10 R5 - 0x882C0113, // 003A GETMBR R11 R0 K19 - 0x7C180A00, // 003B CALL R6 5 - 0xA8040001, // 003C EXBLK 1 1 - 0x70020010, // 003D JMP #004F - 0xAC0C0002, // 003E CATCH R3 0 2 - 0x7002000D, // 003F JMP #004E - 0xB8160E00, // 0040 GETNGBL R5 K7 - 0x8C140B0B, // 0041 GETMET R5 R5 K11 - 0x601C0008, // 0042 GETGBL R7 G8 - 0x5C200600, // 0043 MOVE R8 R3 - 0x7C1C0200, // 0044 CALL R7 1 - 0x001E2807, // 0045 ADD R7 K20 R7 - 0x001C0F15, // 0046 ADD R7 R7 K21 - 0x60200008, // 0047 GETGBL R8 G8 - 0x5C240800, // 0048 MOVE R9 R4 - 0x7C200200, // 0049 CALL R8 1 - 0x001C0E08, // 004A ADD R7 R7 R8 - 0x58200016, // 004B LDCONST R8 K22 - 0x7C140600, // 004C CALL R5 3 - 0x70020000, // 004D JMP #004F - 0xB0080000, // 004E RAISE 2 R0 R0 - 0x80000000, // 004F RET 0 + 0x58140003, // 0005 LDCONST R5 K3 + 0x58180004, // 0006 LDCONST R6 K4 + 0x7C0C0600, // 0007 CALL R3 3 + 0x880C0105, // 0008 GETMBR R3 R0 K5 + 0x8C0C0706, // 0009 GETMET R3 R3 K6 + 0xB8160E00, // 000A GETNGBL R5 K7 + 0x8C140B08, // 000B GETMET R5 R5 K8 + 0x5C1C0000, // 000C MOVE R7 R0 + 0x58200009, // 000D LDCONST R8 K9 + 0x60240013, // 000E GETGBL R9 G19 + 0x7C240000, // 000F CALL R9 0 + 0x7C140800, // 0010 CALL R5 4 + 0x7C0C0400, // 0011 CALL R3 2 + 0xB80E0200, // 0012 GETNGBL R3 K1 + 0x8C0C0702, // 0013 GETMET R3 R3 K2 + 0x60140018, // 0014 GETGBL R5 G24 + 0x5818000A, // 0015 LDCONST R6 K10 + 0x581C0009, // 0016 LDCONST R7 K9 + 0x5820000B, // 0017 LDCONST R8 K11 + 0x5824000C, // 0018 LDCONST R9 K12 + 0x7C140800, // 0019 CALL R5 4 + 0x58180004, // 001A LDCONST R6 K4 + 0x7C0C0600, // 001B CALL R3 3 + 0x880C0105, // 001C GETMBR R3 R0 K5 + 0x8C0C0706, // 001D GETMET R3 R3 K6 + 0xB8160E00, // 001E GETNGBL R5 K7 + 0x8C140B0D, // 001F GETMET R5 R5 K13 + 0x5C1C0000, // 0020 MOVE R7 R0 + 0x5422FEFF, // 0021 LDINT R8 65280 + 0x60240013, // 0022 GETGBL R9 G19 + 0x7C240000, // 0023 CALL R9 0 + 0x7C140800, // 0024 CALL R5 4 + 0x7C0C0400, // 0025 CALL R3 2 + 0x600C0010, // 0026 GETGBL R3 G16 + 0x5C100400, // 0027 MOVE R4 R2 + 0x7C0C0200, // 0028 CALL R3 1 + 0xA802005A, // 0029 EXBLK 0 #0085 + 0x5C100600, // 002A MOVE R4 R3 + 0x7C100000, // 002B CALL R4 0 + 0x1C140909, // 002C EQ R5 R4 K9 + 0x78160000, // 002D JMPF R5 #002F + 0x7001FFFA, // 002E JMP #002A + 0xA8020042, // 002F EXBLK 0 #0073 + 0x60140008, // 0030 GETGBL R5 G8 + 0x5C180800, // 0031 MOVE R6 R4 + 0x7C140200, // 0032 CALL R5 1 + 0x94140205, // 0033 GETIDX R5 R1 R5 + 0x8C180B0E, // 0034 GETMET R6 R5 K14 + 0x5820000F, // 0035 LDCONST R8 K15 + 0x7C180400, // 0036 CALL R6 2 + 0x4C1C0000, // 0037 LDNIL R7 + 0x1C1C0C07, // 0038 EQ R7 R6 R7 + 0x781E0006, // 0039 JMPF R7 #0041 + 0xB81E0200, // 003A GETNGBL R7 K1 + 0x8C1C0F02, // 003B GETMET R7 R7 K2 + 0x58240010, // 003C LDCONST R9 K16 + 0x58280011, // 003D LDCONST R10 K17 + 0x7C1C0600, // 003E CALL R7 3 + 0xA8040001, // 003F EXBLK 1 1 + 0x7001FFE8, // 0040 JMP #002A + 0x1C1C0D0B, // 0041 EQ R7 R6 K11 + 0x781E0006, // 0042 JMPF R7 #004A + 0xB81E0200, // 0043 GETNGBL R7 K1 + 0x8C1C0F02, // 0044 GETMET R7 R7 K2 + 0x58240012, // 0045 LDCONST R9 K18 + 0x58280011, // 0046 LDCONST R10 K17 + 0x7C1C0600, // 0047 CALL R7 3 + 0xA8040001, // 0048 EXBLK 1 1 + 0x7001FFDF, // 0049 JMP #002A + 0x881C0113, // 004A GETMBR R7 R0 K19 + 0x8C1C0F0E, // 004B GETMET R7 R7 K14 + 0x5C240C00, // 004C MOVE R9 R6 + 0x7C1C0400, // 004D CALL R7 2 + 0x4C200000, // 004E LDNIL R8 + 0x1C200E08, // 004F EQ R8 R7 R8 + 0x7822000A, // 0050 JMPF R8 #005C + 0xB8220200, // 0051 GETNGBL R8 K1 + 0x8C201102, // 0052 GETMET R8 R8 K2 + 0x60280008, // 0053 GETGBL R10 G8 + 0x5C2C0C00, // 0054 MOVE R11 R6 + 0x7C280200, // 0055 CALL R10 1 + 0x002A280A, // 0056 ADD R10 K20 R10 + 0x00281515, // 0057 ADD R10 R10 K21 + 0x582C0004, // 0058 LDCONST R11 K4 + 0x7C200600, // 0059 CALL R8 3 + 0xA8040001, // 005A EXBLK 1 1 + 0x7001FFCD, // 005B JMP #002A + 0x5C200E00, // 005C MOVE R8 R7 + 0x5C240000, // 005D MOVE R9 R0 + 0x5C280800, // 005E MOVE R10 R4 + 0x5C2C0A00, // 005F MOVE R11 R5 + 0x7C200600, // 0060 CALL R8 3 + 0x88240105, // 0061 GETMBR R9 R0 K5 + 0x8C241306, // 0062 GETMET R9 R9 K6 + 0x5C2C1000, // 0063 MOVE R11 R8 + 0x7C240400, // 0064 CALL R9 2 + 0xB8260200, // 0065 GETNGBL R9 K1 + 0x8C241302, // 0066 GETMET R9 R9 K2 + 0x602C0018, // 0067 GETGBL R11 G24 + 0x5830000A, // 0068 LDCONST R12 K10 + 0x5C340800, // 0069 MOVE R13 R4 + 0x5C380C00, // 006A MOVE R14 R6 + 0x8C3C0116, // 006B GETMET R15 R0 K22 + 0x5C440A00, // 006C MOVE R17 R5 + 0x7C3C0400, // 006D CALL R15 2 + 0x7C2C0800, // 006E CALL R11 4 + 0x58300004, // 006F LDCONST R12 K4 + 0x7C240600, // 0070 CALL R9 3 + 0xA8040001, // 0071 EXBLK 1 1 + 0x70020010, // 0072 JMP #0084 + 0xAC140002, // 0073 CATCH R5 0 2 + 0x7002000D, // 0074 JMP #0083 + 0xB81E0200, // 0075 GETNGBL R7 K1 + 0x8C1C0F02, // 0076 GETMET R7 R7 K2 + 0x60240008, // 0077 GETGBL R9 G8 + 0x5C280A00, // 0078 MOVE R10 R5 + 0x7C240200, // 0079 CALL R9 1 + 0x00262E09, // 007A ADD R9 K23 R9 + 0x00241318, // 007B ADD R9 R9 K24 + 0x60280008, // 007C GETGBL R10 G8 + 0x5C2C0C00, // 007D MOVE R11 R6 + 0x7C280200, // 007E CALL R10 1 + 0x0024120A, // 007F ADD R9 R9 R10 + 0x58280004, // 0080 LDCONST R10 K4 + 0x7C1C0600, // 0081 CALL R7 3 + 0x70020000, // 0082 JMP #0084 + 0xB0080000, // 0083 RAISE 2 R0 R0 + 0x7001FFA4, // 0084 JMP #002A + 0x580C0019, // 0085 LDCONST R3 K25 + 0xAC0C0200, // 0086 CATCH R3 1 0 + 0xB0080000, // 0087 RAISE 2 R0 R0 + 0xB80E0200, // 0088 GETNGBL R3 K1 + 0x8C0C0702, // 0089 GETMET R3 R3 K2 + 0x60140018, // 008A GETGBL R5 G24 + 0x5818000A, // 008B LDCONST R6 K10 + 0x541EFEFF, // 008C LDINT R7 65280 + 0x5820001A, // 008D LDCONST R8 K26 + 0x5824000C, // 008E LDCONST R9 K12 + 0x7C140800, // 008F CALL R5 4 + 0x58180004, // 0090 LDCONST R6 K4 + 0x7C0C0600, // 0091 CALL R3 3 + 0xB80E0200, // 0092 GETNGBL R3 K1 + 0x8C0C071B, // 0093 GETMET R3 R3 K27 + 0x5814001C, // 0094 LDCONST R5 K28 + 0x5818001D, // 0095 LDCONST R6 K29 + 0x7C0C0600, // 0096 CALL R3 3 + 0x80000000, // 0097 RET 0 }) ) ); @@ -5360,49 +5399,73 @@ be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */ /******************************************************************** -** Solidified function: adjust_next_ep +** Solidified function: _compute_pbkdf ********************************************************************/ -be_local_closure(Matter_Device_adjust_next_ep, /* name */ +be_local_closure(Matter_Device__compute_pbkdf, /* name */ be_nested_proto( - 5, /* nstack */ - 1, /* argc */ + 13, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(plugins_config), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(next_ep), - /* K3 */ be_const_int(1), - /* K4 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(add), + /* K2 */ be_nested_str_weak(PBKDF2_HMAC_SHA256), + /* K3 */ be_nested_str_weak(derive), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(root_w0), + /* K6 */ be_nested_str_weak(EC_P256), + /* K7 */ be_nested_str_weak(mod), + /* K8 */ be_nested_str_weak(root_L), + /* K9 */ be_nested_str_weak(public_key), }), - be_str_weak(adjust_next_ep), + be_str_weak(_compute_pbkdf), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x60040010, // 0000 GETGBL R1 G16 - 0x88080100, // 0001 GETMBR R2 R0 K0 - 0x8C080501, // 0002 GETMET R2 R2 K1 - 0x7C080200, // 0003 CALL R2 1 - 0x7C040200, // 0004 CALL R1 1 - 0xA802000A, // 0005 EXBLK 0 #0011 - 0x5C080200, // 0006 MOVE R2 R1 - 0x7C080000, // 0007 CALL R2 0 - 0x600C0009, // 0008 GETGBL R3 G9 - 0x5C100400, // 0009 MOVE R4 R2 - 0x7C0C0200, // 000A CALL R3 1 - 0x88100102, // 000B GETMBR R4 R0 K2 - 0x28100604, // 000C GE R4 R3 R4 - 0x78120001, // 000D JMPF R4 #0010 - 0x00100703, // 000E ADD R4 R3 K3 - 0x90020404, // 000F SETMBR R0 K2 R4 - 0x7001FFF4, // 0010 JMP #0006 - 0x58040004, // 0011 LDCONST R1 K4 - 0xAC040200, // 0012 CATCH R1 1 0 - 0xB0080000, // 0013 RAISE 2 R0 R0 - 0x80000000, // 0014 RET 0 + ( &(const binstruction[40]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0x60140015, // 0001 GETGBL R5 G21 + 0x7C140000, // 0002 CALL R5 0 + 0x8C140B01, // 0003 GETMET R5 R5 K1 + 0x5C1C0200, // 0004 MOVE R7 R1 + 0x54220003, // 0005 LDINT R8 4 + 0x7C140600, // 0006 CALL R5 3 + 0x8C180902, // 0007 GETMET R6 R4 K2 + 0x7C180200, // 0008 CALL R6 1 + 0x8C180D03, // 0009 GETMET R6 R6 K3 + 0x5C200A00, // 000A MOVE R8 R5 + 0x5C240600, // 000B MOVE R9 R3 + 0x5C280400, // 000C MOVE R10 R2 + 0x542E004F, // 000D LDINT R11 80 + 0x7C180A00, // 000E CALL R6 5 + 0x541E0026, // 000F LDINT R7 39 + 0x401E0807, // 0010 CONNECT R7 K4 R7 + 0x941C0C07, // 0011 GETIDX R7 R6 R7 + 0x54220027, // 0012 LDINT R8 40 + 0x5426004E, // 0013 LDINT R9 79 + 0x40201009, // 0014 CONNECT R8 R8 R9 + 0x94200C08, // 0015 GETIDX R8 R6 R8 + 0x8C240906, // 0016 GETMET R9 R4 K6 + 0x7C240200, // 0017 CALL R9 1 + 0x8C241307, // 0018 GETMET R9 R9 K7 + 0x5C2C0E00, // 0019 MOVE R11 R7 + 0x7C240400, // 001A CALL R9 2 + 0x90020A09, // 001B SETMBR R0 K5 R9 + 0x8C240906, // 001C GETMET R9 R4 K6 + 0x7C240200, // 001D CALL R9 1 + 0x8C241307, // 001E GETMET R9 R9 K7 + 0x5C2C1000, // 001F MOVE R11 R8 + 0x7C240400, // 0020 CALL R9 2 + 0x8C280906, // 0021 GETMET R10 R4 K6 + 0x7C280200, // 0022 CALL R10 1 + 0x8C281509, // 0023 GETMET R10 R10 K9 + 0x5C301200, // 0024 MOVE R12 R9 + 0x7C280400, // 0025 CALL R10 2 + 0x9002100A, // 0026 SETMBR R0 K8 R10 + 0x80000000, // 0027 RET 0 }) ) ); @@ -5410,114 +5473,88 @@ be_local_closure(Matter_Device_adjust_next_ep, /* name */ /******************************************************************** -** Solidified function: bridge_add_endpoint +** Solidified function: get_plugin_class_arg ********************************************************************/ -be_local_closure(Matter_Device_bridge_add_endpoint, /* name */ +be_local_closure(Matter_Device_get_plugin_class_arg, /* name */ be_nested_proto( - 17, /* nstack */ - 3, /* argc */ + 5, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[21]) { /* constants */ + ( &(const bvalue[ 4]) { /* constants */ /* K0 */ be_nested_str_weak(plugins_classes), /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(log), - /* K4 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), - /* K5 */ be_nested_str_weak(_X27_X20skipping), - /* K6 */ be_const_int(3), - /* K7 */ be_nested_str_weak(next_ep), - /* K8 */ be_nested_str_weak(plugins), - /* K9 */ be_nested_str_weak(push), - /* K10 */ be_nested_str_weak(type), - /* K11 */ be_nested_str_weak(keys), - /* K12 */ be_nested_str_weak(stop_iteration), - /* K13 */ be_nested_str_weak(MTR_X3A_X20adding_X20endpoint_X20_X3D_X20_X25i_X20type_X3A_X25s_X25s), - /* K14 */ be_nested_str_weak(conf_to_log), - /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_weak(plugins_config), - /* K17 */ be_nested_str_weak(plugins_persist), - /* K18 */ be_const_int(1), - /* K19 */ be_nested_str_weak(save_param), - /* K20 */ be_nested_str_weak(signal_endpoints_changed), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_nested_str_weak(), }), - be_str_weak(bridge_add_endpoint), + be_str_weak(get_plugin_class_arg), &be_const_str_solidified, - ( &(const binstruction[70]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x1C100604, // 0005 EQ R4 R3 R4 - 0x78120009, // 0006 JMPF R4 #0011 - 0xB8120400, // 0007 GETNGBL R4 K2 - 0x8C100903, // 0008 GETMET R4 R4 K3 - 0x60180008, // 0009 GETGBL R6 G8 - 0x5C1C0200, // 000A MOVE R7 R1 - 0x7C180200, // 000B CALL R6 1 - 0x001A0806, // 000C ADD R6 K4 R6 - 0x00180D05, // 000D ADD R6 R6 K5 - 0x581C0006, // 000E LDCONST R7 K6 - 0x7C100600, // 000F CALL R4 3 - 0x80000800, // 0010 RET 0 - 0x88100107, // 0011 GETMBR R4 R0 K7 - 0x60140008, // 0012 GETGBL R5 G8 - 0x5C180800, // 0013 MOVE R6 R4 - 0x7C140200, // 0014 CALL R5 1 - 0x5C180600, // 0015 MOVE R6 R3 - 0x5C1C0000, // 0016 MOVE R7 R0 - 0x5C200800, // 0017 MOVE R8 R4 - 0x5C240400, // 0018 MOVE R9 R2 - 0x7C180600, // 0019 CALL R6 3 - 0x881C0108, // 001A GETMBR R7 R0 K8 - 0x8C1C0F09, // 001B GETMET R7 R7 K9 - 0x5C240C00, // 001C MOVE R9 R6 - 0x7C1C0400, // 001D CALL R7 2 - 0x601C0013, // 001E GETGBL R7 G19 - 0x7C1C0000, // 001F CALL R7 0 - 0x981E1401, // 0020 SETIDX R7 K10 R1 - 0x60200010, // 0021 GETGBL R8 G16 - 0x8C24050B, // 0022 GETMET R9 R2 K11 - 0x7C240200, // 0023 CALL R9 1 - 0x7C200200, // 0024 CALL R8 1 - 0xA8020004, // 0025 EXBLK 0 #002B - 0x5C241000, // 0026 MOVE R9 R8 - 0x7C240000, // 0027 CALL R9 0 - 0x94280409, // 0028 GETIDX R10 R2 R9 - 0x981C120A, // 0029 SETIDX R7 R9 R10 - 0x7001FFFA, // 002A JMP #0026 - 0x5820000C, // 002B LDCONST R8 K12 - 0xAC200200, // 002C CATCH R8 1 0 - 0xB0080000, // 002D RAISE 2 R0 R0 - 0xB8220400, // 002E GETNGBL R8 K2 - 0x8C201103, // 002F GETMET R8 R8 K3 - 0x60280018, // 0030 GETGBL R10 G24 - 0x582C000D, // 0031 LDCONST R11 K13 - 0x5C300800, // 0032 MOVE R12 R4 - 0x5C340200, // 0033 MOVE R13 R1 - 0x8C38010E, // 0034 GETMET R14 R0 K14 - 0x5C400400, // 0035 MOVE R16 R2 - 0x7C380400, // 0036 CALL R14 2 - 0x7C280800, // 0037 CALL R10 4 - 0x582C000F, // 0038 LDCONST R11 K15 - 0x7C200600, // 0039 CALL R8 3 - 0x88200110, // 003A GETMBR R8 R0 K16 - 0x98200A07, // 003B SETIDX R8 R5 R7 - 0x50200200, // 003C LDBOOL R8 1 0 - 0x90022208, // 003D SETMBR R0 K17 R8 - 0x88200107, // 003E GETMBR R8 R0 K7 - 0x00201112, // 003F ADD R8 R8 K18 - 0x90020E08, // 0040 SETMBR R0 K7 R8 - 0x8C200113, // 0041 GETMET R8 R0 K19 - 0x7C200200, // 0042 CALL R8 1 - 0x8C200114, // 0043 GETMET R8 R0 K20 - 0x7C200200, // 0044 CALL R8 1 - 0x80040800, // 0045 RET 1 R4 + ( &(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 + 0x780A0001, // 0004 JMPF R2 #0007 + 0x880C0502, // 0005 GETMBR R3 R2 K2 + 0x70020000, // 0006 JMP #0008 + 0x580C0003, // 0007 LDCONST R3 K3 + 0x80040600, // 0008 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_announce_op_discovery_all_fabrics +********************************************************************/ +be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(active_fabrics), + /* K2 */ be_nested_str_weak(get_device_id), + /* K3 */ be_nested_str_weak(get_fabric_id), + /* K4 */ be_nested_str_weak(mdns_announce_op_discovery), + /* K5 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(mdns_announce_op_discovery_all_fabrics), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x60040010, // 0000 GETGBL R1 G16 + 0x88080100, // 0001 GETMBR R2 R0 K0 + 0x8C080501, // 0002 GETMET R2 R2 K1 + 0x7C080200, // 0003 CALL R2 1 + 0x7C040200, // 0004 CALL R1 1 + 0xA802000B, // 0005 EXBLK 0 #0012 + 0x5C080200, // 0006 MOVE R2 R1 + 0x7C080000, // 0007 CALL R2 0 + 0x8C0C0502, // 0008 GETMET R3 R2 K2 + 0x7C0C0200, // 0009 CALL R3 1 + 0x780E0005, // 000A JMPF R3 #0011 + 0x8C0C0503, // 000B GETMET R3 R2 K3 + 0x7C0C0200, // 000C CALL R3 1 + 0x780E0002, // 000D JMPF R3 #0011 + 0x8C0C0104, // 000E GETMET R3 R0 K4 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x7001FFF3, // 0011 JMP #0006 + 0x58040005, // 0012 LDCONST R1 K5 + 0xAC040200, // 0013 CATCH R1 1 0 + 0xB0080000, // 0014 RAISE 2 R0 R0 + 0x80000000, // 0015 RET 0 }) ) ); @@ -5525,55 +5562,40 @@ be_local_closure(Matter_Device_bridge_add_endpoint, /* name */ /******************************************************************** -** Solidified function: invoke_request +** Solidified function: event_fabrics_saved ********************************************************************/ -be_local_closure(Matter_Device_invoke_request, /* name */ +be_local_closure(Matter_Device_event_fabrics_saved, /* name */ be_nested_proto( - 12, /* nstack */ - 4, /* argc */ + 3, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(endpoint), - /* K2 */ be_nested_str_weak(plugins), - /* K3 */ be_nested_str_weak(invoke_request), - /* K4 */ be_const_int(1), - /* K5 */ be_nested_str_weak(status), - /* K6 */ be_nested_str_weak(matter), - /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_nested_str_weak(count_active_fabrics), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(plugins_persist), + /* K4 */ be_nested_str_weak(save_param), }), - be_str_weak(invoke_request), + be_str_weak(event_fabrics_saved), &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x58100000, // 0000 LDCONST R4 K0 - 0x88140701, // 0001 GETMBR R5 R3 K1 - 0x6018000C, // 0002 GETGBL R6 G12 - 0x881C0102, // 0003 GETMBR R7 R0 K2 - 0x7C180200, // 0004 CALL R6 1 - 0x14180806, // 0005 LT R6 R4 R6 - 0x781A000C, // 0006 JMPF R6 #0014 - 0x88180102, // 0007 GETMBR R6 R0 K2 - 0x94180C04, // 0008 GETIDX R6 R6 R4 - 0x881C0D01, // 0009 GETMBR R7 R6 K1 - 0x1C1C0E05, // 000A EQ R7 R7 R5 - 0x781E0005, // 000B JMPF R7 #0012 - 0x8C1C0D03, // 000C GETMET R7 R6 K3 - 0x5C240200, // 000D MOVE R9 R1 - 0x5C280400, // 000E MOVE R10 R2 - 0x5C2C0600, // 000F MOVE R11 R3 - 0x7C1C0800, // 0010 CALL R7 4 - 0x80040E00, // 0011 RET 1 R7 - 0x00100904, // 0012 ADD R4 R4 K4 - 0x7001FFED, // 0013 JMP #0002 - 0xB81A0C00, // 0014 GETNGBL R6 K6 - 0x88180D07, // 0015 GETMBR R6 R6 K7 - 0x900E0A06, // 0016 SETMBR R3 K5 R6 - 0x80000000, // 0017 RET 0 + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x24040302, // 0003 GT R1 R1 K2 + 0x78060005, // 0004 JMPF R1 #000B + 0x88040103, // 0005 GETMBR R1 R0 K3 + 0x74060003, // 0006 JMPT R1 #000B + 0x50040200, // 0007 LDBOOL R1 1 0 + 0x90020601, // 0008 SETMBR R0 K3 R1 + 0x8C040104, // 0009 GETMET R1 R0 K4 + 0x7C040200, // 000A CALL R1 1 + 0x80000000, // 000B RET 0 }) ) ); @@ -5581,11 +5603,11 @@ be_local_closure(Matter_Device_invoke_request, /* name */ /******************************************************************** -** Solidified function: register_commands +** Solidified function: start_mdns_announce_hostnames ********************************************************************/ -be_local_closure(Matter_Device_register_commands, /* name */ +be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -5593,8 +5615,8 @@ be_local_closure(Matter_Device_register_commands, /* name */ 1, /* has sup protos */ ( &(const struct bproto*[ 2]) { be_nested_proto( - 10, /* nstack */ - 4, /* argc */ + 4, /* nstack */ + 0, /* argc */ 0, /* varg */ 1, /* has upvals */ ( &(const bupvaldesc[ 1]) { /* upvals */ @@ -5603,25 +5625,31 @@ be_local_closure(Matter_Device_register_commands, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(MtrJoin), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_mdns_announce_hostname), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(remove_rule), + /* K3 */ be_nested_str_weak(Wifi_X23Connected), + /* K4 */ be_nested_str_weak(matter_mdns_host), }), - be_str_weak(_X3Clambda_X3E), + be_str_weak(_anonymous_), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x68100000, // 0000 GETUPV R4 U0 - 0x8C100900, // 0001 GETMET R4 R4 K0 - 0x5C180000, // 0002 MOVE R6 R0 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80040800, // 0007 RET 1 R4 + ( &(const binstruction[10]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x50080000, // 0002 LDBOOL R2 0 0 + 0x7C000400, // 0003 CALL R0 2 + 0xB8020200, // 0004 GETNGBL R0 K1 + 0x8C000102, // 0005 GETMET R0 R0 K2 + 0x58080003, // 0006 LDCONST R2 K3 + 0x580C0004, // 0007 LDCONST R3 K4 + 0x7C000600, // 0008 CALL R0 3 + 0x80000000, // 0009 RET 0 }) ), be_nested_proto( - 10, /* nstack */ - 4, /* argc */ + 4, /* nstack */ + 0, /* argc */ 0, /* varg */ 1, /* has upvals */ ( &(const bupvaldesc[ 1]) { /* upvals */ @@ -5630,45 +5658,212 @@ be_local_closure(Matter_Device_register_commands, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(MtrUpdate), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_mdns_announce_hostname), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(remove_rule), + /* K3 */ be_nested_str_weak(Eth_X23Connected), + /* K4 */ be_nested_str_weak(matter_mdns_host), }), - be_str_weak(_X3Clambda_X3E), + be_str_weak(_anonymous_), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x68100000, // 0000 GETUPV R4 U0 - 0x8C100900, // 0001 GETMET R4 R4 K0 - 0x5C180000, // 0002 MOVE R6 R0 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80040800, // 0007 RET 1 R4 + ( &(const binstruction[10]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x50080200, // 0002 LDBOOL R2 1 0 + 0x7C000400, // 0003 CALL R0 2 + 0xB8020200, // 0004 GETNGBL R0 K1 + 0x8C000102, // 0005 GETMET R0 R0 K2 + 0x58080003, // 0006 LDCONST R2 K3 + 0x580C0004, // 0007 LDCONST R3 K4 + 0x7C000600, // 0008 CALL R0 3 + 0x80000000, // 0009 RET 0 }) ), }), 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 9]) { /* constants */ /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(add_cmd), - /* K2 */ be_nested_str_weak(MtrJoin), - /* K3 */ be_nested_str_weak(MtrUpdate), + /* K1 */ be_nested_str_weak(wifi), + /* K2 */ be_nested_str_weak(up), + /* K3 */ be_nested_str_weak(_mdns_announce_hostname), + /* K4 */ be_nested_str_weak(add_rule), + /* K5 */ be_nested_str_weak(Wifi_X23Connected), + /* K6 */ be_nested_str_weak(matter_mdns_host), + /* K7 */ be_nested_str_weak(eth), + /* K8 */ be_nested_str_weak(Eth_X23Connected), + }), + be_str_weak(start_mdns_announce_hostnames), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x94040302, // 0003 GETIDX R1 R1 K2 + 0x78060003, // 0004 JMPF R1 #0009 + 0x8C040103, // 0005 GETMET R1 R0 K3 + 0x500C0000, // 0006 LDBOOL R3 0 0 + 0x7C040400, // 0007 CALL R1 2 + 0x70020005, // 0008 JMP #000F + 0xB8060000, // 0009 GETNGBL R1 K0 + 0x8C040304, // 000A GETMET R1 R1 K4 + 0x580C0005, // 000B LDCONST R3 K5 + 0x84100000, // 000C CLOSURE R4 P0 + 0x58140006, // 000D LDCONST R5 K6 + 0x7C040800, // 000E CALL R1 4 + 0xB8060000, // 000F GETNGBL R1 K0 + 0x8C040307, // 0010 GETMET R1 R1 K7 + 0x7C040200, // 0011 CALL R1 1 + 0x94040302, // 0012 GETIDX R1 R1 K2 + 0x78060003, // 0013 JMPF R1 #0018 + 0x8C040103, // 0014 GETMET R1 R0 K3 + 0x500C0200, // 0015 LDBOOL R3 1 0 + 0x7C040400, // 0016 CALL R1 2 + 0x70020005, // 0017 JMP #001E + 0xB8060000, // 0018 GETNGBL R1 K0 + 0x8C040304, // 0019 GETMET R1 R1 K4 + 0x580C0008, // 001A LDCONST R3 K8 + 0x84100001, // 001B CLOSURE R4 P1 + 0x58140006, // 001C LDCONST R5 K6 + 0x7C040800, // 001D CALL R1 4 + 0xA0000000, // 001E CLOSE R0 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: save_param +********************************************************************/ +be_local_closure(Matter_Device_save_param, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[30]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(update_remotes_info), + /* K2 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s_X2C_X22disable_bridge_mode_X22_X3A_X25s_X2C_X22nextep_X22_X3A_X25i), + /* K3 */ be_nested_str_weak(root_discriminator), + /* K4 */ be_nested_str_weak(root_passcode), + /* K5 */ be_nested_str_weak(ipv4only), + /* K6 */ be_nested_str_weak(true), + /* K7 */ be_nested_str_weak(false), + /* K8 */ be_nested_str_weak(disable_bridge_mode), + /* K9 */ be_nested_str_weak(next_ep), + /* K10 */ be_nested_str_weak(plugins_persist), + /* K11 */ be_nested_str_weak(_X2C_X22config_X22_X3A), + /* K12 */ be_nested_str_weak(dump), + /* K13 */ be_nested_str_weak(plugins_config), + /* K14 */ be_nested_str_weak(plugins_config_remotes), + /* K15 */ be_const_int(0), + /* K16 */ be_nested_str_weak(_X2C_X22remotes_X22_X3A), + /* K17 */ be_nested_str_weak(_X7D), + /* K18 */ be_nested_str_weak(FILENAME), + /* K19 */ be_nested_str_weak(w), + /* K20 */ be_nested_str_weak(write), + /* K21 */ be_nested_str_weak(close), + /* K22 */ be_nested_str_weak(tasmota), + /* K23 */ be_nested_str_weak(log), + /* K24 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s), + /* K25 */ be_nested_str_weak(_X20and_X20configuration), + /* K26 */ be_nested_str_weak(), + /* K27 */ be_const_int(2), + /* K28 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), + /* K29 */ be_nested_str_weak(_X7C), }), - be_str_weak(register_commands), + be_str_weak(save_param), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x580C0002, // 0002 LDCONST R3 K2 - 0x84100000, // 0003 CLOSURE R4 P0 - 0x7C040600, // 0004 CALL R1 3 - 0xB8060000, // 0005 GETNGBL R1 K0 - 0x8C040301, // 0006 GETMET R1 R1 K1 - 0x580C0003, // 0007 LDCONST R3 K3 - 0x84100001, // 0008 CLOSURE R4 P1 - 0x7C040600, // 0009 CALL R1 3 - 0xA0000000, // 000A CLOSE R0 - 0x80000000, // 000B RET 0 + ( &(const binstruction[82]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x60080018, // 0003 GETGBL R2 G24 + 0x580C0002, // 0004 LDCONST R3 K2 + 0x88100103, // 0005 GETMBR R4 R0 K3 + 0x88140104, // 0006 GETMBR R5 R0 K4 + 0x88180105, // 0007 GETMBR R6 R0 K5 + 0x781A0001, // 0008 JMPF R6 #000B + 0x58180006, // 0009 LDCONST R6 K6 + 0x70020000, // 000A JMP #000C + 0x58180007, // 000B LDCONST R6 K7 + 0x881C0108, // 000C GETMBR R7 R0 K8 + 0x781E0001, // 000D JMPF R7 #0010 + 0x581C0006, // 000E LDCONST R7 K6 + 0x70020000, // 000F JMP #0011 + 0x581C0007, // 0010 LDCONST R7 K7 + 0x88200109, // 0011 GETMBR R8 R0 K9 + 0x7C080C00, // 0012 CALL R2 6 + 0x880C010A, // 0013 GETMBR R3 R0 K10 + 0x780E000E, // 0014 JMPF R3 #0024 + 0x0008050B, // 0015 ADD R2 R2 K11 + 0x8C0C030C, // 0016 GETMET R3 R1 K12 + 0x8814010D, // 0017 GETMBR R5 R0 K13 + 0x7C0C0400, // 0018 CALL R3 2 + 0x00080403, // 0019 ADD R2 R2 R3 + 0x600C000C, // 001A GETGBL R3 G12 + 0x8810010E, // 001B GETMBR R4 R0 K14 + 0x7C0C0200, // 001C CALL R3 1 + 0x240C070F, // 001D GT R3 R3 K15 + 0x780E0004, // 001E JMPF R3 #0024 + 0x00080510, // 001F ADD R2 R2 K16 + 0x8C0C030C, // 0020 GETMET R3 R1 K12 + 0x8814010E, // 0021 GETMBR R5 R0 K14 + 0x7C0C0400, // 0022 CALL R3 2 + 0x00080403, // 0023 ADD R2 R2 R3 + 0x00080511, // 0024 ADD R2 R2 K17 + 0xA8020018, // 0025 EXBLK 0 #003F + 0x600C0011, // 0026 GETGBL R3 G17 + 0x88100112, // 0027 GETMBR R4 R0 K18 + 0x58140013, // 0028 LDCONST R5 K19 + 0x7C0C0400, // 0029 CALL R3 2 + 0x8C100714, // 002A GETMET R4 R3 K20 + 0x5C180400, // 002B MOVE R6 R2 + 0x7C100400, // 002C CALL R4 2 + 0x8C100715, // 002D GETMET R4 R3 K21 + 0x7C100200, // 002E CALL R4 1 + 0xB8122C00, // 002F GETNGBL R4 K22 + 0x8C100917, // 0030 GETMET R4 R4 K23 + 0x60180018, // 0031 GETGBL R6 G24 + 0x581C0018, // 0032 LDCONST R7 K24 + 0x8820010A, // 0033 GETMBR R8 R0 K10 + 0x78220001, // 0034 JMPF R8 #0037 + 0x58200019, // 0035 LDCONST R8 K25 + 0x70020000, // 0036 JMP #0038 + 0x5820001A, // 0037 LDCONST R8 K26 + 0x7C180400, // 0038 CALL R6 2 + 0x581C001B, // 0039 LDCONST R7 K27 + 0x7C100600, // 003A CALL R4 3 + 0xA8040001, // 003B EXBLK 1 1 + 0x80040400, // 003C RET 1 R2 + 0xA8040001, // 003D EXBLK 1 1 + 0x70020011, // 003E JMP #0051 + 0xAC0C0002, // 003F CATCH R3 0 2 + 0x7002000E, // 0040 JMP #0050 + 0xB8162C00, // 0041 GETNGBL R5 K22 + 0x8C140B17, // 0042 GETMET R5 R5 K23 + 0x601C0008, // 0043 GETGBL R7 G8 + 0x5C200600, // 0044 MOVE R8 R3 + 0x7C1C0200, // 0045 CALL R7 1 + 0x001E3807, // 0046 ADD R7 K28 R7 + 0x001C0F1D, // 0047 ADD R7 R7 K29 + 0x60200008, // 0048 GETGBL R8 G8 + 0x5C240800, // 0049 MOVE R9 R4 + 0x7C200200, // 004A CALL R8 1 + 0x001C0E08, // 004B ADD R7 R7 R8 + 0x5820001B, // 004C LDCONST R8 K27 + 0x7C140600, // 004D CALL R5 3 + 0x80040400, // 004E RET 1 R2 + 0x70020000, // 004F JMP #0051 + 0xB0080000, // 0050 RAISE 2 R0 R0 + 0x80000000, // 0051 RET 0 }) ) ); @@ -5676,309 +5871,300 @@ be_local_closure(Matter_Device_register_commands, /* name */ /******************************************************************** -** Solidified function: process_attribute_expansion +** Solidified function: mdns_announce_PASE ********************************************************************/ -be_local_closure(Matter_Device_process_attribute_expansion, /* name */ +be_local_closure(Matter_Device_mdns_announce_PASE, /* name */ be_nested_proto( - 24, /* nstack */ - 3, /* argc */ + 12, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(keys), - /* K1 */ be_nested_str_weak(push), - /* K2 */ be_nested_str_weak(stop_iteration), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(keys_sorted), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0x60040012, // 0000 GETGBL R1 G18 - 0x7C040000, // 0001 CALL R1 0 - 0x60080010, // 0002 GETGBL R2 G16 - 0x8C0C0100, // 0003 GETMET R3 R0 K0 - 0x7C0C0200, // 0004 CALL R3 1 - 0x7C080200, // 0005 CALL R2 1 - 0xA8020005, // 0006 EXBLK 0 #000D - 0x5C0C0400, // 0007 MOVE R3 R2 - 0x7C0C0000, // 0008 CALL R3 0 - 0x8C100301, // 0009 GETMET R4 R1 K1 - 0x5C180600, // 000A MOVE R6 R3 - 0x7C100400, // 000B CALL R4 2 - 0x7001FFF9, // 000C JMP #0007 - 0x58080002, // 000D LDCONST R2 K2 - 0xAC080200, // 000E CATCH R2 1 0 - 0xB0080000, // 000F RAISE 2 R0 R0 - 0x60080010, // 0010 GETGBL R2 G16 - 0x600C000C, // 0011 GETGBL R3 G12 - 0x5C100200, // 0012 MOVE R4 R1 - 0x7C0C0200, // 0013 CALL R3 1 - 0x040C0703, // 0014 SUB R3 R3 K3 - 0x400E0603, // 0015 CONNECT R3 K3 R3 - 0x7C080200, // 0016 CALL R2 1 - 0xA8020010, // 0017 EXBLK 0 #0029 - 0x5C0C0400, // 0018 MOVE R3 R2 - 0x7C0C0000, // 0019 CALL R3 0 - 0x94100203, // 001A GETIDX R4 R1 R3 - 0x5C140600, // 001B MOVE R5 R3 - 0x24180B04, // 001C GT R6 R5 K4 - 0x781A0008, // 001D JMPF R6 #0027 - 0x04180B03, // 001E SUB R6 R5 K3 - 0x94180206, // 001F GETIDX R6 R1 R6 - 0x24180C04, // 0020 GT R6 R6 R4 - 0x781A0004, // 0021 JMPF R6 #0027 - 0x04180B03, // 0022 SUB R6 R5 K3 - 0x94180206, // 0023 GETIDX R6 R1 R6 - 0x98040A06, // 0024 SETIDX R1 R5 R6 - 0x04140B03, // 0025 SUB R5 R5 K3 - 0x7001FFF4, // 0026 JMP #001C - 0x98040A04, // 0027 SETIDX R1 R5 R4 - 0x7001FFEE, // 0028 JMP #0018 - 0x58080002, // 0029 LDCONST R2 K2 - 0xAC080200, // 002A CATCH R2 1 0 - 0xB0080000, // 002B RAISE 2 R0 R0 - 0x80040200, // 002C RET 1 R1 - }) - ), - }), + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ - /* K0 */ be_nested_str_weak(endpoint), - /* K1 */ be_nested_str_weak(cluster), - /* K2 */ be_nested_str_weak(attribute), - /* K3 */ be_nested_str_weak(plugins), - /* K4 */ be_nested_str_weak(get_endpoint), - /* K5 */ be_nested_str_weak(contains), - /* K6 */ be_nested_str_weak(get_cluster_list), - /* K7 */ be_nested_str_weak(get_attribute_list), - /* K8 */ be_nested_str_weak(push), - /* K9 */ be_nested_str_weak(stop_iteration), - /* K10 */ be_nested_str_weak(status), - /* K11 */ be_nested_str_weak(matter), - /* K12 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), - /* K13 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), - /* K14 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), - /* K15 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE), + ( &(const bvalue[41]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(crypto), + /* K2 */ be_nested_str_weak(VP), + /* K3 */ be_nested_str_weak(vendorid), + /* K4 */ be_nested_str_weak(_X2B), + /* K5 */ be_nested_str_weak(productid), + /* K6 */ be_nested_str_weak(D), + /* K7 */ be_nested_str_weak(commissioning_discriminator), + /* K8 */ be_nested_str_weak(CM), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(T), + /* K11 */ be_const_int(0), + /* K12 */ be_nested_str_weak(SII), + /* K13 */ be_nested_str_weak(SAI), + /* K14 */ be_nested_str_weak(commissioning_instance_wifi), + /* K15 */ be_nested_str_weak(random), + /* K16 */ be_nested_str_weak(tohex), + /* K17 */ be_nested_str_weak(commissioning_instance_eth), + /* K18 */ be_nested_str_weak(hostname_eth), + /* K19 */ be_nested_str_weak(add_service), + /* K20 */ be_nested_str_weak(_matterc), + /* K21 */ be_nested_str_weak(_udp), + /* K22 */ be_nested_str_weak(mdns_pase_eth), + /* K23 */ be_nested_str_weak(tasmota), + /* K24 */ be_nested_str_weak(log), + /* K25 */ be_nested_str_weak(MTR_X3A_X20announce_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), + /* K26 */ be_nested_str_weak(eth), + /* K27 */ be_const_int(2), + /* K28 */ be_nested_str_weak(_L), + /* K29 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), + /* K30 */ be_const_int(3), + /* K31 */ be_nested_str_weak(add_subtype), + /* K32 */ be_nested_str_weak(_S), + /* K33 */ be_nested_str_weak(_V), + /* K34 */ be_nested_str_weak(_CM1), + /* K35 */ be_nested_str_weak(hostname_wifi), + /* K36 */ be_nested_str_weak(mdns_pase_wifi), + /* K37 */ be_nested_str_weak(MTR_X3A_X20starting_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), + /* K38 */ be_nested_str_weak(wifi), + /* K39 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K40 */ be_nested_str_weak(_X7C), }), - be_str_weak(process_attribute_expansion), + be_str_weak(mdns_announce_PASE), &be_const_str_solidified, - ( &(const binstruction[203]) { /* code */ - 0x840C0000, // 0000 CLOSURE R3 P0 - 0x88100300, // 0001 GETMBR R4 R1 K0 - 0x88140301, // 0002 GETMBR R5 R1 K1 - 0x88180302, // 0003 GETMBR R6 R1 K2 - 0x501C0000, // 0004 LDBOOL R7 0 0 - 0x50200000, // 0005 LDBOOL R8 0 0 - 0x50240000, // 0006 LDBOOL R9 0 0 - 0x88280300, // 0007 GETMBR R10 R1 K0 - 0x4C2C0000, // 0008 LDNIL R11 - 0x2028140B, // 0009 NE R10 R10 R11 - 0x782A0007, // 000A JMPF R10 #0013 - 0x88280301, // 000B GETMBR R10 R1 K1 - 0x4C2C0000, // 000C LDNIL R11 - 0x2028140B, // 000D NE R10 R10 R11 - 0x782A0003, // 000E JMPF R10 #0013 - 0x88280302, // 000F GETMBR R10 R1 K2 - 0x4C2C0000, // 0010 LDNIL R11 - 0x2028140B, // 0011 NE R10 R10 R11 - 0x742A0000, // 0012 JMPT R10 #0014 - 0x50280001, // 0013 LDBOOL R10 0 1 - 0x50280200, // 0014 LDBOOL R10 1 0 - 0x602C0013, // 0015 GETGBL R11 G19 - 0x7C2C0000, // 0016 CALL R11 0 - 0x60300010, // 0017 GETGBL R12 G16 - 0x88340103, // 0018 GETMBR R13 R0 K3 - 0x7C300200, // 0019 CALL R12 1 - 0xA8020053, // 001A EXBLK 0 #006F - 0x5C341800, // 001B MOVE R13 R12 - 0x7C340000, // 001C CALL R13 0 - 0x8C381B04, // 001D GETMET R14 R13 K4 - 0x7C380200, // 001E CALL R14 1 - 0x4C3C0000, // 001F LDNIL R15 - 0x203C080F, // 0020 NE R15 R4 R15 - 0x783E0002, // 0021 JMPF R15 #0025 - 0x203C1C04, // 0022 NE R15 R14 R4 - 0x783E0000, // 0023 JMPF R15 #0025 - 0x7001FFF5, // 0024 JMP #001B - 0x8C3C1705, // 0025 GETMET R15 R11 K5 - 0x5C441C00, // 0026 MOVE R17 R14 - 0x7C3C0400, // 0027 CALL R15 2 - 0x743E0002, // 0028 JMPT R15 #002C - 0x603C0013, // 0029 GETGBL R15 G19 - 0x7C3C0000, // 002A CALL R15 0 - 0x982C1C0F, // 002B SETIDX R11 R14 R15 - 0x501C0200, // 002C LDBOOL R7 1 0 - 0x8C3C1B06, // 002D GETMET R15 R13 K6 - 0x7C3C0200, // 002E CALL R15 1 - 0x60400010, // 002F GETGBL R16 G16 - 0x5C441E00, // 0030 MOVE R17 R15 - 0x7C400200, // 0031 CALL R16 1 - 0xA8020037, // 0032 EXBLK 0 #006B - 0x5C442000, // 0033 MOVE R17 R16 - 0x7C440000, // 0034 CALL R17 0 - 0x4C480000, // 0035 LDNIL R18 - 0x20480A12, // 0036 NE R18 R5 R18 - 0x784A0002, // 0037 JMPF R18 #003B - 0x20482205, // 0038 NE R18 R17 R5 - 0x784A0000, // 0039 JMPF R18 #003B - 0x7001FFF7, // 003A JMP #0033 - 0x9448160E, // 003B GETIDX R18 R11 R14 - 0x8C482505, // 003C GETMET R18 R18 K5 - 0x5C502200, // 003D MOVE R20 R17 - 0x7C480400, // 003E CALL R18 2 - 0x744A0003, // 003F JMPT R18 #0044 - 0x9448160E, // 0040 GETIDX R18 R11 R14 - 0x604C0013, // 0041 GETGBL R19 G19 - 0x7C4C0000, // 0042 CALL R19 0 - 0x98482213, // 0043 SETIDX R18 R17 R19 - 0x50200200, // 0044 LDBOOL R8 1 0 - 0x8C481B07, // 0045 GETMET R18 R13 K7 - 0x5C502200, // 0046 MOVE R20 R17 - 0x7C480400, // 0047 CALL R18 2 - 0x604C0010, // 0048 GETGBL R19 G16 - 0x5C502400, // 0049 MOVE R20 R18 - 0x7C4C0200, // 004A CALL R19 1 - 0xA802001A, // 004B EXBLK 0 #0067 - 0x5C502600, // 004C MOVE R20 R19 - 0x7C500000, // 004D CALL R20 0 - 0x4C540000, // 004E LDNIL R21 - 0x20540C15, // 004F NE R21 R6 R21 - 0x78560002, // 0050 JMPF R21 #0054 - 0x20542806, // 0051 NE R21 R20 R6 - 0x78560000, // 0052 JMPF R21 #0054 - 0x7001FFF7, // 0053 JMP #004C - 0x9454160E, // 0054 GETIDX R21 R11 R14 - 0x94542A11, // 0055 GETIDX R21 R21 R17 - 0x8C542B05, // 0056 GETMET R21 R21 K5 - 0x5C5C2800, // 0057 MOVE R23 R20 - 0x7C540400, // 0058 CALL R21 2 - 0x74560004, // 0059 JMPT R21 #005F - 0x9454160E, // 005A GETIDX R21 R11 R14 - 0x94542A11, // 005B GETIDX R21 R21 R17 - 0x60580012, // 005C GETGBL R22 G18 - 0x7C580000, // 005D CALL R22 0 - 0x98542816, // 005E SETIDX R21 R20 R22 - 0x50240200, // 005F LDBOOL R9 1 0 - 0x9454160E, // 0060 GETIDX R21 R11 R14 - 0x94542A11, // 0061 GETIDX R21 R21 R17 - 0x94542A14, // 0062 GETIDX R21 R21 R20 - 0x8C542B08, // 0063 GETMET R21 R21 K8 - 0x5C5C1A00, // 0064 MOVE R23 R13 - 0x7C540400, // 0065 CALL R21 2 - 0x7001FFE4, // 0066 JMP #004C - 0x584C0009, // 0067 LDCONST R19 K9 - 0xAC4C0200, // 0068 CATCH R19 1 0 - 0xB0080000, // 0069 RAISE 2 R0 R0 - 0x7001FFC7, // 006A JMP #0033 - 0x58400009, // 006B LDCONST R16 K9 - 0xAC400200, // 006C CATCH R16 1 0 - 0xB0080000, // 006D RAISE 2 R0 R0 - 0x7001FFAB, // 006E JMP #001B - 0x58300009, // 006F LDCONST R12 K9 - 0xAC300200, // 0070 CATCH R12 1 0 - 0xB0080000, // 0071 RAISE 2 R0 R0 - 0x60300010, // 0072 GETGBL R12 G16 - 0x5C340600, // 0073 MOVE R13 R3 - 0x5C381600, // 0074 MOVE R14 R11 - 0x7C340200, // 0075 CALL R13 1 - 0x7C300200, // 0076 CALL R12 1 - 0xA8020033, // 0077 EXBLK 0 #00AC - 0x5C341800, // 0078 MOVE R13 R12 - 0x7C340000, // 0079 CALL R13 0 - 0x60380010, // 007A GETGBL R14 G16 - 0x5C3C0600, // 007B MOVE R15 R3 - 0x9440160D, // 007C GETIDX R16 R11 R13 - 0x7C3C0200, // 007D CALL R15 1 - 0x7C380200, // 007E CALL R14 1 - 0xA8020027, // 007F EXBLK 0 #00A8 - 0x5C3C1C00, // 0080 MOVE R15 R14 - 0x7C3C0000, // 0081 CALL R15 0 - 0x60400010, // 0082 GETGBL R16 G16 - 0x5C440600, // 0083 MOVE R17 R3 - 0x9448160D, // 0084 GETIDX R18 R11 R13 - 0x9448240F, // 0085 GETIDX R18 R18 R15 - 0x7C440200, // 0086 CALL R17 1 - 0x7C400200, // 0087 CALL R16 1 - 0xA802001A, // 0088 EXBLK 0 #00A4 - 0x5C442000, // 0089 MOVE R17 R16 - 0x7C440000, // 008A CALL R17 0 - 0x60480010, // 008B GETGBL R18 G16 - 0x944C160D, // 008C GETIDX R19 R11 R13 - 0x944C260F, // 008D GETIDX R19 R19 R15 - 0x944C2611, // 008E GETIDX R19 R19 R17 - 0x7C480200, // 008F CALL R18 1 - 0xA802000E, // 0090 EXBLK 0 #00A0 - 0x5C4C2400, // 0091 MOVE R19 R18 - 0x7C4C0000, // 0092 CALL R19 0 - 0x9006000D, // 0093 SETMBR R1 K0 R13 - 0x9006020F, // 0094 SETMBR R1 K1 R15 - 0x90060411, // 0095 SETMBR R1 K2 R17 - 0x5C500400, // 0096 MOVE R20 R2 - 0x5C542600, // 0097 MOVE R21 R19 - 0x5C580200, // 0098 MOVE R22 R1 - 0x5C5C1400, // 0099 MOVE R23 R10 - 0x7C500600, // 009A CALL R20 3 - 0x782A0002, // 009B JMPF R10 #009F - 0x78520001, // 009C JMPF R20 #009F - 0xA8040004, // 009D EXBLK 1 4 - 0x80002A00, // 009E RET 0 - 0x7001FFF0, // 009F JMP #0091 - 0x58480009, // 00A0 LDCONST R18 K9 - 0xAC480200, // 00A1 CATCH R18 1 0 - 0xB0080000, // 00A2 RAISE 2 R0 R0 - 0x7001FFE4, // 00A3 JMP #0089 - 0x58400009, // 00A4 LDCONST R16 K9 - 0xAC400200, // 00A5 CATCH R16 1 0 - 0xB0080000, // 00A6 RAISE 2 R0 R0 - 0x7001FFD7, // 00A7 JMP #0080 - 0x58380009, // 00A8 LDCONST R14 K9 - 0xAC380200, // 00A9 CATCH R14 1 0 - 0xB0080000, // 00AA RAISE 2 R0 R0 - 0x7001FFCB, // 00AB JMP #0078 - 0x58300009, // 00AC LDCONST R12 K9 - 0xAC300200, // 00AD CATCH R12 1 0 - 0xB0080000, // 00AE RAISE 2 R0 R0 - 0x782A0019, // 00AF JMPF R10 #00CA - 0x5C300E00, // 00B0 MOVE R12 R7 - 0x74320003, // 00B1 JMPT R12 #00B6 - 0xB8321600, // 00B2 GETNGBL R12 K11 - 0x8830190C, // 00B3 GETMBR R12 R12 K12 - 0x9006140C, // 00B4 SETMBR R1 K10 R12 - 0x7002000E, // 00B5 JMP #00C5 - 0x5C301000, // 00B6 MOVE R12 R8 - 0x74320003, // 00B7 JMPT R12 #00BC - 0xB8321600, // 00B8 GETNGBL R12 K11 - 0x8830190D, // 00B9 GETMBR R12 R12 K13 - 0x9006140C, // 00BA SETMBR R1 K10 R12 - 0x70020008, // 00BB JMP #00C5 - 0x5C301200, // 00BC MOVE R12 R9 - 0x74320003, // 00BD JMPT R12 #00C2 - 0xB8321600, // 00BE GETNGBL R12 K11 - 0x8830190E, // 00BF GETMBR R12 R12 K14 - 0x9006140C, // 00C0 SETMBR R1 K10 R12 - 0x70020002, // 00C1 JMP #00C5 - 0xB8321600, // 00C2 GETNGBL R12 K11 - 0x8830190F, // 00C3 GETMBR R12 R12 K15 - 0x9006140C, // 00C4 SETMBR R1 K10 R12 - 0x5C300400, // 00C5 MOVE R12 R2 - 0x4C340000, // 00C6 LDNIL R13 - 0x5C380200, // 00C7 MOVE R14 R1 - 0x503C0200, // 00C8 LDBOOL R15 1 0 - 0x7C300600, // 00C9 CALL R12 3 - 0x80000000, // 00CA RET 0 + ( &(const binstruction[236]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x600C0013, // 0002 GETGBL R3 G19 + 0x7C0C0000, // 0003 CALL R3 0 + 0x60100008, // 0004 GETGBL R4 G8 + 0x88140103, // 0005 GETMBR R5 R0 K3 + 0x7C100200, // 0006 CALL R4 1 + 0x00100904, // 0007 ADD R4 R4 K4 + 0x60140008, // 0008 GETGBL R5 G8 + 0x88180105, // 0009 GETMBR R6 R0 K5 + 0x7C140200, // 000A CALL R5 1 + 0x00100805, // 000B ADD R4 R4 R5 + 0x980E0404, // 000C SETIDX R3 K2 R4 + 0x88100107, // 000D GETMBR R4 R0 K7 + 0x980E0C04, // 000E SETIDX R3 K6 R4 + 0x980E1109, // 000F SETIDX R3 K8 K9 + 0x980E150B, // 0010 SETIDX R3 K10 K11 + 0x54121387, // 0011 LDINT R4 5000 + 0x980E1804, // 0012 SETIDX R3 K12 R4 + 0x5412012B, // 0013 LDINT R4 300 + 0x980E1A04, // 0014 SETIDX R3 K13 R4 + 0x8C10050F, // 0015 GETMET R4 R2 K15 + 0x541A0007, // 0016 LDINT R6 8 + 0x7C100400, // 0017 CALL R4 2 + 0x8C100910, // 0018 GETMET R4 R4 K16 + 0x7C100200, // 0019 CALL R4 1 + 0x90021C04, // 001A SETMBR R0 K14 R4 + 0x8C10050F, // 001B GETMET R4 R2 K15 + 0x541A0007, // 001C LDINT R6 8 + 0x7C100400, // 001D CALL R4 2 + 0x8C100910, // 001E GETMET R4 R4 K16 + 0x7C100200, // 001F CALL R4 1 + 0x90022204, // 0020 SETMBR R0 K17 R4 + 0xA80200B7, // 0021 EXBLK 0 #00DA + 0x88100112, // 0022 GETMBR R4 R0 K18 + 0x78120058, // 0023 JMPF R4 #007D + 0x8C100313, // 0024 GETMET R4 R1 K19 + 0x58180014, // 0025 LDCONST R6 K20 + 0x581C0015, // 0026 LDCONST R7 K21 + 0x542215A3, // 0027 LDINT R8 5540 + 0x5C240600, // 0028 MOVE R9 R3 + 0x88280111, // 0029 GETMBR R10 R0 K17 + 0x882C0112, // 002A GETMBR R11 R0 K18 + 0x7C100E00, // 002B CALL R4 7 + 0x50100200, // 002C LDBOOL R4 1 0 + 0x90022C04, // 002D SETMBR R0 K22 R4 + 0xB8122E00, // 002E GETNGBL R4 K23 + 0x8C100918, // 002F GETMET R4 R4 K24 + 0x60180018, // 0030 GETGBL R6 G24 + 0x581C0019, // 0031 LDCONST R7 K25 + 0x5820001A, // 0032 LDCONST R8 K26 + 0x88240111, // 0033 GETMBR R9 R0 K17 + 0x88280112, // 0034 GETMBR R10 R0 K18 + 0x7C180800, // 0035 CALL R6 4 + 0x581C001B, // 0036 LDCONST R7 K27 + 0x7C100600, // 0037 CALL R4 3 + 0x60100008, // 0038 GETGBL R4 G8 + 0x88140107, // 0039 GETMBR R5 R0 K7 + 0x541A0FFE, // 003A LDINT R6 4095 + 0x2C140A06, // 003B AND R5 R5 R6 + 0x7C100200, // 003C CALL R4 1 + 0x00123804, // 003D ADD R4 K28 R4 + 0xB8162E00, // 003E GETNGBL R5 K23 + 0x8C140B18, // 003F GETMET R5 R5 K24 + 0x001E3A04, // 0040 ADD R7 K29 R4 + 0x5820001E, // 0041 LDCONST R8 K30 + 0x7C140600, // 0042 CALL R5 3 + 0x8C14031F, // 0043 GETMET R5 R1 K31 + 0x581C0014, // 0044 LDCONST R7 K20 + 0x58200015, // 0045 LDCONST R8 K21 + 0x88240111, // 0046 GETMBR R9 R0 K17 + 0x88280112, // 0047 GETMBR R10 R0 K18 + 0x5C2C0800, // 0048 MOVE R11 R4 + 0x7C140C00, // 0049 CALL R5 6 + 0x60140008, // 004A GETGBL R5 G8 + 0x88180107, // 004B GETMBR R6 R0 K7 + 0x541E0EFF, // 004C LDINT R7 3840 + 0x2C180C07, // 004D AND R6 R6 R7 + 0x541E0007, // 004E LDINT R7 8 + 0x3C180C07, // 004F SHR R6 R6 R7 + 0x7C140200, // 0050 CALL R5 1 + 0x00164005, // 0051 ADD R5 K32 R5 + 0x5C100A00, // 0052 MOVE R4 R5 + 0xB8162E00, // 0053 GETNGBL R5 K23 + 0x8C140B18, // 0054 GETMET R5 R5 K24 + 0x001E3A04, // 0055 ADD R7 K29 R4 + 0x5820001E, // 0056 LDCONST R8 K30 + 0x7C140600, // 0057 CALL R5 3 + 0x8C14031F, // 0058 GETMET R5 R1 K31 + 0x581C0014, // 0059 LDCONST R7 K20 + 0x58200015, // 005A LDCONST R8 K21 + 0x88240111, // 005B GETMBR R9 R0 K17 + 0x88280112, // 005C GETMBR R10 R0 K18 + 0x5C2C0800, // 005D MOVE R11 R4 + 0x7C140C00, // 005E CALL R5 6 + 0x60140008, // 005F GETGBL R5 G8 + 0x88180103, // 0060 GETMBR R6 R0 K3 + 0x7C140200, // 0061 CALL R5 1 + 0x00164205, // 0062 ADD R5 K33 R5 + 0x5C100A00, // 0063 MOVE R4 R5 + 0xB8162E00, // 0064 GETNGBL R5 K23 + 0x8C140B18, // 0065 GETMET R5 R5 K24 + 0x001E3A04, // 0066 ADD R7 K29 R4 + 0x5820001E, // 0067 LDCONST R8 K30 + 0x7C140600, // 0068 CALL R5 3 + 0x8C14031F, // 0069 GETMET R5 R1 K31 + 0x581C0014, // 006A LDCONST R7 K20 + 0x58200015, // 006B LDCONST R8 K21 + 0x88240111, // 006C GETMBR R9 R0 K17 + 0x88280112, // 006D GETMBR R10 R0 K18 + 0x5C2C0800, // 006E MOVE R11 R4 + 0x7C140C00, // 006F CALL R5 6 + 0x58100022, // 0070 LDCONST R4 K34 + 0xB8162E00, // 0071 GETNGBL R5 K23 + 0x8C140B18, // 0072 GETMET R5 R5 K24 + 0x001E3A04, // 0073 ADD R7 K29 R4 + 0x5820001E, // 0074 LDCONST R8 K30 + 0x7C140600, // 0075 CALL R5 3 + 0x8C14031F, // 0076 GETMET R5 R1 K31 + 0x581C0014, // 0077 LDCONST R7 K20 + 0x58200015, // 0078 LDCONST R8 K21 + 0x88240111, // 0079 GETMBR R9 R0 K17 + 0x88280112, // 007A GETMBR R10 R0 K18 + 0x5C2C0800, // 007B MOVE R11 R4 + 0x7C140C00, // 007C CALL R5 6 + 0x88100123, // 007D GETMBR R4 R0 K35 + 0x78120058, // 007E JMPF R4 #00D8 + 0x8C100313, // 007F GETMET R4 R1 K19 + 0x58180014, // 0080 LDCONST R6 K20 + 0x581C0015, // 0081 LDCONST R7 K21 + 0x542215A3, // 0082 LDINT R8 5540 + 0x5C240600, // 0083 MOVE R9 R3 + 0x8828010E, // 0084 GETMBR R10 R0 K14 + 0x882C0123, // 0085 GETMBR R11 R0 K35 + 0x7C100E00, // 0086 CALL R4 7 + 0x50100200, // 0087 LDBOOL R4 1 0 + 0x90024804, // 0088 SETMBR R0 K36 R4 + 0xB8122E00, // 0089 GETNGBL R4 K23 + 0x8C100918, // 008A GETMET R4 R4 K24 + 0x60180018, // 008B GETGBL R6 G24 + 0x581C0025, // 008C LDCONST R7 K37 + 0x58200026, // 008D LDCONST R8 K38 + 0x8824010E, // 008E GETMBR R9 R0 K14 + 0x88280123, // 008F GETMBR R10 R0 K35 + 0x7C180800, // 0090 CALL R6 4 + 0x581C001E, // 0091 LDCONST R7 K30 + 0x7C100600, // 0092 CALL R4 3 + 0x60100008, // 0093 GETGBL R4 G8 + 0x88140107, // 0094 GETMBR R5 R0 K7 + 0x541A0FFE, // 0095 LDINT R6 4095 + 0x2C140A06, // 0096 AND R5 R5 R6 + 0x7C100200, // 0097 CALL R4 1 + 0x00123804, // 0098 ADD R4 K28 R4 + 0xB8162E00, // 0099 GETNGBL R5 K23 + 0x8C140B18, // 009A GETMET R5 R5 K24 + 0x001E3A04, // 009B ADD R7 K29 R4 + 0x5820001E, // 009C LDCONST R8 K30 + 0x7C140600, // 009D CALL R5 3 + 0x8C14031F, // 009E GETMET R5 R1 K31 + 0x581C0014, // 009F LDCONST R7 K20 + 0x58200015, // 00A0 LDCONST R8 K21 + 0x8824010E, // 00A1 GETMBR R9 R0 K14 + 0x88280123, // 00A2 GETMBR R10 R0 K35 + 0x5C2C0800, // 00A3 MOVE R11 R4 + 0x7C140C00, // 00A4 CALL R5 6 + 0x60140008, // 00A5 GETGBL R5 G8 + 0x88180107, // 00A6 GETMBR R6 R0 K7 + 0x541E0EFF, // 00A7 LDINT R7 3840 + 0x2C180C07, // 00A8 AND R6 R6 R7 + 0x541E0007, // 00A9 LDINT R7 8 + 0x3C180C07, // 00AA SHR R6 R6 R7 + 0x7C140200, // 00AB CALL R5 1 + 0x00164005, // 00AC ADD R5 K32 R5 + 0x5C100A00, // 00AD MOVE R4 R5 + 0xB8162E00, // 00AE GETNGBL R5 K23 + 0x8C140B18, // 00AF GETMET R5 R5 K24 + 0x001E3A04, // 00B0 ADD R7 K29 R4 + 0x5820001E, // 00B1 LDCONST R8 K30 + 0x7C140600, // 00B2 CALL R5 3 + 0x8C14031F, // 00B3 GETMET R5 R1 K31 + 0x581C0014, // 00B4 LDCONST R7 K20 + 0x58200015, // 00B5 LDCONST R8 K21 + 0x8824010E, // 00B6 GETMBR R9 R0 K14 + 0x88280123, // 00B7 GETMBR R10 R0 K35 + 0x5C2C0800, // 00B8 MOVE R11 R4 + 0x7C140C00, // 00B9 CALL R5 6 + 0x60140008, // 00BA GETGBL R5 G8 + 0x88180103, // 00BB GETMBR R6 R0 K3 + 0x7C140200, // 00BC CALL R5 1 + 0x00164205, // 00BD ADD R5 K33 R5 + 0x5C100A00, // 00BE MOVE R4 R5 + 0xB8162E00, // 00BF GETNGBL R5 K23 + 0x8C140B18, // 00C0 GETMET R5 R5 K24 + 0x001E3A04, // 00C1 ADD R7 K29 R4 + 0x5820001E, // 00C2 LDCONST R8 K30 + 0x7C140600, // 00C3 CALL R5 3 + 0x8C14031F, // 00C4 GETMET R5 R1 K31 + 0x581C0014, // 00C5 LDCONST R7 K20 + 0x58200015, // 00C6 LDCONST R8 K21 + 0x8824010E, // 00C7 GETMBR R9 R0 K14 + 0x88280123, // 00C8 GETMBR R10 R0 K35 + 0x5C2C0800, // 00C9 MOVE R11 R4 + 0x7C140C00, // 00CA CALL R5 6 + 0x58100022, // 00CB LDCONST R4 K34 + 0xB8162E00, // 00CC GETNGBL R5 K23 + 0x8C140B18, // 00CD GETMET R5 R5 K24 + 0x001E3A04, // 00CE ADD R7 K29 R4 + 0x5820001E, // 00CF LDCONST R8 K30 + 0x7C140600, // 00D0 CALL R5 3 + 0x8C14031F, // 00D1 GETMET R5 R1 K31 + 0x581C0014, // 00D2 LDCONST R7 K20 + 0x58200015, // 00D3 LDCONST R8 K21 + 0x8824010E, // 00D4 GETMBR R9 R0 K14 + 0x88280123, // 00D5 GETMBR R10 R0 K35 + 0x5C2C0800, // 00D6 MOVE R11 R4 + 0x7C140C00, // 00D7 CALL R5 6 + 0xA8040001, // 00D8 EXBLK 1 1 + 0x70020010, // 00D9 JMP #00EB + 0xAC100002, // 00DA CATCH R4 0 2 + 0x7002000D, // 00DB JMP #00EA + 0xB81A2E00, // 00DC GETNGBL R6 K23 + 0x8C180D18, // 00DD GETMET R6 R6 K24 + 0x60200008, // 00DE GETGBL R8 G8 + 0x5C240800, // 00DF MOVE R9 R4 + 0x7C200200, // 00E0 CALL R8 1 + 0x00224E08, // 00E1 ADD R8 K39 R8 + 0x00201128, // 00E2 ADD R8 R8 K40 + 0x60240008, // 00E3 GETGBL R9 G8 + 0x5C280A00, // 00E4 MOVE R10 R5 + 0x7C240200, // 00E5 CALL R9 1 + 0x00201009, // 00E6 ADD R8 R8 R9 + 0x5824001B, // 00E7 LDCONST R9 K27 + 0x7C180600, // 00E8 CALL R6 3 + 0x70020000, // 00E9 JMP #00EB + 0xB0080000, // 00EA RAISE 2 R0 R0 + 0x80000000, // 00EB RET 0 }) ) ); @@ -5991,18 +6177,11 @@ be_local_closure(Matter_Device_process_attribute_expansion, /* name */ be_local_class(Matter_Device, 37, NULL, - be_nested_map(113, + be_nested_map(114, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(register_native_classes, -1), be_const_closure(Matter_Device_register_native_classes_closure) }, - { be_const_key_weak(mdns_pase_eth, -1), be_const_var(25) }, - { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) }, - { be_const_key_weak(root_L, -1), be_const_var(36) }, - { be_const_key_weak(start_operational_discovery_deferred, 79), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) }, - { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) }, - { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) }, - { be_const_key_weak(FILENAME, 42), be_nested_str_weak(_matter_device_X2Ejson) }, - { be_const_key_weak(autoconf_device, 56), be_const_closure(Matter_Device_autoconf_device_closure) }, - { be_const_key_weak(PASSCODE_INVALID, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) }, + { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) }, + { be_const_key_weak(PASSCODE_INVALID, 23), 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), @@ -6018,109 +6197,117 @@ be_local_class(Matter_Device, be_const_int(12345678), be_const_int(87654321), })) ) } )) }, - { be_const_key_weak(commissioning_open, 25), be_const_var(12) }, - { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) }, + { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) }, + { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) }, + { be_const_key_weak(_init_basic_commissioning, 4), be_const_closure(Matter_Device__init_basic_commissioning_closure) }, + { be_const_key_weak(compute_manual_pairing_code, -1), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) }, + { be_const_key_weak(ui, -1), be_const_var(10) }, + { be_const_key_weak(vendorid, 50), be_const_var(23) }, + { be_const_key_weak(root_L, 87), be_const_var(36) }, + { be_const_key_weak(sessions, -1), be_const_var(9) }, + { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) }, + { be_const_key_weak(bridge_add_endpoint, -1), be_const_closure(Matter_Device_bridge_add_endpoint_closure) }, + { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) }, + { be_const_key_weak(start_mdns_announce_hostnames, 36), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) }, + { be_const_key_weak(disable_bridge_mode, 17), be_const_var(31) }, + { be_const_key_weak(get_plugin_class_displayname, 1), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) }, { be_const_key_weak(http_remotes, -1), be_const_var(27) }, - { be_const_key_weak(get_plugin_remote_info, 16), be_const_closure(Matter_Device_get_plugin_remote_info_closure) }, - { be_const_key_weak(every_second, 19), be_const_closure(Matter_Device_every_second_closure) }, - { be_const_key_weak(vendorid, 107), be_const_var(23) }, { be_const_key_weak(clean_remotes, -1), be_const_closure(Matter_Device_clean_remotes_closure) }, - { be_const_key_weak(start_mdns_announce_hostnames, 70), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) }, - { be_const_key_weak(hostname_eth, 32), be_const_var(22) }, - { be_const_key_weak(commissioning_w0, -1), be_const_var(16) }, - { be_const_key_weak(_compute_pbkdf, 83), be_const_closure(Matter_Device__compute_pbkdf_closure) }, - { be_const_key_weak(compute_qrcode_content, 61), be_const_closure(Matter_Device_compute_qrcode_content_closure) }, - { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) }, + { be_const_key_weak(get_plugin_remote_info, 49), be_const_closure(Matter_Device_get_plugin_remote_info_closure) }, + { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) }, + { be_const_key_weak(register_native_classes, 55), be_const_closure(Matter_Device_register_native_classes_closure) }, + { be_const_key_weak(_start_udp, 109), be_const_closure(Matter_Device__start_udp_closure) }, + { be_const_key_weak(get_plugin_class_arg, 33), be_const_closure(Matter_Device_get_plugin_class_arg_closure) }, + { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(18) }, + { be_const_key_weak(msg_send, -1), be_const_closure(Matter_Device_msg_send_closure) }, + { be_const_key_weak(commissioning_w0, 102), be_const_var(16) }, + { be_const_key_weak(mdns_pase_eth, -1), be_const_var(25) }, + { be_const_key_weak(process_attribute_read_solo, -1), be_const_closure(Matter_Device_process_attribute_read_solo_closure) }, + { be_const_key_weak(invoke_request, 108), be_const_closure(Matter_Device_invoke_request_closure) }, + { be_const_key_weak(adjust_next_ep, 104), be_const_closure(Matter_Device_adjust_next_ep_closure) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Device_attribute_updated_closure) }, + { be_const_key_weak(mdns_remove_PASE, 107), be_const_closure(Matter_Device_mdns_remove_PASE_closure) }, + { be_const_key_weak(_compute_pbkdf, 90), be_const_closure(Matter_Device__compute_pbkdf_closure) }, + { be_const_key_weak(ipv4only, 71), be_const_var(30) }, + { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) }, + { be_const_key_weak(k2l_num, -1), be_const_static_closure(Matter_Device_k2l_num_closure) }, { be_const_key_weak(autoconf_sensors_list, -1), be_const_closure(Matter_Device_autoconf_sensors_list_closure) }, - { be_const_key_weak(root_salt, -1), be_const_var(34) }, - { be_const_key_weak(plugins_config, 49), be_const_var(4) }, - { be_const_key_weak(hostname_wifi, -1), be_const_var(21) }, - { be_const_key_weak(MtrUpdate, -1), be_const_closure(Matter_Device_MtrUpdate_closure) }, - { be_const_key_weak(conf_to_log, -1), be_const_static_closure(Matter_Device_conf_to_log_closure) }, + { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) }, + { be_const_key_weak(bridge_remove_endpoint, 14), be_const_closure(Matter_Device_bridge_remove_endpoint_closure) }, + { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) }, { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) }, - { be_const_key_weak(bridge_remove_endpoint, 94), be_const_closure(Matter_Device_bridge_remove_endpoint_closure) }, - { be_const_key_weak(find_plugin_by_endpoint, -1), be_const_closure(Matter_Device_find_plugin_by_endpoint_closure) }, - { be_const_key_weak(root_discriminator, -1), be_const_var(28) }, - { be_const_key_weak(ui, 104), be_const_var(10) }, - { be_const_key_weak(bridge_add_endpoint, 47), be_const_closure(Matter_Device_bridge_add_endpoint_closure) }, - { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(20) }, + { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) }, + { be_const_key_weak(generate_random_passcode, -1), be_const_closure(Matter_Device_generate_random_passcode_closure) }, + { be_const_key_weak(started, 65), be_const_var(0) }, + { be_const_key_weak(signal_endpoints_changed, -1), be_const_closure(Matter_Device_signal_endpoints_changed_closure) }, + { be_const_key_weak(MtrJoin, 48), be_const_closure(Matter_Device_MtrJoin_closure) }, { be_const_key_weak(productid, -1), be_const_var(24) }, - { be_const_key_weak(signal_endpoints_changed, 88), be_const_closure(Matter_Device_signal_endpoints_changed_closure) }, - { be_const_key_weak(remove_fabric, 18), be_const_closure(Matter_Device_remove_fabric_closure) }, - { be_const_key_weak(init, 27), be_const_closure(Matter_Device_init_closure) }, - { be_const_key_weak(process_attribute_read_solo, 96), be_const_closure(Matter_Device_process_attribute_read_solo_closure) }, - { be_const_key_weak(commissioning_L, 85), be_const_var(17) }, - { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(18) }, + { be_const_key_weak(find_plugin_by_endpoint, -1), be_const_closure(Matter_Device_find_plugin_by_endpoint_closure) }, + { be_const_key_weak(PBKDF_ITERATIONS, 3), be_const_int(1000) }, + { be_const_key_weak(hostname_eth, 97), be_const_var(22) }, + { be_const_key_weak(init, 37), be_const_closure(Matter_Device_init_closure) }, + { be_const_key_weak(register_http_remote, 40), be_const_closure(Matter_Device_register_http_remote_closure) }, + { be_const_key_weak(commissioning_salt, 98), be_const_var(15) }, + { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(26) }, + { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) }, + { be_const_key_weak(hostname_wifi, 93), be_const_var(21) }, + { be_const_key_weak(compute_qrcode_content, 45), be_const_closure(Matter_Device_compute_qrcode_content_closure) }, + { be_const_key_weak(plugins_config, -1), be_const_var(4) }, + { be_const_key_weak(start_root_basic_commissioning, -1), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) }, + { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) }, + { be_const_key_weak(register_commands, 54), be_const_closure(Matter_Device_register_commands_closure) }, + { be_const_key_weak(root_salt, -1), be_const_var(34) }, + { be_const_key_weak(commissioning_iterations, 2), be_const_var(13) }, + { be_const_key_weak(find_plugin_by_friendly_name, -1), be_const_closure(Matter_Device_find_plugin_by_friendly_name_closure) }, + { be_const_key_weak(plugins_persist, -1), be_const_var(2) }, + { be_const_key_weak(udp_server, -1), be_const_var(6) }, + { be_const_key_weak(next_ep, -1), be_const_var(32) }, + { be_const_key_weak(start_operational_discovery_deferred, 72), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) }, + { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, + { be_const_key_weak(mdns_announce_op_discovery, 30), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) }, { be_const_key_weak(message_handler, -1), be_const_var(8) }, + { be_const_key_weak(process_attribute_expansion, 43), be_const_closure(Matter_Device_process_attribute_expansion_closure) }, + { be_const_key_weak(is_commissioning_open, 62), be_const_closure(Matter_Device_is_commissioning_open_closure) }, + { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) }, + { be_const_key_weak(plugins_classes, 44), be_const_var(3) }, + { be_const_key_weak(start_operational_discovery, 68), be_const_closure(Matter_Device_start_operational_discovery_closure) }, + { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, 9), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) }, { be_const_key_weak(commissioning_discriminator, -1), be_const_var(14) }, - { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) }, - { be_const_key_weak(attribute_updated, 65), be_const_closure(Matter_Device_attribute_updated_closure) }, - { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, - { be_const_key_weak(plugins_classes, -1), be_const_var(3) }, - { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(Matter_Device__trigger_read_sensors_closure) }, - { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) }, - { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) }, - { be_const_key_weak(_instantiate_plugins_from_config, 99), be_const_closure(Matter_Device__instantiate_plugins_from_config_closure) }, - { be_const_key_weak(mdns_remove_PASE, 43), be_const_closure(Matter_Device_mdns_remove_PASE_closure) }, - { be_const_key_weak(started, 44), be_const_var(0) }, - { be_const_key_weak(start_operational_discovery, -1), be_const_closure(Matter_Device_start_operational_discovery_closure) }, - { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) }, - { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) }, + { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) }, + { be_const_key_weak(root_iterations, 112), be_const_var(33) }, + { be_const_key_weak(commissioning_open, -1), be_const_var(12) }, + { be_const_key_weak(_trigger_read_sensors, 82), be_const_closure(Matter_Device__trigger_read_sensors_closure) }, + { be_const_key_weak(commissioning_instance_wifi, 81), be_const_var(19) }, + { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) }, { be_const_key_weak(tick, -1), be_const_var(11) }, - { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) }, - { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) }, - { be_const_key_weak(plugins_config_remotes, -1), be_const_var(5) }, - { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) }, - { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) }, - { be_const_key_weak(get_active_endpoints, 80), be_const_closure(Matter_Device_get_active_endpoints_closure) }, - { be_const_key_weak(commissioning_iterations, 39), be_const_var(13) }, - { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) }, + { be_const_key_weak(MtrInfo, -1), be_const_closure(Matter_Device_MtrInfo_closure) }, + { be_const_key_weak(root_discriminator, 67), be_const_var(28) }, + { be_const_key_weak(start_commissioning_complete, 7), be_const_closure(Matter_Device_start_commissioning_complete_closure) }, + { be_const_key_weak(register_plugin_class, 95), be_const_closure(Matter_Device_register_plugin_class_closure) }, + { be_const_key_weak(MtrUpdate, -1), be_const_closure(Matter_Device_MtrUpdate_closure) }, + { be_const_key_weak(sort_distinct, -1), be_const_static_closure(Matter_Device_sort_distinct_closure) }, + { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(20) }, + { be_const_key_weak(conf_to_log, -1), be_const_static_closure(Matter_Device_conf_to_log_closure) }, + { be_const_key_weak(MtrInfo_one, -1), be_const_closure(Matter_Device_MtrInfo_one_closure) }, + { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) }, + { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) }, + { be_const_key_weak(update_remotes_info, -1), be_const_closure(Matter_Device_update_remotes_info_closure) }, + { be_const_key_weak(plugins, -1), be_const_var(1) }, + { be_const_key_weak(profiler, -1), be_const_var(7) }, + { be_const_key_weak(_instantiate_plugins_from_config, -1), be_const_closure(Matter_Device__instantiate_plugins_from_config_closure) }, + { be_const_key_weak(every_50ms, 22), be_const_closure(Matter_Device_every_50ms_closure) }, + { be_const_key_weak(commissioning_L, -1), be_const_var(17) }, { be_const_key_weak(PASE_TIMEOUT, -1), be_const_int(600) }, - { be_const_key_weak(plugins_persist, -1), be_const_var(2) }, - { be_const_key_weak(save_before_restart, 91), be_const_closure(Matter_Device_save_before_restart_closure) }, - { be_const_key_weak(k2l, 109), be_const_static_closure(Matter_Device_k2l_closure) }, - { be_const_key_weak(disable_bridge_mode, -1), be_const_var(31) }, - { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) }, - { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(26) }, - { be_const_key_weak(every_50ms, 63), be_const_closure(Matter_Device_every_50ms_closure) }, - { be_const_key_weak(PRODUCT_ID, 89), be_const_int(32768) }, - { be_const_key_weak(find_plugin_by_name_or_ep, 11), be_const_closure(Matter_Device_find_plugin_by_name_or_ep_closure) }, - { be_const_key_weak(find_plugin_by_friendly_name, 82), be_const_closure(Matter_Device_find_plugin_by_friendly_name_closure) }, - { be_const_key_weak(get_plugin_class_arg, -1), be_const_closure(Matter_Device_get_plugin_class_arg_closure) }, - { be_const_key_weak(register_plugin_class, -1), be_const_closure(Matter_Device_register_plugin_class_closure) }, - { be_const_key_weak(ipv4only, 93), be_const_var(30) }, - { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) }, - { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) }, - { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) }, - { be_const_key_weak(every_250ms, 81), be_const_closure(Matter_Device_every_250ms_closure) }, - { be_const_key_weak(root_iterations, -1), be_const_var(33) }, - { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) }, - { be_const_key_weak(start_root_basic_commissioning, 77), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) }, - { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) }, - { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) }, - { be_const_key_weak(generate_random_passcode, 50), be_const_closure(Matter_Device_generate_random_passcode_closure) }, - { be_const_key_weak(compute_manual_pairing_code, -1), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) }, - { be_const_key_weak(next_ep, 57), be_const_var(32) }, - { be_const_key_weak(get_plugin_class_displayname, -1), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) }, { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) }, - { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) }, - { be_const_key_weak(k2l_num, 24), be_const_static_closure(Matter_Device_k2l_num_closure) }, - { be_const_key_weak(adjust_next_ep, -1), be_const_closure(Matter_Device_adjust_next_ep_closure) }, - { be_const_key_weak(profiler, -1), be_const_var(7) }, - { be_const_key_weak(msg_send, -1), be_const_closure(Matter_Device_msg_send_closure) }, - { be_const_key_weak(udp_server, -1), be_const_var(6) }, - { be_const_key_weak(commissioning_salt, 34), be_const_var(15) }, - { be_const_key_weak(root_w0, -1), be_const_var(35) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) }, - { be_const_key_weak(update_remotes_info, -1), be_const_closure(Matter_Device_update_remotes_info_closure) }, + { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) }, + { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) }, { be_const_key_weak(root_passcode, -1), be_const_var(29) }, - { be_const_key_weak(plugins, -1), be_const_var(1) }, - { be_const_key_weak(register_http_remote, -1), be_const_closure(Matter_Device_register_http_remote_closure) }, - { be_const_key_weak(register_commands, -1), be_const_closure(Matter_Device_register_commands_closure) }, - { be_const_key_weak(sort_distinct, 2), be_const_static_closure(Matter_Device_sort_distinct_closure) }, - { be_const_key_weak(commissioning_instance_wifi, 9), be_const_var(19) }, - { be_const_key_weak(sessions, 7), be_const_var(9) }, - { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) }, + { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) }, + { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) }, + { be_const_key_weak(plugins_config_remotes, -1), be_const_var(5) }, + { be_const_key_weak(root_w0, -1), be_const_var(35) }, })), be_str_weak(Matter_Device) ); 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 578d929dfab6..ce621266eabc 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,86 +7,41 @@ extern const bclass be_class_Matter_Plugin; /******************************************************************** -** Solidified function: parse_sensors +** Solidified function: ack_request ********************************************************************/ -be_local_closure(Matter_Plugin_parse_sensors, /* name */ +be_local_closure(Matter_Plugin_ack_request, /* name */ be_nested_proto( - 2, /* nstack */ + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(parse_sensors), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow_lazy -********************************************************************/ -be_local_closure(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 */ - NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(msg), /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(update_shadow), + /* K2 */ be_nested_str_weak(message_handler), + /* K3 */ be_nested_str_weak(im), + /* K4 */ be_nested_str_weak(send_ack_now), }), - 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: read_event -********************************************************************/ -be_local_closure(Matter_Plugin_read_event, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(read_event), + be_str_weak(ack_request), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + ( &(const binstruction[13]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x200C0403, // 0002 NE R3 R2 R3 + 0x780E0005, // 0003 JMPF R3 #000A + 0x880C0101, // 0004 GETMBR R3 R0 K1 + 0x880C0702, // 0005 GETMBR R3 R3 K2 + 0x880C0703, // 0006 GETMBR R3 R3 K3 + 0x8C0C0704, // 0007 GETMET R3 R3 K4 + 0x5C140400, // 0008 MOVE R5 R2 + 0x7C0C0400, // 0009 CALL R3 2 + 0x4C0C0000, // 000A LDNIL R3 + 0x90060003, // 000B SETMBR R1 K0 R3 + 0x80000000, // 000C RET 0 }) ) ); @@ -94,9 +49,9 @@ be_local_closure(Matter_Plugin_read_event, /* name */ /******************************************************************** -** Solidified function: invoke_request +** Solidified function: write_attribute ********************************************************************/ -be_local_closure(Matter_Plugin_invoke_request, /* name */ +be_local_closure(Matter_Plugin_write_attribute, /* name */ be_nested_proto( 5, /* nstack */ 4, /* argc */ @@ -107,7 +62,7 @@ be_local_closure(Matter_Plugin_invoke_request, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(invoke_request), + be_str_weak(write_attribute), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C100000, // 0000 LDNIL R4 @@ -119,49 +74,26 @@ be_local_closure(Matter_Plugin_invoke_request, /* name */ /******************************************************************** -** Solidified function: contains_attribute +** Solidified function: ********************************************************************/ -be_local_closure(Matter_Plugin_contains_attribute, /* name */ +be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 2, /* varg */ + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_const_int(0), - /* K3 */ be_const_int(1), - }), - be_str_weak(contains_attribute), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x20100604, // 0005 NE R4 R3 R4 - 0x7812000C, // 0006 JMPF R4 #0014 - 0x58100002, // 0007 LDCONST R4 K2 - 0x6014000C, // 0008 GETGBL R5 G12 - 0x5C180600, // 0009 MOVE R6 R3 - 0x7C140200, // 000A CALL R5 1 - 0x14140805, // 000B LT R5 R4 R5 - 0x78160006, // 000C JMPF R5 #0014 - 0x94140604, // 000D GETIDX R5 R3 R4 - 0x1C140A02, // 000E EQ R5 R5 R2 - 0x78160001, // 000F JMPF R5 #0012 - 0x50140200, // 0010 LDBOOL R5 1 0 - 0x80040A00, // 0011 RET 1 R5 - 0x00100903, // 0012 ADD R4 R4 K3 - 0x7001FFF3, // 0013 JMP #0008 - 0x50100000, // 0014 LDBOOL R4 0 0 - 0x80040800, // 0015 RET 1 R4 + ( &(const binstruction[ 4]) { /* code */ + 0x60040008, // 0000 GETGBL R1 G8 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 }) ) ); @@ -169,12 +101,12 @@ be_local_closure(Matter_Plugin_contains_attribute, /* name */ /******************************************************************** -** Solidified function: write_attribute +** Solidified function: parse_sensors ********************************************************************/ -be_local_closure(Matter_Plugin_write_attribute, /* name */ +be_local_closure(Matter_Plugin_parse_sensors, /* name */ be_nested_proto( - 5, /* nstack */ - 4, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -182,11 +114,10 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(write_attribute), + be_str_weak(parse_sensors), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -194,24 +125,26 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */ /******************************************************************** -** Solidified function: subscribe_attribute +** Solidified function: consolidate_update_commands ********************************************************************/ -be_local_closure(Matter_Plugin_subscribe_attribute, /* name */ +be_local_closure(Matter_Plugin_consolidate_update_commands, /* name */ be_nested_proto( - 6, /* nstack */ - 5, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(subscribe_attribute), + 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 */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -298,30 +231,24 @@ be_local_closure(Matter_Plugin_publish_command, /* name */ /******************************************************************** -** Solidified function: contains_cluster +** Solidified function: subscribe_attribute ********************************************************************/ -be_local_closure(Matter_Plugin_contains_cluster, /* name */ +be_local_closure(Matter_Plugin_subscribe_attribute, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 6, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), - }), - be_str_weak(contains_cluster), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(subscribe_attribute), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* 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 + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -329,51 +256,167 @@ be_local_closure(Matter_Plugin_contains_cluster, /* name */ /******************************************************************** -** Solidified function: ack_request +** Solidified function: read_attribute ********************************************************************/ -be_local_closure(Matter_Plugin_ack_request, /* name */ +be_local_closure(Matter_Plugin_read_attribute, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 17, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(msg), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(message_handler), - /* K3 */ be_nested_str_weak(im), - /* K4 */ be_nested_str_weak(send_ack_now), + ( &(const bvalue[20]) { /* 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(Matter_TLV_array), + /* K6 */ be_nested_str_weak(TYPES), + /* K7 */ be_nested_str_weak(keys), + /* K8 */ be_nested_str_weak(add_struct), + /* K9 */ be_nested_str_weak(add_TLV), + /* K10 */ be_nested_str_weak(U2), + /* K11 */ be_const_int(1), + /* K12 */ be_nested_str_weak(stop_iteration), + /* K13 */ be_nested_str_weak(get_cluster_list), + /* K14 */ be_nested_str_weak(U4), + /* K15 */ be_const_int(2), + /* K16 */ be_const_int(3), + /* K17 */ be_nested_str_weak(set), + /* K18 */ be_nested_str_weak(BOOL), + /* K19 */ be_nested_str_weak(read_attribute), }), - be_str_weak(ack_request), + be_str_weak(read_attribute), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x88080300, // 0000 GETMBR R2 R1 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x200C0403, // 0002 NE R3 R2 R3 - 0x780E0005, // 0003 JMPF R3 #000A - 0x880C0101, // 0004 GETMBR R3 R0 K1 - 0x880C0702, // 0005 GETMBR R3 R3 K2 - 0x880C0703, // 0006 GETMBR R3 R3 K3 - 0x8C0C0704, // 0007 GETMET R3 R3 K4 - 0x5C140400, // 0008 MOVE R5 R2 - 0x7C0C0400, // 0009 CALL R3 2 - 0x4C0C0000, // 000A LDNIL R3 - 0x90060003, // 000B SETMBR R1 K0 R3 - 0x80000000, // 000C RET 0 - }) - ) + ( &(const binstruction[114]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x541E001C, // 0004 LDINT R7 29 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0051, // 0006 JMPF R7 #0059 + 0x1C1C0D04, // 0007 EQ R7 R6 K4 + 0x781E001B, // 0008 JMPF R7 #0025 + 0x8C1C0905, // 0009 GETMET R7 R4 K5 + 0x7C1C0200, // 000A CALL R7 1 + 0x88200106, // 000B GETMBR R8 R0 K6 + 0x60240010, // 000C GETGBL R9 G16 + 0x8C281107, // 000D GETMET R10 R8 K7 + 0x7C280200, // 000E CALL R10 1 + 0x7C240200, // 000F CALL R9 1 + 0xA802000E, // 0010 EXBLK 0 #0020 + 0x5C281200, // 0011 MOVE R10 R9 + 0x7C280000, // 0012 CALL R10 0 + 0x8C2C0F08, // 0013 GETMET R11 R7 K8 + 0x7C2C0200, // 0014 CALL R11 1 + 0x8C301709, // 0015 GETMET R12 R11 K9 + 0x58380004, // 0016 LDCONST R14 K4 + 0x883C090A, // 0017 GETMBR R15 R4 K10 + 0x5C401400, // 0018 MOVE R16 R10 + 0x7C300800, // 0019 CALL R12 4 + 0x8C301709, // 001A GETMET R12 R11 K9 + 0x5838000B, // 001B LDCONST R14 K11 + 0x883C090A, // 001C GETMBR R15 R4 K10 + 0x9440100A, // 001D GETIDX R16 R8 R10 + 0x7C300800, // 001E CALL R12 4 + 0x7001FFF0, // 001F JMP #0011 + 0x5824000C, // 0020 LDCONST R9 K12 + 0xAC240200, // 0021 CATCH R9 1 0 + 0xB0080000, // 0022 RAISE 2 R0 R0 + 0x80040E00, // 0023 RET 1 R7 + 0x70020032, // 0024 JMP #0058 + 0x1C1C0D0B, // 0025 EQ R7 R6 K11 + 0x781E0013, // 0026 JMPF R7 #003B + 0x8C1C0905, // 0027 GETMET R7 R4 K5 + 0x7C1C0200, // 0028 CALL R7 1 + 0x60200010, // 0029 GETGBL R8 G16 + 0x8C24010D, // 002A GETMET R9 R0 K13 + 0x7C240200, // 002B CALL R9 1 + 0x7C200200, // 002C CALL R8 1 + 0xA8020007, // 002D EXBLK 0 #0036 + 0x5C241000, // 002E MOVE R9 R8 + 0x7C240000, // 002F CALL R9 0 + 0x8C280F09, // 0030 GETMET R10 R7 K9 + 0x4C300000, // 0031 LDNIL R12 + 0x8834090E, // 0032 GETMBR R13 R4 K14 + 0x5C381200, // 0033 MOVE R14 R9 + 0x7C280800, // 0034 CALL R10 4 + 0x7001FFF7, // 0035 JMP #002E + 0x5820000C, // 0036 LDCONST R8 K12 + 0xAC200200, // 0037 CATCH R8 1 0 + 0xB0080000, // 0038 RAISE 2 R0 R0 + 0x80040E00, // 0039 RET 1 R7 + 0x7002001C, // 003A JMP #0058 + 0x1C1C0D0F, // 003B EQ R7 R6 K15 + 0x781E0003, // 003C JMPF R7 #0041 + 0x8C1C0905, // 003D GETMET R7 R4 K5 + 0x7C1C0200, // 003E CALL R7 1 + 0x80040E00, // 003F RET 1 R7 + 0x70020016, // 0040 JMP #0058 + 0x1C1C0D10, // 0041 EQ R7 R6 K16 + 0x781E0003, // 0042 JMPF R7 #0047 + 0x8C1C0905, // 0043 GETMET R7 R4 K5 + 0x7C1C0200, // 0044 CALL R7 1 + 0x80040E00, // 0045 RET 1 R7 + 0x70020010, // 0046 JMP #0058 + 0x541EFFFB, // 0047 LDINT R7 65532 + 0x1C1C0C07, // 0048 EQ R7 R6 R7 + 0x781E0005, // 0049 JMPF R7 #0050 + 0x8C1C0711, // 004A GETMET R7 R3 K17 + 0x8824090E, // 004B GETMBR R9 R4 K14 + 0x58280004, // 004C LDCONST R10 K4 + 0x7C1C0600, // 004D CALL R7 3 + 0x80040E00, // 004E RET 1 R7 + 0x70020007, // 004F JMP #0058 + 0x541EFFFC, // 0050 LDINT R7 65533 + 0x1C1C0C07, // 0051 EQ R7 R6 R7 + 0x781E0004, // 0052 JMPF R7 #0058 + 0x8C1C0711, // 0053 GETMET R7 R3 K17 + 0x8824090E, // 0054 GETMBR R9 R4 K14 + 0x5828000B, // 0055 LDCONST R10 K11 + 0x7C1C0600, // 0056 CALL R7 3 + 0x80040E00, // 0057 RET 1 R7 + 0x70020017, // 0058 JMP #0071 + 0x541E0038, // 0059 LDINT R7 57 + 0x1C1C0A07, // 005A EQ R7 R5 R7 + 0x781E0012, // 005B JMPF R7 #006F + 0x541E0010, // 005C LDINT R7 17 + 0x1C1C0C07, // 005D EQ R7 R6 R7 + 0x781E0005, // 005E JMPF R7 #0065 + 0x8C1C0711, // 005F GETMET R7 R3 K17 + 0x88240912, // 0060 GETMBR R9 R4 K18 + 0x5828000B, // 0061 LDCONST R10 K11 + 0x7C1C0600, // 0062 CALL R7 3 + 0x80040E00, // 0063 RET 1 R7 + 0x70020008, // 0064 JMP #006E + 0x601C0003, // 0065 GETGBL R7 G3 + 0x5C200000, // 0066 MOVE R8 R0 + 0x7C1C0200, // 0067 CALL R7 1 + 0x8C1C0F13, // 0068 GETMET R7 R7 K19 + 0x5C240200, // 0069 MOVE R9 R1 + 0x5C280400, // 006A MOVE R10 R2 + 0x5C2C0600, // 006B MOVE R11 R3 + 0x7C1C0800, // 006C CALL R7 4 + 0x80040E00, // 006D RET 1 R7 + 0x70020001, // 006E JMP #0071 + 0x4C1C0000, // 006F LDNIL R7 + 0x80040E00, // 0070 RET 1 R7 + 0x80000000, // 0071 RET 0 + }) + ) ); /*******************************************************************/ /******************************************************************** -** Solidified function: get_name +** Solidified function: consolidate_clusters ********************************************************************/ -be_local_closure(Matter_Plugin_get_name, /* name */ +be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -384,9 +427,9 @@ be_local_closure(Matter_Plugin_get_name, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(node_label), + /* K0 */ be_nested_str_weak(CLUSTERS), }), - be_str_weak(get_name), + be_str_weak(consolidate_clusters), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -398,36 +441,12 @@ be_local_closure(Matter_Plugin_get_name, /* name */ /******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -be_local_closure(Matter_Plugin_parse_configuration, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 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_event +** Solidified function: timed_request ********************************************************************/ -be_local_closure(Matter_Plugin_subscribe_event, /* name */ +be_local_closure(Matter_Plugin_timed_request, /* name */ be_nested_proto( - 6, /* nstack */ - 5, /* argc */ + 5, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -435,11 +454,11 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */ NULL, /* no sub protos */ 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 }) ) ); @@ -482,47 +501,12 @@ be_local_closure(Matter_Plugin_set_name, /* name */ /******************************************************************** -** Solidified function: attribute_updated -********************************************************************/ -be_local_closure(Matter_Plugin_attribute_updated, /* name */ - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: timed_request +** Solidified function: is_local_device ********************************************************************/ -be_local_closure(Matter_Plugin_timed_request, /* name */ +be_local_closure(Matter_Plugin_is_local_device, /* name */ be_nested_proto( - 5, /* nstack */ - 4, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -530,11 +514,11 @@ be_local_closure(Matter_Plugin_timed_request, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(timed_request), + be_str_weak(is_local_device), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + 0x50040200, // 0000 LDBOOL R1 1 0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -542,26 +526,26 @@ be_local_closure(Matter_Plugin_timed_request, /* name */ /******************************************************************** -** Solidified function: +** Solidified function: get_name ********************************************************************/ -be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ +be_local_closure(Matter_Plugin_get_name, /* name */ be_nested_proto( - 3, /* nstack */ + 2, /* nstack */ 1, /* argc */ - 0, /* varg */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), + 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[ 4]) { /* code */ - 0x60040008, // 0000 GETGBL R1 G8 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -569,62 +553,19 @@ be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ /******************************************************************** -** Solidified function: has +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Plugin_has, /* name */ +be_local_closure(Matter_Plugin_init, /* name */ be_nested_proto( - 6, /* nstack */ - 3, /* argc */ + 8, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 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: init -********************************************************************/ -be_local_closure(Matter_Plugin_init, /* name */ - be_nested_proto( - 8, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ + ( &(const bvalue[10]) { /* constants */ /* K0 */ be_nested_str_weak(device), /* K1 */ be_nested_str_weak(endpoint), /* K2 */ be_nested_str_weak(clusters), @@ -634,10 +575,11 @@ be_local_closure(Matter_Plugin_init, /* name */ /* K6 */ be_nested_str_weak(find), /* K7 */ be_nested_str_weak(name), /* K8 */ be_nested_str_weak(), + /* K9 */ be_nested_str_weak(virtual), }), be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ + ( &(const binstruction[16]) { /* code */ 0x90020001, // 0000 SETMBR R0 K0 R1 0x90020202, // 0001 SETMBR R0 K1 R2 0x8C100103, // 0002 GETMET R4 R0 K3 @@ -651,7 +593,9 @@ be_local_closure(Matter_Plugin_init, /* name */ 0x581C0008, // 000A LDCONST R7 K8 0x7C100600, // 000B CALL R4 3 0x90020A04, // 000C SETMBR R0 K5 R4 - 0x80000000, // 000D RET 0 + 0x50100000, // 000D LDBOOL R4 0 0 + 0x90021204, // 000E SETMBR R0 K9 R4 + 0x80000000, // 000F RET 0 }) ) ); @@ -659,11 +603,11 @@ be_local_closure(Matter_Plugin_init, /* name */ /******************************************************************** -** Solidified function: get_cluster_list +** Solidified function: update_shadow_lazy ********************************************************************/ -be_local_closure(Matter_Plugin_get_cluster_list, /* name */ +be_local_closure(Matter_Plugin_update_shadow_lazy, /* name */ be_nested_proto( - 7, /* nstack */ + 3, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -671,33 +615,25 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(push), - /* K3 */ be_nested_str_weak(stop_iteration), + ( &(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(get_cluster_list), + be_str_weak(update_shadow_lazy), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x60040012, // 0000 GETGBL R1 G18 - 0x7C040000, // 0001 CALL R1 0 - 0x60080010, // 0002 GETGBL R2 G16 - 0x880C0100, // 0003 GETMBR R3 R0 K0 - 0x8C0C0701, // 0004 GETMET R3 R3 K1 - 0x7C0C0200, // 0005 CALL R3 1 - 0x7C080200, // 0006 CALL R2 1 - 0xA8020005, // 0007 EXBLK 0 #000E - 0x5C0C0400, // 0008 MOVE R3 R2 - 0x7C0C0000, // 0009 CALL R3 0 - 0x8C100302, // 000A GETMET R4 R1 K2 - 0x5C180600, // 000B MOVE R6 R3 - 0x7C100400, // 000C CALL R4 2 - 0x7001FFF9, // 000D JMP #0008 - 0x58080003, // 000E LDCONST R2 K3 - 0xAC080200, // 000F CATCH R2 1 0 - 0xB0080000, // 0010 RAISE 2 R0 R0 - 0x80040200, // 0011 RET 1 R1 + ( &(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 }) ) ); @@ -705,39 +641,61 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */ /******************************************************************** -** Solidified function: ui_conf_to_string +** Solidified function: invoke_request ********************************************************************/ -be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */ +be_local_closure(Matter_Plugin_invoke_request, /* name */ be_nested_proto( - 9, /* nstack */ - 2, /* argc */ + 5, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 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: ui_string_to_conf +********************************************************************/ +be_local_closure(Matter_Plugin_ui_string_to_conf, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ 4, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 3]) { /* constants */ /* K0 */ be_const_class(be_class_Matter_Plugin), /* K1 */ be_nested_str_weak(ARG), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(ARG_TYPE), }), - be_str_weak(ui_conf_to_string), + be_str_weak(ui_string_to_conf), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x780E0006, // 0002 JMPF R3 #000A - 0x60100008, // 0003 GETGBL R4 G8 - 0x8C140302, // 0004 GETMET R5 R1 K2 - 0x5C1C0600, // 0005 MOVE R7 R3 - 0x58200003, // 0006 LDCONST R8 K3 - 0x7C140600, // 0007 CALL R5 3 - 0x7C100200, // 0008 CALL R4 1 - 0x70020000, // 0009 JMP #000B - 0x58100003, // 000A LDCONST R4 K3 - 0x80040800, // 000B RET 1 R4 + ( &(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 }) ) ); @@ -745,11 +703,44 @@ be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */ /******************************************************************** -** Solidified function: get_endpoint +** Solidified function: get_attribute_list ********************************************************************/ -be_local_closure(Matter_Plugin_get_endpoint, /* name */ +be_local_closure(Matter_Plugin_get_attribute_list, /* name */ be_nested_proto( - 2, /* nstack */ + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(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: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_append_state_json, /* name */ + be_nested_proto( + 1, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -758,13 +749,37 @@ be_local_closure(Matter_Plugin_get_endpoint, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(endpoint), + /* K0 */ be_nested_str_weak(), }), - be_str_weak(get_endpoint), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80060000, // 0000 RET 1 K0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_event +********************************************************************/ +be_local_closure(Matter_Plugin_read_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(read_event), &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 }) ) ); @@ -772,157 +787,287 @@ be_local_closure(Matter_Plugin_get_endpoint, /* name */ /******************************************************************** -** Solidified function: read_attribute +** Solidified function: parse_configuration ********************************************************************/ -be_local_closure(Matter_Plugin_read_attribute, /* name */ +be_local_closure(Matter_Plugin_parse_configuration, /* name */ be_nested_proto( - 17, /* nstack */ - 4, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[20]) { /* 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(Matter_TLV_array), - /* K6 */ be_nested_str_weak(TYPES), - /* K7 */ be_nested_str_weak(keys), - /* K8 */ be_nested_str_weak(add_struct), - /* K9 */ be_nested_str_weak(add_TLV), - /* K10 */ be_nested_str_weak(U2), - /* K11 */ be_const_int(1), - /* K12 */ be_nested_str_weak(stop_iteration), - /* K13 */ be_nested_str_weak(get_cluster_list), - /* K14 */ be_nested_str_weak(U4), - /* K15 */ be_const_int(2), - /* K16 */ be_const_int(3), - /* K17 */ be_nested_str_weak(set), - /* K18 */ be_nested_str_weak(BOOL), - /* K19 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(parse_configuration), &be_const_str_solidified, - ( &(const binstruction[114]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E001C, // 0004 LDINT R7 29 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0051, // 0006 JMPF R7 #0059 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E001B, // 0008 JMPF R7 #0025 - 0x8C1C0905, // 0009 GETMET R7 R4 K5 - 0x7C1C0200, // 000A CALL R7 1 - 0x88200106, // 000B GETMBR R8 R0 K6 - 0x60240010, // 000C GETGBL R9 G16 - 0x8C281107, // 000D GETMET R10 R8 K7 - 0x7C280200, // 000E CALL R10 1 - 0x7C240200, // 000F CALL R9 1 - 0xA802000E, // 0010 EXBLK 0 #0020 - 0x5C281200, // 0011 MOVE R10 R9 - 0x7C280000, // 0012 CALL R10 0 - 0x8C2C0F08, // 0013 GETMET R11 R7 K8 - 0x7C2C0200, // 0014 CALL R11 1 - 0x8C301709, // 0015 GETMET R12 R11 K9 - 0x58380004, // 0016 LDCONST R14 K4 - 0x883C090A, // 0017 GETMBR R15 R4 K10 - 0x5C401400, // 0018 MOVE R16 R10 - 0x7C300800, // 0019 CALL R12 4 - 0x8C301709, // 001A GETMET R12 R11 K9 - 0x5838000B, // 001B LDCONST R14 K11 - 0x883C090A, // 001C GETMBR R15 R4 K10 - 0x9440100A, // 001D GETIDX R16 R8 R10 - 0x7C300800, // 001E CALL R12 4 - 0x7001FFF0, // 001F JMP #0011 - 0x5824000C, // 0020 LDCONST R9 K12 - 0xAC240200, // 0021 CATCH R9 1 0 - 0xB0080000, // 0022 RAISE 2 R0 R0 - 0x80040E00, // 0023 RET 1 R7 - 0x70020032, // 0024 JMP #0058 - 0x1C1C0D0B, // 0025 EQ R7 R6 K11 - 0x781E0013, // 0026 JMPF R7 #003B - 0x8C1C0905, // 0027 GETMET R7 R4 K5 - 0x7C1C0200, // 0028 CALL R7 1 - 0x60200010, // 0029 GETGBL R8 G16 - 0x8C24010D, // 002A GETMET R9 R0 K13 - 0x7C240200, // 002B CALL R9 1 - 0x7C200200, // 002C CALL R8 1 - 0xA8020007, // 002D EXBLK 0 #0036 - 0x5C241000, // 002E MOVE R9 R8 - 0x7C240000, // 002F CALL R9 0 - 0x8C280F09, // 0030 GETMET R10 R7 K9 - 0x4C300000, // 0031 LDNIL R12 - 0x8834090E, // 0032 GETMBR R13 R4 K14 - 0x5C381200, // 0033 MOVE R14 R9 - 0x7C280800, // 0034 CALL R10 4 - 0x7001FFF7, // 0035 JMP #002E - 0x5820000C, // 0036 LDCONST R8 K12 - 0xAC200200, // 0037 CATCH R8 1 0 - 0xB0080000, // 0038 RAISE 2 R0 R0 - 0x80040E00, // 0039 RET 1 R7 - 0x7002001C, // 003A JMP #0058 - 0x1C1C0D0F, // 003B EQ R7 R6 K15 - 0x781E0003, // 003C JMPF R7 #0041 - 0x8C1C0905, // 003D GETMET R7 R4 K5 - 0x7C1C0200, // 003E CALL R7 1 - 0x80040E00, // 003F RET 1 R7 - 0x70020016, // 0040 JMP #0058 - 0x1C1C0D10, // 0041 EQ R7 R6 K16 - 0x781E0003, // 0042 JMPF R7 #0047 - 0x8C1C0905, // 0043 GETMET R7 R4 K5 - 0x7C1C0200, // 0044 CALL R7 1 - 0x80040E00, // 0045 RET 1 R7 - 0x70020010, // 0046 JMP #0058 - 0x541EFFFB, // 0047 LDINT R7 65532 - 0x1C1C0C07, // 0048 EQ R7 R6 R7 - 0x781E0005, // 0049 JMPF R7 #0050 - 0x8C1C0711, // 004A GETMET R7 R3 K17 - 0x8824090E, // 004B GETMBR R9 R4 K14 - 0x58280004, // 004C LDCONST R10 K4 - 0x7C1C0600, // 004D CALL R7 3 - 0x80040E00, // 004E RET 1 R7 - 0x70020007, // 004F JMP #0058 - 0x541EFFFC, // 0050 LDINT R7 65533 - 0x1C1C0C07, // 0051 EQ R7 R6 R7 - 0x781E0004, // 0052 JMPF R7 #0058 - 0x8C1C0711, // 0053 GETMET R7 R3 K17 - 0x8824090E, // 0054 GETMBR R9 R4 K14 - 0x5828000B, // 0055 LDCONST R10 K11 - 0x7C1C0600, // 0056 CALL R7 3 - 0x80040E00, // 0057 RET 1 R7 - 0x70020017, // 0058 JMP #0071 - 0x541E0038, // 0059 LDINT R7 57 - 0x1C1C0A07, // 005A EQ R7 R5 R7 - 0x781E0012, // 005B JMPF R7 #006F - 0x541E0010, // 005C LDINT R7 17 - 0x1C1C0C07, // 005D EQ R7 R6 R7 - 0x781E0005, // 005E JMPF R7 #0065 - 0x8C1C0711, // 005F GETMET R7 R3 K17 - 0x88240912, // 0060 GETMBR R9 R4 K18 - 0x5828000B, // 0061 LDCONST R10 K11 - 0x7C1C0600, // 0062 CALL R7 3 - 0x80040E00, // 0063 RET 1 R7 - 0x70020008, // 0064 JMP #006E - 0x601C0003, // 0065 GETGBL R7 G3 - 0x5C200000, // 0066 MOVE R8 R0 - 0x7C1C0200, // 0067 CALL R7 1 - 0x8C1C0F13, // 0068 GETMET R7 R7 K19 - 0x5C240200, // 0069 MOVE R9 R1 - 0x5C280400, // 006A MOVE R10 R2 - 0x5C2C0600, // 006B MOVE R11 R3 - 0x7C1C0800, // 006C CALL R7 4 - 0x80040E00, // 006D RET 1 R7 - 0x70020001, // 006E JMP #0071 - 0x4C1C0000, // 006F LDNIL R7 - 0x80040E00, // 0070 RET 1 R7 - 0x80000000, // 0071 RET 0 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: state_json +********************************************************************/ +be_local_closure(Matter_Plugin_state_json, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 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: subscribe_event +********************************************************************/ +be_local_closure(Matter_Plugin_subscribe_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(subscribe_event), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_endpoint +********************************************************************/ +be_local_closure(Matter_Plugin_get_endpoint, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(endpoint), + }), + be_str_weak(get_endpoint), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: has +********************************************************************/ +be_local_closure(Matter_Plugin_has, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 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: every_250ms +********************************************************************/ +be_local_closure(Matter_Plugin_every_250ms, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 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: contains_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_contains_attribute, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_const_int(0), + /* K3 */ be_const_int(1), + }), + be_str_weak(contains_attribute), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x4C100000, // 0004 LDNIL R4 + 0x20100604, // 0005 NE R4 R3 R4 + 0x7812000C, // 0006 JMPF R4 #0014 + 0x58100002, // 0007 LDCONST R4 K2 + 0x6014000C, // 0008 GETGBL R5 G12 + 0x5C180600, // 0009 MOVE R6 R3 + 0x7C140200, // 000A CALL R5 1 + 0x14140805, // 000B LT R5 R4 R5 + 0x78160006, // 000C JMPF R5 #0014 + 0x94140604, // 000D GETIDX R5 R3 R4 + 0x1C140A02, // 000E EQ R5 R5 R2 + 0x78160001, // 000F JMPF R5 #0012 + 0x50140200, // 0010 LDBOOL R5 1 0 + 0x80040A00, // 0011 RET 1 R5 + 0x00100903, // 0012 ADD R4 R4 K3 + 0x7001FFF3, // 0013 JMP #0008 + 0x50100000, // 0014 LDBOOL R4 0 0 + 0x80040800, // 0015 RET 1 R4 }) ) ); @@ -960,32 +1105,34 @@ be_local_closure(Matter_Plugin_update_shadow, /* name */ /******************************************************************** -** Solidified function: get_attribute_list +** Solidified function: attribute_updated ********************************************************************/ -be_local_closure(Matter_Plugin_get_attribute_list, /* name */ +be_local_closure(Matter_Plugin_attribute_updated, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 10, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), + ( &(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(get_attribute_list), + be_str_weak(attribute_updated), &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 + ( &(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 }) ) ); @@ -993,61 +1140,39 @@ be_local_closure(Matter_Plugin_get_attribute_list, /* name */ /******************************************************************** -** Solidified function: every_250ms +** Solidified function: ui_conf_to_string ********************************************************************/ -be_local_closure(Matter_Plugin_every_250ms, /* name */ +be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ + 9, /* nstack */ + 2, /* argc */ + 4, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 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), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(), }), - be_str_weak(every_250ms), + be_str_weak(ui_conf_to_string), &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 + ( &(const binstruction[12]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x780E0006, // 0002 JMPF R3 #000A + 0x60100008, // 0003 GETGBL R4 G8 + 0x8C140302, // 0004 GETMET R5 R1 K2 + 0x5C1C0600, // 0005 MOVE R7 R3 + 0x58200003, // 0006 LDCONST R8 K3 + 0x7C140600, // 0007 CALL R5 3 + 0x7C100200, // 0008 CALL R4 1 + 0x70020000, // 0009 JMP #000B + 0x58100003, // 000A LDCONST R4 K3 + 0x80040800, // 000B RET 1 R4 }) ) ); @@ -1055,26 +1180,23 @@ be_local_closure(Matter_Plugin_every_250ms, /* name */ /******************************************************************** -** Solidified function: consolidate_clusters +** Solidified function: update_virtual ********************************************************************/ -be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ +be_local_closure(Matter_Plugin_update_virtual, /* name */ be_nested_proto( 2, /* nstack */ - 1, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(CLUSTERS), - }), - be_str_weak(consolidate_clusters), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(update_virtual), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -1082,24 +1204,45 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ /******************************************************************** -** Solidified function: is_local_device +** Solidified function: get_cluster_list ********************************************************************/ -be_local_closure(Matter_Plugin_is_local_device, /* name */ +be_local_closure(Matter_Plugin_get_cluster_list, /* name */ be_nested_proto( - 2, /* nstack */ + 7, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(is_local_device), + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(push), + /* K3 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(get_cluster_list), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x50040200, // 0000 LDBOOL R1 1 0 - 0x80040200, // 0001 RET 1 R1 + ( &(const binstruction[18]) { /* code */ + 0x60040012, // 0000 GETGBL R1 G18 + 0x7C040000, // 0001 CALL R1 0 + 0x60080010, // 0002 GETGBL R2 G16 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x8C0C0701, // 0004 GETMET R3 R3 K1 + 0x7C0C0200, // 0005 CALL R3 1 + 0x7C080200, // 0006 CALL R2 1 + 0xA8020005, // 0007 EXBLK 0 #000E + 0x5C0C0400, // 0008 MOVE R3 R2 + 0x7C0C0000, // 0009 CALL R3 0 + 0x8C100302, // 000A GETMET R4 R1 K2 + 0x5C180600, // 000B MOVE R6 R3 + 0x7C100400, // 000C CALL R4 2 + 0x7001FFF9, // 000D JMP #0008 + 0x58080003, // 000E LDCONST R2 K3 + 0xAC080200, // 000F CATCH R2 1 0 + 0xB0080000, // 0010 RAISE 2 R0 R0 + 0x80040200, // 0011 RET 1 R1 }) ) ); @@ -1107,36 +1250,30 @@ be_local_closure(Matter_Plugin_is_local_device, /* name */ /******************************************************************** -** Solidified function: ui_string_to_conf +** Solidified function: contains_cluster ********************************************************************/ -be_local_closure(Matter_Plugin_ui_string_to_conf, /* name */ +be_local_closure(Matter_Plugin_contains_cluster, /* name */ be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 4, /* varg */ + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 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[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(contains), }), - be_str_weak(ui_string_to_conf), + be_str_weak(contains_cluster), &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[ 5]) { /* 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 }) ) ); @@ -1147,28 +1284,26 @@ be_local_closure(Matter_Plugin_ui_string_to_conf, /* name */ ** Solidified class: Matter_Plugin ********************************************************************/ be_local_class(Matter_Plugin, - 6, + 7, NULL, - be_nested_map(41, + be_nested_map(47, ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(ack_request, -1), be_const_closure(Matter_Plugin_ack_request_closure) }, + { be_const_key_weak(consolidate_update_commands, -1), be_const_closure(Matter_Plugin_consolidate_update_commands_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, + { be_const_key_weak(clusters, 2), be_const_var(3) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), 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(set_name, 5), be_const_closure(Matter_Plugin_set_name_closure) }, + { be_const_key_weak(endpoint, -1), be_const_var(2) }, { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) }, - { be_const_key_weak(read_event, 17), be_const_closure(Matter_Plugin_read_event_closure) }, - { be_const_key_weak(invoke_request, 12), be_const_closure(Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(tick, 18), be_const_var(4) }, - { be_const_key_weak(write_attribute, 37), be_const_closure(Matter_Plugin_write_attribute_closure) }, - { be_const_key_weak(subscribe_attribute, 33), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, + { be_const_key_weak(NAME, 10), be_nested_str_weak() }, + { be_const_key_weak(ui_conf_to_string, 14), be_const_static_closure(Matter_Plugin_ui_conf_to_string_closure) }, { be_const_key_weak(publish_command, -1), be_const_closure(Matter_Plugin_publish_command_closure) }, - { be_const_key_weak(contains_cluster, 20), be_const_closure(Matter_Plugin_contains_cluster_closure) }, - { be_const_key_weak(ack_request, 27), be_const_closure(Matter_Plugin_ack_request_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak() }, - { be_const_key_weak(get_name, -1), be_const_closure(Matter_Plugin_get_name_closure) }, - { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(Matter_Plugin_ui_string_to_conf_closure) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_parse_configuration_closure) }, - { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) }, - { be_const_key_weak(update_next, -1), be_const_var(0) }, - { be_const_key_weak(set_name, 26), be_const_closure(Matter_Plugin_set_name_closure) }, - { be_const_key_weak(device, -1), be_const_var(1) }, + { be_const_key_weak(subscribe_attribute, 45), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { @@ -1188,28 +1323,39 @@ be_local_class(Matter_Plugin, be_const_int(17), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(endpoint, -1), be_const_var(2) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) }, - { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) }, + { be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(node_label, 23), be_const_var(5) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) }, + { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(Matter_Plugin_ui_string_to_conf_closure) }, + { be_const_key_weak(update_next, 42), be_const_var(0) }, + { be_const_key_weak(ARG, 13), be_nested_str_weak() }, { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) }, - { be_const_key_weak(get_cluster_list, 32), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, - { be_const_key_weak(ui_conf_to_string, -1), be_const_static_closure(Matter_Plugin_ui_conf_to_string_closure) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, - { be_const_key_weak(get_endpoint, 30), be_const_closure(Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(contains_attribute, 34), be_const_closure(Matter_Plugin_contains_attribute_closure) }, - { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_every_250ms_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(write_attribute, 27), be_const_closure(Matter_Plugin_write_attribute_closure) }, { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(update_shadow, 39), be_const_closure(Matter_Plugin_update_shadow_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) }, - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(node_label, -1), be_const_var(5) }, - { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(is_local_device, -1), be_const_closure(Matter_Plugin_is_local_device_closure) }, + { be_const_key_weak(get_name, 17), be_const_closure(Matter_Plugin_get_name_closure) }, + { be_const_key_weak(ARG_TYPE, 18), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) }, + { be_const_key_weak(tick, 40), be_const_var(4) }, + { be_const_key_weak(get_endpoint, 20), be_const_closure(Matter_Plugin_get_endpoint_closure) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_append_state_json_closure) }, + { be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) }, + { be_const_key_weak(device, -1), be_const_var(1) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_parse_configuration_closure) }, + { be_const_key_weak(state_json, -1), be_const_closure(Matter_Plugin_state_json_closure) }, + { be_const_key_weak(virtual, 34), be_const_var(6) }, + { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(read_attribute, 26), be_const_closure(Matter_Plugin_read_attribute_closure) }, + { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_every_250ms_closure) }, + { be_const_key_weak(contains_attribute, -1), be_const_closure(Matter_Plugin_contains_attribute_closure) }, + { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) }, { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) }, - { be_const_key_weak(clusters, 4), be_const_var(3) }, + { be_const_key_weak(is_local_device, 6), be_const_closure(Matter_Plugin_is_local_device_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_update_virtual_closure) }, + { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, + { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, + { be_const_key_weak(contains_cluster, -1), be_const_closure(Matter_Plugin_contains_cluster_closure) }, })), 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 d5362de13319..e654a4d9a757 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 @@ -7,35 +7,11 @@ extern const bclass be_class_Matter_Plugin_Device; /******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -be_local_closure(Matter_Plugin_Device_update_virtual, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 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: init +** Solidified function: invoke_request ********************************************************************/ -be_local_closure(Matter_Plugin_Device_init, /* name */ +be_local_closure(Matter_Plugin_Device_invoke_request, /* name */ be_nested_proto( - 9, /* nstack */ + 13, /* nstack */ 4, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -43,28 +19,73 @@ be_local_closure(Matter_Plugin_Device_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(virtual), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(init), + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(command), + /* K4 */ be_const_int(3), + /* K5 */ be_const_int(0), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(Matter_TLV_struct), + /* K8 */ be_nested_str_weak(add_TLV), + /* K9 */ be_nested_str_weak(U2), + /* K10 */ be_nested_str_weak(invoke_request), }), - be_str_weak(init), + be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C100701, // 0000 GETMET R4 R3 K1 - 0x58180000, // 0001 LDCONST R6 K0 - 0x501C0000, // 0002 LDBOOL R7 0 0 - 0x7C100600, // 0003 CALL R4 3 - 0x90020004, // 0004 SETMBR R0 K0 R4 - 0x60100003, // 0005 GETGBL R4 G3 - 0x5C140000, // 0006 MOVE R5 R0 - 0x7C100200, // 0007 CALL R4 1 - 0x8C100902, // 0008 GETMET R4 R4 K2 - 0x5C180200, // 0009 MOVE R6 R1 - 0x5C1C0400, // 000A MOVE R7 R2 - 0x5C200600, // 000B MOVE R8 R3 - 0x7C100800, // 000C CALL R4 4 - 0x80000000, // 000D RET 0 + ( &(const binstruction[51]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x1C1C0B04, // 0004 EQ R7 R5 K4 + 0x781E0016, // 0005 JMPF R7 #001D + 0x1C1C0D05, // 0006 EQ R7 R6 K5 + 0x781E0002, // 0007 JMPF R7 #000B + 0x501C0200, // 0008 LDBOOL R7 1 0 + 0x80040E00, // 0009 RET 1 R7 + 0x70020010, // 000A JMP #001C + 0x1C1C0D06, // 000B EQ R7 R6 K6 + 0x781E0009, // 000C JMPF R7 #0017 + 0x8C1C0907, // 000D GETMET R7 R4 K7 + 0x7C1C0200, // 000E CALL R7 1 + 0x8C200F08, // 000F GETMET R8 R7 K8 + 0x58280005, // 0010 LDCONST R10 K5 + 0x882C0909, // 0011 GETMBR R11 R4 K9 + 0x58300005, // 0012 LDCONST R12 K5 + 0x7C200800, // 0013 CALL R8 4 + 0x900E0705, // 0014 SETMBR R3 K3 K5 + 0x80040E00, // 0015 RET 1 R7 + 0x70020004, // 0016 JMP #001C + 0x541E003F, // 0017 LDINT R7 64 + 0x1C1C0C07, // 0018 EQ R7 R6 R7 + 0x781E0001, // 0019 JMPF R7 #001C + 0x501C0200, // 001A LDBOOL R7 1 0 + 0x80040E00, // 001B RET 1 R7 + 0x70020014, // 001C JMP #0032 + 0x541E0003, // 001D LDINT R7 4 + 0x1C1C0A07, // 001E EQ R7 R5 R7 + 0x781E0002, // 001F JMPF R7 #0023 + 0x501C0200, // 0020 LDBOOL R7 1 0 + 0x80040E00, // 0021 RET 1 R7 + 0x7002000E, // 0022 JMP #0032 + 0x541E0004, // 0023 LDINT R7 5 + 0x1C1C0A07, // 0024 EQ R7 R5 R7 + 0x781E0002, // 0025 JMPF R7 #0029 + 0x501C0200, // 0026 LDBOOL R7 1 0 + 0x80040E00, // 0027 RET 1 R7 + 0x70020008, // 0028 JMP #0032 + 0x601C0003, // 0029 GETGBL R7 G3 + 0x5C200000, // 002A MOVE R8 R0 + 0x7C1C0200, // 002B CALL R7 1 + 0x8C1C0F0A, // 002C GETMET R7 R7 K10 + 0x5C240200, // 002D MOVE R9 R1 + 0x5C280400, // 002E MOVE R10 R2 + 0x5C2C0600, // 002F MOVE R11 R3 + 0x7C1C0800, // 0030 CALL R7 4 + 0x80040E00, // 0031 RET 1 R7 + 0x80000000, // 0032 RET 0 }) ) ); @@ -396,110 +417,27 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(Matter_Plugin_Device_invoke_request, /* name */ - be_nested_proto( - 13, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(command), - /* K4 */ be_const_int(3), - /* K5 */ be_const_int(0), - /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_weak(Matter_TLV_struct), - /* K8 */ be_nested_str_weak(add_TLV), - /* K9 */ be_nested_str_weak(U2), - /* K10 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140702, // 0002 GETMBR R5 R3 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x1C1C0B04, // 0004 EQ R7 R5 K4 - 0x781E0016, // 0005 JMPF R7 #001D - 0x1C1C0D05, // 0006 EQ R7 R6 K5 - 0x781E0002, // 0007 JMPF R7 #000B - 0x501C0200, // 0008 LDBOOL R7 1 0 - 0x80040E00, // 0009 RET 1 R7 - 0x70020010, // 000A JMP #001C - 0x1C1C0D06, // 000B EQ R7 R6 K6 - 0x781E0009, // 000C JMPF R7 #0017 - 0x8C1C0907, // 000D GETMET R7 R4 K7 - 0x7C1C0200, // 000E CALL R7 1 - 0x8C200F08, // 000F GETMET R8 R7 K8 - 0x58280005, // 0010 LDCONST R10 K5 - 0x882C0909, // 0011 GETMBR R11 R4 K9 - 0x58300005, // 0012 LDCONST R12 K5 - 0x7C200800, // 0013 CALL R8 4 - 0x900E0705, // 0014 SETMBR R3 K3 K5 - 0x80040E00, // 0015 RET 1 R7 - 0x70020004, // 0016 JMP #001C - 0x541E003F, // 0017 LDINT R7 64 - 0x1C1C0C07, // 0018 EQ R7 R6 R7 - 0x781E0001, // 0019 JMPF R7 #001C - 0x501C0200, // 001A LDBOOL R7 1 0 - 0x80040E00, // 001B RET 1 R7 - 0x70020014, // 001C JMP #0032 - 0x541E0003, // 001D LDINT R7 4 - 0x1C1C0A07, // 001E EQ R7 R5 R7 - 0x781E0002, // 001F JMPF R7 #0023 - 0x501C0200, // 0020 LDBOOL R7 1 0 - 0x80040E00, // 0021 RET 1 R7 - 0x7002000E, // 0022 JMP #0032 - 0x541E0004, // 0023 LDINT R7 5 - 0x1C1C0A07, // 0024 EQ R7 R5 R7 - 0x781E0002, // 0025 JMPF R7 #0029 - 0x501C0200, // 0026 LDBOOL R7 1 0 - 0x80040E00, // 0027 RET 1 R7 - 0x70020008, // 0028 JMP #0032 - 0x601C0003, // 0029 GETGBL R7 G3 - 0x5C200000, // 002A MOVE R8 R0 - 0x7C1C0200, // 002B CALL R7 1 - 0x8C1C0F0A, // 002C GETMET R7 R7 K10 - 0x5C240200, // 002D MOVE R9 R1 - 0x5C280400, // 002E MOVE R10 R2 - 0x5C2C0600, // 002F MOVE R11 R3 - 0x7C1C0800, // 0030 CALL R7 4 - 0x80040E00, // 0031 RET 1 R7 - 0x80000000, // 0032 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Device ********************************************************************/ extern const bclass be_class_Matter_Plugin; be_local_class(Matter_Plugin_Device, - 1, + 0, &be_class_Matter_Plugin, - be_nested_map(8, + be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Device_update_virtual_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) }, - { be_const_key_weak(read_attribute, 5), be_const_closure(Matter_Plugin_Device_read_attribute_closure) }, - { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Device_init_closure) }, - { be_const_key_weak(virtual, -1), be_const_var(0) }, - { be_const_key_weak(TYPES, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(19, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Device_read_attribute_closure) }, + { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) }, + { 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(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(5, @@ -552,12 +490,6 @@ be_local_class(Matter_Plugin_Device, be_const_int(65532), 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_str_weak(Matter_Plugin_Device) diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h index 0a47aa32b725..b9a61a7ce69b 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h @@ -7,89 +7,36 @@ extern const bclass be_class_Matter_Plugin_Light0; /******************************************************************** -** Solidified function: find_val_i -********************************************************************/ -be_local_closure(Matter_Plugin_Light0_find_val_i, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 4, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Plugin_Light0), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(find_key_i), - /* K3 */ be_nested_str_weak(find), - }), - be_str_weak(find_val_i), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0xB80E0200, // 0001 GETNGBL R3 K1 - 0x8C0C0702, // 0002 GETMET R3 R3 K2 - 0x5C140000, // 0003 MOVE R5 R0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C0C0600, // 0005 CALL R3 3 - 0x8C100103, // 0006 GETMET R4 R0 K3 - 0x5C180600, // 0007 MOVE R6 R3 - 0x7C100400, // 0008 CALL R4 2 - 0x80040800, // 0009 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_onoff +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Plugin_Light0_set_onoff, /* name */ +be_local_closure(Matter_Plugin_Light0_init, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 9, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(virtual), - /* K1 */ be_nested_str_weak(light), - /* K2 */ be_nested_str_weak(set), - /* K3 */ be_nested_str_weak(power), - /* K4 */ be_nested_str_weak(update_shadow), - /* K5 */ be_nested_str_weak(shadow_onoff), - /* K6 */ be_nested_str_weak(attribute_updated), - /* K7 */ be_const_int(0), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_onoff), }), - be_str_weak(set_onoff), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A0008, // 0001 JMPT R2 #000B - 0xA40A0200, // 0002 IMPORT R2 K1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x60140013, // 0004 GETGBL R5 G19 - 0x7C140000, // 0005 CALL R5 0 - 0x98160601, // 0006 SETIDX R5 K3 R1 - 0x7C0C0400, // 0007 CALL R3 2 - 0x8C0C0104, // 0008 GETMET R3 R0 K4 - 0x7C0C0200, // 0009 CALL R3 1 - 0x70020007, // 000A JMP #0013 - 0x88080105, // 000B GETMBR R2 R0 K5 - 0x20080202, // 000C NE R2 R1 R2 - 0x780A0004, // 000D JMPF R2 #0013 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x54120005, // 000F LDINT R4 6 - 0x58140007, // 0010 LDCONST R5 K7 - 0x7C080600, // 0011 CALL R2 3 - 0x90020A01, // 0012 SETMBR R0 K5 R1 - 0x80000000, // 0013 RET 0 + ( &(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 }) ) ); @@ -97,46 +44,32 @@ be_local_closure(Matter_Plugin_Light0_set_onoff, /* name */ /******************************************************************** -** Solidified function: update_virtual +** Solidified function: append_state_json ********************************************************************/ -be_local_closure(Matter_Plugin_Light0_update_virtual, /* name */ +be_local_closure(Matter_Plugin_Light0_append_state_json, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ + 5, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(find_val_i), - /* K1 */ be_nested_str_weak(Power), - /* K2 */ be_nested_str_weak(set_onoff), - /* K3 */ be_nested_str_weak(update_virtual), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_onoff), }), - be_str_weak(update_virtual), + be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0x58140001, // 0002 LDCONST R5 K1 - 0x7C080600, // 0003 CALL R2 3 - 0x4C0C0000, // 0004 LDNIL R3 - 0x200C0403, // 0005 NE R3 R2 R3 - 0x780E0004, // 0006 JMPF R3 #000C - 0x8C0C0102, // 0007 GETMET R3 R0 K2 - 0x60140017, // 0008 GETGBL R5 G23 - 0x5C180400, // 0009 MOVE R6 R2 - 0x7C140200, // 000A CALL R5 1 - 0x7C0C0400, // 000B CALL R3 2 - 0x600C0003, // 000C GETGBL R3 G3 - 0x5C100000, // 000D MOVE R4 R0 - 0x7C0C0200, // 000E CALL R3 1 - 0x8C0C0703, // 000F GETMET R3 R3 K3 - 0x5C140200, // 0010 MOVE R5 R1 - 0x7C0C0400, // 0011 CALL R3 2 - 0x80000000, // 0012 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C040400, // 0005 CALL R1 2 + 0x80040200, // 0006 RET 1 R1 }) ) ); @@ -234,36 +167,51 @@ be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: set_onoff ********************************************************************/ -be_local_closure(Matter_Plugin_Light0_init, /* name */ +be_local_closure(Matter_Plugin_Light0_set_onoff, /* name */ be_nested_proto( - 9, /* nstack */ - 4, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_onoff), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(virtual), + /* K1 */ be_nested_str_weak(light), + /* K2 */ be_nested_str_weak(set), + /* K3 */ be_nested_str_weak(power), + /* K4 */ be_nested_str_weak(update_shadow), + /* K5 */ be_nested_str_weak(shadow_onoff), + /* K6 */ be_nested_str_weak(attribute_updated), + /* K7 */ be_const_int(0), }), - be_str_weak(init), + be_str_weak(set_onoff), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 + ( &(const binstruction[20]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x740A0008, // 0001 JMPT R2 #000B + 0xA40A0200, // 0002 IMPORT R2 K1 + 0x8C0C0502, // 0003 GETMET R3 R2 K2 + 0x60140013, // 0004 GETGBL R5 G19 + 0x7C140000, // 0005 CALL R5 0 + 0x98160601, // 0006 SETIDX R5 K3 R1 + 0x7C0C0400, // 0007 CALL R3 2 + 0x8C0C0104, // 0008 GETMET R3 R0 K4 + 0x7C0C0200, // 0009 CALL R3 1 + 0x70020007, // 000A JMP #0013 + 0x88080105, // 000B GETMBR R2 R0 K5 + 0x20080202, // 000C NE R2 R1 R2 + 0x780A0004, // 000D JMPF R2 #0013 + 0x8C080106, // 000E GETMET R2 R0 K6 + 0x54120005, // 000F LDINT R4 6 + 0x58140007, // 0010 LDCONST R5 K7 + 0x7C080600, // 0011 CALL R2 3 + 0x90020A01, // 0012 SETMBR R0 K5 R1 + 0x80000000, // 0013 RET 0 }) ) ); @@ -329,6 +277,52 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_update_virtual, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Power), + /* K2 */ be_nested_str_weak(set_onoff), + /* K3 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* 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 + 0x780E0004, // 0005 JMPF R3 #000B + 0x8C0C0102, // 0006 GETMET R3 R0 K2 + 0x60140017, // 0007 GETGBL R5 G23 + 0x5C180400, // 0008 MOVE R6 R2 + 0x7C140200, // 0009 CALL R5 1 + 0x7C0C0400, // 000A CALL R3 2 + 0x600C0003, // 000B GETGBL R3 G3 + 0x5C100000, // 000C MOVE R4 R0 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -409,6 +403,44 @@ be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: find_val_i +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_find_val_i, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin_Light0), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(find_key_i), + /* K3 */ be_nested_str_weak(find), + }), + be_str_weak(find_val_i), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0xB80E0200, // 0001 GETNGBL R3 K1 + 0x8C0C0702, // 0002 GETMET R3 R3 K2 + 0x5C140000, // 0003 MOVE R5 R0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x7C0C0600, // 0005 CALL R3 3 + 0x8C100103, // 0006 GETMET R4 R0 K3 + 0x5C180600, // 0007 MOVE R6 R3 + 0x7C100400, // 0008 CALL R4 2 + 0x80040800, // 0009 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Light0 ********************************************************************/ @@ -416,19 +448,28 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Light0, 1, &be_class_Matter_Plugin_Device, - be_nested_map(13, + be_nested_map(15, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(shadow_onoff, -1), be_const_var(0) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) }, - { be_const_key_weak(find_val_i, 4), be_const_static_closure(Matter_Plugin_Light0_find_val_i_closure) }, - { be_const_key_weak(read_attribute, 8), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) }, - { be_const_key_weak(update_virtual, 1), be_const_closure(Matter_Plugin_Light0_update_virtual_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) }, { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Light0_append_state_json_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) }, + { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Light0_set_onoff_closure) }, + { be_const_key_weak(update_shadow, 11), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) }, + { be_const_key_weak(update_virtual, 7), be_const_closure(Matter_Plugin_Light0_update_virtual_closure) }, { be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(256, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Power), + })) ) } )) }, + { be_const_key_weak(NAME, 8), be_nested_str_weak(Light_X200_X20On) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) }, + { be_const_key_weak(CLUSTERS, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -487,12 +528,9 @@ be_local_class(Matter_Plugin_Light0, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(set_onoff, 3), be_const_closure(Matter_Plugin_Light0_set_onoff_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(256, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(0) }, + { be_const_key_weak(find_val_i, -1), be_const_static_closure(Matter_Plugin_Light0_find_val_i_closure) }, })), be_str_weak(Matter_Plugin_Light0) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h index 994bfcd00c16..9cbe1473f827 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h @@ -6,43 +6,6 @@ extern const bclass be_class_Matter_Plugin_OnOff; -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_onoff), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: invoke_request ********************************************************************/ @@ -131,129 +94,6 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: set_onoff -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(virtual), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(set_power), - /* K3 */ be_nested_str_weak(tasmota_relay_index), - /* K4 */ be_const_int(1), - /* K5 */ be_nested_str_weak(update_shadow), - /* K6 */ be_nested_str_weak(shadow_onoff), - /* K7 */ be_nested_str_weak(attribute_updated), - /* K8 */ be_const_int(0), - }), - be_str_weak(set_onoff), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A000A, // 0001 JMPT R2 #000D - 0xB80A0200, // 0002 GETNGBL R2 K1 - 0x8C080502, // 0003 GETMET R2 R2 K2 - 0x88100103, // 0004 GETMBR R4 R0 K3 - 0x04100904, // 0005 SUB R4 R4 K4 - 0x60140017, // 0006 GETGBL R5 G23 - 0x5C180200, // 0007 MOVE R6 R1 - 0x7C140200, // 0008 CALL R5 1 - 0x7C080600, // 0009 CALL R2 3 - 0x8C080105, // 000A GETMET R2 R0 K5 - 0x7C080200, // 000B CALL R2 1 - 0x70020007, // 000C JMP #0015 - 0x88080106, // 000D GETMBR R2 R0 K6 - 0x20080202, // 000E NE R2 R1 R2 - 0x780A0004, // 000F JMPF R2 #0015 - 0x8C080107, // 0010 GETMET R2 R0 K7 - 0x54120005, // 0011 LDINT R4 6 - 0x58140008, // 0012 LDCONST R5 K8 - 0x7C080600, // 0013 CALL R2 3 - 0x90020C01, // 0014 SETMBR R0 K6 R1 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_relay_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -394,6 +234,245 @@ be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_update_virtual, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Power), + /* K2 */ be_nested_str_weak(set_onoff), + /* K3 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* 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 + 0x780E0004, // 0005 JMPF R3 #000B + 0x8C0C0102, // 0006 GETMET R3 R0 K2 + 0x60140017, // 0007 GETGBL R5 G23 + 0x5C180400, // 0008 MOVE R6 R2 + 0x7C140200, // 0009 CALL R5 1 + 0x7C0C0400, // 000A CALL R3 2 + 0x600C0003, // 000B GETGBL R3 G3 + 0x5C100000, // 000C MOVE R4 R0 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_onoff +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(virtual), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(set_power), + /* K3 */ be_nested_str_weak(tasmota_relay_index), + /* K4 */ be_const_int(1), + /* K5 */ be_nested_str_weak(update_shadow), + /* K6 */ be_nested_str_weak(shadow_onoff), + /* K7 */ be_nested_str_weak(attribute_updated), + /* K8 */ be_const_int(0), + }), + be_str_weak(set_onoff), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x740A000A, // 0001 JMPT R2 #000D + 0xB80A0200, // 0002 GETNGBL R2 K1 + 0x8C080502, // 0003 GETMET R2 R2 K2 + 0x88100103, // 0004 GETMBR R4 R0 K3 + 0x04100904, // 0005 SUB R4 R4 K4 + 0x60140017, // 0006 GETGBL R5 G23 + 0x5C180200, // 0007 MOVE R6 R1 + 0x7C140200, // 0008 CALL R5 1 + 0x7C080600, // 0009 CALL R2 3 + 0x8C080105, // 000A GETMET R2 R0 K5 + 0x7C080200, // 000B CALL R2 1 + 0x70020007, // 000C JMP #0015 + 0x88080106, // 000D GETMBR R2 R0 K6 + 0x20080202, // 000E NE R2 R1 R2 + 0x780A0004, // 000F JMPF R2 #0015 + 0x8C080107, // 0010 GETMET R2 R0 K7 + 0x54120005, // 0011 LDINT R4 6 + 0x58140008, // 0012 LDCONST R5 K8 + 0x7C080600, // 0013 CALL R2 3 + 0x90020C01, // 0014 SETMBR R0 K6 R1 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_relay_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_append_state_json, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C040400, // 0005 CALL R1 2 + 0x80040200, // 0006 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_OnOff ********************************************************************/ @@ -401,19 +480,21 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_OnOff, 1, &be_class_Matter_Plugin_Device, - be_nested_map(15, + be_nested_map(18, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, 14), be_const_closure(Matter_Plugin_OnOff_init_closure) }, - { be_const_key_weak(update_shadow, 10), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) }, - { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) }, - { be_const_key_weak(ARG_TYPE, 1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) }, - { be_const_key_weak(tasmota_relay_index, 13), be_const_var(0) }, { be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) }, - { be_const_key_weak(NAME, 7), be_nested_str_weak(Relay) }, - { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(266, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Power), + })) ) } )) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -472,14 +553,19 @@ be_local_class(Matter_Plugin_OnOff, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(parse_configuration, 8), be_const_closure(Matter_Plugin_OnOff_parse_configuration_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_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(266, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) }, + { be_const_key_weak(read_attribute, 16), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) }, + { be_const_key_weak(update_shadow, 14), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_OnOff_update_virtual_closure) }, + { be_const_key_weak(ARG_HINT, 11), be_nested_str_weak(Relay_X3Cx_X3E_X20number) }, + { be_const_key_weak(ARG_TYPE, 13), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_OnOff_append_state_json_closure) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_OnOff_parse_configuration_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) }, + { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) }, + { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) }, })), be_str_weak(Matter_Plugin_OnOff) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Shutter.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Shutter.h index 4fb42c61eb1f..5ef865a76725 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Shutter.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Shutter.h @@ -6,6 +6,47 @@ extern const bclass be_class_Matter_Plugin_Shutter; +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +be_local_closure(Matter_Plugin_Shutter_parse_configuration, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_shutter_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(shadow_shutter_inverted), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x8C080301, // 0000 GETMET R2 R1 K1 + 0x88100102, // 0001 GETMBR R4 R0 K2 + 0x7C080400, // 0002 CALL R2 2 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x88080100, // 0004 GETMBR R2 R0 K0 + 0x4C0C0000, // 0005 LDNIL R3 + 0x1C080403, // 0006 EQ R2 R2 R3 + 0x780A0000, // 0007 JMPF R2 #0009 + 0x90020103, // 0008 SETMBR R0 K0 K3 + 0x5409FFFE, // 0009 LDINT R2 -1 + 0x90020802, // 000A SETMBR R0 K4 R2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -201,88 +242,26 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */ /******************************************************************** -** Solidified function: parse_sensors +** Solidified function: ********************************************************************/ -be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */ +be_local_closure(Matter_Plugin_Shutter__X3Clambda_X3E, /* name */ be_nested_proto( - 11, /* nstack */ - 2, /* argc */ - 2, /* varg */ + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(Shutter), - /* K1 */ be_nested_str_weak(tasmota_shutter_index), - /* K2 */ be_const_int(1), - /* K3 */ be_nested_str_weak(contains), - /* K4 */ be_nested_str_weak(find), - /* K5 */ be_nested_str_weak(Position), - /* K6 */ be_nested_str_weak(shadow_shutter_pos), - /* K7 */ be_nested_str_weak(attribute_updated), - /* K8 */ be_nested_str_weak(Direction), - /* K9 */ be_nested_str_weak(shadow_shutter_direction), - /* K10 */ be_nested_str_weak(Target), - /* K11 */ be_nested_str_weak(shadow_shutter_target), - }), - be_str_weak(parse_sensors), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ - 0x60080008, // 0000 GETGBL R2 G8 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x000C0702, // 0002 ADD R3 R3 K2 - 0x7C080200, // 0003 CALL R2 1 - 0x000A0002, // 0004 ADD R2 K0 R2 - 0x8C0C0303, // 0005 GETMET R3 R1 K3 - 0x5C140400, // 0006 MOVE R5 R2 - 0x7C0C0400, // 0007 CALL R3 2 - 0x780E002A, // 0008 JMPF R3 #0034 - 0x940C0202, // 0009 GETIDX R3 R1 R2 - 0x8C100704, // 000A GETMET R4 R3 K4 - 0x58180005, // 000B LDCONST R6 K5 - 0x7C100400, // 000C CALL R4 2 - 0x4C140000, // 000D LDNIL R5 - 0x20140805, // 000E NE R5 R4 R5 - 0x78160007, // 000F JMPF R5 #0018 - 0x88140106, // 0010 GETMBR R5 R0 K6 - 0x20140805, // 0011 NE R5 R4 R5 - 0x78160003, // 0012 JMPF R5 #0017 - 0x8C140107, // 0013 GETMET R5 R0 K7 - 0x541E0101, // 0014 LDINT R7 258 - 0x5422000D, // 0015 LDINT R8 14 - 0x7C140600, // 0016 CALL R5 3 - 0x90020C04, // 0017 SETMBR R0 K6 R4 - 0x8C140704, // 0018 GETMET R5 R3 K4 - 0x581C0008, // 0019 LDCONST R7 K8 - 0x7C140400, // 001A CALL R5 2 - 0x4C180000, // 001B LDNIL R6 - 0x20180A06, // 001C NE R6 R5 R6 - 0x781A0007, // 001D JMPF R6 #0026 - 0x88180109, // 001E GETMBR R6 R0 K9 - 0x20180A06, // 001F NE R6 R5 R6 - 0x781A0003, // 0020 JMPF R6 #0025 - 0x8C180107, // 0021 GETMET R6 R0 K7 - 0x54220101, // 0022 LDINT R8 258 - 0x54260009, // 0023 LDINT R9 10 - 0x7C180600, // 0024 CALL R6 3 - 0x90021205, // 0025 SETMBR R0 K9 R5 - 0x8C180704, // 0026 GETMET R6 R3 K4 - 0x5820000A, // 0027 LDCONST R8 K10 - 0x7C180400, // 0028 CALL R6 2 - 0x4C1C0000, // 0029 LDNIL R7 - 0x201C0C07, // 002A NE R7 R6 R7 - 0x781E0007, // 002B JMPF R7 #0034 - 0x881C010B, // 002C GETMBR R7 R0 K11 - 0x201C0C07, // 002D NE R7 R6 R7 - 0x781E0003, // 002E JMPF R7 #0033 - 0x8C1C0107, // 002F GETMET R7 R0 K7 - 0x54260101, // 0030 LDINT R9 258 - 0x542A000A, // 0031 LDINT R10 11 - 0x7C1C0600, // 0032 CALL R7 3 - 0x90021606, // 0033 SETMBR R0 K11 R6 - 0x80000000, // 0034 RET 0 + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 }) ) ); @@ -290,52 +269,32 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */ /******************************************************************** -** Solidified function: update_shadow +** Solidified function: append_state_json ********************************************************************/ -be_local_closure(Matter_Plugin_Shutter_update_shadow, /* name */ +be_local_closure(Matter_Plugin_Shutter_append_state_json, /* name */ be_nested_proto( - 5, /* nstack */ - 1, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(update_inverted), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(cmd), - /* K3 */ be_nested_str_weak(ShutterPosition), - /* K4 */ be_nested_str_weak(tasmota_shutter_index), - /* K5 */ be_const_int(1), - /* K6 */ be_nested_str_weak(parse_sensors), - /* K7 */ be_nested_str_weak(update_shadow), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22ShutterPos_X22_X3A_X25s_X2C_X22ShutterTarget_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_shutter_pos), + /* K2 */ be_nested_str_weak(shadow_shutter_target), }), - be_str_weak(update_shadow), + be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0xB8060200, // 0002 GETNGBL R1 K1 - 0x8C040302, // 0003 GETMET R1 R1 K2 - 0x600C0008, // 0004 GETGBL R3 G8 - 0x88100104, // 0005 GETMBR R4 R0 K4 - 0x00100905, // 0006 ADD R4 R4 K5 - 0x7C0C0200, // 0007 CALL R3 1 - 0x000E0603, // 0008 ADD R3 K3 R3 - 0x50100200, // 0009 LDBOOL R4 1 0 - 0x7C040600, // 000A CALL R1 3 - 0x78060002, // 000B JMPF R1 #000F - 0x8C080106, // 000C GETMET R2 R0 K6 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C080400, // 000E CALL R2 2 - 0x60080003, // 000F GETGBL R2 G3 - 0x5C0C0000, // 0010 MOVE R3 R0 - 0x7C080200, // 0011 CALL R2 1 - 0x8C080507, // 0012 GETMET R2 R2 K7 - 0x7C080200, // 0013 CALL R2 1 - 0x80000000, // 0014 RET 0 + ( &(const binstruction[ 6]) { /* code */ + 0x60080018, // 0000 GETGBL R2 G24 + 0x580C0000, // 0001 LDCONST R3 K0 + 0x88100101, // 0002 GETMBR R4 R0 K1 + 0x88140102, // 0003 GETMBR R5 R0 K2 + 0x7C080600, // 0004 CALL R2 3 + 0x80040400, // 0005 RET 1 R2 }) ) ); @@ -506,47 +465,6 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -be_local_closure(Matter_Plugin_Shutter_parse_configuration, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_shutter_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(shadow_shutter_inverted), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x8C080301, // 0000 GETMET R2 R1 K1 - 0x88100102, // 0001 GETMBR R4 R0 K2 - 0x7C080400, // 0002 CALL R2 2 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x4C0C0000, // 0005 LDNIL R3 - 0x1C080403, // 0006 EQ R2 R2 R3 - 0x780A0000, // 0007 JMPF R2 #0009 - 0x90020103, // 0008 SETMBR R0 K0 K3 - 0x5409FFFE, // 0009 LDINT R2 -1 - 0x90020802, // 000A SETMBR R0 K4 R2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: update_inverted ********************************************************************/ @@ -620,26 +538,141 @@ be_local_closure(Matter_Plugin_Shutter_update_inverted, /* name */ /******************************************************************** -** Solidified function: +** Solidified function: update_shadow ********************************************************************/ -be_local_closure(Matter_Plugin_Shutter__X3Clambda_X3E, /* name */ +be_local_closure(Matter_Plugin_Shutter_update_shadow, /* name */ be_nested_proto( - 3, /* nstack */ + 5, /* nstack */ 1, /* argc */ - 0, /* varg */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(update_inverted), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(cmd), + /* K3 */ be_nested_str_weak(ShutterPosition), + /* K4 */ be_nested_str_weak(tasmota_shutter_index), + /* K5 */ be_const_int(1), + /* K6 */ be_nested_str_weak(parse_sensors), + /* K7 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 + ( &(const binstruction[21]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0xB8060200, // 0002 GETNGBL R1 K1 + 0x8C040302, // 0003 GETMET R1 R1 K2 + 0x600C0008, // 0004 GETGBL R3 G8 + 0x88100104, // 0005 GETMBR R4 R0 K4 + 0x00100905, // 0006 ADD R4 R4 K5 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0603, // 0008 ADD R3 K3 R3 + 0x50100200, // 0009 LDBOOL R4 1 0 + 0x7C040600, // 000A CALL R1 3 + 0x78060002, // 000B JMPF R1 #000F + 0x8C080106, // 000C GETMET R2 R0 K6 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x60080003, // 000F GETGBL R2 G3 + 0x5C0C0000, // 0010 MOVE R3 R0 + 0x7C080200, // 0011 CALL R2 1 + 0x8C080507, // 0012 GETMET R2 R2 K7 + 0x7C080200, // 0013 CALL R2 1 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_sensors +********************************************************************/ +be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(Shutter), + /* K1 */ be_nested_str_weak(tasmota_shutter_index), + /* K2 */ be_const_int(1), + /* K3 */ be_nested_str_weak(contains), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(Position), + /* K6 */ be_nested_str_weak(shadow_shutter_pos), + /* K7 */ be_nested_str_weak(attribute_updated), + /* K8 */ be_nested_str_weak(Direction), + /* K9 */ be_nested_str_weak(shadow_shutter_direction), + /* K10 */ be_nested_str_weak(Target), + /* K11 */ be_nested_str_weak(shadow_shutter_target), + }), + be_str_weak(parse_sensors), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* code */ + 0x60080008, // 0000 GETGBL R2 G8 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x000C0702, // 0002 ADD R3 R3 K2 + 0x7C080200, // 0003 CALL R2 1 + 0x000A0002, // 0004 ADD R2 K0 R2 + 0x8C0C0303, // 0005 GETMET R3 R1 K3 + 0x5C140400, // 0006 MOVE R5 R2 + 0x7C0C0400, // 0007 CALL R3 2 + 0x780E002A, // 0008 JMPF R3 #0034 + 0x940C0202, // 0009 GETIDX R3 R1 R2 + 0x8C100704, // 000A GETMET R4 R3 K4 + 0x58180005, // 000B LDCONST R6 K5 + 0x7C100400, // 000C CALL R4 2 + 0x4C140000, // 000D LDNIL R5 + 0x20140805, // 000E NE R5 R4 R5 + 0x78160007, // 000F JMPF R5 #0018 + 0x88140106, // 0010 GETMBR R5 R0 K6 + 0x20140805, // 0011 NE R5 R4 R5 + 0x78160003, // 0012 JMPF R5 #0017 + 0x8C140107, // 0013 GETMET R5 R0 K7 + 0x541E0101, // 0014 LDINT R7 258 + 0x5422000D, // 0015 LDINT R8 14 + 0x7C140600, // 0016 CALL R5 3 + 0x90020C04, // 0017 SETMBR R0 K6 R4 + 0x8C140704, // 0018 GETMET R5 R3 K4 + 0x581C0008, // 0019 LDCONST R7 K8 + 0x7C140400, // 001A CALL R5 2 + 0x4C180000, // 001B LDNIL R6 + 0x20180A06, // 001C NE R6 R5 R6 + 0x781A0007, // 001D JMPF R6 #0026 + 0x88180109, // 001E GETMBR R6 R0 K9 + 0x20180A06, // 001F NE R6 R5 R6 + 0x781A0003, // 0020 JMPF R6 #0025 + 0x8C180107, // 0021 GETMET R6 R0 K7 + 0x54220101, // 0022 LDINT R8 258 + 0x54260009, // 0023 LDINT R9 10 + 0x7C180600, // 0024 CALL R6 3 + 0x90021205, // 0025 SETMBR R0 K9 R5 + 0x8C180704, // 0026 GETMET R6 R3 K4 + 0x5820000A, // 0027 LDCONST R8 K10 + 0x7C180400, // 0028 CALL R6 2 + 0x4C1C0000, // 0029 LDNIL R7 + 0x201C0C07, // 002A NE R7 R6 R7 + 0x781E0007, // 002B JMPF R7 #0034 + 0x881C010B, // 002C GETMBR R7 R0 K11 + 0x201C0C07, // 002D NE R7 R6 R7 + 0x781E0003, // 002E JMPF R7 #0033 + 0x8C1C0107, // 002F GETMET R7 R0 K7 + 0x54260101, // 0030 LDINT R9 258 + 0x542A000A, // 0031 LDINT R10 11 + 0x7C1C0600, // 0032 CALL R7 3 + 0x90021606, // 0033 SETMBR R0 K11 R6 + 0x80000000, // 0034 RET 0 }) ) ); @@ -653,16 +686,24 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Shutter, 6, &be_class_Matter_Plugin_Device, - be_nested_map(19, + be_nested_map(20, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Shutter_read_attribute_closure) }, - { be_const_key_weak(shadow_shutter_pos, 18), be_const_var(1) }, - { be_const_key_weak(tasmota_shutter_index, -1), be_const_var(0) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Shutter_read_attribute_closure) }, + { be_const_key_weak(shadow_shutter_direction, 3), be_const_var(4) }, + { be_const_key_weak(shadow_shutter_pos, 0), be_const_var(1) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Shutter__X3Clambda_X3E_closure) }, + { be_const_key_weak(shadow_shutter_inverted, 1), be_const_var(5) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Shutter_append_state_json_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Shutter_invoke_request_closure) }, { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Shutter_parse_sensors_closure) }, - { be_const_key_weak(shadow_shutter_direction, -1), be_const_var(4) }, + { be_const_key_weak(parse_configuration, 17), be_const_closure(Matter_Plugin_Shutter_parse_configuration_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(514, -1), be_const_int(2) }, + })) ) } )) }, { be_const_key_weak(shadow_shutter_target, -1), be_const_var(2) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Shutter_invoke_request_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -729,20 +770,13 @@ be_local_class(Matter_Plugin_Shutter, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(update_shadow, 5), be_const_closure(Matter_Plugin_Shutter_update_shadow_closure) }, - { be_const_key_weak(NAME, 6), be_nested_str_weak(Shutter) }, + { be_const_key_weak(tasmota_shutter_index, 11), be_const_var(0) }, + { be_const_key_weak(NAME, 12), be_nested_str_weak(Shutter) }, + { be_const_key_weak(shadow_shutter_tilt, -1), be_const_var(3) }, + { be_const_key_weak(update_inverted, 8), be_const_closure(Matter_Plugin_Shutter_update_inverted_closure) }, + { be_const_key_weak(update_shadow, 18), be_const_closure(Matter_Plugin_Shutter_update_shadow_closure) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(shutter) }, - { be_const_key_weak(shadow_shutter_inverted, -1), be_const_var(5) }, - { be_const_key_weak(ARG, 7), be_nested_str_weak(shutter) }, - { be_const_key_weak(shadow_shutter_tilt, 8), be_const_var(3) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Shutter_parse_configuration_closure) }, - { be_const_key_weak(update_inverted, -1), be_const_closure(Matter_Plugin_Shutter_update_inverted_closure) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Shutter__X3Clambda_X3E_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(514, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(shutter) }, })), be_str_weak(Matter_Plugin_Shutter) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light1.h index a3145963bbd2..3b38cdf61f0d 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light1.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light1.h @@ -35,7 +35,7 @@ be_local_closure(Matter_Plugin_Light1_set_bri, /* name */ }), be_str_weak(set_bri), &be_const_str_solidified, - ( &(const binstruction[56]) { /* code */ + ( &(const binstruction[65]) { /* code */ 0x140C0300, // 0000 LT R3 R1 K0 0x780E0000, // 0001 JMPF R3 #0003 0x58040000, // 0002 LDCONST R1 K0 @@ -43,55 +43,64 @@ be_local_closure(Matter_Plugin_Light1_set_bri, /* name */ 0x240C0203, // 0004 GT R3 R1 R3 0x780E0000, // 0005 JMPF R3 #0007 0x540600FD, // 0006 LDINT R1 254 - 0x880C0101, // 0007 GETMBR R3 R0 K1 - 0x740E001A, // 0008 JMPT R3 #0024 - 0xA40E0400, // 0009 IMPORT R3 K2 - 0xB8120600, // 000A GETNGBL R4 K3 - 0x8C100904, // 000B GETMET R4 R4 K4 - 0x5C180200, // 000C MOVE R6 R1 - 0x581C0000, // 000D LDCONST R7 K0 - 0x542200FD, // 000E LDINT R8 254 - 0x58240000, // 000F LDCONST R9 K0 - 0x542A00FE, // 0010 LDINT R10 255 - 0x7C100C00, // 0011 CALL R4 6 - 0x4C140000, // 0012 LDNIL R5 - 0x1C140405, // 0013 EQ R5 R2 R5 - 0x78160005, // 0014 JMPF R5 #001B - 0x8C140705, // 0015 GETMET R5 R3 K5 - 0x601C0013, // 0016 GETGBL R7 G19 - 0x7C1C0000, // 0017 CALL R7 0 - 0x981E0C04, // 0018 SETIDX R7 K6 R4 - 0x7C140400, // 0019 CALL R5 2 - 0x70020005, // 001A JMP #0021 - 0x8C140705, // 001B GETMET R5 R3 K5 - 0x601C0013, // 001C GETGBL R7 G19 - 0x7C1C0000, // 001D CALL R7 0 - 0x981E0C04, // 001E SETIDX R7 K6 R4 - 0x981E0E02, // 001F SETIDX R7 K7 R2 - 0x7C140400, // 0020 CALL R5 2 - 0x8C140108, // 0021 GETMET R5 R0 K8 - 0x7C140200, // 0022 CALL R5 1 - 0x70020012, // 0023 JMP #0037 - 0x4C0C0000, // 0024 LDNIL R3 - 0x200C0403, // 0025 NE R3 R2 R3 - 0x780E0007, // 0026 JMPF R3 #002F - 0x880C0109, // 0027 GETMBR R3 R0 K9 - 0x200C0403, // 0028 NE R3 R2 R3 - 0x780E0004, // 0029 JMPF R3 #002F - 0x8C0C010A, // 002A GETMET R3 R0 K10 - 0x54160005, // 002B LDINT R5 6 - 0x58180000, // 002C LDCONST R6 K0 - 0x7C0C0600, // 002D CALL R3 3 - 0x90021202, // 002E SETMBR R0 K9 R2 - 0x880C010B, // 002F GETMBR R3 R0 K11 - 0x200C0203, // 0030 NE R3 R1 R3 - 0x780E0004, // 0031 JMPF R3 #0037 - 0x8C0C010A, // 0032 GETMET R3 R0 K10 - 0x54160007, // 0033 LDINT R5 8 - 0x58180000, // 0034 LDCONST R6 K0 - 0x7C0C0600, // 0035 CALL R3 3 - 0x90021601, // 0036 SETMBR R0 K11 R1 - 0x80000000, // 0037 RET 0 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0003, // 0009 JMPF R3 #000E + 0x600C0017, // 000A GETGBL R3 G23 + 0x5C100400, // 000B MOVE R4 R2 + 0x7C0C0200, // 000C CALL R3 1 + 0x70020000, // 000D JMP #000F + 0x4C0C0000, // 000E LDNIL R3 + 0x5C080600, // 000F MOVE R2 R3 + 0x880C0101, // 0010 GETMBR R3 R0 K1 + 0x740E001A, // 0011 JMPT R3 #002D + 0xA40E0400, // 0012 IMPORT R3 K2 + 0xB8120600, // 0013 GETNGBL R4 K3 + 0x8C100904, // 0014 GETMET R4 R4 K4 + 0x5C180200, // 0015 MOVE R6 R1 + 0x581C0000, // 0016 LDCONST R7 K0 + 0x542200FD, // 0017 LDINT R8 254 + 0x58240000, // 0018 LDCONST R9 K0 + 0x542A00FE, // 0019 LDINT R10 255 + 0x7C100C00, // 001A CALL R4 6 + 0x4C140000, // 001B LDNIL R5 + 0x1C140405, // 001C EQ R5 R2 R5 + 0x78160005, // 001D JMPF R5 #0024 + 0x8C140705, // 001E GETMET R5 R3 K5 + 0x601C0013, // 001F GETGBL R7 G19 + 0x7C1C0000, // 0020 CALL R7 0 + 0x981E0C04, // 0021 SETIDX R7 K6 R4 + 0x7C140400, // 0022 CALL R5 2 + 0x70020005, // 0023 JMP #002A + 0x8C140705, // 0024 GETMET R5 R3 K5 + 0x601C0013, // 0025 GETGBL R7 G19 + 0x7C1C0000, // 0026 CALL R7 0 + 0x981E0C04, // 0027 SETIDX R7 K6 R4 + 0x981E0E02, // 0028 SETIDX R7 K7 R2 + 0x7C140400, // 0029 CALL R5 2 + 0x8C140108, // 002A GETMET R5 R0 K8 + 0x7C140200, // 002B CALL R5 1 + 0x70020012, // 002C JMP #0040 + 0x4C0C0000, // 002D LDNIL R3 + 0x200C0403, // 002E NE R3 R2 R3 + 0x780E0007, // 002F JMPF R3 #0038 + 0x880C0109, // 0030 GETMBR R3 R0 K9 + 0x200C0403, // 0031 NE R3 R2 R3 + 0x780E0004, // 0032 JMPF R3 #0038 + 0x8C0C010A, // 0033 GETMET R3 R0 K10 + 0x54160005, // 0034 LDINT R5 6 + 0x58180000, // 0035 LDCONST R6 K0 + 0x7C0C0600, // 0036 CALL R3 3 + 0x90021202, // 0037 SETMBR R0 K9 R2 + 0x880C010B, // 0038 GETMBR R3 R0 K11 + 0x200C0203, // 0039 NE R3 R1 R3 + 0x780E0004, // 003A JMPF R3 #0040 + 0x8C0C010A, // 003B GETMET R3 R0 K10 + 0x54160007, // 003C LDINT R5 8 + 0x58180000, // 003D LDCONST R6 K0 + 0x7C0C0600, // 003E CALL R3 3 + 0x90021601, // 003F SETMBR R0 K11 R1 + 0x80000000, // 0040 RET 0 }) ) ); @@ -99,226 +108,51 @@ be_local_closure(Matter_Plugin_Light1_set_bri, /* name */ /******************************************************************** -** Solidified function: read_attribute +** Solidified function: update_virtual ********************************************************************/ -be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */ +be_local_closure(Matter_Plugin_Light1_update_virtual, /* name */ be_nested_proto( - 12, /* nstack */ - 4, /* argc */ + 8, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 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(set), - /* K7 */ be_nested_str_weak(U1), - /* K8 */ be_nested_str_weak(shadow_bri), - /* K9 */ be_const_int(2), - /* K10 */ be_const_int(3), - /* K11 */ be_nested_str_weak(U4), - /* K12 */ be_const_int(1), - /* K13 */ be_nested_str_weak(read_attribute), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Power), + /* K2 */ be_nested_str_weak(Bri), + /* K3 */ be_nested_str_weak(set_bri), + /* K4 */ be_nested_str_weak(update_virtual), }), - be_str_weak(read_attribute), + be_str_weak(update_virtual), &be_const_str_solidified, - ( &(const binstruction[79]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0007, // 0004 LDINT R7 8 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E003D, // 0006 JMPF R7 #0045 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E0005, // 000A JMPF R7 #0011 - 0x8C1C0706, // 000B GETMET R7 R3 K6 - 0x88240907, // 000C GETMBR R9 R4 K7 - 0x88280108, // 000D GETMBR R10 R0 K8 - 0x7C1C0600, // 000E CALL R7 3 - 0x80040E00, // 000F RET 1 R7 - 0x70020032, // 0010 JMP #0044 - 0x1C1C0D09, // 0011 EQ R7 R6 K9 - 0x781E0005, // 0012 JMPF R7 #0019 - 0x8C1C0706, // 0013 GETMET R7 R3 K6 - 0x88240907, // 0014 GETMBR R9 R4 K7 - 0x58280005, // 0015 LDCONST R10 K5 - 0x7C1C0600, // 0016 CALL R7 3 - 0x80040E00, // 0017 RET 1 R7 - 0x7002002A, // 0018 JMP #0044 - 0x1C1C0D0A, // 0019 EQ R7 R6 K10 - 0x781E0005, // 001A JMPF R7 #0021 - 0x8C1C0706, // 001B GETMET R7 R3 K6 - 0x88240907, // 001C GETMBR R9 R4 K7 - 0x542A00FD, // 001D LDINT R10 254 - 0x7C1C0600, // 001E CALL R7 3 - 0x80040E00, // 001F RET 1 R7 - 0x70020022, // 0020 JMP #0044 - 0x541E000E, // 0021 LDINT R7 15 - 0x1C1C0C07, // 0022 EQ R7 R6 R7 - 0x781E0005, // 0023 JMPF R7 #002A - 0x8C1C0706, // 0024 GETMET R7 R3 K6 - 0x88240907, // 0025 GETMBR R9 R4 K7 - 0x58280005, // 0026 LDCONST R10 K5 - 0x7C1C0600, // 0027 CALL R7 3 - 0x80040E00, // 0028 RET 1 R7 - 0x70020019, // 0029 JMP #0044 - 0x541E0010, // 002A LDINT R7 17 - 0x1C1C0C07, // 002B EQ R7 R6 R7 - 0x781E0005, // 002C JMPF R7 #0033 - 0x8C1C0706, // 002D GETMET R7 R3 K6 - 0x88240907, // 002E GETMBR R9 R4 K7 - 0x88280108, // 002F GETMBR R10 R0 K8 - 0x7C1C0600, // 0030 CALL R7 3 - 0x80040E00, // 0031 RET 1 R7 - 0x70020010, // 0032 JMP #0044 - 0x541EFFFB, // 0033 LDINT R7 65532 - 0x1C1C0C07, // 0034 EQ R7 R6 R7 - 0x781E0005, // 0035 JMPF R7 #003C - 0x8C1C0706, // 0036 GETMET R7 R3 K6 - 0x8824090B, // 0037 GETMBR R9 R4 K11 - 0x5828000C, // 0038 LDCONST R10 K12 - 0x7C1C0600, // 0039 CALL R7 3 - 0x80040E00, // 003A RET 1 R7 - 0x70020007, // 003B JMP #0044 - 0x541EFFFC, // 003C LDINT R7 65533 - 0x1C1C0C07, // 003D EQ R7 R6 R7 - 0x781E0004, // 003E JMPF R7 #0044 - 0x8C1C0706, // 003F GETMET R7 R3 K6 - 0x8824090B, // 0040 GETMBR R9 R4 K11 - 0x542A0004, // 0041 LDINT R10 5 - 0x7C1C0600, // 0042 CALL R7 3 - 0x80040E00, // 0043 RET 1 R7 - 0x70020008, // 0044 JMP #004E - 0x601C0003, // 0045 GETGBL R7 G3 - 0x5C200000, // 0046 MOVE R8 R0 - 0x7C1C0200, // 0047 CALL R7 1 - 0x8C1C0F0D, // 0048 GETMET R7 R7 K13 - 0x5C240200, // 0049 MOVE R9 R1 - 0x5C280400, // 004A MOVE R10 R2 - 0x5C2C0600, // 004B MOVE R11 R3 - 0x7C1C0800, // 004C CALL R7 4 - 0x80040E00, // 004D RET 1 R7 - 0x80000000, // 004E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */ - be_nested_proto( - 11, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(virtual), - /* K1 */ be_nested_str_weak(light), - /* K2 */ be_nested_str_weak(get), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(bri), - /* K5 */ be_nested_str_weak(tasmota), - /* K6 */ be_nested_str_weak(scale_uint), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(shadow_bri), - /* K9 */ be_nested_str_weak(attribute_updated), - /* K10 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x7406001D, // 0001 JMPT R1 #0020 - 0xA4060200, // 0002 IMPORT R1 K1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x4C0C0000, // 0005 LDNIL R3 - 0x200C0403, // 0006 NE R3 R2 R3 - 0x780E0017, // 0007 JMPF R3 #0020 - 0x8C0C0503, // 0008 GETMET R3 R2 K3 - 0x58140004, // 0009 LDCONST R5 K4 - 0x4C180000, // 000A LDNIL R6 - 0x7C0C0600, // 000B CALL R3 3 - 0x4C100000, // 000C LDNIL R4 - 0x20100604, // 000D NE R4 R3 R4 - 0x78120010, // 000E JMPF R4 #0020 - 0xB8120A00, // 000F GETNGBL R4 K5 - 0x8C100906, // 0010 GETMET R4 R4 K6 - 0x5C180600, // 0011 MOVE R6 R3 - 0x581C0007, // 0012 LDCONST R7 K7 - 0x542200FE, // 0013 LDINT R8 255 - 0x58240007, // 0014 LDCONST R9 K7 - 0x542A00FD, // 0015 LDINT R10 254 - 0x7C100C00, // 0016 CALL R4 6 - 0x5C0C0800, // 0017 MOVE R3 R4 - 0x88100108, // 0018 GETMBR R4 R0 K8 - 0x20100604, // 0019 NE R4 R3 R4 - 0x78120004, // 001A JMPF R4 #0020 - 0x8C100109, // 001B GETMET R4 R0 K9 - 0x541A0007, // 001C LDINT R6 8 - 0x581C0007, // 001D LDCONST R7 K7 - 0x7C100600, // 001E CALL R4 3 - 0x90021003, // 001F SETMBR R0 K8 R3 - 0x60040003, // 0020 GETGBL R1 G3 - 0x5C080000, // 0021 MOVE R2 R0 - 0x7C040200, // 0022 CALL R1 1 - 0x8C04030A, // 0023 GETMET R1 R1 K10 - 0x7C040200, // 0024 CALL R1 1 - 0x80000000, // 0025 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_Light1_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_bri), - /* K2 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* 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 - 0x90020302, // 0008 SETMBR R0 K1 K2 - 0x80000000, // 0009 RET 0 + ( &(const binstruction[23]) { /* code */ + 0x8C080300, // 0000 GETMET R2 R1 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x7C080400, // 0002 CALL R2 2 + 0x8C0C0300, // 0003 GETMET R3 R1 K0 + 0x58140002, // 0004 LDCONST R5 K2 + 0x7C0C0400, // 0005 CALL R3 2 + 0x4C100000, // 0006 LDNIL R4 + 0x20100604, // 0007 NE R4 R3 R4 + 0x78120006, // 0008 JMPF R4 #0010 + 0x8C100103, // 0009 GETMET R4 R0 K3 + 0x60180009, // 000A GETGBL R6 G9 + 0x5C1C0600, // 000B MOVE R7 R3 + 0x7C180200, // 000C CALL R6 1 + 0x5C1C0400, // 000D MOVE R7 R2 + 0x7C100600, // 000E CALL R4 3 + 0x80000800, // 000F RET 0 + 0x60100003, // 0010 GETGBL R4 G3 + 0x5C140000, // 0011 MOVE R5 R0 + 0x7C100200, // 0012 CALL R4 1 + 0x8C100904, // 0013 GETMET R4 R4 K4 + 0x5C180200, // 0014 MOVE R6 R1 + 0x7C100400, // 0015 CALL R4 2 + 0x80000000, // 0016 RET 0 }) ) ); @@ -489,6 +323,268 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Light1_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_bri), + /* K2 */ be_const_int(0), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* 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 + 0x90020302, // 0008 SETMBR R0 K1 K2 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */ + be_nested_proto( + 11, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(virtual), + /* K1 */ be_nested_str_weak(light), + /* K2 */ be_nested_str_weak(get), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(bri), + /* K5 */ be_nested_str_weak(tasmota), + /* K6 */ be_nested_str_weak(scale_uint), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(shadow_bri), + /* K9 */ be_nested_str_weak(attribute_updated), + /* K10 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[38]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x7406001D, // 0001 JMPT R1 #0020 + 0xA4060200, // 0002 IMPORT R1 K1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x7C080200, // 0004 CALL R2 1 + 0x4C0C0000, // 0005 LDNIL R3 + 0x200C0403, // 0006 NE R3 R2 R3 + 0x780E0017, // 0007 JMPF R3 #0020 + 0x8C0C0503, // 0008 GETMET R3 R2 K3 + 0x58140004, // 0009 LDCONST R5 K4 + 0x4C180000, // 000A LDNIL R6 + 0x7C0C0600, // 000B CALL R3 3 + 0x4C100000, // 000C LDNIL R4 + 0x20100604, // 000D NE R4 R3 R4 + 0x78120010, // 000E JMPF R4 #0020 + 0xB8120A00, // 000F GETNGBL R4 K5 + 0x8C100906, // 0010 GETMET R4 R4 K6 + 0x5C180600, // 0011 MOVE R6 R3 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x542200FE, // 0013 LDINT R8 255 + 0x58240007, // 0014 LDCONST R9 K7 + 0x542A00FD, // 0015 LDINT R10 254 + 0x7C100C00, // 0016 CALL R4 6 + 0x5C0C0800, // 0017 MOVE R3 R4 + 0x88100108, // 0018 GETMBR R4 R0 K8 + 0x20100604, // 0019 NE R4 R3 R4 + 0x78120004, // 001A JMPF R4 #0020 + 0x8C100109, // 001B GETMET R4 R0 K9 + 0x541A0007, // 001C LDINT R6 8 + 0x581C0007, // 001D LDCONST R7 K7 + 0x7C100600, // 001E CALL R4 3 + 0x90021003, // 001F SETMBR R0 K8 R3 + 0x60040003, // 0020 GETGBL R1 G3 + 0x5C080000, // 0021 MOVE R2 R0 + 0x7C040200, // 0022 CALL R1 1 + 0x8C04030A, // 0023 GETMET R1 R1 K10 + 0x7C040200, // 0024 CALL R1 1 + 0x80000000, // 0025 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Light1_append_state_json, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s_X2C_X22Bri_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_onoff), + /* K2 */ be_nested_str_weak(shadow_bri), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x88100102, // 0005 GETMBR R4 R0 K2 + 0x7C040600, // 0006 CALL R1 3 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 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(set), + /* K7 */ be_nested_str_weak(U1), + /* K8 */ be_nested_str_weak(shadow_bri), + /* K9 */ be_const_int(2), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(U4), + /* K12 */ be_const_int(1), + /* K13 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[79]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x541E0007, // 0004 LDINT R7 8 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E003D, // 0006 JMPF R7 #0045 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E0005, // 000A JMPF R7 #0011 + 0x8C1C0706, // 000B GETMET R7 R3 K6 + 0x88240907, // 000C GETMBR R9 R4 K7 + 0x88280108, // 000D GETMBR R10 R0 K8 + 0x7C1C0600, // 000E CALL R7 3 + 0x80040E00, // 000F RET 1 R7 + 0x70020032, // 0010 JMP #0044 + 0x1C1C0D09, // 0011 EQ R7 R6 K9 + 0x781E0005, // 0012 JMPF R7 #0019 + 0x8C1C0706, // 0013 GETMET R7 R3 K6 + 0x88240907, // 0014 GETMBR R9 R4 K7 + 0x58280005, // 0015 LDCONST R10 K5 + 0x7C1C0600, // 0016 CALL R7 3 + 0x80040E00, // 0017 RET 1 R7 + 0x7002002A, // 0018 JMP #0044 + 0x1C1C0D0A, // 0019 EQ R7 R6 K10 + 0x781E0005, // 001A JMPF R7 #0021 + 0x8C1C0706, // 001B GETMET R7 R3 K6 + 0x88240907, // 001C GETMBR R9 R4 K7 + 0x542A00FD, // 001D LDINT R10 254 + 0x7C1C0600, // 001E CALL R7 3 + 0x80040E00, // 001F RET 1 R7 + 0x70020022, // 0020 JMP #0044 + 0x541E000E, // 0021 LDINT R7 15 + 0x1C1C0C07, // 0022 EQ R7 R6 R7 + 0x781E0005, // 0023 JMPF R7 #002A + 0x8C1C0706, // 0024 GETMET R7 R3 K6 + 0x88240907, // 0025 GETMBR R9 R4 K7 + 0x58280005, // 0026 LDCONST R10 K5 + 0x7C1C0600, // 0027 CALL R7 3 + 0x80040E00, // 0028 RET 1 R7 + 0x70020019, // 0029 JMP #0044 + 0x541E0010, // 002A LDINT R7 17 + 0x1C1C0C07, // 002B EQ R7 R6 R7 + 0x781E0005, // 002C JMPF R7 #0033 + 0x8C1C0706, // 002D GETMET R7 R3 K6 + 0x88240907, // 002E GETMBR R9 R4 K7 + 0x88280108, // 002F GETMBR R10 R0 K8 + 0x7C1C0600, // 0030 CALL R7 3 + 0x80040E00, // 0031 RET 1 R7 + 0x70020010, // 0032 JMP #0044 + 0x541EFFFB, // 0033 LDINT R7 65532 + 0x1C1C0C07, // 0034 EQ R7 R6 R7 + 0x781E0005, // 0035 JMPF R7 #003C + 0x8C1C0706, // 0036 GETMET R7 R3 K6 + 0x8824090B, // 0037 GETMBR R9 R4 K11 + 0x5828000C, // 0038 LDCONST R10 K12 + 0x7C1C0600, // 0039 CALL R7 3 + 0x80040E00, // 003A RET 1 R7 + 0x70020007, // 003B JMP #0044 + 0x541EFFFC, // 003C LDINT R7 65533 + 0x1C1C0C07, // 003D EQ R7 R6 R7 + 0x781E0004, // 003E JMPF R7 #0044 + 0x8C1C0706, // 003F GETMET R7 R3 K6 + 0x8824090B, // 0040 GETMBR R9 R4 K11 + 0x542A0004, // 0041 LDINT R10 5 + 0x7C1C0600, // 0042 CALL R7 3 + 0x80040E00, // 0043 RET 1 R7 + 0x70020008, // 0044 JMP #004E + 0x601C0003, // 0045 GETGBL R7 G3 + 0x5C200000, // 0046 MOVE R8 R0 + 0x7C1C0200, // 0047 CALL R7 1 + 0x8C1C0F0D, // 0048 GETMET R7 R7 K13 + 0x5C240200, // 0049 MOVE R9 R1 + 0x5C280400, // 004A MOVE R10 R2 + 0x5C2C0600, // 004B MOVE R11 R3 + 0x7C1C0800, // 004C CALL R7 4 + 0x80040E00, // 004D RET 1 R7 + 0x80000000, // 004E RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Light1 ********************************************************************/ @@ -496,15 +592,17 @@ extern const bclass be_class_Matter_Plugin_Light0; be_local_class(Matter_Plugin_Light1, 1, &be_class_Matter_Plugin_Light0, - be_nested_map(10, + be_nested_map(13, ( (struct bmapnode*) &(const bmapnode[]) { - { 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(257, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(shadow_bri, 6), be_const_var(0) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Light1_update_virtual_closure) }, { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) }, + { be_const_key_weak(TYPE, 0), be_nested_str_weak(light1) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Light1_append_state_json_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) }, + { be_const_key_weak(set_bri, 4), be_const_closure(Matter_Plugin_Light1_set_bri_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) }, + { be_const_key_weak(shadow_bri, -1), be_const_var(0) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) }, { be_const_key_weak(CLUSTERS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(7, @@ -576,11 +674,17 @@ be_local_class(Matter_Plugin_Light1, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) }, - { be_const_key_weak(TYPE, 8), be_nested_str_weak(light1) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) }, - { be_const_key_weak(set_bri, 1), be_const_closure(Matter_Plugin_Light1_set_bri_closure) }, + { be_const_key_weak(UPDATE_COMMANDS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(2, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Power), + be_nested_str_weak(Bri), + })) ) } )) }, + { 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(257, -1), be_const_int(2) }, + })) ) } )) }, })), be_str_weak(Matter_Plugin_Light1) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h index 326036f237d0..d9fa044817d7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h @@ -33,6 +33,88 @@ be_local_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(json), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(cmd), + /* K4 */ be_nested_str_weak(Status_X208), + /* K5 */ be_nested_str_weak(load), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(Switch), + /* K8 */ be_nested_str_weak(tasmota_switch_index), + /* K9 */ be_nested_str_weak(ON), + /* K10 */ be_nested_str_weak(shadow_contact), + /* K11 */ be_nested_str_weak(attribute_updated), + /* K12 */ be_const_int(0), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0xA4060200, // 0005 IMPORT R1 K1 + 0xB80A0400, // 0006 GETNGBL R2 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x58100004, // 0008 LDCONST R4 K4 + 0x50140200, // 0009 LDBOOL R5 1 0 + 0x7C080600, // 000A CALL R2 3 + 0x4C0C0000, // 000B LDNIL R3 + 0x200C0403, // 000C NE R3 R2 R3 + 0x780E001D, // 000D JMPF R3 #002C + 0x8C0C0305, // 000E GETMET R3 R1 K5 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x4C100000, // 0011 LDNIL R4 + 0x20100604, // 0012 NE R4 R3 R4 + 0x78120017, // 0013 JMPF R4 #002C + 0x50100000, // 0014 LDBOOL R4 0 0 + 0x8C140706, // 0015 GETMET R5 R3 K6 + 0x601C0008, // 0016 GETGBL R7 G8 + 0x88200108, // 0017 GETMBR R8 R0 K8 + 0x7C1C0200, // 0018 CALL R7 1 + 0x001E0E07, // 0019 ADD R7 K7 R7 + 0x7C140400, // 001A CALL R5 2 + 0x1C140B09, // 001B EQ R5 R5 K9 + 0x5C100A00, // 001C MOVE R4 R5 + 0x8814010A, // 001D GETMBR R5 R0 K10 + 0x4C180000, // 001E LDNIL R6 + 0x20140A06, // 001F NE R5 R5 R6 + 0x78160009, // 0020 JMPF R5 #002B + 0x8814010A, // 0021 GETMBR R5 R0 K10 + 0x60180017, // 0022 GETGBL R6 G23 + 0x5C1C0800, // 0023 MOVE R7 R4 + 0x7C180200, // 0024 CALL R6 1 + 0x20140A06, // 0025 NE R5 R5 R6 + 0x78160003, // 0026 JMPF R5 #002B + 0x8C14010B, // 0027 GETMET R5 R0 K11 + 0x541E0044, // 0028 LDINT R7 69 + 0x5820000C, // 0029 LDCONST R8 K12 + 0x7C140600, // 002A CALL R5 3 + 0x90021404, // 002B SETMBR R0 K10 R4 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: parse_configuration ********************************************************************/ @@ -164,11 +246,11 @@ be_local_closure(Matter_Plugin_Sensor_Contact_read_attribute, /* name */ /******************************************************************** -** Solidified function: update_shadow +** Solidified function: append_state_json ********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */ +be_local_closure(Matter_Plugin_Sensor_Contact_append_state_json, /* name */ be_nested_proto( - 9, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -176,69 +258,20 @@ be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(json), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(cmd), - /* K4 */ be_nested_str_weak(Status_X208), - /* K5 */ be_nested_str_weak(load), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(Switch), - /* K8 */ be_nested_str_weak(tasmota_switch_index), - /* K9 */ be_nested_str_weak(ON), - /* K10 */ be_nested_str_weak(shadow_contact), - /* K11 */ be_nested_str_weak(attribute_updated), - /* K12 */ be_const_int(0), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Contact_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_contact), }), - be_str_weak(update_shadow), + be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0xA4060200, // 0005 IMPORT R1 K1 - 0xB80A0400, // 0006 GETNGBL R2 K2 - 0x8C080503, // 0007 GETMET R2 R2 K3 - 0x58100004, // 0008 LDCONST R4 K4 - 0x50140200, // 0009 LDBOOL R5 1 0 - 0x7C080600, // 000A CALL R2 3 - 0x4C0C0000, // 000B LDNIL R3 - 0x200C0403, // 000C NE R3 R2 R3 - 0x780E001D, // 000D JMPF R3 #002C - 0x8C0C0305, // 000E GETMET R3 R1 K5 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x4C100000, // 0011 LDNIL R4 - 0x20100604, // 0012 NE R4 R3 R4 - 0x78120017, // 0013 JMPF R4 #002C - 0x50100000, // 0014 LDBOOL R4 0 0 - 0x8C140706, // 0015 GETMET R5 R3 K6 - 0x601C0008, // 0016 GETGBL R7 G8 - 0x88200108, // 0017 GETMBR R8 R0 K8 - 0x7C1C0200, // 0018 CALL R7 1 - 0x001E0E07, // 0019 ADD R7 K7 R7 - 0x7C140400, // 001A CALL R5 2 - 0x1C140B09, // 001B EQ R5 R5 K9 - 0x5C100A00, // 001C MOVE R4 R5 - 0x8814010A, // 001D GETMBR R5 R0 K10 - 0x4C180000, // 001E LDNIL R6 - 0x20140A06, // 001F NE R5 R5 R6 - 0x78160009, // 0020 JMPF R5 #002B - 0x8814010A, // 0021 GETMBR R5 R0 K10 - 0x60180017, // 0022 GETGBL R6 G23 - 0x5C1C0800, // 0023 MOVE R7 R4 - 0x7C180200, // 0024 CALL R6 1 - 0x20140A06, // 0025 NE R5 R5 R6 - 0x78160003, // 0026 JMPF R5 #002B - 0x8C14010B, // 0027 GETMET R5 R0 K11 - 0x541E0044, // 0028 LDINT R7 69 - 0x5820000C, // 0029 LDCONST R8 K12 - 0x7C140600, // 002A CALL R5 3 - 0x90021404, // 002B SETMBR R0 K10 R4 - 0x80000000, // 002C RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C040400, // 0005 CALL R1 2 + 0x80040200, // 0006 RET 1 R1 }) ) ); @@ -252,18 +285,24 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Contact, 2, &be_class_Matter_Plugin_Device, - be_nested_map(13, + be_nested_map(14, ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(shadow_contact, 5), be_const_var(1) }, { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(shadow_contact, -1), be_const_var(1) }, + { be_const_key_weak(UPDATE_TIME, 4), be_const_int(750) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(contact) }, - { be_const_key_weak(ARG_TYPE, 5), be_const_static_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(ARG_HINT, 1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(Contact) }, - { be_const_key_weak(parse_configuration, 8), be_const_closure(Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, + { be_const_key_weak(append_state_json, 9), be_const_closure(Matter_Plugin_Sensor_Contact_append_state_json_closure) }, + { be_const_key_weak(read_attribute, 12), be_const_closure(Matter_Plugin_Sensor_Contact_read_attribute_closure) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Contact_update_shadow_closure) }, - { be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(Contact) }, + { be_const_key_weak(tasmota_switch_index, 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(21, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(ARG_HINT, 6), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -323,12 +362,7 @@ be_local_class(Matter_Plugin_Sensor_Contact, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Sensor_Contact_read_attribute_closure) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(21, -1), be_const_int(1) }, - })) ) } )) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Contact) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h index 33088862998c..67dc45b954a2 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h @@ -6,6 +6,101 @@ extern const bclass be_class_Matter_Plugin_Sensor_Humidity; +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(pre_value), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0004, // 0002 JMPF R2 #0008 + 0x60080009, // 0003 GETGBL R2 G9 + 0x540E0063, // 0004 LDINT R3 100 + 0x080C0203, // 0005 MUL R3 R1 R3 + 0x7C080200, // 0006 CALL R2 1 + 0x70020000, // 0007 JMP #0009 + 0x4C080000, // 0008 LDNIL R2 + 0x80040400, // 0009 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Humidity_value_changed, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + }), + be_str_weak(value_changed), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x54120404, // 0001 LDINT R4 1029 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C080600, // 0003 CALL R2 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Humidity_append_state_json, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Humidity_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -115,70 +210,6 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0004, // 0002 JMPF R2 #0008 - 0x60080009, // 0003 GETGBL R2 G9 - 0x540E0063, // 0004 LDINT R3 100 - 0x080C0203, // 0005 MUL R3 R1 R3 - 0x7C080200, // 0006 CALL R2 1 - 0x70020000, // 0007 JMP #0009 - 0x4C080000, // 0008 LDNIL R2 - 0x80040400, // 0009 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Humidity_value_changed, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x54120404, // 0001 LDINT R4 1029 - 0x58140001, // 0002 LDCONST R5 K1 - 0x7C080600, // 0003 CALL R2 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Humidity ********************************************************************/ @@ -186,11 +217,16 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Humidity, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(7, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) }, + { be_const_key_weak(TYPES, 3), 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_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) }, - { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_int(775, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Humidity_append_state_json_closure) }, + { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -251,14 +287,10 @@ be_local_class(Matter_Plugin_Sensor_Humidity, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(humidity) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) }, + { be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Humidity_value_changed_closure) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) }, - { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_value_changed_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(775, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Humidity) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h index 28107aa81541..86e427d1bb7d 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h @@ -6,6 +6,113 @@ extern const bclass be_class_Matter_Plugin_Sensor_Illuminance; +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(math), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(log10), + /* K3 */ be_const_int(1), + }), + be_str_weak(pre_value), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0001, // 0002 JMPF R2 #0005 + 0x4C080000, // 0003 LDNIL R2 + 0x80040400, // 0004 RET 1 R2 + 0xA40A0000, // 0005 IMPORT R2 K0 + 0x140C0301, // 0006 LT R3 R1 K1 + 0x780E0001, // 0007 JMPF R3 #000A + 0x80060200, // 0008 RET 1 K1 + 0x70020005, // 0009 JMP #0010 + 0x8C0C0502, // 000A GETMET R3 R2 K2 + 0x00140303, // 000B ADD R5 R1 K3 + 0x7C0C0400, // 000C CALL R3 2 + 0x5412270F, // 000D LDINT R4 10000 + 0x080C0604, // 000E MUL R3 R3 R4 + 0x80040600, // 000F RET 1 R3 + 0x80000000, // 0010 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Illuminance_value_changed, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + }), + be_str_weak(value_changed), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x541203FF, // 0001 LDINT R4 1024 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C080600, // 0003 CALL R2 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Illuminance_append_state_json, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Illuminance_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -115,82 +222,6 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(math), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(log10), - /* K3 */ be_const_int(1), - }), - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0001, // 0002 JMPF R2 #0005 - 0x4C080000, // 0003 LDNIL R2 - 0x80040400, // 0004 RET 1 R2 - 0xA40A0000, // 0005 IMPORT R2 K0 - 0x140C0301, // 0006 LT R3 R1 K1 - 0x780E0001, // 0007 JMPF R3 #000A - 0x80060200, // 0008 RET 1 K1 - 0x70020005, // 0009 JMP #0010 - 0x8C0C0502, // 000A GETMET R3 R2 K2 - 0x00140303, // 000B ADD R5 R1 K3 - 0x7C0C0400, // 000C CALL R3 2 - 0x5412270F, // 000D LDINT R4 10000 - 0x080C0604, // 000E MUL R3 R3 R4 - 0x80040600, // 000F RET 1 R3 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Illuminance_value_changed, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x541203FF, // 0001 LDINT R4 1024 - 0x58140001, // 0002 LDCONST R5 K1 - 0x7C080600, // 0003 CALL R2 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Illuminance ********************************************************************/ @@ -198,11 +229,16 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Illuminance, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(7, + be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) }, - { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) }, + { be_const_key_weak(TYPES, 3), 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(262, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Illuminance_append_state_json_closure) }, + { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -263,14 +299,10 @@ be_local_class(Matter_Plugin_Sensor_Illuminance, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(illuminance) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) }, + { be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Illuminance_value_changed_closure) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) }, - { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_value_changed_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(262, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Illuminance) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h index 3c387918b47a..bb58ae60aed5 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h @@ -6,6 +6,39 @@ extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Occupancy_append_state_json, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Occupancy_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_occupancy), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C040400, // 0005 CALL R1 2 + 0x80040200, // 0006 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: ********************************************************************/ @@ -74,6 +107,84 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name * /*******************************************************************/ +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(Switch), + /* K2 */ be_nested_str_weak(tasmota_switch_index), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(cmd), + /* K5 */ be_nested_str_weak(Status_X208), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(StatusSNS), + /* K8 */ be_nested_str_weak(contains), + /* K9 */ be_nested_str_weak(ON), + /* K10 */ be_nested_str_weak(shadow_occupancy), + /* K11 */ be_nested_str_weak(attribute_updated), + /* K12 */ be_const_int(0), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0x60040008, // 0005 GETGBL R1 G8 + 0x88080102, // 0006 GETMBR R2 R0 K2 + 0x7C040200, // 0007 CALL R1 1 + 0x00060201, // 0008 ADD R1 K1 R1 + 0xB80A0600, // 0009 GETNGBL R2 K3 + 0x8C080504, // 000A GETMET R2 R2 K4 + 0x58100005, // 000B LDCONST R4 K5 + 0x50140200, // 000C LDBOOL R5 1 0 + 0x7C080600, // 000D CALL R2 3 + 0x4C0C0000, // 000E LDNIL R3 + 0x200C0403, // 000F NE R3 R2 R3 + 0x780E0003, // 0010 JMPF R3 #0015 + 0x8C0C0506, // 0011 GETMET R3 R2 K6 + 0x58140007, // 0012 LDCONST R5 K7 + 0x7C0C0400, // 0013 CALL R3 2 + 0x5C080600, // 0014 MOVE R2 R3 + 0x4C0C0000, // 0015 LDNIL R3 + 0x200C0403, // 0016 NE R3 R2 R3 + 0x780E000F, // 0017 JMPF R3 #0028 + 0x8C0C0508, // 0018 GETMET R3 R2 K8 + 0x5C140200, // 0019 MOVE R5 R1 + 0x7C0C0400, // 001A CALL R3 2 + 0x780E000B, // 001B JMPF R3 #0028 + 0x8C0C0506, // 001C GETMET R3 R2 K6 + 0x5C140200, // 001D MOVE R5 R1 + 0x7C0C0400, // 001E CALL R3 2 + 0x1C0C0709, // 001F EQ R3 R3 K9 + 0x8810010A, // 0020 GETMBR R4 R0 K10 + 0x20100803, // 0021 NE R4 R4 R3 + 0x78120003, // 0022 JMPF R4 #0027 + 0x8C10010B, // 0023 GETMET R4 R0 K11 + 0x541A0405, // 0024 LDINT R6 1030 + 0x581C000C, // 0025 LDCONST R7 K12 + 0x7C100600, // 0026 CALL R4 3 + 0x90021403, // 0027 SETMBR R0 K10 R3 + 0x80000000, // 0028 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -181,84 +292,6 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(Switch), - /* K2 */ be_nested_str_weak(tasmota_switch_index), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(cmd), - /* K5 */ be_nested_str_weak(Status_X208), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(StatusSNS), - /* K8 */ be_nested_str_weak(contains), - /* K9 */ be_nested_str_weak(ON), - /* K10 */ be_nested_str_weak(shadow_occupancy), - /* K11 */ be_nested_str_weak(attribute_updated), - /* K12 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0x60040008, // 0005 GETGBL R1 G8 - 0x88080102, // 0006 GETMBR R2 R0 K2 - 0x7C040200, // 0007 CALL R1 1 - 0x00060201, // 0008 ADD R1 K1 R1 - 0xB80A0600, // 0009 GETNGBL R2 K3 - 0x8C080504, // 000A GETMET R2 R2 K4 - 0x58100005, // 000B LDCONST R4 K5 - 0x50140200, // 000C LDBOOL R5 1 0 - 0x7C080600, // 000D CALL R2 3 - 0x4C0C0000, // 000E LDNIL R3 - 0x200C0403, // 000F NE R3 R2 R3 - 0x780E0003, // 0010 JMPF R3 #0015 - 0x8C0C0506, // 0011 GETMET R3 R2 K6 - 0x58140007, // 0012 LDCONST R5 K7 - 0x7C0C0400, // 0013 CALL R3 2 - 0x5C080600, // 0014 MOVE R2 R3 - 0x4C0C0000, // 0015 LDNIL R3 - 0x200C0403, // 0016 NE R3 R2 R3 - 0x780E000F, // 0017 JMPF R3 #0028 - 0x8C0C0508, // 0018 GETMET R3 R2 K8 - 0x5C140200, // 0019 MOVE R5 R1 - 0x7C0C0400, // 001A CALL R3 2 - 0x780E000B, // 001B JMPF R3 #0028 - 0x8C0C0506, // 001C GETMET R3 R2 K6 - 0x5C140200, // 001D MOVE R5 R1 - 0x7C0C0400, // 001E CALL R3 2 - 0x1C0C0709, // 001F EQ R3 R3 K9 - 0x8810010A, // 0020 GETMBR R4 R0 K10 - 0x20100803, // 0021 NE R4 R4 R3 - 0x78120003, // 0022 JMPF R4 #0027 - 0x8C10010B, // 0023 GETMET R4 R0 K11 - 0x541A0405, // 0024 LDINT R6 1030 - 0x581C000C, // 0025 LDCONST R7 K12 - 0x7C100600, // 0026 CALL R4 3 - 0x90021403, // 0027 SETMBR R0 K10 R3 - 0x80000000, // 0028 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Occupancy ********************************************************************/ @@ -266,19 +299,9 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Occupancy, 2, &be_class_Matter_Plugin_Device, - be_nested_map(13, + be_nested_map(14, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) }, - { be_const_key_weak(ARG_HINT, 1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, - { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, - { be_const_key_weak(shadow_occupancy, 8), be_const_var(1) }, - { be_const_key_weak(update_shadow, 5), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, - { be_const_key_weak(NAME, 6), be_nested_str_weak(Occupancy) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -339,12 +362,23 @@ be_local_class(Matter_Plugin_Sensor_Occupancy, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, + { be_const_key_weak(UPDATE_TIME, 9), be_const_int(750) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_append_state_json_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(Occupancy) }, + { be_const_key_weak(tasmota_switch_index, 12), 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(263, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(parse_configuration, 6), be_const_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, + { be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, + { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) }, })), be_str_weak(Matter_Plugin_Sensor_Occupancy) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h index 1ccfc963bea8..ca54ac19de67 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h @@ -33,6 +33,84 @@ be_local_closure(Matter_Plugin_Sensor_OnOff__X3Clambda_X3E, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_OnOff_update_shadow, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(Switch), + /* K2 */ be_nested_str_weak(tasmota_switch_index), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(cmd), + /* K5 */ be_nested_str_weak(Status_X208), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(StatusSNS), + /* K8 */ be_nested_str_weak(contains), + /* K9 */ be_nested_str_weak(ON), + /* K10 */ be_nested_str_weak(shadow_onoff), + /* K11 */ be_nested_str_weak(attribute_updated), + /* K12 */ be_const_int(0), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0x60040008, // 0005 GETGBL R1 G8 + 0x88080102, // 0006 GETMBR R2 R0 K2 + 0x7C040200, // 0007 CALL R1 1 + 0x00060201, // 0008 ADD R1 K1 R1 + 0xB80A0600, // 0009 GETNGBL R2 K3 + 0x8C080504, // 000A GETMET R2 R2 K4 + 0x58100005, // 000B LDCONST R4 K5 + 0x50140200, // 000C LDBOOL R5 1 0 + 0x7C080600, // 000D CALL R2 3 + 0x4C0C0000, // 000E LDNIL R3 + 0x200C0403, // 000F NE R3 R2 R3 + 0x780E0003, // 0010 JMPF R3 #0015 + 0x8C0C0506, // 0011 GETMET R3 R2 K6 + 0x58140007, // 0012 LDCONST R5 K7 + 0x7C0C0400, // 0013 CALL R3 2 + 0x5C080600, // 0014 MOVE R2 R3 + 0x4C0C0000, // 0015 LDNIL R3 + 0x200C0403, // 0016 NE R3 R2 R3 + 0x780E000F, // 0017 JMPF R3 #0028 + 0x8C0C0508, // 0018 GETMET R3 R2 K8 + 0x5C140200, // 0019 MOVE R5 R1 + 0x7C0C0400, // 001A CALL R3 2 + 0x780E000B, // 001B JMPF R3 #0028 + 0x8C0C0506, // 001C GETMET R3 R2 K6 + 0x5C140200, // 001D MOVE R5 R1 + 0x7C0C0400, // 001E CALL R3 2 + 0x1C0C0709, // 001F EQ R3 R3 K9 + 0x8810010A, // 0020 GETMBR R4 R0 K10 + 0x20100803, // 0021 NE R4 R4 R3 + 0x78120003, // 0022 JMPF R4 #0027 + 0x8C10010B, // 0023 GETMET R4 R0 K11 + 0x541A0005, // 0024 LDINT R6 6 + 0x581C000C, // 0025 LDCONST R7 K12 + 0x7C100600, // 0026 CALL R4 3 + 0x90021403, // 0027 SETMBR R0 K10 R3 + 0x80000000, // 0028 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: parse_configuration ********************************************************************/ @@ -155,11 +233,11 @@ be_local_closure(Matter_Plugin_Sensor_OnOff_read_attribute, /* name */ /******************************************************************** -** Solidified function: update_shadow +** Solidified function: append_state_json ********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_OnOff_update_shadow, /* name */ +be_local_closure(Matter_Plugin_Sensor_OnOff_append_state_json, /* name */ be_nested_proto( - 8, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -167,65 +245,20 @@ be_local_closure(Matter_Plugin_Sensor_OnOff_update_shadow, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(Switch), - /* K2 */ be_nested_str_weak(tasmota_switch_index), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(cmd), - /* K5 */ be_nested_str_weak(Status_X208), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(StatusSNS), - /* K8 */ be_nested_str_weak(contains), - /* K9 */ be_nested_str_weak(ON), - /* K10 */ be_nested_str_weak(shadow_onoff), - /* K11 */ be_nested_str_weak(attribute_updated), - /* K12 */ be_const_int(0), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22OnOff_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_onoff), }), - be_str_weak(update_shadow), + be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0x60040008, // 0005 GETGBL R1 G8 - 0x88080102, // 0006 GETMBR R2 R0 K2 - 0x7C040200, // 0007 CALL R1 1 - 0x00060201, // 0008 ADD R1 K1 R1 - 0xB80A0600, // 0009 GETNGBL R2 K3 - 0x8C080504, // 000A GETMET R2 R2 K4 - 0x58100005, // 000B LDCONST R4 K5 - 0x50140200, // 000C LDBOOL R5 1 0 - 0x7C080600, // 000D CALL R2 3 - 0x4C0C0000, // 000E LDNIL R3 - 0x200C0403, // 000F NE R3 R2 R3 - 0x780E0003, // 0010 JMPF R3 #0015 - 0x8C0C0506, // 0011 GETMET R3 R2 K6 - 0x58140007, // 0012 LDCONST R5 K7 - 0x7C0C0400, // 0013 CALL R3 2 - 0x5C080600, // 0014 MOVE R2 R3 - 0x4C0C0000, // 0015 LDNIL R3 - 0x200C0403, // 0016 NE R3 R2 R3 - 0x780E000F, // 0017 JMPF R3 #0028 - 0x8C0C0508, // 0018 GETMET R3 R2 K8 - 0x5C140200, // 0019 MOVE R5 R1 - 0x7C0C0400, // 001A CALL R3 2 - 0x780E000B, // 001B JMPF R3 #0028 - 0x8C0C0506, // 001C GETMET R3 R2 K6 - 0x5C140200, // 001D MOVE R5 R1 - 0x7C0C0400, // 001E CALL R3 2 - 0x1C0C0709, // 001F EQ R3 R3 K9 - 0x8810010A, // 0020 GETMBR R4 R0 K10 - 0x20100803, // 0021 NE R4 R4 R3 - 0x78120003, // 0022 JMPF R4 #0027 - 0x8C10010B, // 0023 GETMET R4 R0 K11 - 0x541A0005, // 0024 LDINT R6 6 - 0x581C000C, // 0025 LDCONST R7 K12 - 0x7C100600, // 0026 CALL R4 3 - 0x90021403, // 0027 SETMBR R0 K10 R3 - 0x80000000, // 0028 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x600C0009, // 0002 GETGBL R3 G9 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C040400, // 0005 CALL R1 2 + 0x80040200, // 0006 RET 1 R1 }) ) ); @@ -239,19 +272,9 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_OnOff, 2, &be_class_Matter_Plugin_Device, - be_nested_map(13, + be_nested_map(14, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG, 8), be_nested_str_weak(switch) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) }, - { be_const_key_weak(ARG_TYPE, 1), be_const_static_closure(Matter_Plugin_Sensor_OnOff__X3Clambda_X3E_closure) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_update_shadow_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(OnOff_X20Sensor) }, - { be_const_key_weak(parse_configuration, 5), be_const_closure(Matter_Plugin_Sensor_OnOff_parse_configuration_closure) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, - { be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -310,12 +333,23 @@ be_local_class(Matter_Plugin_Sensor_OnOff, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Sensor_OnOff_read_attribute_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, + { be_const_key_weak(UPDATE_TIME, 4), be_const_int(750) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) }, + { be_const_key_weak(append_state_json, 12), be_const_closure(Matter_Plugin_Sensor_OnOff_append_state_json_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_read_attribute_closure) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_update_shadow_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(OnOff_X20Sensor) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_parse_configuration_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(2128, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(ARG_HINT, 9), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(tasmota_switch_index, 13), be_const_var(0) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_OnOff__X3Clambda_X3E_closure) }, })), be_str_weak(Matter_Plugin_Sensor_OnOff) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h index 328ab2438817..ddf6e0cc839a 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h @@ -6,6 +6,100 @@ extern const bclass be_class_Matter_Plugin_Sensor_Pressure; +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(pre_value), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0x60080009, // 0003 GETGBL R2 G9 + 0x5C0C0200, // 0004 MOVE R3 R1 + 0x7C080200, // 0005 CALL R2 1 + 0x70020000, // 0006 JMP #0008 + 0x4C080000, // 0007 LDNIL R2 + 0x80040400, // 0008 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Pressure_value_changed, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + }), + be_str_weak(value_changed), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x54120402, // 0001 LDINT R4 1027 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C080600, // 0003 CALL R2 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Pressure_append_state_json, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Pressure_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -115,69 +209,6 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0003, // 0002 JMPF R2 #0007 - 0x60080009, // 0003 GETGBL R2 G9 - 0x5C0C0200, // 0004 MOVE R3 R1 - 0x7C080200, // 0005 CALL R2 1 - 0x70020000, // 0006 JMP #0008 - 0x4C080000, // 0007 LDNIL R2 - 0x80040400, // 0008 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Pressure_value_changed, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x54120402, // 0001 LDINT R4 1027 - 0x58140001, // 0002 LDCONST R5 K1 - 0x7C080600, // 0003 CALL R2 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Pressure ********************************************************************/ @@ -185,11 +216,16 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Pressure, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(7, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) }, + { be_const_key_weak(TYPES, 3), 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_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) }, - { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_int(773, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Pressure_append_state_json_closure) }, + { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -250,14 +286,10 @@ be_local_class(Matter_Plugin_Sensor_Pressure, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(pressure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) }, + { be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Pressure_value_changed_closure) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) }, - { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_value_changed_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(773, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Pressure) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h index 7a69753690be..72a23f14d906 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h @@ -6,6 +6,116 @@ extern const bclass be_class_Matter_Plugin_Sensor_Temp; +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(get_option), + /* K2 */ be_const_int(1), + /* K3 */ be_const_real_hex(0x3FE66666), + }), + be_str_weak(pre_value), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x54120007, // 0002 LDINT R4 8 + 0x7C080400, // 0003 CALL R2 2 + 0x1C080502, // 0004 EQ R2 R2 K2 + 0x780A0003, // 0005 JMPF R2 #000A + 0x540A001F, // 0006 LDINT R2 32 + 0x04080202, // 0007 SUB R2 R1 R2 + 0x0C080503, // 0008 DIV R2 R2 K3 + 0x5C040400, // 0009 MOVE R1 R2 + 0x4C080000, // 000A LDNIL R2 + 0x20080202, // 000B NE R2 R1 R2 + 0x780A0004, // 000C JMPF R2 #0012 + 0x60080009, // 000D GETGBL R2 G9 + 0x540E0063, // 000E LDINT R3 100 + 0x080C0203, // 000F MUL R3 R1 R3 + 0x7C080200, // 0010 CALL R2 1 + 0x70020000, // 0011 JMP #0013 + 0x4C080000, // 0012 LDNIL R2 + 0x80040400, // 0013 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Temp_value_changed, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + }), + be_str_weak(value_changed), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x54120401, // 0001 LDINT R4 1026 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C080600, // 0003 CALL R2 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_Temp_append_state_json, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Temperature_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x60040018, // 0000 GETGBL R1 G24 + 0x58080000, // 0001 LDCONST R2 K0 + 0x880C0101, // 0002 GETMBR R3 R0 K1 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -112,85 +222,6 @@ be_local_closure(Matter_Plugin_Sensor_Temp_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(get_option), - /* K2 */ be_const_int(1), - /* K3 */ be_const_real_hex(0x3FE66666), - }), - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x54120007, // 0002 LDINT R4 8 - 0x7C080400, // 0003 CALL R2 2 - 0x1C080502, // 0004 EQ R2 R2 K2 - 0x780A0003, // 0005 JMPF R2 #000A - 0x540A001F, // 0006 LDINT R2 32 - 0x04080202, // 0007 SUB R2 R1 R2 - 0x0C080503, // 0008 DIV R2 R2 K3 - 0x5C040400, // 0009 MOVE R1 R2 - 0x4C080000, // 000A LDNIL R2 - 0x20080202, // 000B NE R2 R1 R2 - 0x780A0004, // 000C JMPF R2 #0012 - 0x60080009, // 000D GETGBL R2 G9 - 0x540E0063, // 000E LDINT R3 100 - 0x080C0203, // 000F MUL R3 R1 R3 - 0x7C080200, // 0010 CALL R2 1 - 0x70020000, // 0011 JMP #0013 - 0x4C080000, // 0012 LDNIL R2 - 0x80040400, // 0013 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_Temp_value_changed, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x54120401, // 0001 LDINT R4 1026 - 0x58140001, // 0002 LDCONST R5 K1 - 0x7C080600, // 0003 CALL R2 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Temp ********************************************************************/ @@ -198,11 +229,16 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Temp, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(7, + be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) }, - { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) }, + { be_const_key_weak(TYPES, 3), 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(770, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Temp_append_state_json_closure) }, + { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -263,14 +299,10 @@ be_local_class(Matter_Plugin_Sensor_Temp, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(temperature) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) }, + { be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Temp_value_changed_closure) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) }, - { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_value_changed_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(770, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Temp) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_ShutterTilt.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_ShutterTilt.h index f1e9be9d40f4..1e0fa451abe4 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_ShutterTilt.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_ShutterTilt.h @@ -76,132 +76,6 @@ be_local_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */ - be_nested_proto( - 18, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[23]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(command), - /* K5 */ be_nested_str_weak(update_shadow_lazy), - /* K6 */ be_nested_str_weak(findsubval), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(update_tilt_min_max), - /* K9 */ be_nested_str_weak(tilt_min), - /* K10 */ be_nested_str_weak(tilt_max), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(scale_uint), - /* K13 */ be_nested_str_weak(cmd), - /* K14 */ be_nested_str_weak(ShutterTilt), - /* K15 */ be_nested_str_weak(tasmota_shutter_index), - /* K16 */ be_const_int(1), - /* K17 */ be_nested_str_weak(_X20), - /* K18 */ be_nested_str_weak(update_shadow), - /* K19 */ be_nested_str_weak(log), - /* K20 */ be_nested_str_weak(tilt_X25_X3A), - /* K21 */ be_nested_str_weak(tilt_X25_X28no_tilt_support_X29_X3A), - /* K22 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[79]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0xB8160200, // 0001 GETNGBL R5 K1 - 0x88140B02, // 0002 GETMBR R5 R5 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x54220101, // 0005 LDINT R8 258 - 0x1C200C08, // 0006 EQ R8 R6 R8 - 0x7822003D, // 0007 JMPF R8 #0046 - 0x8C200105, // 0008 GETMET R8 R0 K5 - 0x7C200200, // 0009 CALL R8 1 - 0x54220007, // 000A LDINT R8 8 - 0x1C200E08, // 000B EQ R8 R7 R8 - 0x78220038, // 000C JMPF R8 #0046 - 0x8C200506, // 000D GETMET R8 R2 K6 - 0x58280007, // 000E LDCONST R10 K7 - 0x7C200400, // 000F CALL R8 2 - 0x4C240000, // 0010 LDNIL R9 - 0x20241009, // 0011 NE R9 R8 R9 - 0x78260030, // 0012 JMPF R9 #0044 - 0x8C240108, // 0013 GETMET R9 R0 K8 - 0x7C240200, // 0014 CALL R9 1 - 0x88240109, // 0015 GETMBR R9 R0 K9 - 0x4C280000, // 0016 LDNIL R10 - 0x2024120A, // 0017 NE R9 R9 R10 - 0x78260025, // 0018 JMPF R9 #003F - 0x8824010A, // 0019 GETMBR R9 R0 K10 - 0x4C280000, // 001A LDNIL R10 - 0x2024120A, // 001B NE R9 R9 R10 - 0x78260021, // 001C JMPF R9 #003F - 0x88240109, // 001D GETMBR R9 R0 K9 - 0xB82A1600, // 001E GETNGBL R10 K11 - 0x8C28150C, // 001F GETMET R10 R10 K12 - 0x5C301000, // 0020 MOVE R12 R8 - 0x58340007, // 0021 LDCONST R13 K7 - 0x543A270F, // 0022 LDINT R14 10000 - 0x583C0007, // 0023 LDCONST R15 K7 - 0x8840010A, // 0024 GETMBR R16 R0 K10 - 0x88440109, // 0025 GETMBR R17 R0 K9 - 0x04402011, // 0026 SUB R16 R16 R17 - 0x7C280C00, // 0027 CALL R10 6 - 0x0024120A, // 0028 ADD R9 R9 R10 - 0xB82A1600, // 0029 GETNGBL R10 K11 - 0x8C28150D, // 002A GETMET R10 R10 K13 - 0x60300008, // 002B GETGBL R12 G8 - 0x8834010F, // 002C GETMBR R13 R0 K15 - 0x00341B10, // 002D ADD R13 R13 K16 - 0x7C300200, // 002E CALL R12 1 - 0x00321C0C, // 002F ADD R12 K14 R12 - 0x00301911, // 0030 ADD R12 R12 K17 - 0x60340008, // 0031 GETGBL R13 G8 - 0x5C381200, // 0032 MOVE R14 R9 - 0x7C340200, // 0033 CALL R13 1 - 0x0030180D, // 0034 ADD R12 R12 R13 - 0x50340000, // 0035 LDBOOL R13 0 0 - 0x7C280600, // 0036 CALL R10 3 - 0x8C280112, // 0037 GETMET R10 R0 K18 - 0x7C280200, // 0038 CALL R10 1 - 0x60280008, // 0039 GETGBL R10 G8 - 0x5C2C1000, // 003A MOVE R11 R8 - 0x7C280200, // 003B CALL R10 1 - 0x002A280A, // 003C ADD R10 K20 R10 - 0x900E260A, // 003D SETMBR R3 K19 R10 - 0x70020004, // 003E JMP #0044 - 0x60240008, // 003F GETGBL R9 G8 - 0x5C281000, // 0040 MOVE R10 R8 - 0x7C240200, // 0041 CALL R9 1 - 0x00262A09, // 0042 ADD R9 K21 R9 - 0x900E2609, // 0043 SETMBR R3 K19 R9 - 0x50240200, // 0044 LDBOOL R9 1 0 - 0x80041200, // 0045 RET 1 R9 - 0x60200003, // 0046 GETGBL R8 G3 - 0x5C240000, // 0047 MOVE R9 R0 - 0x7C200200, // 0048 CALL R8 1 - 0x8C201116, // 0049 GETMET R8 R8 K22 - 0x5C280200, // 004A MOVE R10 R1 - 0x5C2C0400, // 004B MOVE R11 R2 - 0x5C300600, // 004C MOVE R12 R3 - 0x7C200800, // 004D CALL R8 4 - 0x80041000, // 004E RET 1 R8 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -359,6 +233,167 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_ShutterTilt_append_state_json, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22ShutterPos_X22_X3A_X25s_X2C_X22ShutterTarget_X22_X3A_X25s_X2C_X22ShutterTilt_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_shutter_pos), + /* K2 */ be_nested_str_weak(shadow_shutter_target), + /* K3 */ be_nested_str_weak(shadow_shutter_tilt), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x60080018, // 0000 GETGBL R2 G24 + 0x580C0000, // 0001 LDCONST R3 K0 + 0x88100101, // 0002 GETMBR R4 R0 K1 + 0x88140102, // 0003 GETMBR R5 R0 K2 + 0x88180103, // 0004 GETMBR R6 R0 K3 + 0x7C080800, // 0005 CALL R2 4 + 0x80040400, // 0006 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */ + be_nested_proto( + 18, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[23]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(command), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_nested_str_weak(findsubval), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(update_tilt_min_max), + /* K9 */ be_nested_str_weak(tilt_min), + /* K10 */ be_nested_str_weak(tilt_max), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(scale_uint), + /* K13 */ be_nested_str_weak(cmd), + /* K14 */ be_nested_str_weak(ShutterTilt), + /* K15 */ be_nested_str_weak(tasmota_shutter_index), + /* K16 */ be_const_int(1), + /* K17 */ be_nested_str_weak(_X20), + /* K18 */ be_nested_str_weak(update_shadow), + /* K19 */ be_nested_str_weak(log), + /* K20 */ be_nested_str_weak(tilt_X25_X3A), + /* K21 */ be_nested_str_weak(tilt_X25_X28no_tilt_support_X29_X3A), + /* K22 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[79]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0xB8160200, // 0001 GETNGBL R5 K1 + 0x88140B02, // 0002 GETMBR R5 R5 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x881C0704, // 0004 GETMBR R7 R3 K4 + 0x54220101, // 0005 LDINT R8 258 + 0x1C200C08, // 0006 EQ R8 R6 R8 + 0x7822003D, // 0007 JMPF R8 #0046 + 0x8C200105, // 0008 GETMET R8 R0 K5 + 0x7C200200, // 0009 CALL R8 1 + 0x54220007, // 000A LDINT R8 8 + 0x1C200E08, // 000B EQ R8 R7 R8 + 0x78220038, // 000C JMPF R8 #0046 + 0x8C200506, // 000D GETMET R8 R2 K6 + 0x58280007, // 000E LDCONST R10 K7 + 0x7C200400, // 000F CALL R8 2 + 0x4C240000, // 0010 LDNIL R9 + 0x20241009, // 0011 NE R9 R8 R9 + 0x78260030, // 0012 JMPF R9 #0044 + 0x8C240108, // 0013 GETMET R9 R0 K8 + 0x7C240200, // 0014 CALL R9 1 + 0x88240109, // 0015 GETMBR R9 R0 K9 + 0x4C280000, // 0016 LDNIL R10 + 0x2024120A, // 0017 NE R9 R9 R10 + 0x78260025, // 0018 JMPF R9 #003F + 0x8824010A, // 0019 GETMBR R9 R0 K10 + 0x4C280000, // 001A LDNIL R10 + 0x2024120A, // 001B NE R9 R9 R10 + 0x78260021, // 001C JMPF R9 #003F + 0x88240109, // 001D GETMBR R9 R0 K9 + 0xB82A1600, // 001E GETNGBL R10 K11 + 0x8C28150C, // 001F GETMET R10 R10 K12 + 0x5C301000, // 0020 MOVE R12 R8 + 0x58340007, // 0021 LDCONST R13 K7 + 0x543A270F, // 0022 LDINT R14 10000 + 0x583C0007, // 0023 LDCONST R15 K7 + 0x8840010A, // 0024 GETMBR R16 R0 K10 + 0x88440109, // 0025 GETMBR R17 R0 K9 + 0x04402011, // 0026 SUB R16 R16 R17 + 0x7C280C00, // 0027 CALL R10 6 + 0x0024120A, // 0028 ADD R9 R9 R10 + 0xB82A1600, // 0029 GETNGBL R10 K11 + 0x8C28150D, // 002A GETMET R10 R10 K13 + 0x60300008, // 002B GETGBL R12 G8 + 0x8834010F, // 002C GETMBR R13 R0 K15 + 0x00341B10, // 002D ADD R13 R13 K16 + 0x7C300200, // 002E CALL R12 1 + 0x00321C0C, // 002F ADD R12 K14 R12 + 0x00301911, // 0030 ADD R12 R12 K17 + 0x60340008, // 0031 GETGBL R13 G8 + 0x5C381200, // 0032 MOVE R14 R9 + 0x7C340200, // 0033 CALL R13 1 + 0x0030180D, // 0034 ADD R12 R12 R13 + 0x50340000, // 0035 LDBOOL R13 0 0 + 0x7C280600, // 0036 CALL R10 3 + 0x8C280112, // 0037 GETMET R10 R0 K18 + 0x7C280200, // 0038 CALL R10 1 + 0x60280008, // 0039 GETGBL R10 G8 + 0x5C2C1000, // 003A MOVE R11 R8 + 0x7C280200, // 003B CALL R10 1 + 0x002A280A, // 003C ADD R10 K20 R10 + 0x900E260A, // 003D SETMBR R3 K19 R10 + 0x70020004, // 003E JMP #0044 + 0x60240008, // 003F GETGBL R9 G8 + 0x5C281000, // 0040 MOVE R10 R8 + 0x7C240200, // 0041 CALL R9 1 + 0x00262A09, // 0042 ADD R9 K21 R9 + 0x900E2609, // 0043 SETMBR R3 K19 R9 + 0x50240200, // 0044 LDBOOL R9 1 0 + 0x80041200, // 0045 RET 1 R9 + 0x60200003, // 0046 GETGBL R8 G3 + 0x5C240000, // 0047 MOVE R9 R0 + 0x7C200200, // 0048 CALL R8 1 + 0x8C201116, // 0049 GETMET R8 R8 K22 + 0x5C280200, // 004A MOVE R10 R1 + 0x5C2C0400, // 004B MOVE R11 R2 + 0x5C300600, // 004C MOVE R12 R3 + 0x7C200800, // 004D CALL R8 4 + 0x80041000, // 004E RET 1 R8 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: parse_sensors ********************************************************************/ @@ -430,13 +465,13 @@ extern const bclass be_class_Matter_Plugin_Shutter; be_local_class(Matter_Plugin_ShutterTilt, 2, &be_class_Matter_Plugin_Shutter, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update_tilt_min_max, -1), be_const_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max_closure) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(shutter_X2Btilt) }, - { be_const_key_weak(update_tilt_min_max, 0), be_const_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max_closure) }, - { be_const_key_weak(parse_sensors, 7), be_const_closure(Matter_Plugin_ShutterTilt_parse_sensors_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(Shutter_X20_X2B_X20Tilt) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) }, + { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_ShutterTilt_parse_sensors_closure) }, + { be_const_key_weak(CLUSTERS, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -506,10 +541,11 @@ be_local_class(Matter_Plugin_ShutterTilt, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(tilt_min, -1), be_const_var(0) }, + { be_const_key_weak(append_state_json, 3), be_const_closure(Matter_Plugin_ShutterTilt_append_state_json_closure) }, { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_ShutterTilt_invoke_request_closure) }, - { be_const_key_weak(tilt_min, 2), be_const_var(0) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) }, - { be_const_key_weak(tilt_max, -1), be_const_var(1) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(Shutter_X20_X2B_X20Tilt) }, + { be_const_key_weak(tilt_max, 1), be_const_var(1) }, })), be_str_weak(Matter_Plugin_ShutterTilt) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Light2.h index 3a4019f17eeb..46843184beb6 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Light2.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Light2.h @@ -6,6 +6,89 @@ extern const bclass be_class_Matter_Plugin_Light2; +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +be_local_closure(Matter_Plugin_Light2_update_virtual, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(CT), + /* K2 */ be_nested_str_weak(set_ct), + /* K3 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0300, // 0001 GETMET R3 R1 K0 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x7C080200, // 0004 CALL R2 1 + 0x4C0C0000, // 0005 LDNIL R3 + 0x200C0403, // 0006 NE R3 R2 R3 + 0x780E0002, // 0007 JMPF R3 #000B + 0x8C0C0102, // 0008 GETMET R3 R0 K2 + 0x5C140400, // 0009 MOVE R5 R2 + 0x7C0C0400, // 000A CALL R3 2 + 0x600C0003, // 000B GETGBL R3 G3 + 0x5C100000, // 000C MOVE R4 R0 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +be_local_closure(Matter_Plugin_Light2_append_state_json, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s_X2C_X22Bri_X22_X3A_X25s_X2C_X22CT_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_onoff), + /* K2 */ be_nested_str_weak(shadow_bri), + /* K3 */ be_nested_str_weak(shadow_ct), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x60080018, // 0000 GETGBL R2 G24 + 0x580C0000, // 0001 LDCONST R3 K0 + 0x60100009, // 0002 GETGBL R4 G9 + 0x88140101, // 0003 GETMBR R5 R0 K1 + 0x7C100200, // 0004 CALL R4 1 + 0x88140102, // 0005 GETMBR R5 R0 K2 + 0x88180103, // 0006 GETMBR R6 R0 K3 + 0x7C080800, // 0007 CALL R2 4 + 0x80040400, // 0008 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: init ********************************************************************/ @@ -107,146 +190,6 @@ be_local_closure(Matter_Plugin_Light2_set_ct, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: update_ct_minmax -********************************************************************/ -be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(get_option), - /* K2 */ be_nested_str_weak(ct_min), - /* K3 */ be_nested_str_weak(ct_max), - }), - be_str_weak(update_ct_minmax), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x540E0051, // 0002 LDINT R3 82 - 0x7C040400, // 0003 CALL R1 2 - 0x78060001, // 0004 JMPF R1 #0007 - 0x540A00C7, // 0005 LDINT R2 200 - 0x70020000, // 0006 JMP #0008 - 0x540A0098, // 0007 LDINT R2 153 - 0x90020402, // 0008 SETMBR R0 K2 R2 - 0x78060001, // 0009 JMPF R1 #000C - 0x540A017B, // 000A LDINT R2 380 - 0x70020000, // 000B JMP #000D - 0x540A01F3, // 000C LDINT R2 500 - 0x90020602, // 000D SETMBR R0 K3 R2 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */ - be_nested_proto( - 13, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(command), - /* K5 */ be_nested_str_weak(update_shadow_lazy), - /* K6 */ be_nested_str_weak(findsubval), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(set_ct), - /* K9 */ be_nested_str_weak(log), - /* K10 */ be_nested_str_weak(ct_X3A), - /* K11 */ be_nested_str_weak(publish_command), - /* K12 */ be_nested_str_weak(CT), - /* K13 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[59]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0xB8160200, // 0001 GETNGBL R5 K1 - 0x88140B02, // 0002 GETMBR R5 R5 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x542202FF, // 0005 LDINT R8 768 - 0x1C200C08, // 0006 EQ R8 R6 R8 - 0x78220028, // 0007 JMPF R8 #0031 - 0x8C200105, // 0008 GETMET R8 R0 K5 - 0x7C200200, // 0009 CALL R8 1 - 0x54220009, // 000A LDINT R8 10 - 0x1C200E08, // 000B EQ R8 R7 R8 - 0x78220011, // 000C JMPF R8 #001F - 0x8C200506, // 000D GETMET R8 R2 K6 - 0x58280007, // 000E LDCONST R10 K7 - 0x7C200400, // 000F CALL R8 2 - 0x8C240108, // 0010 GETMET R9 R0 K8 - 0x5C2C1000, // 0011 MOVE R11 R8 - 0x7C240400, // 0012 CALL R9 2 - 0x60240008, // 0013 GETGBL R9 G8 - 0x5C281000, // 0014 MOVE R10 R8 - 0x7C240200, // 0015 CALL R9 1 - 0x00261409, // 0016 ADD R9 K10 R9 - 0x900E1209, // 0017 SETMBR R3 K9 R9 - 0x8C24010B, // 0018 GETMET R9 R0 K11 - 0x582C000C, // 0019 LDCONST R11 K12 - 0x5C301000, // 001A MOVE R12 R8 - 0x7C240600, // 001B CALL R9 3 - 0x50240200, // 001C LDBOOL R9 1 0 - 0x80041200, // 001D RET 1 R9 - 0x70020010, // 001E JMP #0030 - 0x54220046, // 001F LDINT R8 71 - 0x1C200E08, // 0020 EQ R8 R7 R8 - 0x78220002, // 0021 JMPF R8 #0025 - 0x50200200, // 0022 LDBOOL R8 1 0 - 0x80041000, // 0023 RET 1 R8 - 0x7002000A, // 0024 JMP #0030 - 0x5422004A, // 0025 LDINT R8 75 - 0x1C200E08, // 0026 EQ R8 R7 R8 - 0x78220002, // 0027 JMPF R8 #002B - 0x50200200, // 0028 LDBOOL R8 1 0 - 0x80041000, // 0029 RET 1 R8 - 0x70020004, // 002A JMP #0030 - 0x5422004B, // 002B LDINT R8 76 - 0x1C200E08, // 002C EQ R8 R7 R8 - 0x78220001, // 002D JMPF R8 #0030 - 0x50200200, // 002E LDBOOL R8 1 0 - 0x80041000, // 002F RET 1 R8 - 0x70020008, // 0030 JMP #003A - 0x60200003, // 0031 GETGBL R8 G3 - 0x5C240000, // 0032 MOVE R9 R0 - 0x7C200200, // 0033 CALL R8 1 - 0x8C20110D, // 0034 GETMET R8 R8 K13 - 0x5C280200, // 0035 MOVE R10 R1 - 0x5C2C0400, // 0036 MOVE R11 R2 - 0x5C300600, // 0037 MOVE R12 R3 - 0x7C200800, // 0038 CALL R8 4 - 0x80041000, // 0039 RET 1 R8 - 0x80000000, // 003A RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: update_shadow ********************************************************************/ @@ -429,6 +372,146 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */ + be_nested_proto( + 13, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(command), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_nested_str_weak(findsubval), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(set_ct), + /* K9 */ be_nested_str_weak(log), + /* K10 */ be_nested_str_weak(ct_X3A), + /* K11 */ be_nested_str_weak(publish_command), + /* K12 */ be_nested_str_weak(CT), + /* K13 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[59]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0xB8160200, // 0001 GETNGBL R5 K1 + 0x88140B02, // 0002 GETMBR R5 R5 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x881C0704, // 0004 GETMBR R7 R3 K4 + 0x542202FF, // 0005 LDINT R8 768 + 0x1C200C08, // 0006 EQ R8 R6 R8 + 0x78220028, // 0007 JMPF R8 #0031 + 0x8C200105, // 0008 GETMET R8 R0 K5 + 0x7C200200, // 0009 CALL R8 1 + 0x54220009, // 000A LDINT R8 10 + 0x1C200E08, // 000B EQ R8 R7 R8 + 0x78220011, // 000C JMPF R8 #001F + 0x8C200506, // 000D GETMET R8 R2 K6 + 0x58280007, // 000E LDCONST R10 K7 + 0x7C200400, // 000F CALL R8 2 + 0x8C240108, // 0010 GETMET R9 R0 K8 + 0x5C2C1000, // 0011 MOVE R11 R8 + 0x7C240400, // 0012 CALL R9 2 + 0x60240008, // 0013 GETGBL R9 G8 + 0x5C281000, // 0014 MOVE R10 R8 + 0x7C240200, // 0015 CALL R9 1 + 0x00261409, // 0016 ADD R9 K10 R9 + 0x900E1209, // 0017 SETMBR R3 K9 R9 + 0x8C24010B, // 0018 GETMET R9 R0 K11 + 0x582C000C, // 0019 LDCONST R11 K12 + 0x5C301000, // 001A MOVE R12 R8 + 0x7C240600, // 001B CALL R9 3 + 0x50240200, // 001C LDBOOL R9 1 0 + 0x80041200, // 001D RET 1 R9 + 0x70020010, // 001E JMP #0030 + 0x54220046, // 001F LDINT R8 71 + 0x1C200E08, // 0020 EQ R8 R7 R8 + 0x78220002, // 0021 JMPF R8 #0025 + 0x50200200, // 0022 LDBOOL R8 1 0 + 0x80041000, // 0023 RET 1 R8 + 0x7002000A, // 0024 JMP #0030 + 0x5422004A, // 0025 LDINT R8 75 + 0x1C200E08, // 0026 EQ R8 R7 R8 + 0x78220002, // 0027 JMPF R8 #002B + 0x50200200, // 0028 LDBOOL R8 1 0 + 0x80041000, // 0029 RET 1 R8 + 0x70020004, // 002A JMP #0030 + 0x5422004B, // 002B LDINT R8 76 + 0x1C200E08, // 002C EQ R8 R7 R8 + 0x78220001, // 002D JMPF R8 #0030 + 0x50200200, // 002E LDBOOL R8 1 0 + 0x80041000, // 002F RET 1 R8 + 0x70020008, // 0030 JMP #003A + 0x60200003, // 0031 GETGBL R8 G3 + 0x5C240000, // 0032 MOVE R9 R0 + 0x7C200200, // 0033 CALL R8 1 + 0x8C20110D, // 0034 GETMET R8 R8 K13 + 0x5C280200, // 0035 MOVE R10 R1 + 0x5C2C0400, // 0036 MOVE R11 R2 + 0x5C300600, // 0037 MOVE R12 R3 + 0x7C200800, // 0038 CALL R8 4 + 0x80041000, // 0039 RET 1 R8 + 0x80000000, // 003A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_ct_minmax +********************************************************************/ +be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(get_option), + /* K2 */ be_nested_str_weak(ct_min), + /* K3 */ be_nested_str_weak(ct_max), + }), + be_str_weak(update_ct_minmax), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x540E0051, // 0002 LDINT R3 82 + 0x7C040400, // 0003 CALL R1 2 + 0x78060001, // 0004 JMPF R1 #0007 + 0x540A00C7, // 0005 LDINT R2 200 + 0x70020000, // 0006 JMP #0008 + 0x540A0098, // 0007 LDINT R2 153 + 0x90020402, // 0008 SETMBR R0 K2 R2 + 0x78060001, // 0009 JMPF R1 #000C + 0x540A017B, // 000A LDINT R2 380 + 0x70020000, // 000B JMP #000D + 0x540A01F3, // 000C LDINT R2 500 + 0x90020602, // 000D SETMBR R0 K3 R2 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Light2 ********************************************************************/ @@ -436,19 +519,27 @@ extern const bclass be_class_Matter_Plugin_Light1; be_local_class(Matter_Plugin_Light2, 3, &be_class_Matter_Plugin_Light1, - be_nested_map(13, + be_nested_map(16, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ct_min, -1), be_const_var(1) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(light2) }, - { be_const_key_weak(set_ct, -1), be_const_closure(Matter_Plugin_Light2_set_ct_closure) }, - { be_const_key_weak(shadow_ct, -1), be_const_var(0) }, - { be_const_key_weak(update_ct_minmax, 8), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Light2_update_virtual_closure) }, + { be_const_key_weak(ct_min, 8), be_const_var(1) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Light2_append_state_json_closure) }, { be_const_key_weak(init, 4), be_const_closure(Matter_Plugin_Light2_init_closure) }, + { be_const_key_weak(set_ct, -1), be_const_closure(Matter_Plugin_Light2_set_ct_closure) }, { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) }, - { be_const_key_weak(ct_max, 1), be_const_var(2) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X202_X20CT) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(3, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Power), + be_nested_str_weak(Bri), + be_nested_str_weak(CT), + })) ) } )) }, + { be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(light2) }, + { be_const_key_weak(read_attribute, 12), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) }, + { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -529,12 +620,13 @@ be_local_class(Matter_Plugin_Light2, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) }, + { be_const_key_weak(shadow_ct, 9), 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(268, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(ct_max, -1), be_const_var(2) }, })), be_str_weak(Matter_Plugin_Light2) ); 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_4_Light3.h similarity index 84% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Light3.h index 81148a5566b7..736028422392 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Light3.h @@ -1,4 +1,4 @@ -/* Solidification of Matter_Plugin_3_Light3.h */ +/* Solidification of Matter_Plugin_4_Light3.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ @@ -151,140 +151,38 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */ /******************************************************************** -** Solidified function: set_hue_sat +** Solidified function: append_state_json ********************************************************************/ -be_local_closure(Matter_Plugin_Light3_set_hue_sat, /* name */ +be_local_closure(Matter_Plugin_Light3_append_state_json, /* name */ be_nested_proto( - 11, /* nstack */ - 3, /* argc */ + 8, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(virtual), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(scale_uint), - /* K4 */ be_nested_str_weak(light), - /* K5 */ be_nested_str_weak(set), - /* K6 */ be_nested_str_weak(hue), - /* K7 */ be_nested_str_weak(sat), - /* K8 */ be_nested_str_weak(update_shadow), - /* K9 */ be_nested_str_weak(shadow_hue), - /* K10 */ be_nested_str_weak(attribute_updated), - /* K11 */ be_nested_str_weak(shadow_sat), - /* K12 */ be_const_int(1), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s_X2C_X22Bri_X22_X3A_X25s_X2C_X22Hue_X22_X3A_X25s_X2C_X22Sat_X22_X3A_X25s), + /* K1 */ be_nested_str_weak(shadow_onoff), + /* K2 */ be_nested_str_weak(shadow_bri), + /* K3 */ be_nested_str_weak(shadow_hue), + /* K4 */ be_nested_str_weak(shadow_sat), }), - be_str_weak(set_hue_sat), + be_str_weak(append_state_json), &be_const_str_solidified, - ( &(const binstruction[104]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x200C0203, // 0001 NE R3 R1 R3 - 0x780E0006, // 0002 JMPF R3 #000A - 0x140C0300, // 0003 LT R3 R1 K0 - 0x780E0000, // 0004 JMPF R3 #0006 - 0x58040000, // 0005 LDCONST R1 K0 - 0x540E00FD, // 0006 LDINT R3 254 - 0x240C0203, // 0007 GT R3 R1 R3 - 0x780E0000, // 0008 JMPF R3 #000A - 0x540600FD, // 0009 LDINT R1 254 - 0x4C0C0000, // 000A LDNIL R3 - 0x200C0403, // 000B NE R3 R2 R3 - 0x780E0006, // 000C JMPF R3 #0014 - 0x140C0500, // 000D LT R3 R2 K0 - 0x780E0000, // 000E JMPF R3 #0010 - 0x58080000, // 000F LDCONST R2 K0 - 0x540E00FD, // 0010 LDINT R3 254 - 0x240C0403, // 0011 GT R3 R2 R3 - 0x780E0000, // 0012 JMPF R3 #0014 - 0x540A00FD, // 0013 LDINT R2 254 - 0x880C0101, // 0014 GETMBR R3 R0 K1 - 0x740E003A, // 0015 JMPT R3 #0051 - 0x4C0C0000, // 0016 LDNIL R3 - 0x200C0203, // 0017 NE R3 R1 R3 - 0x780E0008, // 0018 JMPF R3 #0022 - 0xB80E0400, // 0019 GETNGBL R3 K2 - 0x8C0C0703, // 001A GETMET R3 R3 K3 - 0x5C140200, // 001B MOVE R5 R1 - 0x58180000, // 001C LDCONST R6 K0 - 0x541E00FD, // 001D LDINT R7 254 - 0x58200000, // 001E LDCONST R8 K0 - 0x54260167, // 001F LDINT R9 360 - 0x7C0C0C00, // 0020 CALL R3 6 - 0x70020000, // 0021 JMP #0023 - 0x4C0C0000, // 0022 LDNIL R3 - 0x4C100000, // 0023 LDNIL R4 - 0x20100404, // 0024 NE R4 R2 R4 - 0x78120008, // 0025 JMPF R4 #002F - 0xB8120400, // 0026 GETNGBL R4 K2 - 0x8C100903, // 0027 GETMET R4 R4 K3 - 0x5C180400, // 0028 MOVE R6 R2 - 0x581C0000, // 0029 LDCONST R7 K0 - 0x542200FD, // 002A LDINT R8 254 - 0x58240000, // 002B LDCONST R9 K0 - 0x542A00FE, // 002C LDINT R10 255 - 0x7C100C00, // 002D CALL R4 6 - 0x70020000, // 002E JMP #0030 - 0x4C100000, // 002F LDNIL R4 - 0x4C140000, // 0030 LDNIL R5 - 0x20140605, // 0031 NE R5 R3 R5 - 0x7816000A, // 0032 JMPF R5 #003E - 0x4C140000, // 0033 LDNIL R5 - 0x20140805, // 0034 NE R5 R4 R5 - 0x78160007, // 0035 JMPF R5 #003E - 0xB8160800, // 0036 GETNGBL R5 K4 - 0x8C140B05, // 0037 GETMET R5 R5 K5 - 0x601C0013, // 0038 GETGBL R7 G19 - 0x7C1C0000, // 0039 CALL R7 0 - 0x981E0C03, // 003A SETIDX R7 K6 R3 - 0x981E0E04, // 003B SETIDX R7 K7 R4 - 0x7C140400, // 003C CALL R5 2 - 0x7002000F, // 003D JMP #004E - 0x4C140000, // 003E LDNIL R5 - 0x20140605, // 003F NE R5 R3 R5 - 0x78160006, // 0040 JMPF R5 #0048 - 0xB8160800, // 0041 GETNGBL R5 K4 - 0x8C140B05, // 0042 GETMET R5 R5 K5 - 0x601C0013, // 0043 GETGBL R7 G19 - 0x7C1C0000, // 0044 CALL R7 0 - 0x981E0C03, // 0045 SETIDX R7 K6 R3 - 0x7C140400, // 0046 CALL R5 2 - 0x70020005, // 0047 JMP #004E - 0xB8160800, // 0048 GETNGBL R5 K4 - 0x8C140B05, // 0049 GETMET R5 R5 K5 - 0x601C0013, // 004A GETGBL R7 G19 - 0x7C1C0000, // 004B CALL R7 0 - 0x981E0E04, // 004C SETIDX R7 K7 R4 - 0x7C140400, // 004D CALL R5 2 - 0x8C140108, // 004E GETMET R5 R0 K8 - 0x7C140200, // 004F CALL R5 1 - 0x70020015, // 0050 JMP #0067 - 0x4C0C0000, // 0051 LDNIL R3 - 0x200C0203, // 0052 NE R3 R1 R3 - 0x780E0007, // 0053 JMPF R3 #005C - 0x880C0109, // 0054 GETMBR R3 R0 K9 - 0x200C0203, // 0055 NE R3 R1 R3 - 0x780E0004, // 0056 JMPF R3 #005C - 0x8C0C010A, // 0057 GETMET R3 R0 K10 - 0x541602FF, // 0058 LDINT R5 768 - 0x58180000, // 0059 LDCONST R6 K0 - 0x7C0C0600, // 005A CALL R3 3 - 0x90021201, // 005B SETMBR R0 K9 R1 - 0x4C0C0000, // 005C LDNIL R3 - 0x200C0403, // 005D NE R3 R2 R3 - 0x780E0007, // 005E JMPF R3 #0067 - 0x880C010B, // 005F GETMBR R3 R0 K11 - 0x200C0403, // 0060 NE R3 R2 R3 - 0x780E0004, // 0061 JMPF R3 #0067 - 0x8C0C010A, // 0062 GETMET R3 R0 K10 - 0x541602FF, // 0063 LDINT R5 768 - 0x5818000C, // 0064 LDCONST R6 K12 - 0x7C0C0600, // 0065 CALL R3 3 - 0x90021602, // 0066 SETMBR R0 K11 R2 - 0x80000000, // 0067 RET 0 + ( &(const binstruction[10]) { /* code */ + 0x60080018, // 0000 GETGBL R2 G24 + 0x580C0000, // 0001 LDCONST R3 K0 + 0x60100009, // 0002 GETGBL R4 G9 + 0x88140101, // 0003 GETMBR R5 R0 K1 + 0x7C100200, // 0004 CALL R4 1 + 0x88140102, // 0005 GETMBR R5 R0 K2 + 0x88180103, // 0006 GETMBR R6 R0 K3 + 0x881C0104, // 0007 GETMBR R7 R0 K4 + 0x7C080A00, // 0008 CALL R2 5 + 0x80040400, // 0009 RET 1 R2 }) ) ); @@ -292,103 +190,55 @@ be_local_closure(Matter_Plugin_Light3_set_hue_sat, /* name */ /******************************************************************** -** Solidified function: update_shadow +** Solidified function: update_virtual ********************************************************************/ -be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */ +be_local_closure(Matter_Plugin_Light3_update_virtual, /* name */ be_nested_proto( - 12, /* nstack */ - 1, /* argc */ + 8, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(virtual), - /* K2 */ be_nested_str_weak(light), - /* K3 */ be_nested_str_weak(get), - /* K4 */ be_nested_str_weak(find), - /* K5 */ be_nested_str_weak(hue), - /* K6 */ be_nested_str_weak(sat), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(scale_uint), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(shadow_hue), - /* K11 */ be_nested_str_weak(shadow_sat), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(1), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Hue), + /* K2 */ be_nested_str_weak(Sat), + /* K3 */ be_nested_str_weak(set_hue_sat), + /* K4 */ be_nested_str_weak(update_virtual), }), - be_str_weak(update_shadow), + be_str_weak(update_virtual), &be_const_str_solidified, - ( &(const binstruction[66]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060039, // 0006 JMPT R1 #0041 - 0xA4060400, // 0007 IMPORT R1 K2 - 0x8C080303, // 0008 GETMET R2 R1 K3 - 0x7C080200, // 0009 CALL R2 1 - 0x4C0C0000, // 000A LDNIL R3 - 0x200C0403, // 000B NE R3 R2 R3 - 0x780E0033, // 000C JMPF R3 #0041 - 0x8C0C0504, // 000D GETMET R3 R2 K4 - 0x58140005, // 000E LDCONST R5 K5 - 0x4C180000, // 000F LDNIL R6 - 0x7C0C0600, // 0010 CALL R3 3 - 0x8C100504, // 0011 GETMET R4 R2 K4 - 0x58180006, // 0012 LDCONST R6 K6 - 0x4C1C0000, // 0013 LDNIL R7 - 0x7C100600, // 0014 CALL R4 3 - 0x4C140000, // 0015 LDNIL R5 - 0x20140605, // 0016 NE R5 R3 R5 - 0x78160009, // 0017 JMPF R5 #0022 - 0xB8160E00, // 0018 GETNGBL R5 K7 - 0x8C140B08, // 0019 GETMET R5 R5 K8 - 0x5C1C0600, // 001A MOVE R7 R3 - 0x58200009, // 001B LDCONST R8 K9 - 0x54260167, // 001C LDINT R9 360 - 0x58280009, // 001D LDCONST R10 K9 - 0x542E00FD, // 001E LDINT R11 254 - 0x7C140C00, // 001F CALL R5 6 - 0x5C0C0A00, // 0020 MOVE R3 R5 - 0x70020000, // 0021 JMP #0023 - 0x880C010A, // 0022 GETMBR R3 R0 K10 - 0x4C140000, // 0023 LDNIL R5 - 0x20140805, // 0024 NE R5 R4 R5 - 0x78160009, // 0025 JMPF R5 #0030 - 0xB8160E00, // 0026 GETNGBL R5 K7 - 0x8C140B08, // 0027 GETMET R5 R5 K8 - 0x5C1C0800, // 0028 MOVE R7 R4 - 0x58200009, // 0029 LDCONST R8 K9 - 0x542600FE, // 002A LDINT R9 255 - 0x58280009, // 002B LDCONST R10 K9 - 0x542E00FD, // 002C LDINT R11 254 - 0x7C140C00, // 002D CALL R5 6 - 0x5C100A00, // 002E MOVE R4 R5 - 0x70020000, // 002F JMP #0031 - 0x8810010B, // 0030 GETMBR R4 R0 K11 - 0x8814010A, // 0031 GETMBR R5 R0 K10 - 0x20140605, // 0032 NE R5 R3 R5 - 0x78160004, // 0033 JMPF R5 #0039 - 0x8C14010C, // 0034 GETMET R5 R0 K12 - 0x541E02FF, // 0035 LDINT R7 768 - 0x58200009, // 0036 LDCONST R8 K9 - 0x7C140600, // 0037 CALL R5 3 - 0x90021403, // 0038 SETMBR R0 K10 R3 - 0x8814010B, // 0039 GETMBR R5 R0 K11 - 0x20140805, // 003A NE R5 R4 R5 - 0x78160004, // 003B JMPF R5 #0041 - 0x8C14010C, // 003C GETMET R5 R0 K12 - 0x541E02FF, // 003D LDINT R7 768 - 0x5820000D, // 003E LDCONST R8 K13 - 0x7C140600, // 003F CALL R5 3 - 0x90021604, // 0040 SETMBR R0 K11 R4 - 0x80000000, // 0041 RET 0 + ( &(const binstruction[27]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0300, // 0001 GETMET R3 R1 K0 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x7C080200, // 0004 CALL R2 1 + 0x600C0009, // 0005 GETGBL R3 G9 + 0x8C100300, // 0006 GETMET R4 R1 K0 + 0x58180002, // 0007 LDCONST R6 K2 + 0x7C100400, // 0008 CALL R4 2 + 0x7C0C0200, // 0009 CALL R3 1 + 0x4C100000, // 000A LDNIL R4 + 0x20100404, // 000B NE R4 R2 R4 + 0x74120002, // 000C JMPT R4 #0010 + 0x4C100000, // 000D LDNIL R4 + 0x20100604, // 000E NE R4 R3 R4 + 0x78120003, // 000F JMPF R4 #0014 + 0x8C100103, // 0010 GETMET R4 R0 K3 + 0x5C180400, // 0011 MOVE R6 R2 + 0x5C1C0600, // 0012 MOVE R7 R3 + 0x7C100600, // 0013 CALL R4 3 + 0x60100003, // 0014 GETGBL R4 G3 + 0x5C140000, // 0015 MOVE R5 R0 + 0x7C100200, // 0016 CALL R4 1 + 0x8C100904, // 0017 GETMET R4 R4 K4 + 0x5C180200, // 0018 MOVE R6 R1 + 0x7C100400, // 0019 CALL R4 2 + 0x80000000, // 001A RET 0 }) ) ); @@ -600,6 +450,251 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */ + be_nested_proto( + 12, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(virtual), + /* K2 */ be_nested_str_weak(light), + /* K3 */ be_nested_str_weak(get), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(hue), + /* K6 */ be_nested_str_weak(sat), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(scale_uint), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(shadow_hue), + /* K11 */ be_nested_str_weak(shadow_sat), + /* K12 */ be_nested_str_weak(attribute_updated), + /* K13 */ be_const_int(1), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[66]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0x88040101, // 0005 GETMBR R1 R0 K1 + 0x74060039, // 0006 JMPT R1 #0041 + 0xA4060400, // 0007 IMPORT R1 K2 + 0x8C080303, // 0008 GETMET R2 R1 K3 + 0x7C080200, // 0009 CALL R2 1 + 0x4C0C0000, // 000A LDNIL R3 + 0x200C0403, // 000B NE R3 R2 R3 + 0x780E0033, // 000C JMPF R3 #0041 + 0x8C0C0504, // 000D GETMET R3 R2 K4 + 0x58140005, // 000E LDCONST R5 K5 + 0x4C180000, // 000F LDNIL R6 + 0x7C0C0600, // 0010 CALL R3 3 + 0x8C100504, // 0011 GETMET R4 R2 K4 + 0x58180006, // 0012 LDCONST R6 K6 + 0x4C1C0000, // 0013 LDNIL R7 + 0x7C100600, // 0014 CALL R4 3 + 0x4C140000, // 0015 LDNIL R5 + 0x20140605, // 0016 NE R5 R3 R5 + 0x78160009, // 0017 JMPF R5 #0022 + 0xB8160E00, // 0018 GETNGBL R5 K7 + 0x8C140B08, // 0019 GETMET R5 R5 K8 + 0x5C1C0600, // 001A MOVE R7 R3 + 0x58200009, // 001B LDCONST R8 K9 + 0x54260167, // 001C LDINT R9 360 + 0x58280009, // 001D LDCONST R10 K9 + 0x542E00FD, // 001E LDINT R11 254 + 0x7C140C00, // 001F CALL R5 6 + 0x5C0C0A00, // 0020 MOVE R3 R5 + 0x70020000, // 0021 JMP #0023 + 0x880C010A, // 0022 GETMBR R3 R0 K10 + 0x4C140000, // 0023 LDNIL R5 + 0x20140805, // 0024 NE R5 R4 R5 + 0x78160009, // 0025 JMPF R5 #0030 + 0xB8160E00, // 0026 GETNGBL R5 K7 + 0x8C140B08, // 0027 GETMET R5 R5 K8 + 0x5C1C0800, // 0028 MOVE R7 R4 + 0x58200009, // 0029 LDCONST R8 K9 + 0x542600FE, // 002A LDINT R9 255 + 0x58280009, // 002B LDCONST R10 K9 + 0x542E00FD, // 002C LDINT R11 254 + 0x7C140C00, // 002D CALL R5 6 + 0x5C100A00, // 002E MOVE R4 R5 + 0x70020000, // 002F JMP #0031 + 0x8810010B, // 0030 GETMBR R4 R0 K11 + 0x8814010A, // 0031 GETMBR R5 R0 K10 + 0x20140605, // 0032 NE R5 R3 R5 + 0x78160004, // 0033 JMPF R5 #0039 + 0x8C14010C, // 0034 GETMET R5 R0 K12 + 0x541E02FF, // 0035 LDINT R7 768 + 0x58200009, // 0036 LDCONST R8 K9 + 0x7C140600, // 0037 CALL R5 3 + 0x90021403, // 0038 SETMBR R0 K10 R3 + 0x8814010B, // 0039 GETMBR R5 R0 K11 + 0x20140805, // 003A NE R5 R4 R5 + 0x78160004, // 003B JMPF R5 #0041 + 0x8C14010C, // 003C GETMET R5 R0 K12 + 0x541E02FF, // 003D LDINT R7 768 + 0x5820000D, // 003E LDCONST R8 K13 + 0x7C140600, // 003F CALL R5 3 + 0x90021604, // 0040 SETMBR R0 K11 R4 + 0x80000000, // 0041 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_hue_sat +********************************************************************/ +be_local_closure(Matter_Plugin_Light3_set_hue_sat, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(virtual), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(scale_uint), + /* K4 */ be_nested_str_weak(light), + /* K5 */ be_nested_str_weak(set), + /* K6 */ be_nested_str_weak(hue), + /* K7 */ be_nested_str_weak(sat), + /* K8 */ be_nested_str_weak(update_shadow), + /* K9 */ be_nested_str_weak(shadow_hue), + /* K10 */ be_nested_str_weak(attribute_updated), + /* K11 */ be_nested_str_weak(shadow_sat), + /* K12 */ be_const_int(1), + }), + be_str_weak(set_hue_sat), + &be_const_str_solidified, + ( &(const binstruction[104]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x200C0203, // 0001 NE R3 R1 R3 + 0x780E0006, // 0002 JMPF R3 #000A + 0x140C0300, // 0003 LT R3 R1 K0 + 0x780E0000, // 0004 JMPF R3 #0006 + 0x58040000, // 0005 LDCONST R1 K0 + 0x540E00FD, // 0006 LDINT R3 254 + 0x240C0203, // 0007 GT R3 R1 R3 + 0x780E0000, // 0008 JMPF R3 #000A + 0x540600FD, // 0009 LDINT R1 254 + 0x4C0C0000, // 000A LDNIL R3 + 0x200C0403, // 000B NE R3 R2 R3 + 0x780E0006, // 000C JMPF R3 #0014 + 0x140C0500, // 000D LT R3 R2 K0 + 0x780E0000, // 000E JMPF R3 #0010 + 0x58080000, // 000F LDCONST R2 K0 + 0x540E00FD, // 0010 LDINT R3 254 + 0x240C0403, // 0011 GT R3 R2 R3 + 0x780E0000, // 0012 JMPF R3 #0014 + 0x540A00FD, // 0013 LDINT R2 254 + 0x880C0101, // 0014 GETMBR R3 R0 K1 + 0x740E003A, // 0015 JMPT R3 #0051 + 0x4C0C0000, // 0016 LDNIL R3 + 0x200C0203, // 0017 NE R3 R1 R3 + 0x780E0008, // 0018 JMPF R3 #0022 + 0xB80E0400, // 0019 GETNGBL R3 K2 + 0x8C0C0703, // 001A GETMET R3 R3 K3 + 0x5C140200, // 001B MOVE R5 R1 + 0x58180000, // 001C LDCONST R6 K0 + 0x541E00FD, // 001D LDINT R7 254 + 0x58200000, // 001E LDCONST R8 K0 + 0x54260167, // 001F LDINT R9 360 + 0x7C0C0C00, // 0020 CALL R3 6 + 0x70020000, // 0021 JMP #0023 + 0x4C0C0000, // 0022 LDNIL R3 + 0x4C100000, // 0023 LDNIL R4 + 0x20100404, // 0024 NE R4 R2 R4 + 0x78120008, // 0025 JMPF R4 #002F + 0xB8120400, // 0026 GETNGBL R4 K2 + 0x8C100903, // 0027 GETMET R4 R4 K3 + 0x5C180400, // 0028 MOVE R6 R2 + 0x581C0000, // 0029 LDCONST R7 K0 + 0x542200FD, // 002A LDINT R8 254 + 0x58240000, // 002B LDCONST R9 K0 + 0x542A00FE, // 002C LDINT R10 255 + 0x7C100C00, // 002D CALL R4 6 + 0x70020000, // 002E JMP #0030 + 0x4C100000, // 002F LDNIL R4 + 0x4C140000, // 0030 LDNIL R5 + 0x20140605, // 0031 NE R5 R3 R5 + 0x7816000A, // 0032 JMPF R5 #003E + 0x4C140000, // 0033 LDNIL R5 + 0x20140805, // 0034 NE R5 R4 R5 + 0x78160007, // 0035 JMPF R5 #003E + 0xB8160800, // 0036 GETNGBL R5 K4 + 0x8C140B05, // 0037 GETMET R5 R5 K5 + 0x601C0013, // 0038 GETGBL R7 G19 + 0x7C1C0000, // 0039 CALL R7 0 + 0x981E0C03, // 003A SETIDX R7 K6 R3 + 0x981E0E04, // 003B SETIDX R7 K7 R4 + 0x7C140400, // 003C CALL R5 2 + 0x7002000F, // 003D JMP #004E + 0x4C140000, // 003E LDNIL R5 + 0x20140605, // 003F NE R5 R3 R5 + 0x78160006, // 0040 JMPF R5 #0048 + 0xB8160800, // 0041 GETNGBL R5 K4 + 0x8C140B05, // 0042 GETMET R5 R5 K5 + 0x601C0013, // 0043 GETGBL R7 G19 + 0x7C1C0000, // 0044 CALL R7 0 + 0x981E0C03, // 0045 SETIDX R7 K6 R3 + 0x7C140400, // 0046 CALL R5 2 + 0x70020005, // 0047 JMP #004E + 0xB8160800, // 0048 GETNGBL R5 K4 + 0x8C140B05, // 0049 GETMET R5 R5 K5 + 0x601C0013, // 004A GETGBL R7 G19 + 0x7C1C0000, // 004B CALL R7 0 + 0x981E0E04, // 004C SETIDX R7 K7 R4 + 0x7C140400, // 004D CALL R5 2 + 0x8C140108, // 004E GETMET R5 R0 K8 + 0x7C140200, // 004F CALL R5 1 + 0x70020015, // 0050 JMP #0067 + 0x4C0C0000, // 0051 LDNIL R3 + 0x200C0203, // 0052 NE R3 R1 R3 + 0x780E0007, // 0053 JMPF R3 #005C + 0x880C0109, // 0054 GETMBR R3 R0 K9 + 0x200C0203, // 0055 NE R3 R1 R3 + 0x780E0004, // 0056 JMPF R3 #005C + 0x8C0C010A, // 0057 GETMET R3 R0 K10 + 0x541602FF, // 0058 LDINT R5 768 + 0x58180000, // 0059 LDCONST R6 K0 + 0x7C0C0600, // 005A CALL R3 3 + 0x90021201, // 005B SETMBR R0 K9 R1 + 0x4C0C0000, // 005C LDNIL R3 + 0x200C0403, // 005D NE R3 R2 R3 + 0x780E0007, // 005E JMPF R3 #0067 + 0x880C010B, // 005F GETMBR R3 R0 K11 + 0x200C0403, // 0060 NE R3 R2 R3 + 0x780E0004, // 0061 JMPF R3 #0067 + 0x8C0C010A, // 0062 GETMET R3 R0 K10 + 0x541602FF, // 0063 LDINT R5 768 + 0x5818000C, // 0064 LDCONST R6 K12 + 0x7C0C0600, // 0065 CALL R3 3 + 0x90021602, // 0066 SETMBR R0 K11 R2 + 0x80000000, // 0067 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Light3 ********************************************************************/ @@ -607,19 +702,20 @@ extern const bclass be_class_Matter_Plugin_Light1; be_local_class(Matter_Plugin_Light3, 2, &be_class_Matter_Plugin_Light1, - be_nested_map(11, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) }, - { be_const_key_weak(shadow_sat, -1), be_const_var(1) }, - { be_const_key_weak(set_hue_sat, 0), be_const_closure(Matter_Plugin_Light3_set_hue_sat_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) }, - { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, + be_nested_map(14, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(269, -1), be_const_int(2) }, + { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Light3_update_virtual_closure) }, + { be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Light3_append_state_json_closure) }, + { be_const_key_weak(UPDATE_COMMANDS, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(4, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Power), + be_nested_str_weak(Bri), + be_nested_str_weak(Hue), + be_nested_str_weak(Sat), })) ) } )) }, - { be_const_key_weak(shadow_hue, 2), be_const_var(0) }, - { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -702,10 +798,19 @@ be_local_class(Matter_Plugin_Light3, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(update_shadow, 8), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X203_X20RGB) }, { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) }, + { be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X203_X20RGB) }, + { be_const_key_weak(shadow_hue, 11), be_const_var(0) }, + { be_const_key_weak(shadow_sat, 9), be_const_var(1) }, + { 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(269, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) }, + { be_const_key_weak(set_hue_sat, -1), be_const_closure(Matter_Plugin_Light3_set_hue_sat_closure) }, })), be_str_weak(Matter_Plugin_Light3) ); 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 2bd03943002d..e198d23ff3f0 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -3372,7 +3372,7 @@ be_local_class(Matter_UI, { be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) }, { be_const_key_weak(page_part_ctl, 18), be_const_closure(Matter_UI_page_part_ctl_closure) }, { be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) }, - { be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact) }, + { be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3) }, { be_const_key_weak(web_get_arg, -1), be_const_closure(Matter_UI_web_get_arg_closure) }, { be_const_key_weak(plugin_option, 5), be_const_closure(Matter_UI_plugin_option_closure) }, { be_const_key_weak(web_add_config_button, -1), be_const_closure(Matter_UI_web_add_config_button_closure) }, diff --git a/lib/libesp32/berry_tasmota/src/be_tasmota_lib.c b/lib/libesp32/berry_tasmota/src/be_tasmota_lib.c index e0fd4cdf8511..31c7ffe3de2a 100644 --- a/lib/libesp32/berry_tasmota/src/be_tasmota_lib.c +++ b/lib/libesp32/berry_tasmota/src/be_tasmota_lib.c @@ -145,6 +145,7 @@ class be_class_tasmota (scope: global, name: Tasmota) { _find_op, func(tasm_find_op) // new C version for finding a rule operator _apply_str_op, func(tasm_apply_str_op) find_key_i, closure(Tasmota_find_key_i_closure) + find_list_i, closure(Tasmota_find_list_i_closure) find_op, closure(Tasmota_find_op_closure) add_rule, closure(Tasmota_add_rule_closure) remove_rule, closure(Tasmota_remove_rule_closure) diff --git a/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be b/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be index bd06672c2925..2259e0a68ec4 100644 --- a/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be +++ b/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be @@ -64,6 +64,19 @@ class Tasmota end end + # find a string in a list, case insensitive + def find_list_i(l, vali) + import string + var idx = 0 + var valu = string.toupper(vali) + while idx < size(l) + if string.toupper(l[idx]) == valu + return idx + end + idx += 1 + end + return nil + end # split the item when there is an operator, returns a list of (left,op,right) #- diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h index 0c7730c97abc..1488c004f7de 100644 --- a/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h +++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h @@ -7,85 +7,43 @@ extern const bclass be_class_Tasmota; /******************************************************************** -** Solidified function: exec_rules +** Solidified function: try_rule ********************************************************************/ -be_local_closure(Tasmota_exec_rules, /* name */ +be_local_closure(Tasmota_try_rule, /* name */ be_nested_proto( - 14, /* nstack */ - 3, /* argc */ + 9, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str(cmd_res), - /* K1 */ be_nested_str(_rules), - /* K2 */ be_nested_str(json), - /* K3 */ be_nested_str(load), - /* K4 */ be_nested_str(log), - /* K5 */ be_nested_str(BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20), - /* K6 */ be_const_int(3), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str(try_rule), - /* K9 */ be_nested_str(trig), - /* K10 */ be_nested_str(f), - /* K11 */ be_const_int(1), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(match), + /* K1 */ be_nested_str(trigger), }), - &be_const_str_exec_rules, + &be_const_str_try_rule, &be_const_str_solidified, - ( &(const binstruction[50]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x88100101, // 0001 GETMBR R4 R0 K1 - 0x74120002, // 0002 JMPT R4 #0006 - 0x4C100000, // 0003 LDNIL R4 - 0x20100604, // 0004 NE R4 R3 R4 - 0x78120029, // 0005 JMPF R4 #0030 - 0xA4120400, // 0006 IMPORT R4 K2 - 0x4C140000, // 0007 LDNIL R5 - 0x90020005, // 0008 SETMBR R0 K0 R5 - 0x50140000, // 0009 LDBOOL R5 0 0 - 0x8C180903, // 000A GETMET R6 R4 K3 - 0x5C200200, // 000B MOVE R8 R1 - 0x7C180400, // 000C CALL R6 2 - 0x4C1C0000, // 000D LDNIL R7 - 0x1C1C0C07, // 000E EQ R7 R6 R7 - 0x781E0004, // 000F JMPF R7 #0015 - 0x8C1C0104, // 0010 GETMET R7 R0 K4 - 0x00260A01, // 0011 ADD R9 K5 R1 - 0x58280006, // 0012 LDCONST R10 K6 - 0x7C1C0600, // 0013 CALL R7 3 - 0x5C180200, // 0014 MOVE R6 R1 - 0x780A0014, // 0015 JMPF R2 #002B - 0x881C0101, // 0016 GETMBR R7 R0 K1 - 0x781E0012, // 0017 JMPF R7 #002B - 0x581C0007, // 0018 LDCONST R7 K7 - 0x6020000C, // 0019 GETGBL R8 G12 - 0x88240101, // 001A GETMBR R9 R0 K1 - 0x7C200200, // 001B CALL R8 1 - 0x14200E08, // 001C LT R8 R7 R8 - 0x7822000C, // 001D JMPF R8 #002B - 0x88200101, // 001E GETMBR R8 R0 K1 - 0x94201007, // 001F GETIDX R8 R8 R7 - 0x8C240108, // 0020 GETMET R9 R0 K8 - 0x5C2C0C00, // 0021 MOVE R11 R6 - 0x88301109, // 0022 GETMBR R12 R8 K9 - 0x8834110A, // 0023 GETMBR R13 R8 K10 - 0x7C240800, // 0024 CALL R9 4 - 0x74260001, // 0025 JMPT R9 #0028 - 0x74160000, // 0026 JMPT R5 #0028 - 0x50140001, // 0027 LDBOOL R5 0 1 - 0x50140200, // 0028 LDBOOL R5 1 0 - 0x001C0F0B, // 0029 ADD R7 R7 K11 - 0x7001FFED, // 002A JMP #0019 - 0x4C1C0000, // 002B LDNIL R7 - 0x201C0607, // 002C NE R7 R3 R7 - 0x781E0000, // 002D JMPF R7 #002F - 0x90020006, // 002E SETMBR R0 K0 R6 - 0x80040A00, // 002F RET 1 R5 - 0x50100000, // 0030 LDBOOL R4 0 0 - 0x80040800, // 0031 RET 1 R4 + ( &(const binstruction[18]) { /* code */ + 0x8C100500, // 0000 GETMET R4 R2 K0 + 0x5C180200, // 0001 MOVE R6 R1 + 0x7C100400, // 0002 CALL R4 2 + 0x4C140000, // 0003 LDNIL R5 + 0x20140805, // 0004 NE R5 R4 R5 + 0x78160009, // 0005 JMPF R5 #0010 + 0x4C140000, // 0006 LDNIL R5 + 0x20140605, // 0007 NE R5 R3 R5 + 0x78160004, // 0008 JMPF R5 #000E + 0x5C140600, // 0009 MOVE R5 R3 + 0x5C180800, // 000A MOVE R6 R4 + 0x881C0501, // 000B GETMBR R7 R2 K1 + 0x5C200200, // 000C MOVE R8 R1 + 0x7C140600, // 000D CALL R5 3 + 0x50140200, // 000E LDBOOL R5 1 0 + 0x80040A00, // 000F RET 1 R5 + 0x50140000, // 0010 LDBOOL R5 0 0 + 0x80040A00, // 0011 RET 1 R5 }) ) ); @@ -93,57 +51,30 @@ be_local_closure(Tasmota_exec_rules, /* name */ /******************************************************************** -** Solidified function: cmd +** Solidified function: gen_cb ********************************************************************/ -be_local_closure(Tasmota_cmd, /* name */ +be_local_closure(Tasmota_gen_cb, /* name */ be_nested_proto( - 8, /* nstack */ - 3, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str(cmd_res), - /* K1 */ be_nested_str(tasmota), - /* K2 */ be_nested_str(global), - /* K3 */ be_nested_str(maxlog_level), - /* K4 */ be_const_int(2), - /* K5 */ be_const_int(1), - /* K6 */ be_nested_str(_cmd), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(cb), + /* K1 */ be_nested_str(gen_cb), }), - &be_const_str_cmd, + &be_const_str_gen_cb, &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x50100200, // 0001 LDBOOL R4 1 0 - 0x90020004, // 0002 SETMBR R0 K0 R4 - 0xB8120200, // 0003 GETNGBL R4 K1 - 0x88100902, // 0004 GETMBR R4 R4 K2 - 0x88100903, // 0005 GETMBR R4 R4 K3 - 0x780A0004, // 0006 JMPF R2 #000C - 0x28140904, // 0007 GE R5 R4 K4 - 0x78160002, // 0008 JMPF R5 #000C - 0xB8160200, // 0009 GETNGBL R5 K1 - 0x88140B02, // 000A GETMBR R5 R5 K2 - 0x90160705, // 000B SETMBR R5 K3 K5 - 0x8C140106, // 000C GETMET R5 R0 K6 - 0x5C1C0200, // 000D MOVE R7 R1 - 0x7C140400, // 000E CALL R5 2 - 0x4C140000, // 000F LDNIL R5 - 0x88180100, // 0010 GETMBR R6 R0 K0 - 0x501C0200, // 0011 LDBOOL R7 1 0 - 0x20180C07, // 0012 NE R6 R6 R7 - 0x781A0000, // 0013 JMPF R6 #0015 - 0x88140100, // 0014 GETMBR R5 R0 K0 - 0x90020003, // 0015 SETMBR R0 K0 R3 - 0x780A0002, // 0016 JMPF R2 #001A - 0xB81A0200, // 0017 GETNGBL R6 K1 - 0x88180D02, // 0018 GETMBR R6 R6 K2 - 0x901A0604, // 0019 SETMBR R6 K3 R4 - 0x80040A00, // 001A RET 1 R5 + ( &(const binstruction[ 5]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x80040600, // 0004 RET 1 R3 }) ) ); @@ -151,9 +82,51 @@ be_local_closure(Tasmota_cmd, /* name */ /******************************************************************** -** Solidified function: check_not_method +** Solidified function: fast_loop ********************************************************************/ -be_local_closure(Tasmota_check_not_method, /* name */ +be_local_closure(Tasmota_fast_loop, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str(_fl), + /* K1 */ be_const_int(0), + /* K2 */ be_const_int(1), + }), + &be_const_str_fast_loop, + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x5C080200, // 0001 MOVE R2 R1 + 0x740A0000, // 0002 JMPT R2 #0004 + 0x80000400, // 0003 RET 0 + 0x58080001, // 0004 LDCONST R2 K1 + 0x600C000C, // 0005 GETGBL R3 G12 + 0x5C100200, // 0006 MOVE R4 R1 + 0x7C0C0200, // 0007 CALL R3 1 + 0x14100403, // 0008 LT R4 R2 R3 + 0x78120003, // 0009 JMPF R4 #000E + 0x94100202, // 000A GETIDX R4 R1 R2 + 0x7C100000, // 000B CALL R4 0 + 0x00080502, // 000C ADD R2 R2 K2 + 0x7001FFF9, // 000D JMP #0008 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_fast_loop +********************************************************************/ +be_local_closure(Tasmota_remove_fast_loop, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -163,31 +136,28 @@ be_local_closure(Tasmota_check_not_method, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str(introspect), - /* K1 */ be_nested_str(function), - /* K2 */ be_nested_str(type_error), - /* K3 */ be_nested_str(BRY_X3A_X20argument_X20must_X20be_X20a_X20function), - /* K4 */ be_nested_str(ismethod), - /* K5 */ be_nested_str(BRY_X3A_X20method_X20not_X20allowed_X2C_X20use_X20a_X20closure_X20like_X20_X27_X2F_X20args_X20_X2D_X3E_X20obj_X2Efunc_X28args_X29_X27), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str(_fl), + /* K1 */ be_nested_str(find), + /* K2 */ be_nested_str(remove), }), - &be_const_str_check_not_method, + &be_const_str_remove_fast_loop, &be_const_str_solidified, ( &(const binstruction[15]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x600C0004, // 0001 GETGBL R3 G4 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x200C0701, // 0004 NE R3 R3 K1 - 0x780E0000, // 0005 JMPF R3 #0007 - 0xB0060503, // 0006 RAISE 1 K2 K3 - 0x8C0C0504, // 0007 GETMET R3 R2 K4 - 0x5C140200, // 0008 MOVE R5 R1 - 0x7C0C0400, // 0009 CALL R3 2 - 0x50100200, // 000A LDBOOL R4 1 0 - 0x1C0C0604, // 000B EQ R3 R3 R4 - 0x780E0000, // 000C JMPF R3 #000E - 0xB0060505, // 000D RAISE 1 K2 K5 + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x740A0000, // 0001 JMPT R2 #0003 + 0x80000400, // 0002 RET 0 + 0x88080100, // 0003 GETMBR R2 R0 K0 + 0x8C080501, // 0004 GETMET R2 R2 K1 + 0x5C100200, // 0005 MOVE R4 R1 + 0x7C080400, // 0006 CALL R2 2 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0003, // 0009 JMPF R3 #000E + 0x880C0100, // 000A GETMBR R3 R0 K0 + 0x8C0C0702, // 000B GETMET R3 R3 K2 + 0x5C140400, // 000C MOVE R5 R2 + 0x7C0C0400, // 000D CALL R3 2 0x80000000, // 000E RET 0 }) ) @@ -196,110 +166,11 @@ be_local_closure(Tasmota_check_not_method, /* name */ /******************************************************************** -** Solidified function: remove_rule +** Solidified function: find_key_i ********************************************************************/ -be_local_closure(Tasmota_remove_rule, /* name */ +be_local_closure(Tasmota_find_key_i, /* name */ be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str(_rules), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str(trig), - /* K3 */ be_nested_str(rule), - /* K4 */ be_nested_str(id), - /* K5 */ be_nested_str(remove), - /* K6 */ be_const_int(1), - }), - &be_const_str_remove_rule, - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x780E0017, // 0001 JMPF R3 #001A - 0x580C0001, // 0002 LDCONST R3 K1 - 0x6010000C, // 0003 GETGBL R4 G12 - 0x88140100, // 0004 GETMBR R5 R0 K0 - 0x7C100200, // 0005 CALL R4 1 - 0x14100604, // 0006 LT R4 R3 R4 - 0x78120011, // 0007 JMPF R4 #001A - 0x88100100, // 0008 GETMBR R4 R0 K0 - 0x94100803, // 0009 GETIDX R4 R4 R3 - 0x88100902, // 000A GETMBR R4 R4 K2 - 0x88100903, // 000B GETMBR R4 R4 K3 - 0x1C100801, // 000C EQ R4 R4 R1 - 0x78120009, // 000D JMPF R4 #0018 - 0x88100100, // 000E GETMBR R4 R0 K0 - 0x94100803, // 000F GETIDX R4 R4 R3 - 0x88100904, // 0010 GETMBR R4 R4 K4 - 0x1C100802, // 0011 EQ R4 R4 R2 - 0x78120004, // 0012 JMPF R4 #0018 - 0x88100100, // 0013 GETMBR R4 R0 K0 - 0x8C100905, // 0014 GETMET R4 R4 K5 - 0x5C180600, // 0015 MOVE R6 R3 - 0x7C100400, // 0016 CALL R4 2 - 0x70020000, // 0017 JMP #0019 - 0x000C0706, // 0018 ADD R3 R3 K6 - 0x7001FFE8, // 0019 JMP #0003 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_driver -********************************************************************/ -be_local_closure(Tasmota_remove_driver, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str(_drivers), - /* K1 */ be_nested_str(find), - /* K2 */ be_nested_str(pop), - }), - &be_const_str_remove_driver, - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A000A, // 0001 JMPF R2 #000D - 0x88080100, // 0002 GETMBR R2 R0 K0 - 0x8C080501, // 0003 GETMET R2 R2 K1 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x4C0C0000, // 0006 LDNIL R3 - 0x200C0403, // 0007 NE R3 R2 R3 - 0x780E0003, // 0008 JMPF R3 #000D - 0x880C0100, // 0009 GETMBR R3 R0 K0 - 0x8C0C0702, // 000A GETMET R3 R3 K2 - 0x5C140400, // 000B MOVE R5 R2 - 0x7C0C0400, // 000C CALL R3 2 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: find_key_i -********************************************************************/ -be_local_closure(Tasmota_find_key_i, /* name */ - be_nested_proto( - 10, /* nstack */ + 10, /* nstack */ 3, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -354,11 +225,11 @@ be_local_closure(Tasmota_find_key_i, /* name */ /******************************************************************** -** Solidified function: remove_timer +** Solidified function: check_not_method ********************************************************************/ -be_local_closure(Tasmota_remove_timer, /* name */ +be_local_closure(Tasmota_check_not_method, /* name */ be_nested_proto( - 7, /* nstack */ + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -367,34 +238,31 @@ be_local_closure(Tasmota_remove_timer, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str(_timers), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str(size), - /* K3 */ be_nested_str(id), - /* K4 */ be_nested_str(remove), - /* K5 */ be_const_int(1), + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(function), + /* K2 */ be_nested_str(type_error), + /* K3 */ be_nested_str(BRY_X3A_X20argument_X20must_X20be_X20a_X20function), + /* K4 */ be_nested_str(ismethod), + /* K5 */ be_nested_str(BRY_X3A_X20method_X20not_X20allowed_X2C_X20use_X20a_X20closure_X20like_X20_X27_X2F_X20args_X20_X2D_X3E_X20obj_X2Efunc_X28args_X29_X27), }), - &be_const_str_remove_timer, + &be_const_str_check_not_method, &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A000E, // 0001 JMPF R2 #0011 - 0x580C0001, // 0002 LDCONST R3 K1 - 0x8C100502, // 0003 GETMET R4 R2 K2 - 0x7C100200, // 0004 CALL R4 1 - 0x14100604, // 0005 LT R4 R3 R4 - 0x78120009, // 0006 JMPF R4 #0011 - 0x94100403, // 0007 GETIDX R4 R2 R3 - 0x88100903, // 0008 GETMBR R4 R4 K3 - 0x1C100801, // 0009 EQ R4 R4 R1 - 0x78120003, // 000A JMPF R4 #000F - 0x8C100504, // 000B GETMET R4 R2 K4 - 0x5C180600, // 000C MOVE R6 R3 - 0x7C100400, // 000D CALL R4 2 - 0x70020000, // 000E JMP #0010 - 0x000C0705, // 000F ADD R3 R3 K5 - 0x7001FFF1, // 0010 JMP #0003 - 0x80000000, // 0011 RET 0 + ( &(const binstruction[15]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x600C0004, // 0001 GETGBL R3 G4 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x200C0701, // 0004 NE R3 R3 K1 + 0x780E0000, // 0005 JMPF R3 #0007 + 0xB0060503, // 0006 RAISE 1 K2 K3 + 0x8C0C0504, // 0007 GETMET R3 R2 K4 + 0x5C140200, // 0008 MOVE R5 R1 + 0x7C0C0400, // 0009 CALL R3 2 + 0x50100200, // 000A LDBOOL R4 1 0 + 0x1C0C0604, // 000B EQ R3 R3 R4 + 0x780E0000, // 000C JMPF R3 #000E + 0xB0060505, // 000D RAISE 1 K2 K5 + 0x80000000, // 000E RET 0 }) ) ); @@ -470,118 +338,156 @@ be_local_closure(Tasmota_run_cron, /* name */ /******************************************************************** -** Solidified function: run_deferred -********************************************************************/ -be_local_closure(Tasmota_run_deferred, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str(_timers), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str(size), - /* K3 */ be_nested_str(time_reached), - /* K4 */ be_nested_str(trig), - /* K5 */ be_nested_str(f), - /* K6 */ be_nested_str(remove), - /* K7 */ be_const_int(1), - }), - &be_const_str_run_deferred, - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060015, // 0001 JMPF R1 #0018 - 0x58040001, // 0002 LDCONST R1 K1 - 0x88080100, // 0003 GETMBR R2 R0 K0 - 0x8C080502, // 0004 GETMET R2 R2 K2 - 0x7C080200, // 0005 CALL R2 1 - 0x14080202, // 0006 LT R2 R1 R2 - 0x780A000F, // 0007 JMPF R2 #0018 - 0x88080100, // 0008 GETMBR R2 R0 K0 - 0x94080401, // 0009 GETIDX R2 R2 R1 - 0x8C0C0103, // 000A GETMET R3 R0 K3 - 0x88140504, // 000B GETMBR R5 R2 K4 - 0x7C0C0400, // 000C CALL R3 2 - 0x780E0007, // 000D JMPF R3 #0016 - 0x880C0505, // 000E GETMBR R3 R2 K5 - 0x88100100, // 000F GETMBR R4 R0 K0 - 0x8C100906, // 0010 GETMET R4 R4 K6 - 0x5C180200, // 0011 MOVE R6 R1 - 0x7C100400, // 0012 CALL R4 2 - 0x5C100600, // 0013 MOVE R4 R3 - 0x7C100000, // 0014 CALL R4 0 - 0x70020000, // 0015 JMP #0017 - 0x00040307, // 0016 ADD R1 R1 K7 - 0x7001FFEA, // 0017 JMP #0003 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: wire_scan +** Solidified function: event ********************************************************************/ -be_local_closure(Tasmota_wire_scan, /* name */ +be_local_closure(Tasmota_event, /* name */ be_nested_proto( - 6, /* nstack */ - 3, /* argc */ + 19, /* nstack */ + 6, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str(i2c_enabled), - /* K1 */ be_nested_str(wire1), - /* K2 */ be_nested_str(enabled), - /* K3 */ be_nested_str(detect), - /* K4 */ be_nested_str(wire2), + ( &(const bvalue[25]) { /* constants */ + /* K0 */ be_nested_str(introspect), + /* K1 */ be_nested_str(every_50ms), + /* K2 */ be_nested_str(run_deferred), + /* K3 */ be_nested_str(every_250ms), + /* K4 */ be_nested_str(run_cron), + /* K5 */ be_nested_str(mqtt_data), + /* K6 */ be_nested_str(cmd), + /* K7 */ be_nested_str(exec_cmd), + /* K8 */ be_nested_str(tele), + /* K9 */ be_nested_str(exec_tele), + /* K10 */ be_nested_str(rule), + /* K11 */ be_nested_str(exec_rules), + /* K12 */ be_nested_str(gc), + /* K13 */ be_nested_str(_drivers), + /* K14 */ be_const_int(0), + /* K15 */ be_nested_str(get), + /* K16 */ be_nested_str(function), + /* K17 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K18 */ be_nested_str(_debug_present), + /* K19 */ be_nested_str(debug), + /* K20 */ be_nested_str(traceback), + /* K21 */ be_const_int(1), + /* K22 */ be_nested_str(save_before_restart), + /* K23 */ be_nested_str(persist), + /* K24 */ be_nested_str(save), }), - &be_const_str_wire_scan, + &be_const_str_event, &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x200C0403, // 0001 NE R3 R2 R3 - 0x780E0005, // 0002 JMPF R3 #0009 - 0x8C0C0100, // 0003 GETMET R3 R0 K0 - 0x5C140400, // 0004 MOVE R5 R2 - 0x7C0C0400, // 0005 CALL R3 2 - 0x740E0001, // 0006 JMPT R3 #0009 - 0x4C0C0000, // 0007 LDNIL R3 - 0x80040600, // 0008 RET 1 R3 - 0x880C0101, // 0009 GETMBR R3 R0 K1 - 0x8C0C0702, // 000A GETMET R3 R3 K2 - 0x7C0C0200, // 000B CALL R3 1 - 0x780E0006, // 000C JMPF R3 #0014 - 0x880C0101, // 000D GETMBR R3 R0 K1 - 0x8C0C0703, // 000E GETMET R3 R3 K3 - 0x5C140200, // 000F MOVE R5 R1 - 0x7C0C0400, // 0010 CALL R3 2 - 0x780E0001, // 0011 JMPF R3 #0014 - 0x880C0101, // 0012 GETMBR R3 R0 K1 - 0x80040600, // 0013 RET 1 R3 - 0x880C0104, // 0014 GETMBR R3 R0 K4 - 0x8C0C0702, // 0015 GETMET R3 R3 K2 - 0x7C0C0200, // 0016 CALL R3 1 - 0x780E0006, // 0017 JMPF R3 #001F - 0x880C0104, // 0018 GETMBR R3 R0 K4 - 0x8C0C0703, // 0019 GETMET R3 R3 K3 - 0x5C140200, // 001A MOVE R5 R1 - 0x7C0C0400, // 001B CALL R3 2 - 0x780E0001, // 001C JMPF R3 #001F - 0x880C0104, // 001D GETMBR R3 R0 K4 - 0x80040600, // 001E RET 1 R3 - 0x4C0C0000, // 001F LDNIL R3 - 0x80040600, // 0020 RET 1 R3 + ( &(const binstruction[108]) { /* code */ + 0xA41A0000, // 0000 IMPORT R6 K0 + 0x1C1C0301, // 0001 EQ R7 R1 K1 + 0x781E0001, // 0002 JMPF R7 #0005 + 0x8C1C0102, // 0003 GETMET R7 R0 K2 + 0x7C1C0200, // 0004 CALL R7 1 + 0x1C1C0303, // 0005 EQ R7 R1 K3 + 0x781E0001, // 0006 JMPF R7 #0009 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x501C0000, // 0009 LDBOOL R7 0 0 + 0x50200000, // 000A LDBOOL R8 0 0 + 0x1C240305, // 000B EQ R9 R1 K5 + 0x78260000, // 000C JMPF R9 #000E + 0x50200200, // 000D LDBOOL R8 1 0 + 0x1C240306, // 000E EQ R9 R1 K6 + 0x78260006, // 000F JMPF R9 #0017 + 0x8C240107, // 0010 GETMET R9 R0 K7 + 0x5C2C0400, // 0011 MOVE R11 R2 + 0x5C300600, // 0012 MOVE R12 R3 + 0x5C340800, // 0013 MOVE R13 R4 + 0x7C240800, // 0014 CALL R9 4 + 0x80041200, // 0015 RET 1 R9 + 0x7002004E, // 0016 JMP #0066 + 0x1C240308, // 0017 EQ R9 R1 K8 + 0x78260004, // 0018 JMPF R9 #001E + 0x8C240109, // 0019 GETMET R9 R0 K9 + 0x5C2C0800, // 001A MOVE R11 R4 + 0x7C240400, // 001B CALL R9 2 + 0x80041200, // 001C RET 1 R9 + 0x70020047, // 001D JMP #0066 + 0x1C24030A, // 001E EQ R9 R1 K10 + 0x78260007, // 001F JMPF R9 #0028 + 0x8C24010B, // 0020 GETMET R9 R0 K11 + 0x5C2C0800, // 0021 MOVE R11 R4 + 0x60300017, // 0022 GETGBL R12 G23 + 0x5C340600, // 0023 MOVE R13 R3 + 0x7C300200, // 0024 CALL R12 1 + 0x7C240600, // 0025 CALL R9 3 + 0x80041200, // 0026 RET 1 R9 + 0x7002003D, // 0027 JMP #0066 + 0x1C24030C, // 0028 EQ R9 R1 K12 + 0x78260003, // 0029 JMPF R9 #002E + 0x8C24010C, // 002A GETMET R9 R0 K12 + 0x7C240200, // 002B CALL R9 1 + 0x80041200, // 002C RET 1 R9 + 0x70020037, // 002D JMP #0066 + 0x8824010D, // 002E GETMBR R9 R0 K13 + 0x78260035, // 002F JMPF R9 #0066 + 0x5824000E, // 0030 LDCONST R9 K14 + 0x6028000C, // 0031 GETGBL R10 G12 + 0x882C010D, // 0032 GETMBR R11 R0 K13 + 0x7C280200, // 0033 CALL R10 1 + 0x1428120A, // 0034 LT R10 R9 R10 + 0x782A002F, // 0035 JMPF R10 #0066 + 0x8828010D, // 0036 GETMBR R10 R0 K13 + 0x94281409, // 0037 GETIDX R10 R10 R9 + 0x8C2C0D0F, // 0038 GETMET R11 R6 K15 + 0x5C341400, // 0039 MOVE R13 R10 + 0x5C380200, // 003A MOVE R14 R1 + 0x7C2C0600, // 003B CALL R11 3 + 0x60300004, // 003C GETGBL R12 G4 + 0x5C341600, // 003D MOVE R13 R11 + 0x7C300200, // 003E CALL R12 1 + 0x1C301910, // 003F EQ R12 R12 K16 + 0x78320022, // 0040 JMPF R12 #0064 + 0xA8020011, // 0041 EXBLK 0 #0054 + 0x5C301600, // 0042 MOVE R12 R11 + 0x5C341400, // 0043 MOVE R13 R10 + 0x5C380400, // 0044 MOVE R14 R2 + 0x5C3C0600, // 0045 MOVE R15 R3 + 0x5C400800, // 0046 MOVE R16 R4 + 0x5C440A00, // 0047 MOVE R17 R5 + 0x7C300A00, // 0048 CALL R12 5 + 0x74320001, // 0049 JMPT R12 #004C + 0x741E0000, // 004A JMPT R7 #004C + 0x501C0001, // 004B LDBOOL R7 0 1 + 0x501C0200, // 004C LDBOOL R7 1 0 + 0x781E0003, // 004D JMPF R7 #0052 + 0x5C301000, // 004E MOVE R12 R8 + 0x74320001, // 004F JMPT R12 #0052 + 0xA8040001, // 0050 EXBLK 1 1 + 0x70020013, // 0051 JMP #0066 + 0xA8040001, // 0052 EXBLK 1 1 + 0x7002000F, // 0053 JMP #0064 + 0xAC300002, // 0054 CATCH R12 0 2 + 0x7002000C, // 0055 JMP #0063 + 0x60380001, // 0056 GETGBL R14 G1 + 0x603C0018, // 0057 GETGBL R15 G24 + 0x58400011, // 0058 LDCONST R16 K17 + 0x5C441800, // 0059 MOVE R17 R12 + 0x5C481A00, // 005A MOVE R18 R13 + 0x7C3C0600, // 005B CALL R15 3 + 0x7C380200, // 005C CALL R14 1 + 0x88380112, // 005D GETMBR R14 R0 K18 + 0x783A0002, // 005E JMPF R14 #0062 + 0xA43A2600, // 005F IMPORT R14 K19 + 0x8C3C1D14, // 0060 GETMET R15 R14 K20 + 0x7C3C0200, // 0061 CALL R15 1 + 0x70020000, // 0062 JMP #0064 + 0xB0080000, // 0063 RAISE 2 R0 R0 + 0x00241315, // 0064 ADD R9 R9 K21 + 0x7001FFCA, // 0065 JMP #0031 + 0x1C240316, // 0066 EQ R9 R1 K22 + 0x78260002, // 0067 JMPF R9 #006B + 0xA4262E00, // 0068 IMPORT R9 K23 + 0x8C281318, // 0069 GETMET R10 R9 K24 + 0x7C280200, // 006A CALL R10 1 + 0x80040E00, // 006B RET 1 R7 }) ) ); @@ -589,46 +495,88 @@ be_local_closure(Tasmota_wire_scan, /* name */ /******************************************************************** -** Solidified function: next_cron +** Solidified function: urlfetch ********************************************************************/ -be_local_closure(Tasmota_next_cron, /* name */ +be_local_closure(Tasmota_urlfetch, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 10, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str(_crons), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str(size), - /* K3 */ be_nested_str(id), - /* K4 */ be_nested_str(trig), - /* K5 */ be_const_int(1), + ( &(const bvalue[17]) { /* constants */ + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(split), + /* K2 */ be_nested_str(_X2F), + /* K3 */ be_nested_str(pop), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str(index_X2Ehtml), + /* K6 */ be_nested_str(webclient), + /* K7 */ be_nested_str(set_follow_redirects), + /* K8 */ be_nested_str(begin), + /* K9 */ be_nested_str(GET), + /* K10 */ be_nested_str(status_X3A_X20), + /* K11 */ be_nested_str(connection_error), + /* K12 */ be_nested_str(write_file), + /* K13 */ be_nested_str(close), + /* K14 */ be_nested_str(log), + /* K15 */ be_nested_str(BRY_X3A_X20Fetched_X20), + /* K16 */ be_const_int(3), }), - &be_const_str_next_cron, + &be_const_str_urlfetch, &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A000D, // 0001 JMPF R2 #0010 - 0x580C0001, // 0002 LDCONST R3 K1 - 0x8C100502, // 0003 GETMET R4 R2 K2 - 0x7C100200, // 0004 CALL R4 1 - 0x14100604, // 0005 LT R4 R3 R4 - 0x78120008, // 0006 JMPF R4 #0010 - 0x94100403, // 0007 GETIDX R4 R2 R3 - 0x88100903, // 0008 GETMBR R4 R4 K3 - 0x1C100801, // 0009 EQ R4 R4 R1 - 0x78120002, // 000A JMPF R4 #000E - 0x94100403, // 000B GETIDX R4 R2 R3 - 0x88100904, // 000C GETMBR R4 R4 K4 - 0x80040800, // 000D RET 1 R4 - 0x000C0705, // 000E ADD R3 R3 K5 - 0x7001FFF2, // 000F JMP #0003 - 0x80000000, // 0010 RET 0 + ( &(const binstruction[48]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E000D, // 0002 JMPF R3 #0011 + 0xA40E0000, // 0003 IMPORT R3 K0 + 0x8C100701, // 0004 GETMET R4 R3 K1 + 0x5C180200, // 0005 MOVE R6 R1 + 0x581C0002, // 0006 LDCONST R7 K2 + 0x7C100600, // 0007 CALL R4 3 + 0x8C100903, // 0008 GETMET R4 R4 K3 + 0x7C100200, // 0009 CALL R4 1 + 0x5C080800, // 000A MOVE R2 R4 + 0x6010000C, // 000B GETGBL R4 G12 + 0x5C140400, // 000C MOVE R5 R2 + 0x7C100200, // 000D CALL R4 1 + 0x1C100904, // 000E EQ R4 R4 K4 + 0x78120000, // 000F JMPF R4 #0011 + 0x58080005, // 0010 LDCONST R2 K5 + 0xB80E0C00, // 0011 GETNGBL R3 K6 + 0x7C0C0000, // 0012 CALL R3 0 + 0x8C100707, // 0013 GETMET R4 R3 K7 + 0x50180200, // 0014 LDBOOL R6 1 0 + 0x7C100400, // 0015 CALL R4 2 + 0x8C100708, // 0016 GETMET R4 R3 K8 + 0x5C180200, // 0017 MOVE R6 R1 + 0x7C100400, // 0018 CALL R4 2 + 0x8C100709, // 0019 GETMET R4 R3 K9 + 0x7C100200, // 001A CALL R4 1 + 0x541600C7, // 001B LDINT R5 200 + 0x20140805, // 001C NE R5 R4 R5 + 0x78160004, // 001D JMPF R5 #0023 + 0x60140008, // 001E GETGBL R5 G8 + 0x5C180800, // 001F MOVE R6 R4 + 0x7C140200, // 0020 CALL R5 1 + 0x00161405, // 0021 ADD R5 K10 R5 + 0xB0061605, // 0022 RAISE 1 K11 R5 + 0x8C14070C, // 0023 GETMET R5 R3 K12 + 0x5C1C0400, // 0024 MOVE R7 R2 + 0x7C140400, // 0025 CALL R5 2 + 0x8C18070D, // 0026 GETMET R6 R3 K13 + 0x7C180200, // 0027 CALL R6 1 + 0x8C18010E, // 0028 GETMET R6 R0 K14 + 0x60200008, // 0029 GETGBL R8 G8 + 0x5C240A00, // 002A MOVE R9 R5 + 0x7C200200, // 002B CALL R8 1 + 0x00221E08, // 002C ADD R8 K15 R8 + 0x58240010, // 002D LDCONST R9 K16 + 0x7C180600, // 002E CALL R6 3 + 0x80040800, // 002F RET 1 R4 }) ) ); @@ -636,31 +584,183 @@ be_local_closure(Tasmota_next_cron, /* name */ /******************************************************************** -** Solidified function: set_light +** Solidified function: exec_cmd ********************************************************************/ -be_local_closure(Tasmota_set_light, /* name */ +be_local_closure(Tasmota_exec_cmd, /* name */ be_nested_proto( - 8, /* nstack */ - 3, /* argc */ + 12, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str(tasmota_X2Eset_light_X28_X29_X20is_X20deprecated_X2C_X20use_X20light_X2Eset_X28_X29), - /* K1 */ be_nested_str(light), - /* K2 */ be_nested_str(set), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(_ccmd), + /* K1 */ be_nested_str(json), + /* K2 */ be_nested_str(load), + /* K3 */ be_nested_str(find_key_i), + /* K4 */ be_nested_str(resolvecmnd), }), - &be_const_str_set_light, + &be_const_str_exec_cmd, &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x600C0001, // 0000 GETGBL R3 G1 - 0x58100000, // 0001 LDCONST R4 K0 - 0x7C0C0200, // 0002 CALL R3 1 - 0xA40E0200, // 0003 IMPORT R3 K1 - 0x4C100000, // 0004 LDNIL R4 + ( &(const binstruction[27]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x78120016, // 0001 JMPF R4 #0019 + 0xA4120200, // 0002 IMPORT R4 K1 + 0x8C140902, // 0003 GETMET R5 R4 K2 + 0x5C1C0600, // 0004 MOVE R7 R3 + 0x7C140400, // 0005 CALL R5 2 + 0x8C180103, // 0006 GETMET R6 R0 K3 + 0x88200100, // 0007 GETMBR R8 R0 K0 + 0x5C240200, // 0008 MOVE R9 R1 + 0x7C180600, // 0009 CALL R6 3 + 0x4C1C0000, // 000A LDNIL R7 + 0x201C0C07, // 000B NE R7 R6 R7 + 0x781E000B, // 000C JMPF R7 #0019 + 0x8C1C0104, // 000D GETMET R7 R0 K4 + 0x5C240C00, // 000E MOVE R9 R6 + 0x7C1C0400, // 000F CALL R7 2 + 0x881C0100, // 0010 GETMBR R7 R0 K0 + 0x941C0E06, // 0011 GETIDX R7 R7 R6 + 0x5C200C00, // 0012 MOVE R8 R6 + 0x5C240400, // 0013 MOVE R9 R2 + 0x5C280600, // 0014 MOVE R10 R3 + 0x5C2C0A00, // 0015 MOVE R11 R5 + 0x7C1C0800, // 0016 CALL R7 4 + 0x501C0200, // 0017 LDBOOL R7 1 0 + 0x80040E00, // 0018 RET 1 R7 + 0x50100000, // 0019 LDBOOL R4 0 0 + 0x80040800, // 001A RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_cron +********************************************************************/ +be_local_closure(Tasmota_remove_cron, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str(_crons), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(size), + /* K3 */ be_nested_str(id), + /* K4 */ be_nested_str(remove), + /* K5 */ be_const_int(1), + }), + &be_const_str_remove_cron, + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A000E, // 0001 JMPF R2 #0011 + 0x580C0001, // 0002 LDCONST R3 K1 + 0x8C100502, // 0003 GETMET R4 R2 K2 + 0x7C100200, // 0004 CALL R4 1 + 0x14100604, // 0005 LT R4 R3 R4 + 0x78120009, // 0006 JMPF R4 #0011 + 0x94100403, // 0007 GETIDX R4 R2 R3 + 0x88100903, // 0008 GETMBR R4 R4 K3 + 0x1C100801, // 0009 EQ R4 R4 R1 + 0x78120003, // 000A JMPF R4 #000F + 0x8C100504, // 000B GETMET R4 R2 K4 + 0x5C180600, // 000C MOVE R6 R3 + 0x7C100400, // 000D CALL R4 2 + 0x70020000, // 000E JMP #0010 + 0x000C0705, // 000F ADD R3 R3 K5 + 0x7001FFF1, // 0010 JMP #0003 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_list_i +********************************************************************/ +be_local_closure(Tasmota_find_list_i, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str(string), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(toupper), + /* K3 */ be_const_int(1), + }), + &be_const_str_find_list_i, + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x8C140702, // 0002 GETMET R5 R3 K2 + 0x5C1C0400, // 0003 MOVE R7 R2 + 0x7C140400, // 0004 CALL R5 2 + 0x6018000C, // 0005 GETGBL R6 G12 + 0x5C1C0200, // 0006 MOVE R7 R1 + 0x7C180200, // 0007 CALL R6 1 + 0x14180806, // 0008 LT R6 R4 R6 + 0x781A0007, // 0009 JMPF R6 #0012 + 0x8C180702, // 000A GETMET R6 R3 K2 + 0x94200204, // 000B GETIDX R8 R1 R4 + 0x7C180400, // 000C CALL R6 2 + 0x1C180C05, // 000D EQ R6 R6 R5 + 0x781A0000, // 000E JMPF R6 #0010 + 0x80040800, // 000F RET 1 R4 + 0x00100903, // 0010 ADD R4 R4 K3 + 0x7001FFF2, // 0011 JMP #0005 + 0x4C180000, // 0012 LDNIL R6 + 0x80040C00, // 0013 RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_light +********************************************************************/ +be_local_closure(Tasmota_set_light, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str(tasmota_X2Eset_light_X28_X29_X20is_X20deprecated_X2C_X20use_X20light_X2Eset_X28_X29), + /* K1 */ be_nested_str(light), + /* K2 */ be_nested_str(set), + }), + &be_const_str_set_light, + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x600C0001, // 0000 GETGBL R3 G1 + 0x58100000, // 0001 LDCONST R4 K0 + 0x7C0C0200, // 0002 CALL R3 1 + 0xA40E0200, // 0003 IMPORT R3 K1 + 0x4C100000, // 0004 LDNIL R4 0x20100404, // 0005 NE R4 R2 R4 0x78120005, // 0006 JMPF R4 #000D 0x8C100702, // 0007 GETMET R4 R3 K2 @@ -681,9 +781,90 @@ be_local_closure(Tasmota_set_light, /* name */ /******************************************************************** -** Solidified function: remove_fast_loop +** Solidified function: remove_timer ********************************************************************/ -be_local_closure(Tasmota_remove_fast_loop, /* name */ +be_local_closure(Tasmota_remove_timer, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str(_timers), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(size), + /* K3 */ be_nested_str(id), + /* K4 */ be_nested_str(remove), + /* K5 */ be_const_int(1), + }), + &be_const_str_remove_timer, + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A000E, // 0001 JMPF R2 #0011 + 0x580C0001, // 0002 LDCONST R3 K1 + 0x8C100502, // 0003 GETMET R4 R2 K2 + 0x7C100200, // 0004 CALL R4 1 + 0x14100604, // 0005 LT R4 R3 R4 + 0x78120009, // 0006 JMPF R4 #0011 + 0x94100403, // 0007 GETIDX R4 R2 R3 + 0x88100903, // 0008 GETMBR R4 R4 K3 + 0x1C100801, // 0009 EQ R4 R4 R1 + 0x78120003, // 000A JMPF R4 #000F + 0x8C100504, // 000B GETMET R4 R2 K4 + 0x5C180600, // 000C MOVE R6 R3 + 0x7C100400, // 000D CALL R4 2 + 0x70020000, // 000E JMP #0010 + 0x000C0705, // 000F ADD R3 R3 K5 + 0x7001FFF1, // 0010 JMP #0003 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_cmd +********************************************************************/ +be_local_closure(Tasmota_remove_cmd, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str(_ccmd), + /* K1 */ be_nested_str(remove), + }), + &be_const_str_remove_cmd, + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0003, // 0001 JMPF R2 #0006 + 0x88080100, // 0002 GETMBR R2 R0 K0 + 0x8C080501, // 0003 GETMET R2 R2 K1 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_driver +********************************************************************/ +be_local_closure(Tasmota_remove_driver, /* name */ be_nested_proto( 6, /* nstack */ 2, /* argc */ @@ -694,28 +875,27 @@ be_local_closure(Tasmota_remove_fast_loop, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str(_fl), + /* K0 */ be_nested_str(_drivers), /* K1 */ be_nested_str(find), - /* K2 */ be_nested_str(remove), + /* K2 */ be_nested_str(pop), }), - &be_const_str_remove_fast_loop, + &be_const_str_remove_driver, &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ + ( &(const binstruction[14]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A0000, // 0001 JMPT R2 #0003 - 0x80000400, // 0002 RET 0 - 0x88080100, // 0003 GETMBR R2 R0 K0 - 0x8C080501, // 0004 GETMET R2 R2 K1 - 0x5C100200, // 0005 MOVE R4 R1 - 0x7C080400, // 0006 CALL R2 2 - 0x4C0C0000, // 0007 LDNIL R3 - 0x200C0403, // 0008 NE R3 R2 R3 - 0x780E0003, // 0009 JMPF R3 #000E - 0x880C0100, // 000A GETMBR R3 R0 K0 - 0x8C0C0702, // 000B GETMET R3 R3 K2 - 0x5C140400, // 000C MOVE R5 R2 - 0x7C0C0400, // 000D CALL R3 2 - 0x80000000, // 000E RET 0 + 0x780A000A, // 0001 JMPF R2 #000D + 0x88080100, // 0002 GETMBR R2 R0 K0 + 0x8C080501, // 0003 GETMET R2 R2 K1 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x4C0C0000, // 0006 LDNIL R3 + 0x200C0403, // 0007 NE R3 R2 R3 + 0x780E0003, // 0008 JMPF R3 #000D + 0x880C0100, // 0009 GETMBR R3 R0 K0 + 0x8C0C0702, // 000A GETMET R3 R3 K2 + 0x5C140400, // 000B MOVE R5 R2 + 0x7C0C0400, // 000C CALL R3 2 + 0x80000000, // 000D RET 0 }) ) ); @@ -833,12 +1013,144 @@ be_local_closure(Tasmota_init, /* name */ /******************************************************************** -** Solidified function: set_timer +** Solidified function: add_driver ********************************************************************/ -be_local_closure(Tasmota_set_timer, /* name */ +be_local_closure(Tasmota_add_driver, /* name */ be_nested_proto( - 10, /* nstack */ - 4, /* argc */ + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str(instance), + /* K1 */ be_nested_str(value_error), + /* K2 */ be_nested_str(instance_X20required), + /* K3 */ be_nested_str(_drivers), + /* K4 */ be_nested_str(find), + /* K5 */ be_nested_str(push), + }), + &be_const_str_add_driver, + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x60080004, // 0000 GETGBL R2 G4 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x20080500, // 0003 NE R2 R2 K0 + 0x780A0000, // 0004 JMPF R2 #0006 + 0xB0060302, // 0005 RAISE 1 K1 K2 + 0x88080103, // 0006 GETMBR R2 R0 K3 + 0x780A000B, // 0007 JMPF R2 #0014 + 0x88080103, // 0008 GETMBR R2 R0 K3 + 0x8C080504, // 0009 GETMET R2 R2 K4 + 0x5C100200, // 000A MOVE R4 R1 + 0x7C080400, // 000B CALL R2 2 + 0x4C0C0000, // 000C LDNIL R3 + 0x1C080403, // 000D EQ R2 R2 R3 + 0x780A0003, // 000E JMPF R2 #0013 + 0x88080103, // 000F GETMBR R2 R0 K3 + 0x8C080505, // 0010 GETMET R2 R2 K5 + 0x5C100200, // 0011 MOVE R4 R1 + 0x7C080400, // 0012 CALL R2 2 + 0x70020003, // 0013 JMP #0018 + 0x60080012, // 0014 GETGBL R2 G18 + 0x7C080000, // 0015 CALL R2 0 + 0x400C0401, // 0016 CONNECT R3 R2 R1 + 0x90020602, // 0017 SETMBR R0 K3 R2 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: exec_tele +********************************************************************/ +be_local_closure(Tasmota_exec_tele, /* name */ + be_nested_proto( + 12, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str(_rules), + /* K1 */ be_nested_str(json), + /* K2 */ be_nested_str(load), + /* K3 */ be_nested_str(log), + /* K4 */ be_nested_str(BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str(Tele), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str(try_rule), + /* K9 */ be_nested_str(trig), + /* K10 */ be_nested_str(f), + /* K11 */ be_const_int(1), + }), + &be_const_str_exec_tele, + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0024, // 0001 JMPF R2 #0027 + 0xA40A0200, // 0002 IMPORT R2 K1 + 0x8C0C0502, // 0003 GETMET R3 R2 K2 + 0x5C140200, // 0004 MOVE R5 R1 + 0x7C0C0400, // 0005 CALL R3 2 + 0x50100000, // 0006 LDBOOL R4 0 0 + 0x4C140000, // 0007 LDNIL R5 + 0x1C140605, // 0008 EQ R5 R3 R5 + 0x78160004, // 0009 JMPF R5 #000F + 0x8C140103, // 000A GETMET R5 R0 K3 + 0x001E0801, // 000B ADD R7 K4 R1 + 0x58200005, // 000C LDCONST R8 K5 + 0x7C140600, // 000D CALL R5 3 + 0x5C0C0200, // 000E MOVE R3 R1 + 0x60140013, // 000F GETGBL R5 G19 + 0x7C140000, // 0010 CALL R5 0 + 0x98160C03, // 0011 SETIDX R5 K6 R3 + 0x5C0C0A00, // 0012 MOVE R3 R5 + 0x58140007, // 0013 LDCONST R5 K7 + 0x6018000C, // 0014 GETGBL R6 G12 + 0x881C0100, // 0015 GETMBR R7 R0 K0 + 0x7C180200, // 0016 CALL R6 1 + 0x14180A06, // 0017 LT R6 R5 R6 + 0x781A000C, // 0018 JMPF R6 #0026 + 0x88180100, // 0019 GETMBR R6 R0 K0 + 0x94180C05, // 001A GETIDX R6 R6 R5 + 0x8C1C0108, // 001B GETMET R7 R0 K8 + 0x5C240600, // 001C MOVE R9 R3 + 0x88280D09, // 001D GETMBR R10 R6 K9 + 0x882C0D0A, // 001E GETMBR R11 R6 K10 + 0x7C1C0800, // 001F CALL R7 4 + 0x741E0001, // 0020 JMPT R7 #0023 + 0x74120000, // 0021 JMPT R4 #0023 + 0x50100001, // 0022 LDBOOL R4 0 1 + 0x50100200, // 0023 LDBOOL R4 1 0 + 0x00140B0B, // 0024 ADD R5 R5 K11 + 0x7001FFED, // 0025 JMP #0014 + 0x80040800, // 0026 RET 1 R4 + 0x50080000, // 0027 LDBOOL R2 0 0 + 0x80040400, // 0028 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_cmd +********************************************************************/ +be_local_closure(Tasmota_add_cmd, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -847,35 +1159,93 @@ be_local_closure(Tasmota_set_timer, /* name */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str(check_not_method), - /* K1 */ be_nested_str(_timers), - /* K2 */ be_nested_str(push), - /* K3 */ be_nested_str(Trigger), - /* K4 */ be_nested_str(millis), + /* K1 */ be_nested_str(_ccmd), + /* K2 */ be_nested_str(function), + /* K3 */ be_nested_str(value_error), + /* K4 */ be_nested_str(the_X20second_X20argument_X20is_X20not_X20a_X20function), }), - &be_const_str_set_timer, + &be_const_str_add_cmd, &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x8C100100, // 0000 GETMET R4 R0 K0 - 0x5C180400, // 0001 MOVE R6 R2 - 0x7C100400, // 0002 CALL R4 2 - 0x88100101, // 0003 GETMBR R4 R0 K1 - 0x4C140000, // 0004 LDNIL R5 - 0x1C100805, // 0005 EQ R4 R4 R5 - 0x78120002, // 0006 JMPF R4 #000A - 0x60100012, // 0007 GETGBL R4 G18 - 0x7C100000, // 0008 CALL R4 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x88100101, // 000A GETMBR R4 R0 K1 - 0x8C100902, // 000B GETMET R4 R4 K2 - 0xB81A0600, // 000C GETNGBL R6 K3 - 0x8C1C0104, // 000D GETMET R7 R0 K4 - 0x5C240200, // 000E MOVE R9 R1 - 0x7C1C0400, // 000F CALL R7 2 - 0x5C200400, // 0010 MOVE R8 R2 - 0x5C240600, // 0011 MOVE R9 R3 - 0x7C180600, // 0012 CALL R6 3 - 0x7C100400, // 0013 CALL R4 2 - 0x80000000, // 0014 RET 0 + ( &(const binstruction[20]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x5C140400, // 0001 MOVE R5 R2 + 0x7C0C0400, // 0002 CALL R3 2 + 0x880C0101, // 0003 GETMBR R3 R0 K1 + 0x4C100000, // 0004 LDNIL R4 + 0x1C0C0604, // 0005 EQ R3 R3 R4 + 0x780E0002, // 0006 JMPF R3 #000A + 0x600C0013, // 0007 GETGBL R3 G19 + 0x7C0C0000, // 0008 CALL R3 0 + 0x90020203, // 0009 SETMBR R0 K1 R3 + 0x600C0004, // 000A GETGBL R3 G4 + 0x5C100400, // 000B MOVE R4 R2 + 0x7C0C0200, // 000C CALL R3 1 + 0x1C0C0702, // 000D EQ R3 R3 K2 + 0x780E0002, // 000E JMPF R3 #0012 + 0x880C0101, // 000F GETMBR R3 R0 K1 + 0x980C0202, // 0010 SETIDX R3 R1 R2 + 0x70020000, // 0011 JMP #0013 + 0xB0060704, // 0012 RAISE 1 K3 K4 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_op +********************************************************************/ +be_local_closure(Tasmota_find_op, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str(_find_op), + /* K1 */ be_const_int(0), + /* K2 */ be_const_int(1), + /* K3 */ be_const_int(2147483647), + }), + &be_const_str_find_op, + &be_const_str_solidified, + ( &(const binstruction[31]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0x280C0501, // 0003 GE R3 R2 K1 + 0x780E0011, // 0004 JMPF R3 #0017 + 0x540E7FFE, // 0005 LDINT R3 32767 + 0x2C0C0403, // 0006 AND R3 R2 R3 + 0x5412000F, // 0007 LDINT R4 16 + 0x3C100404, // 0008 SHR R4 R2 R4 + 0x60140012, // 0009 GETGBL R5 G18 + 0x7C140000, // 000A CALL R5 0 + 0x04180702, // 000B SUB R6 R3 K2 + 0x401A0206, // 000C CONNECT R6 K1 R6 + 0x94180206, // 000D GETIDX R6 R1 R6 + 0x40180A06, // 000E CONNECT R6 R5 R6 + 0x04180902, // 000F SUB R6 R4 K2 + 0x40180606, // 0010 CONNECT R6 R3 R6 + 0x94180206, // 0011 GETIDX R6 R1 R6 + 0x40180A06, // 0012 CONNECT R6 R5 R6 + 0x40180903, // 0013 CONNECT R6 R4 K3 + 0x94180206, // 0014 GETIDX R6 R1 R6 + 0x40180A06, // 0015 CONNECT R6 R5 R6 + 0x80040A00, // 0016 RET 1 R5 + 0x600C0012, // 0017 GETGBL R3 G18 + 0x7C0C0000, // 0018 CALL R3 0 + 0x40100601, // 0019 CONNECT R4 R3 R1 + 0x4C100000, // 001A LDNIL R4 + 0x40100604, // 001B CONNECT R4 R3 R4 + 0x4C100000, // 001C LDNIL R4 + 0x40100604, // 001D CONNECT R4 R3 R4 + 0x80040600, // 001E RET 1 R3 }) ) ); @@ -940,32 +1310,119 @@ be_local_closure(Tasmota_add_cron, /* name */ /******************************************************************** -** Solidified function: gc +** Solidified function: remove_rule ********************************************************************/ -be_local_closure(Tasmota_gc, /* name */ +be_local_closure(Tasmota_remove_rule, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ + 7, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str(gc), - /* K1 */ be_nested_str(collect), - /* K2 */ be_nested_str(allocated), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str(_rules), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(trig), + /* K3 */ be_nested_str(rule), + /* K4 */ be_nested_str(id), + /* K5 */ be_nested_str(remove), + /* K6 */ be_const_int(1), }), - &be_const_str_gc, + &be_const_str_remove_rule, &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x80040400, // 0005 RET 1 R2 + ( &(const binstruction[27]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x780E0017, // 0001 JMPF R3 #001A + 0x580C0001, // 0002 LDCONST R3 K1 + 0x6010000C, // 0003 GETGBL R4 G12 + 0x88140100, // 0004 GETMBR R5 R0 K0 + 0x7C100200, // 0005 CALL R4 1 + 0x14100604, // 0006 LT R4 R3 R4 + 0x78120011, // 0007 JMPF R4 #001A + 0x88100100, // 0008 GETMBR R4 R0 K0 + 0x94100803, // 0009 GETIDX R4 R4 R3 + 0x88100902, // 000A GETMBR R4 R4 K2 + 0x88100903, // 000B GETMBR R4 R4 K3 + 0x1C100801, // 000C EQ R4 R4 R1 + 0x78120009, // 000D JMPF R4 #0018 + 0x88100100, // 000E GETMBR R4 R0 K0 + 0x94100803, // 000F GETIDX R4 R4 R3 + 0x88100904, // 0010 GETMBR R4 R4 K4 + 0x1C100802, // 0011 EQ R4 R4 R2 + 0x78120004, // 0012 JMPF R4 #0018 + 0x88100100, // 0013 GETMBR R4 R0 K0 + 0x8C100905, // 0014 GETMET R4 R4 K5 + 0x5C180600, // 0015 MOVE R6 R3 + 0x7C100400, // 0016 CALL R4 2 + 0x70020000, // 0017 JMP #0019 + 0x000C0706, // 0018 ADD R3 R3 K6 + 0x7001FFE8, // 0019 JMP #0003 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: wire_scan +********************************************************************/ +be_local_closure(Tasmota_wire_scan, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(i2c_enabled), + /* K1 */ be_nested_str(wire1), + /* K2 */ be_nested_str(enabled), + /* K3 */ be_nested_str(detect), + /* K4 */ be_nested_str(wire2), + }), + &be_const_str_wire_scan, + &be_const_str_solidified, + ( &(const binstruction[33]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x200C0403, // 0001 NE R3 R2 R3 + 0x780E0005, // 0002 JMPF R3 #0009 + 0x8C0C0100, // 0003 GETMET R3 R0 K0 + 0x5C140400, // 0004 MOVE R5 R2 + 0x7C0C0400, // 0005 CALL R3 2 + 0x740E0001, // 0006 JMPT R3 #0009 + 0x4C0C0000, // 0007 LDNIL R3 + 0x80040600, // 0008 RET 1 R3 + 0x880C0101, // 0009 GETMBR R3 R0 K1 + 0x8C0C0702, // 000A GETMET R3 R3 K2 + 0x7C0C0200, // 000B CALL R3 1 + 0x780E0006, // 000C JMPF R3 #0014 + 0x880C0101, // 000D GETMBR R3 R0 K1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x780E0001, // 0011 JMPF R3 #0014 + 0x880C0101, // 0012 GETMBR R3 R0 K1 + 0x80040600, // 0013 RET 1 R3 + 0x880C0104, // 0014 GETMBR R3 R0 K4 + 0x8C0C0702, // 0015 GETMET R3 R3 K2 + 0x7C0C0200, // 0016 CALL R3 1 + 0x780E0006, // 0017 JMPF R3 #001F + 0x880C0104, // 0018 GETMBR R3 R0 K4 + 0x8C0C0703, // 0019 GETMET R3 R3 K3 + 0x5C140200, // 001A MOVE R5 R1 + 0x7C0C0400, // 001B CALL R3 2 + 0x780E0001, // 001C JMPF R3 #001F + 0x880C0104, // 001D GETMBR R3 R0 K4 + 0x80040600, // 001E RET 1 R3 + 0x4C0C0000, // 001F LDNIL R3 + 0x80040600, // 0020 RET 1 R3 }) ) ); @@ -1016,32 +1473,57 @@ be_local_closure(Tasmota_get_light, /* name */ /******************************************************************** -** Solidified function: remove_cmd +** Solidified function: cmd ********************************************************************/ -be_local_closure(Tasmota_remove_cmd, /* name */ +be_local_closure(Tasmota_cmd, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 8, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str(_ccmd), - /* K1 */ be_nested_str(remove), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str(cmd_res), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(global), + /* K3 */ be_nested_str(maxlog_level), + /* K4 */ be_const_int(2), + /* K5 */ be_const_int(1), + /* K6 */ be_nested_str(_cmd), }), - &be_const_str_remove_cmd, + &be_const_str_cmd, &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0003, // 0001 JMPF R2 #0006 - 0x88080100, // 0002 GETMBR R2 R0 K0 - 0x8C080501, // 0003 GETMET R2 R2 K1 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x80000000, // 0006 RET 0 + ( &(const binstruction[27]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x50100200, // 0001 LDBOOL R4 1 0 + 0x90020004, // 0002 SETMBR R0 K0 R4 + 0xB8120200, // 0003 GETNGBL R4 K1 + 0x88100902, // 0004 GETMBR R4 R4 K2 + 0x88100903, // 0005 GETMBR R4 R4 K3 + 0x780A0004, // 0006 JMPF R2 #000C + 0x28140904, // 0007 GE R5 R4 K4 + 0x78160002, // 0008 JMPF R5 #000C + 0xB8160200, // 0009 GETNGBL R5 K1 + 0x88140B02, // 000A GETMBR R5 R5 K2 + 0x90160705, // 000B SETMBR R5 K3 K5 + 0x8C140106, // 000C GETMET R5 R0 K6 + 0x5C1C0200, // 000D MOVE R7 R1 + 0x7C140400, // 000E CALL R5 2 + 0x4C140000, // 000F LDNIL R5 + 0x88180100, // 0010 GETMBR R6 R0 K0 + 0x501C0200, // 0011 LDBOOL R7 1 0 + 0x20180C07, // 0012 NE R6 R6 R7 + 0x781A0000, // 0013 JMPF R6 #0015 + 0x88140100, // 0014 GETMBR R5 R0 K0 + 0x90020003, // 0015 SETMBR R0 K0 R3 + 0x780A0002, // 0016 JMPF R2 #001A + 0xB81A0200, // 0017 GETNGBL R6 K1 + 0x88180D02, // 0018 GETMBR R6 R6 K2 + 0x901A0604, // 0019 SETMBR R6 K3 R4 + 0x80040A00, // 001A RET 1 R5 }) ) ); @@ -1049,54 +1531,49 @@ be_local_closure(Tasmota_remove_cmd, /* name */ /******************************************************************** -** Solidified function: add_driver +** Solidified function: set_timer ********************************************************************/ -be_local_closure(Tasmota_add_driver, /* name */ +be_local_closure(Tasmota_set_timer, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 10, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str(instance), - /* K1 */ be_nested_str(value_error), - /* K2 */ be_nested_str(instance_X20required), - /* K3 */ be_nested_str(_drivers), - /* K4 */ be_nested_str(find), - /* K5 */ be_nested_str(push), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str(check_not_method), + /* K1 */ be_nested_str(_timers), + /* K2 */ be_nested_str(push), + /* K3 */ be_nested_str(Trigger), + /* K4 */ be_nested_str(millis), }), - &be_const_str_add_driver, + &be_const_str_set_timer, &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x60080004, // 0000 GETGBL R2 G4 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x20080500, // 0003 NE R2 R2 K0 - 0x780A0000, // 0004 JMPF R2 #0006 - 0xB0060302, // 0005 RAISE 1 K1 K2 - 0x88080103, // 0006 GETMBR R2 R0 K3 - 0x780A000B, // 0007 JMPF R2 #0014 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x8C080504, // 0009 GETMET R2 R2 K4 - 0x5C100200, // 000A MOVE R4 R1 - 0x7C080400, // 000B CALL R2 2 - 0x4C0C0000, // 000C LDNIL R3 - 0x1C080403, // 000D EQ R2 R2 R3 - 0x780A0003, // 000E JMPF R2 #0013 - 0x88080103, // 000F GETMBR R2 R0 K3 - 0x8C080505, // 0010 GETMET R2 R2 K5 - 0x5C100200, // 0011 MOVE R4 R1 - 0x7C080400, // 0012 CALL R2 2 - 0x70020003, // 0013 JMP #0018 - 0x60080012, // 0014 GETGBL R2 G18 - 0x7C080000, // 0015 CALL R2 0 - 0x400C0401, // 0016 CONNECT R3 R2 R1 - 0x90020602, // 0017 SETMBR R0 K3 R2 - 0x80000000, // 0018 RET 0 + ( &(const binstruction[21]) { /* code */ + 0x8C100100, // 0000 GETMET R4 R0 K0 + 0x5C180400, // 0001 MOVE R6 R2 + 0x7C100400, // 0002 CALL R4 2 + 0x88100101, // 0003 GETMBR R4 R0 K1 + 0x4C140000, // 0004 LDNIL R5 + 0x1C100805, // 0005 EQ R4 R4 R5 + 0x78120002, // 0006 JMPF R4 #000A + 0x60100012, // 0007 GETGBL R4 G18 + 0x7C100000, // 0008 CALL R4 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x88100101, // 000A GETMBR R4 R0 K1 + 0x8C100902, // 000B GETMET R4 R4 K2 + 0xB81A0600, // 000C GETNGBL R6 K3 + 0x8C1C0104, // 000D GETMET R7 R0 K4 + 0x5C240200, // 000E MOVE R9 R1 + 0x7C1C0400, // 000F CALL R7 2 + 0x5C200400, // 0010 MOVE R8 R2 + 0x5C240600, // 0011 MOVE R9 R3 + 0x7C180600, // 0012 CALL R6 3 + 0x7C100400, // 0013 CALL R4 2 + 0x80000000, // 0014 RET 0 }) ) ); @@ -1497,553 +1974,76 @@ be_local_closure(Tasmota_load, /* name */ 0x78560007, // 0067 JMPF R21 #0070 0x60540001, // 0068 GETGBL R21 G1 0x60580018, // 0069 GETGBL R22 G24 - 0x585C0011, // 006A LDCONST R23 K17 - 0x5C602200, // 006B MOVE R24 R17 - 0x7C580400, // 006C CALL R22 2 - 0x7C540200, // 006D CALL R21 1 - 0x50500000, // 006E LDBOOL R20 0 0 - 0x7002000A, // 006F JMP #007B - 0x54560003, // 0070 LDINT R21 4 - 0x20542615, // 0071 NE R21 R19 R21 - 0x78560007, // 0072 JMPF R21 #007B - 0x60540001, // 0073 GETGBL R21 G1 - 0x60580018, // 0074 GETGBL R22 G24 - 0x585C0012, // 0075 LDCONST R23 K18 - 0x5C602200, // 0076 MOVE R24 R17 - 0x5C642600, // 0077 MOVE R25 R19 - 0x7C580600, // 0078 CALL R22 3 - 0x7C540200, // 0079 CALL R21 1 - 0x50500000, // 007A LDBOOL R20 0 0 - 0x78520003, // 007B JMPF R20 #0080 - 0x5C540C00, // 007C MOVE R21 R6 - 0x5C582200, // 007D MOVE R22 R17 - 0x7C540200, // 007E CALL R21 1 - 0x5C482A00, // 007F MOVE R18 R21 - 0x4C540000, // 0080 LDNIL R21 - 0x1C542415, // 0081 EQ R21 R18 R21 - 0x78560003, // 0082 JMPF R21 #0087 - 0x5C540A00, // 0083 MOVE R21 R5 - 0x5C582200, // 0084 MOVE R22 R17 - 0x7C540200, // 0085 CALL R21 1 - 0x503C0000, // 0086 LDBOOL R15 0 0 - 0x783A0006, // 0087 JMPF R14 #008F - 0x4C4C0000, // 0088 LDNIL R19 - 0x1C4C2413, // 0089 EQ R19 R18 R19 - 0x784E0003, // 008A JMPF R19 #008F - 0x5C4C0C00, // 008B MOVE R19 R6 - 0x5C500200, // 008C MOVE R20 R1 - 0x7C4C0200, // 008D CALL R19 1 - 0x5C482600, // 008E MOVE R18 R19 - 0x4C4C0000, // 008F LDNIL R19 - 0x204C2413, // 0090 NE R19 R18 R19 - 0x784E0015, // 0091 JMPF R19 #00A8 - 0x5C4C1E00, // 0092 MOVE R19 R15 - 0x744E0013, // 0093 JMPT R19 #00A8 - 0x5C4C1A00, // 0094 MOVE R19 R13 - 0x744E0011, // 0095 JMPT R19 #00A8 - 0xA8020005, // 0096 EXBLK 0 #009D - 0x8C4C0113, // 0097 GETMET R19 R0 K19 - 0x5C542200, // 0098 MOVE R21 R17 - 0x5C582400, // 0099 MOVE R22 R18 - 0x7C4C0600, // 009A CALL R19 3 - 0xA8040001, // 009B EXBLK 1 1 - 0x7002000A, // 009C JMP #00A8 - 0xAC4C0001, // 009D CATCH R19 0 1 - 0x70020007, // 009E JMP #00A7 - 0x60500001, // 009F GETGBL R20 G1 - 0x60540018, // 00A0 GETGBL R21 G24 - 0x58580014, // 00A1 LDCONST R22 K20 - 0x5C5C2200, // 00A2 MOVE R23 R17 - 0x5C602600, // 00A3 MOVE R24 R19 - 0x7C540600, // 00A4 CALL R21 3 - 0x7C500200, // 00A5 CALL R20 1 - 0x70020000, // 00A6 JMP #00A8 - 0xB0080000, // 00A7 RAISE 2 R0 R0 - 0x5C4C0E00, // 00A8 MOVE R19 R7 - 0x5C502400, // 00A9 MOVE R20 R18 - 0x7C4C0200, // 00AA CALL R19 1 - 0x78360002, // 00AB JMPF R13 #00AF - 0x5C500600, // 00AC MOVE R20 R3 - 0x00541705, // 00AD ADD R21 R11 K5 - 0x7C500200, // 00AE CALL R20 1 - 0x80042600, // 00AF RET 1 R19 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: urlfetch -********************************************************************/ -be_local_closure(Tasmota_urlfetch, /* name */ - be_nested_proto( - 10, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[17]) { /* constants */ - /* K0 */ be_nested_str(string), - /* K1 */ be_nested_str(split), - /* K2 */ be_nested_str(_X2F), - /* K3 */ be_nested_str(pop), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str(index_X2Ehtml), - /* K6 */ be_nested_str(webclient), - /* K7 */ be_nested_str(set_follow_redirects), - /* K8 */ be_nested_str(begin), - /* K9 */ be_nested_str(GET), - /* K10 */ be_nested_str(status_X3A_X20), - /* K11 */ be_nested_str(connection_error), - /* K12 */ be_nested_str(write_file), - /* K13 */ be_nested_str(close), - /* K14 */ be_nested_str(log), - /* K15 */ be_nested_str(BRY_X3A_X20Fetched_X20), - /* K16 */ be_const_int(3), - }), - &be_const_str_urlfetch, - &be_const_str_solidified, - ( &(const binstruction[48]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E000D, // 0002 JMPF R3 #0011 - 0xA40E0000, // 0003 IMPORT R3 K0 - 0x8C100701, // 0004 GETMET R4 R3 K1 - 0x5C180200, // 0005 MOVE R6 R1 - 0x581C0002, // 0006 LDCONST R7 K2 - 0x7C100600, // 0007 CALL R4 3 - 0x8C100903, // 0008 GETMET R4 R4 K3 - 0x7C100200, // 0009 CALL R4 1 - 0x5C080800, // 000A MOVE R2 R4 - 0x6010000C, // 000B GETGBL R4 G12 - 0x5C140400, // 000C MOVE R5 R2 - 0x7C100200, // 000D CALL R4 1 - 0x1C100904, // 000E EQ R4 R4 K4 - 0x78120000, // 000F JMPF R4 #0011 - 0x58080005, // 0010 LDCONST R2 K5 - 0xB80E0C00, // 0011 GETNGBL R3 K6 - 0x7C0C0000, // 0012 CALL R3 0 - 0x8C100707, // 0013 GETMET R4 R3 K7 - 0x50180200, // 0014 LDBOOL R6 1 0 - 0x7C100400, // 0015 CALL R4 2 - 0x8C100708, // 0016 GETMET R4 R3 K8 - 0x5C180200, // 0017 MOVE R6 R1 - 0x7C100400, // 0018 CALL R4 2 - 0x8C100709, // 0019 GETMET R4 R3 K9 - 0x7C100200, // 001A CALL R4 1 - 0x541600C7, // 001B LDINT R5 200 - 0x20140805, // 001C NE R5 R4 R5 - 0x78160004, // 001D JMPF R5 #0023 - 0x60140008, // 001E GETGBL R5 G8 - 0x5C180800, // 001F MOVE R6 R4 - 0x7C140200, // 0020 CALL R5 1 - 0x00161405, // 0021 ADD R5 K10 R5 - 0xB0061605, // 0022 RAISE 1 K11 R5 - 0x8C14070C, // 0023 GETMET R5 R3 K12 - 0x5C1C0400, // 0024 MOVE R7 R2 - 0x7C140400, // 0025 CALL R5 2 - 0x8C18070D, // 0026 GETMET R6 R3 K13 - 0x7C180200, // 0027 CALL R6 1 - 0x8C18010E, // 0028 GETMET R6 R0 K14 - 0x60200008, // 0029 GETGBL R8 G8 - 0x5C240A00, // 002A MOVE R9 R5 - 0x7C200200, // 002B CALL R8 1 - 0x00221E08, // 002C ADD R8 K15 R8 - 0x58240010, // 002D LDCONST R9 K16 - 0x7C180600, // 002E CALL R6 3 - 0x80040800, // 002F RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: exec_tele -********************************************************************/ -be_local_closure(Tasmota_exec_tele, /* name */ - be_nested_proto( - 12, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str(_rules), - /* K1 */ be_nested_str(json), - /* K2 */ be_nested_str(load), - /* K3 */ be_nested_str(log), - /* K4 */ be_nested_str(BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str(Tele), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str(try_rule), - /* K9 */ be_nested_str(trig), - /* K10 */ be_nested_str(f), - /* K11 */ be_const_int(1), - }), - &be_const_str_exec_tele, - &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0024, // 0001 JMPF R2 #0027 - 0xA40A0200, // 0002 IMPORT R2 K1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x5C140200, // 0004 MOVE R5 R1 - 0x7C0C0400, // 0005 CALL R3 2 - 0x50100000, // 0006 LDBOOL R4 0 0 - 0x4C140000, // 0007 LDNIL R5 - 0x1C140605, // 0008 EQ R5 R3 R5 - 0x78160004, // 0009 JMPF R5 #000F - 0x8C140103, // 000A GETMET R5 R0 K3 - 0x001E0801, // 000B ADD R7 K4 R1 - 0x58200005, // 000C LDCONST R8 K5 - 0x7C140600, // 000D CALL R5 3 - 0x5C0C0200, // 000E MOVE R3 R1 - 0x60140013, // 000F GETGBL R5 G19 - 0x7C140000, // 0010 CALL R5 0 - 0x98160C03, // 0011 SETIDX R5 K6 R3 - 0x5C0C0A00, // 0012 MOVE R3 R5 - 0x58140007, // 0013 LDCONST R5 K7 - 0x6018000C, // 0014 GETGBL R6 G12 - 0x881C0100, // 0015 GETMBR R7 R0 K0 - 0x7C180200, // 0016 CALL R6 1 - 0x14180A06, // 0017 LT R6 R5 R6 - 0x781A000C, // 0018 JMPF R6 #0026 - 0x88180100, // 0019 GETMBR R6 R0 K0 - 0x94180C05, // 001A GETIDX R6 R6 R5 - 0x8C1C0108, // 001B GETMET R7 R0 K8 - 0x5C240600, // 001C MOVE R9 R3 - 0x88280D09, // 001D GETMBR R10 R6 K9 - 0x882C0D0A, // 001E GETMBR R11 R6 K10 - 0x7C1C0800, // 001F CALL R7 4 - 0x741E0001, // 0020 JMPT R7 #0023 - 0x74120000, // 0021 JMPT R4 #0023 - 0x50100001, // 0022 LDBOOL R4 0 1 - 0x50100200, // 0023 LDBOOL R4 1 0 - 0x00140B0B, // 0024 ADD R5 R5 K11 - 0x7001FFED, // 0025 JMP #0014 - 0x80040800, // 0026 RET 1 R4 - 0x50080000, // 0027 LDBOOL R2 0 0 - 0x80040400, // 0028 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: time_str -********************************************************************/ -be_local_closure(Tasmota_time_str, /* name */ - be_nested_proto( - 11, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str(time_dump), - /* K1 */ be_nested_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d), - /* K2 */ be_nested_str(year), - /* K3 */ be_nested_str(month), - /* K4 */ be_nested_str(day), - /* K5 */ be_nested_str(hour), - /* K6 */ be_nested_str(min), - /* K7 */ be_nested_str(sec), - }), - &be_const_str_time_str, - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 - 0x600C0018, // 0003 GETGBL R3 G24 - 0x58100001, // 0004 LDCONST R4 K1 - 0x94140502, // 0005 GETIDX R5 R2 K2 - 0x94180503, // 0006 GETIDX R6 R2 K3 - 0x941C0504, // 0007 GETIDX R7 R2 K4 - 0x94200505, // 0008 GETIDX R8 R2 K5 - 0x94240506, // 0009 GETIDX R9 R2 K6 - 0x94280507, // 000A GETIDX R10 R2 K7 - 0x7C0C0E00, // 000B CALL R3 7 - 0x80040600, // 000C RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: urlfetch_cmd -********************************************************************/ -be_local_closure(Tasmota_urlfetch_cmd, /* name */ - be_nested_proto( - 10, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str(string), - /* K1 */ be_nested_str(find), - /* K2 */ be_nested_str(http), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str(resp_cmnd_str), - /* K5 */ be_nested_str(URL_X20must_X20start_X20with_X20_X27http_X28s_X29_X27), - /* K6 */ be_nested_str(urlfetch), - /* K7 */ be_nested_str(resp_cmnd_failed), - /* K8 */ be_nested_str(tasmota), - /* K9 */ be_nested_str(resp_cmnd_done), - }), - &be_const_str_urlfetch_cmd, - &be_const_str_solidified, - ( &(const binstruction[34]) { /* code */ - 0xA4160000, // 0000 IMPORT R5 K0 - 0x8C180B01, // 0001 GETMET R6 R5 K1 - 0x5C200600, // 0002 MOVE R8 R3 - 0x58240002, // 0003 LDCONST R9 K2 - 0x7C180600, // 0004 CALL R6 3 - 0x20180D03, // 0005 NE R6 R6 K3 - 0x781A0003, // 0006 JMPF R6 #000B - 0x8C180104, // 0007 GETMET R6 R0 K4 - 0x58200005, // 0008 LDCONST R8 K5 - 0x7C180400, // 0009 CALL R6 2 - 0x80000C00, // 000A RET 0 - 0xA802000A, // 000B EXBLK 0 #0017 - 0x8C180106, // 000C GETMET R6 R0 K6 - 0x5C200600, // 000D MOVE R8 R3 - 0x7C180400, // 000E CALL R6 2 - 0x141C0D03, // 000F LT R7 R6 K3 - 0x781E0003, // 0010 JMPF R7 #0015 - 0x8C1C0107, // 0011 GETMET R7 R0 K7 - 0x7C1C0200, // 0012 CALL R7 1 - 0xA8040001, // 0013 EXBLK 1 1 - 0x80000E00, // 0014 RET 0 - 0xA8040001, // 0015 EXBLK 1 1 - 0x70020006, // 0016 JMP #001E - 0xAC180002, // 0017 CATCH R6 0 2 - 0x70020003, // 0018 JMP #001D - 0x8C200107, // 0019 GETMET R8 R0 K7 - 0x7C200200, // 001A CALL R8 1 - 0x80001000, // 001B RET 0 - 0x70020000, // 001C JMP #001E - 0xB0080000, // 001D RAISE 2 R0 R0 - 0xB81A1000, // 001E GETNGBL R6 K8 - 0x8C180D09, // 001F GETMET R6 R6 K9 - 0x7C180200, // 0020 CALL R6 1 - 0x80000000, // 0021 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: hs2rgb -********************************************************************/ -be_local_closure(Tasmota_hs2rgb, /* name */ - be_nested_proto( - 17, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str(tasmota), - /* K2 */ be_nested_str(scale_uint), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(2), - /* K5 */ be_const_int(3), - }), - &be_const_str_hs2rgb, - &be_const_str_solidified, - ( &(const binstruction[68]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0000, // 0002 JMPF R3 #0004 - 0x540A00FE, // 0003 LDINT R2 255 - 0x540E00FE, // 0004 LDINT R3 255 - 0x541200FE, // 0005 LDINT R4 255 - 0x541600FE, // 0006 LDINT R5 255 - 0x541A0167, // 0007 LDINT R6 360 - 0x10040206, // 0008 MOD R1 R1 R6 - 0x24180500, // 0009 GT R6 R2 K0 - 0x781A0031, // 000A JMPF R6 #003D - 0x541A003B, // 000B LDINT R6 60 - 0x0C180206, // 000C DIV R6 R1 R6 - 0x541E003B, // 000D LDINT R7 60 - 0x101C0207, // 000E MOD R7 R1 R7 - 0x542200FE, // 000F LDINT R8 255 - 0x04201002, // 0010 SUB R8 R8 R2 - 0xB8260200, // 0011 GETNGBL R9 K1 - 0x8C241302, // 0012 GETMET R9 R9 K2 - 0x5C2C0E00, // 0013 MOVE R11 R7 - 0x58300000, // 0014 LDCONST R12 K0 - 0x5436003B, // 0015 LDINT R13 60 - 0x543A00FE, // 0016 LDINT R14 255 - 0x5C3C1000, // 0017 MOVE R15 R8 - 0x7C240C00, // 0018 CALL R9 6 - 0xB82A0200, // 0019 GETNGBL R10 K1 - 0x8C281502, // 001A GETMET R10 R10 K2 - 0x5C300E00, // 001B MOVE R12 R7 - 0x58340000, // 001C LDCONST R13 K0 - 0x543A003B, // 001D LDINT R14 60 - 0x5C3C1000, // 001E MOVE R15 R8 - 0x544200FE, // 001F LDINT R16 255 - 0x7C280C00, // 0020 CALL R10 6 - 0x1C2C0D00, // 0021 EQ R11 R6 K0 - 0x782E0002, // 0022 JMPF R11 #0026 - 0x5C141400, // 0023 MOVE R5 R10 - 0x5C101000, // 0024 MOVE R4 R8 - 0x70020016, // 0025 JMP #003D - 0x1C2C0D03, // 0026 EQ R11 R6 K3 - 0x782E0002, // 0027 JMPF R11 #002B - 0x5C0C1200, // 0028 MOVE R3 R9 - 0x5C101000, // 0029 MOVE R4 R8 - 0x70020011, // 002A JMP #003D - 0x1C2C0D04, // 002B EQ R11 R6 K4 - 0x782E0002, // 002C JMPF R11 #0030 - 0x5C0C1000, // 002D MOVE R3 R8 - 0x5C101400, // 002E MOVE R4 R10 - 0x7002000C, // 002F JMP #003D - 0x1C2C0D05, // 0030 EQ R11 R6 K5 - 0x782E0002, // 0031 JMPF R11 #0035 - 0x5C0C1000, // 0032 MOVE R3 R8 - 0x5C141200, // 0033 MOVE R5 R9 - 0x70020007, // 0034 JMP #003D - 0x542E0003, // 0035 LDINT R11 4 - 0x1C2C0C0B, // 0036 EQ R11 R6 R11 - 0x782E0002, // 0037 JMPF R11 #003B - 0x5C0C1400, // 0038 MOVE R3 R10 - 0x5C141000, // 0039 MOVE R5 R8 - 0x70020001, // 003A JMP #003D - 0x5C141000, // 003B MOVE R5 R8 - 0x5C101200, // 003C MOVE R4 R9 - 0x541A000F, // 003D LDINT R6 16 - 0x38180606, // 003E SHL R6 R3 R6 - 0x541E0007, // 003F LDINT R7 8 - 0x381C0A07, // 0040 SHL R7 R5 R7 - 0x30180C07, // 0041 OR R6 R6 R7 - 0x30180C04, // 0042 OR R6 R6 R4 - 0x80040C00, // 0043 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: try_rule -********************************************************************/ -be_local_closure(Tasmota_try_rule, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str(match), - /* K1 */ be_nested_str(trigger), - }), - &be_const_str_try_rule, - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C100500, // 0000 GETMET R4 R2 K0 - 0x5C180200, // 0001 MOVE R6 R1 - 0x7C100400, // 0002 CALL R4 2 - 0x4C140000, // 0003 LDNIL R5 - 0x20140805, // 0004 NE R5 R4 R5 - 0x78160009, // 0005 JMPF R5 #0010 - 0x4C140000, // 0006 LDNIL R5 - 0x20140605, // 0007 NE R5 R3 R5 - 0x78160004, // 0008 JMPF R5 #000E - 0x5C140600, // 0009 MOVE R5 R3 - 0x5C180800, // 000A MOVE R6 R4 - 0x881C0501, // 000B GETMBR R7 R2 K1 - 0x5C200200, // 000C MOVE R8 R1 - 0x7C140600, // 000D CALL R5 3 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x80040A00, // 000F RET 1 R5 - 0x50140000, // 0010 LDBOOL R5 0 0 - 0x80040A00, // 0011 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: exec_cmd -********************************************************************/ -be_local_closure(Tasmota_exec_cmd, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str(_ccmd), - /* K1 */ be_nested_str(json), - /* K2 */ be_nested_str(load), - /* K3 */ be_nested_str(find_key_i), - /* K4 */ be_nested_str(resolvecmnd), - }), - &be_const_str_exec_cmd, - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x78120016, // 0001 JMPF R4 #0019 - 0xA4120200, // 0002 IMPORT R4 K1 - 0x8C140902, // 0003 GETMET R5 R4 K2 - 0x5C1C0600, // 0004 MOVE R7 R3 - 0x7C140400, // 0005 CALL R5 2 - 0x8C180103, // 0006 GETMET R6 R0 K3 - 0x88200100, // 0007 GETMBR R8 R0 K0 - 0x5C240200, // 0008 MOVE R9 R1 - 0x7C180600, // 0009 CALL R6 3 - 0x4C1C0000, // 000A LDNIL R7 - 0x201C0C07, // 000B NE R7 R6 R7 - 0x781E000B, // 000C JMPF R7 #0019 - 0x8C1C0104, // 000D GETMET R7 R0 K4 - 0x5C240C00, // 000E MOVE R9 R6 - 0x7C1C0400, // 000F CALL R7 2 - 0x881C0100, // 0010 GETMBR R7 R0 K0 - 0x941C0E06, // 0011 GETIDX R7 R7 R6 - 0x5C200C00, // 0012 MOVE R8 R6 - 0x5C240400, // 0013 MOVE R9 R2 - 0x5C280600, // 0014 MOVE R10 R3 - 0x5C2C0A00, // 0015 MOVE R11 R5 - 0x7C1C0800, // 0016 CALL R7 4 - 0x501C0200, // 0017 LDBOOL R7 1 0 - 0x80040E00, // 0018 RET 1 R7 - 0x50100000, // 0019 LDBOOL R4 0 0 - 0x80040800, // 001A RET 1 R4 + 0x585C0011, // 006A LDCONST R23 K17 + 0x5C602200, // 006B MOVE R24 R17 + 0x7C580400, // 006C CALL R22 2 + 0x7C540200, // 006D CALL R21 1 + 0x50500000, // 006E LDBOOL R20 0 0 + 0x7002000A, // 006F JMP #007B + 0x54560003, // 0070 LDINT R21 4 + 0x20542615, // 0071 NE R21 R19 R21 + 0x78560007, // 0072 JMPF R21 #007B + 0x60540001, // 0073 GETGBL R21 G1 + 0x60580018, // 0074 GETGBL R22 G24 + 0x585C0012, // 0075 LDCONST R23 K18 + 0x5C602200, // 0076 MOVE R24 R17 + 0x5C642600, // 0077 MOVE R25 R19 + 0x7C580600, // 0078 CALL R22 3 + 0x7C540200, // 0079 CALL R21 1 + 0x50500000, // 007A LDBOOL R20 0 0 + 0x78520003, // 007B JMPF R20 #0080 + 0x5C540C00, // 007C MOVE R21 R6 + 0x5C582200, // 007D MOVE R22 R17 + 0x7C540200, // 007E CALL R21 1 + 0x5C482A00, // 007F MOVE R18 R21 + 0x4C540000, // 0080 LDNIL R21 + 0x1C542415, // 0081 EQ R21 R18 R21 + 0x78560003, // 0082 JMPF R21 #0087 + 0x5C540A00, // 0083 MOVE R21 R5 + 0x5C582200, // 0084 MOVE R22 R17 + 0x7C540200, // 0085 CALL R21 1 + 0x503C0000, // 0086 LDBOOL R15 0 0 + 0x783A0006, // 0087 JMPF R14 #008F + 0x4C4C0000, // 0088 LDNIL R19 + 0x1C4C2413, // 0089 EQ R19 R18 R19 + 0x784E0003, // 008A JMPF R19 #008F + 0x5C4C0C00, // 008B MOVE R19 R6 + 0x5C500200, // 008C MOVE R20 R1 + 0x7C4C0200, // 008D CALL R19 1 + 0x5C482600, // 008E MOVE R18 R19 + 0x4C4C0000, // 008F LDNIL R19 + 0x204C2413, // 0090 NE R19 R18 R19 + 0x784E0015, // 0091 JMPF R19 #00A8 + 0x5C4C1E00, // 0092 MOVE R19 R15 + 0x744E0013, // 0093 JMPT R19 #00A8 + 0x5C4C1A00, // 0094 MOVE R19 R13 + 0x744E0011, // 0095 JMPT R19 #00A8 + 0xA8020005, // 0096 EXBLK 0 #009D + 0x8C4C0113, // 0097 GETMET R19 R0 K19 + 0x5C542200, // 0098 MOVE R21 R17 + 0x5C582400, // 0099 MOVE R22 R18 + 0x7C4C0600, // 009A CALL R19 3 + 0xA8040001, // 009B EXBLK 1 1 + 0x7002000A, // 009C JMP #00A8 + 0xAC4C0001, // 009D CATCH R19 0 1 + 0x70020007, // 009E JMP #00A7 + 0x60500001, // 009F GETGBL R20 G1 + 0x60540018, // 00A0 GETGBL R21 G24 + 0x58580014, // 00A1 LDCONST R22 K20 + 0x5C5C2200, // 00A2 MOVE R23 R17 + 0x5C602600, // 00A3 MOVE R24 R19 + 0x7C540600, // 00A4 CALL R21 3 + 0x7C500200, // 00A5 CALL R20 1 + 0x70020000, // 00A6 JMP #00A8 + 0xB0080000, // 00A7 RAISE 2 R0 R0 + 0x5C4C0E00, // 00A8 MOVE R19 R7 + 0x5C502400, // 00A9 MOVE R20 R18 + 0x7C4C0200, // 00AA CALL R19 1 + 0x78360002, // 00AB JMPF R13 #00AF + 0x5C500600, // 00AC MOVE R20 R3 + 0x00541705, // 00AD ADD R21 R11 K5 + 0x7C500200, // 00AE CALL R20 1 + 0x80042600, // 00AF RET 1 R19 }) ) ); @@ -2051,48 +2051,46 @@ be_local_closure(Tasmota_exec_cmd, /* name */ /******************************************************************** -** Solidified function: add_cmd +** Solidified function: next_cron ********************************************************************/ -be_local_closure(Tasmota_add_cmd, /* name */ +be_local_closure(Tasmota_next_cron, /* name */ be_nested_proto( 6, /* nstack */ - 3, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str(check_not_method), - /* K1 */ be_nested_str(_ccmd), - /* K2 */ be_nested_str(function), - /* K3 */ be_nested_str(value_error), - /* K4 */ be_nested_str(the_X20second_X20argument_X20is_X20not_X20a_X20function), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str(_crons), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str(size), + /* K3 */ be_nested_str(id), + /* K4 */ be_nested_str(trig), + /* K5 */ be_const_int(1), }), - &be_const_str_add_cmd, + &be_const_str_next_cron, &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x5C140400, // 0001 MOVE R5 R2 - 0x7C0C0400, // 0002 CALL R3 2 - 0x880C0101, // 0003 GETMBR R3 R0 K1 - 0x4C100000, // 0004 LDNIL R4 - 0x1C0C0604, // 0005 EQ R3 R3 R4 - 0x780E0002, // 0006 JMPF R3 #000A - 0x600C0013, // 0007 GETGBL R3 G19 - 0x7C0C0000, // 0008 CALL R3 0 - 0x90020203, // 0009 SETMBR R0 K1 R3 - 0x600C0004, // 000A GETGBL R3 G4 - 0x5C100400, // 000B MOVE R4 R2 - 0x7C0C0200, // 000C CALL R3 1 - 0x1C0C0702, // 000D EQ R3 R3 K2 - 0x780E0002, // 000E JMPF R3 #0012 - 0x880C0101, // 000F GETMBR R3 R0 K1 - 0x980C0202, // 0010 SETIDX R3 R1 R2 - 0x70020000, // 0011 JMP #0013 - 0xB0060704, // 0012 RAISE 1 K3 K4 - 0x80000000, // 0013 RET 0 + ( &(const binstruction[17]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A000D, // 0001 JMPF R2 #0010 + 0x580C0001, // 0002 LDCONST R3 K1 + 0x8C100502, // 0003 GETMET R4 R2 K2 + 0x7C100200, // 0004 CALL R4 1 + 0x14100604, // 0005 LT R4 R3 R4 + 0x78120008, // 0006 JMPF R4 #0010 + 0x94100403, // 0007 GETIDX R4 R2 R3 + 0x88100903, // 0008 GETMBR R4 R4 K3 + 0x1C100801, // 0009 EQ R4 R4 R1 + 0x78120002, // 000A JMPF R4 #000E + 0x94100403, // 000B GETIDX R4 R2 R3 + 0x88100904, // 000C GETMBR R4 R4 K4 + 0x80040800, // 000D RET 1 R4 + 0x000C0705, // 000E ADD R3 R3 K5 + 0x7001FFF2, // 000F JMP #0003 + 0x80000000, // 0010 RET 0 }) ) ); @@ -2100,11 +2098,11 @@ be_local_closure(Tasmota_add_cmd, /* name */ /******************************************************************** -** Solidified function: find_op +** Solidified function: time_str ********************************************************************/ -be_local_closure(Tasmota_find_op, /* name */ +be_local_closure(Tasmota_time_str, /* name */ be_nested_proto( - 7, /* nstack */ + 11, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2112,46 +2110,32 @@ be_local_closure(Tasmota_find_op, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str(_find_op), - /* K1 */ be_const_int(0), - /* K2 */ be_const_int(1), - /* K3 */ be_const_int(2147483647), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str(time_dump), + /* K1 */ be_nested_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d), + /* K2 */ be_nested_str(year), + /* K3 */ be_nested_str(month), + /* K4 */ be_nested_str(day), + /* K5 */ be_nested_str(hour), + /* K6 */ be_nested_str(min), + /* K7 */ be_nested_str(sec), }), - &be_const_str_find_op, + &be_const_str_time_str, &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ + ( &(const binstruction[13]) { /* code */ 0x8C080100, // 0000 GETMET R2 R0 K0 0x5C100200, // 0001 MOVE R4 R1 0x7C080400, // 0002 CALL R2 2 - 0x280C0501, // 0003 GE R3 R2 K1 - 0x780E0011, // 0004 JMPF R3 #0017 - 0x540E7FFE, // 0005 LDINT R3 32767 - 0x2C0C0403, // 0006 AND R3 R2 R3 - 0x5412000F, // 0007 LDINT R4 16 - 0x3C100404, // 0008 SHR R4 R2 R4 - 0x60140012, // 0009 GETGBL R5 G18 - 0x7C140000, // 000A CALL R5 0 - 0x04180702, // 000B SUB R6 R3 K2 - 0x401A0206, // 000C CONNECT R6 K1 R6 - 0x94180206, // 000D GETIDX R6 R1 R6 - 0x40180A06, // 000E CONNECT R6 R5 R6 - 0x04180902, // 000F SUB R6 R4 K2 - 0x40180606, // 0010 CONNECT R6 R3 R6 - 0x94180206, // 0011 GETIDX R6 R1 R6 - 0x40180A06, // 0012 CONNECT R6 R5 R6 - 0x40180903, // 0013 CONNECT R6 R4 K3 - 0x94180206, // 0014 GETIDX R6 R1 R6 - 0x40180A06, // 0015 CONNECT R6 R5 R6 - 0x80040A00, // 0016 RET 1 R5 - 0x600C0012, // 0017 GETGBL R3 G18 - 0x7C0C0000, // 0018 CALL R3 0 - 0x40100601, // 0019 CONNECT R4 R3 R1 - 0x4C100000, // 001A LDNIL R4 - 0x40100604, // 001B CONNECT R4 R3 R4 - 0x4C100000, // 001C LDNIL R4 - 0x40100604, // 001D CONNECT R4 R3 R4 - 0x80040600, // 001E RET 1 R3 + 0x600C0018, // 0003 GETGBL R3 G24 + 0x58100001, // 0004 LDCONST R4 K1 + 0x94140502, // 0005 GETIDX R5 R2 K2 + 0x94180503, // 0006 GETIDX R6 R2 K3 + 0x941C0504, // 0007 GETIDX R7 R2 K4 + 0x94200505, // 0008 GETIDX R8 R2 K5 + 0x94240506, // 0009 GETIDX R9 R2 K6 + 0x94280507, // 000A GETIDX R10 R2 K7 + 0x7C0C0E00, // 000B CALL R3 7 + 0x80040600, // 000C RET 1 R3 }) ) ); @@ -2159,55 +2143,85 @@ be_local_closure(Tasmota_find_op, /* name */ /******************************************************************** -** Solidified function: add_fast_loop +** Solidified function: exec_rules ********************************************************************/ -be_local_closure(Tasmota_add_fast_loop, /* name */ +be_local_closure(Tasmota_exec_rules, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 14, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str(check_not_method), - /* K1 */ be_nested_str(_fl), - /* K2 */ be_nested_str(function), - /* K3 */ be_nested_str(value_error), - /* K4 */ be_nested_str(argument_X20must_X20be_X20a_X20function), - /* K5 */ be_nested_str(global), - /* K6 */ be_nested_str(fast_loop_enabled), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str(push), + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str(cmd_res), + /* K1 */ be_nested_str(_rules), + /* K2 */ be_nested_str(json), + /* K3 */ be_nested_str(load), + /* K4 */ be_nested_str(log), + /* K5 */ be_nested_str(BRY_X3A_X20ERROR_X2C_X20bad_X20json_X3A_X20), + /* K6 */ be_const_int(3), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str(try_rule), + /* K9 */ be_nested_str(trig), + /* K10 */ be_nested_str(f), + /* K11 */ be_const_int(1), }), - &be_const_str_add_fast_loop, + &be_const_str_exec_rules, &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 - 0x88080101, // 0003 GETMBR R2 R0 K1 - 0x4C0C0000, // 0004 LDNIL R3 - 0x1C080403, // 0005 EQ R2 R2 R3 - 0x780A0002, // 0006 JMPF R2 #000A - 0x60080012, // 0007 GETGBL R2 G18 - 0x7C080000, // 0008 CALL R2 0 - 0x90020202, // 0009 SETMBR R0 K1 R2 - 0x60080004, // 000A GETGBL R2 G4 - 0x5C0C0200, // 000B MOVE R3 R1 - 0x7C080200, // 000C CALL R2 1 - 0x20080502, // 000D NE R2 R2 K2 - 0x780A0000, // 000E JMPF R2 #0010 - 0xB0060704, // 000F RAISE 1 K3 K4 - 0x88080105, // 0010 GETMBR R2 R0 K5 - 0x900A0D07, // 0011 SETMBR R2 K6 K7 - 0x88080101, // 0012 GETMBR R2 R0 K1 - 0x8C080508, // 0013 GETMET R2 R2 K8 - 0x5C100200, // 0014 MOVE R4 R1 - 0x7C080400, // 0015 CALL R2 2 - 0x80000000, // 0016 RET 0 + ( &(const binstruction[50]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x88100101, // 0001 GETMBR R4 R0 K1 + 0x74120002, // 0002 JMPT R4 #0006 + 0x4C100000, // 0003 LDNIL R4 + 0x20100604, // 0004 NE R4 R3 R4 + 0x78120029, // 0005 JMPF R4 #0030 + 0xA4120400, // 0006 IMPORT R4 K2 + 0x4C140000, // 0007 LDNIL R5 + 0x90020005, // 0008 SETMBR R0 K0 R5 + 0x50140000, // 0009 LDBOOL R5 0 0 + 0x8C180903, // 000A GETMET R6 R4 K3 + 0x5C200200, // 000B MOVE R8 R1 + 0x7C180400, // 000C CALL R6 2 + 0x4C1C0000, // 000D LDNIL R7 + 0x1C1C0C07, // 000E EQ R7 R6 R7 + 0x781E0004, // 000F JMPF R7 #0015 + 0x8C1C0104, // 0010 GETMET R7 R0 K4 + 0x00260A01, // 0011 ADD R9 K5 R1 + 0x58280006, // 0012 LDCONST R10 K6 + 0x7C1C0600, // 0013 CALL R7 3 + 0x5C180200, // 0014 MOVE R6 R1 + 0x780A0014, // 0015 JMPF R2 #002B + 0x881C0101, // 0016 GETMBR R7 R0 K1 + 0x781E0012, // 0017 JMPF R7 #002B + 0x581C0007, // 0018 LDCONST R7 K7 + 0x6020000C, // 0019 GETGBL R8 G12 + 0x88240101, // 001A GETMBR R9 R0 K1 + 0x7C200200, // 001B CALL R8 1 + 0x14200E08, // 001C LT R8 R7 R8 + 0x7822000C, // 001D JMPF R8 #002B + 0x88200101, // 001E GETMBR R8 R0 K1 + 0x94201007, // 001F GETIDX R8 R8 R7 + 0x8C240108, // 0020 GETMET R9 R0 K8 + 0x5C2C0C00, // 0021 MOVE R11 R6 + 0x88301109, // 0022 GETMBR R12 R8 K9 + 0x8834110A, // 0023 GETMBR R13 R8 K10 + 0x7C240800, // 0024 CALL R9 4 + 0x74260001, // 0025 JMPT R9 #0028 + 0x74160000, // 0026 JMPT R5 #0028 + 0x50140001, // 0027 LDBOOL R5 0 1 + 0x50140200, // 0028 LDBOOL R5 1 0 + 0x001C0F0B, // 0029 ADD R7 R7 K11 + 0x7001FFED, // 002A JMP #0019 + 0x4C1C0000, // 002B LDNIL R7 + 0x201C0607, // 002C NE R7 R3 R7 + 0x781E0000, // 002D JMPF R7 #002F + 0x90020006, // 002E SETMBR R0 K0 R6 + 0x80040A00, // 002F RET 1 R5 + 0x50100000, // 0030 LDBOOL R4 0 0 + 0x80040800, // 0031 RET 1 R4 }) ) ); @@ -2277,30 +2291,32 @@ be_local_closure(Tasmota_add_rule, /* name */ /******************************************************************** -** Solidified function: gen_cb +** Solidified function: gc ********************************************************************/ -be_local_closure(Tasmota_gen_cb, /* name */ +be_local_closure(Tasmota_gc, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 4, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str(cb), - /* K1 */ be_nested_str(gen_cb), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str(gc), + /* K1 */ be_nested_str(collect), + /* K2 */ be_nested_str(allocated), }), - &be_const_str_gen_cb, + &be_const_str_gc, &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0501, // 0001 GETMET R3 R2 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x80040600, // 0004 RET 1 R3 + ( &(const binstruction[ 6]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x7C080200, // 0004 CALL R2 1 + 0x80040400, // 0005 RET 1 R2 }) ) ); @@ -2308,156 +2324,67 @@ be_local_closure(Tasmota_gen_cb, /* name */ /******************************************************************** -** Solidified function: event +** Solidified function: urlfetch_cmd ********************************************************************/ -be_local_closure(Tasmota_event, /* name */ +be_local_closure(Tasmota_urlfetch_cmd, /* name */ be_nested_proto( - 19, /* nstack */ - 6, /* argc */ + 10, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[25]) { /* constants */ - /* K0 */ be_nested_str(introspect), - /* K1 */ be_nested_str(every_50ms), - /* K2 */ be_nested_str(run_deferred), - /* K3 */ be_nested_str(every_250ms), - /* K4 */ be_nested_str(run_cron), - /* K5 */ be_nested_str(mqtt_data), - /* K6 */ be_nested_str(cmd), - /* K7 */ be_nested_str(exec_cmd), - /* K8 */ be_nested_str(tele), - /* K9 */ be_nested_str(exec_tele), - /* K10 */ be_nested_str(rule), - /* K11 */ be_nested_str(exec_rules), - /* K12 */ be_nested_str(gc), - /* K13 */ be_nested_str(_drivers), - /* K14 */ be_const_int(0), - /* K15 */ be_nested_str(get), - /* K16 */ be_nested_str(function), - /* K17 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), - /* K18 */ be_nested_str(_debug_present), - /* K19 */ be_nested_str(debug), - /* K20 */ be_nested_str(traceback), - /* K21 */ be_const_int(1), - /* K22 */ be_nested_str(save_before_restart), - /* K23 */ be_nested_str(persist), - /* K24 */ be_nested_str(save), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str(string), + /* K1 */ be_nested_str(find), + /* K2 */ be_nested_str(http), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str(resp_cmnd_str), + /* K5 */ be_nested_str(URL_X20must_X20start_X20with_X20_X27http_X28s_X29_X27), + /* K6 */ be_nested_str(urlfetch), + /* K7 */ be_nested_str(resp_cmnd_failed), + /* K8 */ be_nested_str(tasmota), + /* K9 */ be_nested_str(resp_cmnd_done), }), - &be_const_str_event, + &be_const_str_urlfetch_cmd, &be_const_str_solidified, - ( &(const binstruction[108]) { /* code */ - 0xA41A0000, // 0000 IMPORT R6 K0 - 0x1C1C0301, // 0001 EQ R7 R1 K1 - 0x781E0001, // 0002 JMPF R7 #0005 - 0x8C1C0102, // 0003 GETMET R7 R0 K2 - 0x7C1C0200, // 0004 CALL R7 1 - 0x1C1C0303, // 0005 EQ R7 R1 K3 - 0x781E0001, // 0006 JMPF R7 #0009 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x501C0000, // 0009 LDBOOL R7 0 0 - 0x50200000, // 000A LDBOOL R8 0 0 - 0x1C240305, // 000B EQ R9 R1 K5 - 0x78260000, // 000C JMPF R9 #000E - 0x50200200, // 000D LDBOOL R8 1 0 - 0x1C240306, // 000E EQ R9 R1 K6 - 0x78260006, // 000F JMPF R9 #0017 - 0x8C240107, // 0010 GETMET R9 R0 K7 - 0x5C2C0400, // 0011 MOVE R11 R2 - 0x5C300600, // 0012 MOVE R12 R3 - 0x5C340800, // 0013 MOVE R13 R4 - 0x7C240800, // 0014 CALL R9 4 - 0x80041200, // 0015 RET 1 R9 - 0x7002004E, // 0016 JMP #0066 - 0x1C240308, // 0017 EQ R9 R1 K8 - 0x78260004, // 0018 JMPF R9 #001E - 0x8C240109, // 0019 GETMET R9 R0 K9 - 0x5C2C0800, // 001A MOVE R11 R4 - 0x7C240400, // 001B CALL R9 2 - 0x80041200, // 001C RET 1 R9 - 0x70020047, // 001D JMP #0066 - 0x1C24030A, // 001E EQ R9 R1 K10 - 0x78260007, // 001F JMPF R9 #0028 - 0x8C24010B, // 0020 GETMET R9 R0 K11 - 0x5C2C0800, // 0021 MOVE R11 R4 - 0x60300017, // 0022 GETGBL R12 G23 - 0x5C340600, // 0023 MOVE R13 R3 - 0x7C300200, // 0024 CALL R12 1 - 0x7C240600, // 0025 CALL R9 3 - 0x80041200, // 0026 RET 1 R9 - 0x7002003D, // 0027 JMP #0066 - 0x1C24030C, // 0028 EQ R9 R1 K12 - 0x78260003, // 0029 JMPF R9 #002E - 0x8C24010C, // 002A GETMET R9 R0 K12 - 0x7C240200, // 002B CALL R9 1 - 0x80041200, // 002C RET 1 R9 - 0x70020037, // 002D JMP #0066 - 0x8824010D, // 002E GETMBR R9 R0 K13 - 0x78260035, // 002F JMPF R9 #0066 - 0x5824000E, // 0030 LDCONST R9 K14 - 0x6028000C, // 0031 GETGBL R10 G12 - 0x882C010D, // 0032 GETMBR R11 R0 K13 - 0x7C280200, // 0033 CALL R10 1 - 0x1428120A, // 0034 LT R10 R9 R10 - 0x782A002F, // 0035 JMPF R10 #0066 - 0x8828010D, // 0036 GETMBR R10 R0 K13 - 0x94281409, // 0037 GETIDX R10 R10 R9 - 0x8C2C0D0F, // 0038 GETMET R11 R6 K15 - 0x5C341400, // 0039 MOVE R13 R10 - 0x5C380200, // 003A MOVE R14 R1 - 0x7C2C0600, // 003B CALL R11 3 - 0x60300004, // 003C GETGBL R12 G4 - 0x5C341600, // 003D MOVE R13 R11 - 0x7C300200, // 003E CALL R12 1 - 0x1C301910, // 003F EQ R12 R12 K16 - 0x78320022, // 0040 JMPF R12 #0064 - 0xA8020011, // 0041 EXBLK 0 #0054 - 0x5C301600, // 0042 MOVE R12 R11 - 0x5C341400, // 0043 MOVE R13 R10 - 0x5C380400, // 0044 MOVE R14 R2 - 0x5C3C0600, // 0045 MOVE R15 R3 - 0x5C400800, // 0046 MOVE R16 R4 - 0x5C440A00, // 0047 MOVE R17 R5 - 0x7C300A00, // 0048 CALL R12 5 - 0x74320001, // 0049 JMPT R12 #004C - 0x741E0000, // 004A JMPT R7 #004C - 0x501C0001, // 004B LDBOOL R7 0 1 - 0x501C0200, // 004C LDBOOL R7 1 0 - 0x781E0003, // 004D JMPF R7 #0052 - 0x5C301000, // 004E MOVE R12 R8 - 0x74320001, // 004F JMPT R12 #0052 - 0xA8040001, // 0050 EXBLK 1 1 - 0x70020013, // 0051 JMP #0066 - 0xA8040001, // 0052 EXBLK 1 1 - 0x7002000F, // 0053 JMP #0064 - 0xAC300002, // 0054 CATCH R12 0 2 - 0x7002000C, // 0055 JMP #0063 - 0x60380001, // 0056 GETGBL R14 G1 - 0x603C0018, // 0057 GETGBL R15 G24 - 0x58400011, // 0058 LDCONST R16 K17 - 0x5C441800, // 0059 MOVE R17 R12 - 0x5C481A00, // 005A MOVE R18 R13 - 0x7C3C0600, // 005B CALL R15 3 - 0x7C380200, // 005C CALL R14 1 - 0x88380112, // 005D GETMBR R14 R0 K18 - 0x783A0002, // 005E JMPF R14 #0062 - 0xA43A2600, // 005F IMPORT R14 K19 - 0x8C3C1D14, // 0060 GETMET R15 R14 K20 - 0x7C3C0200, // 0061 CALL R15 1 - 0x70020000, // 0062 JMP #0064 - 0xB0080000, // 0063 RAISE 2 R0 R0 - 0x00241315, // 0064 ADD R9 R9 K21 - 0x7001FFCA, // 0065 JMP #0031 - 0x1C240316, // 0066 EQ R9 R1 K22 - 0x78260002, // 0067 JMPF R9 #006B - 0xA4262E00, // 0068 IMPORT R9 K23 - 0x8C281318, // 0069 GETMET R10 R9 K24 - 0x7C280200, // 006A CALL R10 1 - 0x80040E00, // 006B RET 1 R7 + ( &(const binstruction[34]) { /* code */ + 0xA4160000, // 0000 IMPORT R5 K0 + 0x8C180B01, // 0001 GETMET R6 R5 K1 + 0x5C200600, // 0002 MOVE R8 R3 + 0x58240002, // 0003 LDCONST R9 K2 + 0x7C180600, // 0004 CALL R6 3 + 0x20180D03, // 0005 NE R6 R6 K3 + 0x781A0003, // 0006 JMPF R6 #000B + 0x8C180104, // 0007 GETMET R6 R0 K4 + 0x58200005, // 0008 LDCONST R8 K5 + 0x7C180400, // 0009 CALL R6 2 + 0x80000C00, // 000A RET 0 + 0xA802000A, // 000B EXBLK 0 #0017 + 0x8C180106, // 000C GETMET R6 R0 K6 + 0x5C200600, // 000D MOVE R8 R3 + 0x7C180400, // 000E CALL R6 2 + 0x141C0D03, // 000F LT R7 R6 K3 + 0x781E0003, // 0010 JMPF R7 #0015 + 0x8C1C0107, // 0011 GETMET R7 R0 K7 + 0x7C1C0200, // 0012 CALL R7 1 + 0xA8040001, // 0013 EXBLK 1 1 + 0x80000E00, // 0014 RET 0 + 0xA8040001, // 0015 EXBLK 1 1 + 0x70020006, // 0016 JMP #001E + 0xAC180002, // 0017 CATCH R6 0 2 + 0x70020003, // 0018 JMP #001D + 0x8C200107, // 0019 GETMET R8 R0 K7 + 0x7C200200, // 001A CALL R8 1 + 0x80001000, // 001B RET 0 + 0x70020000, // 001C JMP #001E + 0xB0080000, // 001D RAISE 2 R0 R0 + 0xB81A1000, // 001E GETNGBL R6 K8 + 0x8C180D09, // 001F GETMET R6 R6 K9 + 0x7C180200, // 0020 CALL R6 1 + 0x80000000, // 0021 RET 0 }) ) ); @@ -2465,11 +2392,67 @@ be_local_closure(Tasmota_event, /* name */ /******************************************************************** -** Solidified function: fast_loop +** Solidified function: add_fast_loop ********************************************************************/ -be_local_closure(Tasmota_fast_loop, /* name */ +be_local_closure(Tasmota_add_fast_loop, /* name */ be_nested_proto( 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str(check_not_method), + /* K1 */ be_nested_str(_fl), + /* K2 */ be_nested_str(function), + /* K3 */ be_nested_str(value_error), + /* K4 */ be_nested_str(argument_X20must_X20be_X20a_X20function), + /* K5 */ be_nested_str(global), + /* K6 */ be_nested_str(fast_loop_enabled), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str(push), + }), + &be_const_str_add_fast_loop, + &be_const_str_solidified, + ( &(const binstruction[23]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0x88080101, // 0003 GETMBR R2 R0 K1 + 0x4C0C0000, // 0004 LDNIL R3 + 0x1C080403, // 0005 EQ R2 R2 R3 + 0x780A0002, // 0006 JMPF R2 #000A + 0x60080012, // 0007 GETGBL R2 G18 + 0x7C080000, // 0008 CALL R2 0 + 0x90020202, // 0009 SETMBR R0 K1 R2 + 0x60080004, // 000A GETGBL R2 G4 + 0x5C0C0200, // 000B MOVE R3 R1 + 0x7C080200, // 000C CALL R2 1 + 0x20080502, // 000D NE R2 R2 K2 + 0x780A0000, // 000E JMPF R2 #0010 + 0xB0060704, // 000F RAISE 1 K3 K4 + 0x88080105, // 0010 GETMBR R2 R0 K5 + 0x900A0D07, // 0011 SETMBR R2 K6 K7 + 0x88080101, // 0012 GETMBR R2 R0 K1 + 0x8C080508, // 0013 GETMET R2 R2 K8 + 0x5C100200, // 0014 MOVE R4 R1 + 0x7C080400, // 0015 CALL R2 2 + 0x80000000, // 0016 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: run_deferred +********************************************************************/ +be_local_closure(Tasmota_run_deferred, /* name */ + be_nested_proto( + 7, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2477,29 +2460,44 @@ be_local_closure(Tasmota_fast_loop, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str(_fl), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str(_timers), /* K1 */ be_const_int(0), - /* K2 */ be_const_int(1), + /* K2 */ be_nested_str(size), + /* K3 */ be_nested_str(time_reached), + /* K4 */ be_nested_str(trig), + /* K5 */ be_nested_str(f), + /* K6 */ be_nested_str(remove), + /* K7 */ be_const_int(1), }), - &be_const_str_fast_loop, + &be_const_str_run_deferred, &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ + ( &(const binstruction[25]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x5C080200, // 0001 MOVE R2 R1 - 0x740A0000, // 0002 JMPT R2 #0004 - 0x80000400, // 0003 RET 0 - 0x58080001, // 0004 LDCONST R2 K1 - 0x600C000C, // 0005 GETGBL R3 G12 - 0x5C100200, // 0006 MOVE R4 R1 - 0x7C0C0200, // 0007 CALL R3 1 - 0x14100403, // 0008 LT R4 R2 R3 - 0x78120003, // 0009 JMPF R4 #000E - 0x94100202, // 000A GETIDX R4 R1 R2 - 0x7C100000, // 000B CALL R4 0 - 0x00080502, // 000C ADD R2 R2 K2 - 0x7001FFF9, // 000D JMP #0008 - 0x80000000, // 000E RET 0 + 0x78060015, // 0001 JMPF R1 #0018 + 0x58040001, // 0002 LDCONST R1 K1 + 0x88080100, // 0003 GETMBR R2 R0 K0 + 0x8C080502, // 0004 GETMET R2 R2 K2 + 0x7C080200, // 0005 CALL R2 1 + 0x14080202, // 0006 LT R2 R1 R2 + 0x780A000F, // 0007 JMPF R2 #0018 + 0x88080100, // 0008 GETMBR R2 R0 K0 + 0x94080401, // 0009 GETIDX R2 R2 R1 + 0x8C0C0103, // 000A GETMET R3 R0 K3 + 0x88140504, // 000B GETMBR R5 R2 K4 + 0x7C0C0400, // 000C CALL R3 2 + 0x780E0007, // 000D JMPF R3 #0016 + 0x880C0505, // 000E GETMBR R3 R2 K5 + 0x88100100, // 000F GETMBR R4 R0 K0 + 0x8C100906, // 0010 GETMET R4 R4 K6 + 0x5C180200, // 0011 MOVE R6 R1 + 0x7C100400, // 0012 CALL R4 2 + 0x5C100600, // 0013 MOVE R4 R3 + 0x7C100000, // 0014 CALL R4 0 + 0x70020000, // 0015 JMP #0017 + 0x00040307, // 0016 ADD R1 R1 K7 + 0x7001FFEA, // 0017 JMP #0003 + 0x80000000, // 0018 RET 0 }) ) ); @@ -2507,12 +2505,12 @@ be_local_closure(Tasmota_fast_loop, /* name */ /******************************************************************** -** Solidified function: remove_cron +** Solidified function: hs2rgb ********************************************************************/ -be_local_closure(Tasmota_remove_cron, /* name */ +be_local_closure(Tasmota_hs2rgb, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ + 17, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -2520,34 +2518,84 @@ be_local_closure(Tasmota_remove_cron, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str(_crons), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str(size), - /* K3 */ be_nested_str(id), - /* K4 */ be_nested_str(remove), - /* K5 */ be_const_int(1), + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str(tasmota), + /* K2 */ be_nested_str(scale_uint), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(2), + /* K5 */ be_const_int(3), }), - &be_const_str_remove_cron, + &be_const_str_hs2rgb, &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A000E, // 0001 JMPF R2 #0011 - 0x580C0001, // 0002 LDCONST R3 K1 - 0x8C100502, // 0003 GETMET R4 R2 K2 - 0x7C100200, // 0004 CALL R4 1 - 0x14100604, // 0005 LT R4 R3 R4 - 0x78120009, // 0006 JMPF R4 #0011 - 0x94100403, // 0007 GETIDX R4 R2 R3 - 0x88100903, // 0008 GETMBR R4 R4 K3 - 0x1C100801, // 0009 EQ R4 R4 R1 - 0x78120003, // 000A JMPF R4 #000F - 0x8C100504, // 000B GETMET R4 R2 K4 - 0x5C180600, // 000C MOVE R6 R3 - 0x7C100400, // 000D CALL R4 2 - 0x70020000, // 000E JMP #0010 - 0x000C0705, // 000F ADD R3 R3 K5 - 0x7001FFF1, // 0010 JMP #0003 - 0x80000000, // 0011 RET 0 + ( &(const binstruction[68]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0000, // 0002 JMPF R3 #0004 + 0x540A00FE, // 0003 LDINT R2 255 + 0x540E00FE, // 0004 LDINT R3 255 + 0x541200FE, // 0005 LDINT R4 255 + 0x541600FE, // 0006 LDINT R5 255 + 0x541A0167, // 0007 LDINT R6 360 + 0x10040206, // 0008 MOD R1 R1 R6 + 0x24180500, // 0009 GT R6 R2 K0 + 0x781A0031, // 000A JMPF R6 #003D + 0x541A003B, // 000B LDINT R6 60 + 0x0C180206, // 000C DIV R6 R1 R6 + 0x541E003B, // 000D LDINT R7 60 + 0x101C0207, // 000E MOD R7 R1 R7 + 0x542200FE, // 000F LDINT R8 255 + 0x04201002, // 0010 SUB R8 R8 R2 + 0xB8260200, // 0011 GETNGBL R9 K1 + 0x8C241302, // 0012 GETMET R9 R9 K2 + 0x5C2C0E00, // 0013 MOVE R11 R7 + 0x58300000, // 0014 LDCONST R12 K0 + 0x5436003B, // 0015 LDINT R13 60 + 0x543A00FE, // 0016 LDINT R14 255 + 0x5C3C1000, // 0017 MOVE R15 R8 + 0x7C240C00, // 0018 CALL R9 6 + 0xB82A0200, // 0019 GETNGBL R10 K1 + 0x8C281502, // 001A GETMET R10 R10 K2 + 0x5C300E00, // 001B MOVE R12 R7 + 0x58340000, // 001C LDCONST R13 K0 + 0x543A003B, // 001D LDINT R14 60 + 0x5C3C1000, // 001E MOVE R15 R8 + 0x544200FE, // 001F LDINT R16 255 + 0x7C280C00, // 0020 CALL R10 6 + 0x1C2C0D00, // 0021 EQ R11 R6 K0 + 0x782E0002, // 0022 JMPF R11 #0026 + 0x5C141400, // 0023 MOVE R5 R10 + 0x5C101000, // 0024 MOVE R4 R8 + 0x70020016, // 0025 JMP #003D + 0x1C2C0D03, // 0026 EQ R11 R6 K3 + 0x782E0002, // 0027 JMPF R11 #002B + 0x5C0C1200, // 0028 MOVE R3 R9 + 0x5C101000, // 0029 MOVE R4 R8 + 0x70020011, // 002A JMP #003D + 0x1C2C0D04, // 002B EQ R11 R6 K4 + 0x782E0002, // 002C JMPF R11 #0030 + 0x5C0C1000, // 002D MOVE R3 R8 + 0x5C101400, // 002E MOVE R4 R10 + 0x7002000C, // 002F JMP #003D + 0x1C2C0D05, // 0030 EQ R11 R6 K5 + 0x782E0002, // 0031 JMPF R11 #0035 + 0x5C0C1000, // 0032 MOVE R3 R8 + 0x5C141200, // 0033 MOVE R5 R9 + 0x70020007, // 0034 JMP #003D + 0x542E0003, // 0035 LDINT R11 4 + 0x1C2C0C0B, // 0036 EQ R11 R6 R11 + 0x782E0002, // 0037 JMPF R11 #003B + 0x5C0C1400, // 0038 MOVE R3 R10 + 0x5C141000, // 0039 MOVE R5 R8 + 0x70020001, // 003A JMP #003D + 0x5C141000, // 003B MOVE R5 R8 + 0x5C101200, // 003C MOVE R4 R9 + 0x541A000F, // 003D LDINT R6 16 + 0x38180606, // 003E SHL R6 R3 R6 + 0x541E0007, // 003F LDINT R7 8 + 0x381C0A07, // 0040 SHL R7 R5 R7 + 0x30180C07, // 0041 OR R6 R6 R7 + 0x30180C04, // 0042 OR R6 R6 R4 + 0x80040C00, // 0043 RET 1 R6 }) ) ); @@ -2560,57 +2608,58 @@ be_local_closure(Tasmota_remove_cron, /* name */ be_local_class(Tasmota, 13, NULL, - be_nested_map(49, + be_nested_map(50, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key(exec_rules, 45), be_const_closure(Tasmota_exec_rules_closure) }, - { be_const_key(cmd, 30), be_const_closure(Tasmota_cmd_closure) }, - { be_const_key(remove_cron, -1), be_const_closure(Tasmota_remove_cron_closure) }, - { be_const_key(remove_rule, 23), be_const_closure(Tasmota_remove_rule_closure) }, + { be_const_key(hs2rgb, 34), be_const_closure(Tasmota_hs2rgb_closure) }, + { be_const_key(gen_cb, 22), be_const_closure(Tasmota_gen_cb_closure) }, + { be_const_key(fast_loop, 44), be_const_closure(Tasmota_fast_loop_closure) }, + { be_const_key(remove_fast_loop, -1), be_const_closure(Tasmota_remove_fast_loop_closure) }, + { be_const_key(global, -1), be_const_var(9) }, + { be_const_key(try_rule, 17), be_const_closure(Tasmota_try_rule_closure) }, + { be_const_key(wd, -1), be_const_var(11) }, + { be_const_key(check_not_method, -1), be_const_closure(Tasmota_check_not_method_closure) }, { be_const_key(run_deferred, -1), be_const_closure(Tasmota_run_deferred_closure) }, - { be_const_key(find_key_i, 22), be_const_closure(Tasmota_find_key_i_closure) }, - { be_const_key(remove_timer, -1), be_const_closure(Tasmota_remove_timer_closure) }, - { be_const_key(_crons, -1), be_const_var(3) }, - { be_const_key(gen_cb, -1), be_const_closure(Tasmota_gen_cb_closure) }, - { be_const_key(add_cron, -1), be_const_closure(Tasmota_add_cron_closure) }, - { be_const_key(_rules, -1), be_const_var(1) }, - { be_const_key(_drivers, 4), be_const_var(5) }, - { be_const_key(wire1, -1), be_const_var(6) }, - { be_const_key(run_cron, 7), be_const_closure(Tasmota_run_cron_closure) }, - { be_const_key(wire_scan, 9), be_const_closure(Tasmota_wire_scan_closure) }, - { be_const_key(add_rule, -1), be_const_closure(Tasmota_add_rule_closure) }, - { be_const_key(_fl, 36), be_const_var(0) }, - { be_const_key(get_light, -1), be_const_closure(Tasmota_get_light_closure) }, - { be_const_key(find_op, -1), be_const_closure(Tasmota_find_op_closure) }, - { be_const_key(init, -1), be_const_closure(Tasmota_init_closure) }, - { be_const_key(_ccmd, -1), be_const_var(4) }, - { be_const_key(set_timer, -1), be_const_closure(Tasmota_set_timer_closure) }, - { be_const_key(urlfetch, -1), be_const_closure(Tasmota_urlfetch_closure) }, { be_const_key(exec_cmd, -1), be_const_closure(Tasmota_exec_cmd_closure) }, + { be_const_key(urlfetch, -1), be_const_closure(Tasmota_urlfetch_closure) }, + { be_const_key(urlfetch_cmd, -1), be_const_closure(Tasmota_urlfetch_cmd_closure) }, + { be_const_key(remove_cron, 24), be_const_closure(Tasmota_remove_cron_closure) }, + { be_const_key(find_list_i, 23), be_const_closure(Tasmota_find_list_i_closure) }, { be_const_key(gc, -1), be_const_closure(Tasmota_gc_closure) }, - { be_const_key(remove_fast_loop, 17), be_const_closure(Tasmota_remove_fast_loop_closure) }, - { be_const_key(remove_cmd, -1), be_const_closure(Tasmota_remove_cmd_closure) }, - { be_const_key(add_driver, 18), be_const_closure(Tasmota_add_driver_closure) }, - { be_const_key(settings, 41), be_const_var(10) }, - { be_const_key(wire2, -1), be_const_var(7) }, + { be_const_key(remove_timer, -1), be_const_closure(Tasmota_remove_timer_closure) }, + { be_const_key(_timers, -1), be_const_var(2) }, + { be_const_key(init, 48), be_const_closure(Tasmota_init_closure) }, { be_const_key(remove_driver, -1), be_const_closure(Tasmota_remove_driver_closure) }, - { be_const_key(check_not_method, 29), be_const_closure(Tasmota_check_not_method_closure) }, - { be_const_key(set_light, 37), be_const_closure(Tasmota_set_light_closure) }, - { be_const_key(cmd_res, -1), be_const_var(8) }, - { be_const_key(wd, 8), be_const_var(11) }, - { be_const_key(urlfetch_cmd, -1), be_const_closure(Tasmota_urlfetch_cmd_closure) }, - { be_const_key(global, 39), be_const_var(9) }, - { be_const_key(time_str, -1), be_const_closure(Tasmota_time_str_closure) }, - { be_const_key(try_rule, -1), be_const_closure(Tasmota_try_rule_closure) }, + { be_const_key(wire1, -1), be_const_var(6) }, + { be_const_key(_fl, -1), be_const_var(0) }, + { be_const_key(add_driver, 14), be_const_closure(Tasmota_add_driver_closure) }, { be_const_key(exec_tele, -1), be_const_closure(Tasmota_exec_tele_closure) }, - { be_const_key(add_cmd, -1), be_const_closure(Tasmota_add_cmd_closure) }, - { be_const_key(load, -1), be_const_closure(Tasmota_load_closure) }, - { be_const_key(add_fast_loop, -1), be_const_closure(Tasmota_add_fast_loop_closure) }, - { be_const_key(next_cron, 15), be_const_closure(Tasmota_next_cron_closure) }, + { be_const_key(_ccmd, -1), be_const_var(4) }, + { be_const_key(time_str, 36), be_const_closure(Tasmota_time_str_closure) }, { be_const_key(_debug_present, -1), be_const_var(12) }, - { be_const_key(_timers, -1), be_const_var(2) }, - { be_const_key(event, -1), be_const_closure(Tasmota_event_closure) }, - { be_const_key(fast_loop, -1), be_const_closure(Tasmota_fast_loop_closure) }, - { be_const_key(hs2rgb, 2), be_const_closure(Tasmota_hs2rgb_closure) }, + { be_const_key(find_key_i, 31), be_const_closure(Tasmota_find_key_i_closure) }, + { be_const_key(add_cron, -1), be_const_closure(Tasmota_add_cron_closure) }, + { be_const_key(remove_rule, 6), be_const_closure(Tasmota_remove_rule_closure) }, + { be_const_key(add_cmd, 39), be_const_closure(Tasmota_add_cmd_closure) }, + { be_const_key(wire_scan, -1), be_const_closure(Tasmota_wire_scan_closure) }, + { be_const_key(get_light, 40), be_const_closure(Tasmota_get_light_closure) }, + { be_const_key(cmd, 9), be_const_closure(Tasmota_cmd_closure) }, + { be_const_key(set_timer, 11), be_const_closure(Tasmota_set_timer_closure) }, + { be_const_key(load, 32), be_const_closure(Tasmota_load_closure) }, + { be_const_key(_drivers, -1), be_const_var(5) }, + { be_const_key(cmd_res, -1), be_const_var(8) }, + { be_const_key(next_cron, -1), be_const_closure(Tasmota_next_cron_closure) }, + { be_const_key(wire2, -1), be_const_var(7) }, + { be_const_key(_crons, -1), be_const_var(3) }, + { be_const_key(find_op, 41), be_const_closure(Tasmota_find_op_closure) }, + { be_const_key(settings, -1), be_const_var(10) }, + { be_const_key(exec_rules, 20), be_const_closure(Tasmota_exec_rules_closure) }, + { be_const_key(add_rule, -1), be_const_closure(Tasmota_add_rule_closure) }, + { be_const_key(remove_cmd, 45), be_const_closure(Tasmota_remove_cmd_closure) }, + { be_const_key(set_light, -1), be_const_closure(Tasmota_set_light_closure) }, + { be_const_key(add_fast_loop, 8), be_const_closure(Tasmota_add_fast_loop_closure) }, + { be_const_key(_rules, -1), be_const_var(1) }, + { be_const_key(run_cron, 47), be_const_closure(Tasmota_run_cron_closure) }, + { be_const_key(event, 0), be_const_closure(Tasmota_event_closure) }, })), (bstring*) &be_const_str_Tasmota ); diff --git a/tasmota/include/i18n.h b/tasmota/include/i18n.h index 25391db30b09..a8a2abb98ace 100644 --- a/tasmota/include/i18n.h +++ b/tasmota/include/i18n.h @@ -249,6 +249,7 @@ #define D_RSLT_STATE "STATE" #define D_RSLT_UPTIME "UPTIME" #define D_RSLT_WARNING "WARNING" +#define D_RSLT_COMMAND "COMMAND" #define D_LOG_SOME_SETTINGS_RESET "Some settings have been reset" diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino index 665023e4d03a..bd66d202514b 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino @@ -111,11 +111,14 @@ extern "C" int matter_publish_command(bvm *vm) { if (use_fname) { ResponseAppend_P(PSTR("{\"%s\":"), friendly_name); } else { - ResponseAppend_P(PSTR("{\"ep%i\":"), ep); + ResponseAppend_P(PSTR("{\"%i\":"), ep); } } ResponseAppend_P(PSTR("{")); + // Add "Ep": + ResponseAppend_P(PSTR("\"" "Ep" "\":%i,"), ep); + // Add "Name":"xxx" if name is present if (friendly_name && strlen(friendly_name)) { ResponseAppend_P(PSTR("\"" "Name" "\":\"%s\","), EscapeJSONString(friendly_name).c_str()); @@ -156,13 +159,13 @@ extern "C" int matter_publish_command(bvm *vm) { } char stopic[TOPSZ]; if (Settings->flag5.zb_received_as_subtopic) { - GetTopic_P(stopic, TELE, subtopic, json_prefix); + GetTopic_P(stopic, STAT, subtopic, json_prefix); } else { - GetTopic_P(stopic, TELE, subtopic, PSTR(D_RSLT_SENSOR)); + GetTopic_P(stopic, STAT, subtopic, PSTR(D_RSLT_COMMAND)); } MqttPublish(stopic, Settings->flag.mqtt_sensor_retain); } else { - MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_SENSOR), Settings->flag.mqtt_sensor_retain); + MqttPublishPrefixTopic_P(STAT, PSTR(D_RSLT_COMMAND), Settings->flag.mqtt_sensor_retain); } XdrvRulesProcess(0); // apply rules be_return_nil(vm);