From fe570a1b268f402a6f31f66b3bd21f1197cce628 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Mon, 29 May 2023 10:40:24 +0200 Subject: [PATCH] Matter Border Router for ESP8266 (experimental) (#18734) --- CHANGELOG.md | 2 + .../berry_matter/src/be_matter_module.c | 54 + .../src/embedded/Matter_Commissioning.be | 2 +- .../src/embedded/Matter_Device.be | 24 + .../src/embedded/Matter_HTTP_async.be | 3 +- .../src/embedded/Matter_HTTP_remote.be | 195 +- .../src/embedded/Matter_Plugin.be | 34 +- .../src/embedded/Matter_Plugin_Bridge_HTTP.be | 157 +- .../embedded/Matter_Plugin_Bridge_Light0.be | 155 + .../embedded/Matter_Plugin_Bridge_Light1.be | 188 + .../embedded/Matter_Plugin_Bridge_Light2.be | 190 + .../embedded/Matter_Plugin_Bridge_Light3.be | 221 + .../embedded/Matter_Plugin_Bridge_OnOff.be | 128 +- .../embedded/Matter_Plugin_Bridge_Sensor.be | 98 + .../Matter_Plugin_Bridge_Sensor_Humidity.be | 99 + ...Matter_Plugin_Bridge_Sensor_Illuminance.be | 99 + .../Matter_Plugin_Bridge_Sensor_Pressure.be | 99 + .../Matter_Plugin_Bridge_Sensor_Temp.be | 99 + .../src/embedded/Matter_Plugin_Light0.be | 6 +- .../src/embedded/Matter_Plugin_Light1.be | 14 +- .../src/embedded/Matter_Plugin_Light2.be | 10 +- .../src/embedded/Matter_Plugin_Light3.be | 14 +- .../src/embedded/Matter_Plugin_OnOff.be | 10 +- .../Matter_Plugin_Sensor_Illuminance.be | 2 +- .../embedded/Matter_Plugin_Sensor_Pressure.be | 4 +- .../src/embedded/Matter_TCP_async.be | 1 + .../berry_matter/src/embedded/Matter_UI.be | 89 +- .../src/embedded/Matter_inspect.be | 13 + .../solidified_Matter_Commissioning.h | 41 +- .../src/solidify/solidified_Matter_Device.h | 7408 +++++++++-------- .../solidify/solidified_Matter_HTTP_async.h | 2 +- .../solidify/solidified_Matter_HTTP_remote.h | 924 +- .../src/solidify/solidified_Matter_Plugin.h | 1154 ++- .../solidified_Matter_Plugin_Bridge_HTTP.h | 873 +- .../solidified_Matter_Plugin_Bridge_Light0.h | 492 ++ .../solidified_Matter_Plugin_Bridge_Light1.h | 542 ++ .../solidified_Matter_Plugin_Bridge_Light2.h | 579 ++ .../solidified_Matter_Plugin_Bridge_Light3.h | 752 ++ .../solidified_Matter_Plugin_Bridge_OnOff.h | 441 +- .../solidified_Matter_Plugin_Bridge_Sensor.h | 241 + ...ied_Matter_Plugin_Bridge_Sensor_Humidity.h | 280 + ..._Matter_Plugin_Bridge_Sensor_Illuminance.h | 271 + ...ied_Matter_Plugin_Bridge_Sensor_Pressure.h | 271 + ...idified_Matter_Plugin_Bridge_Sensor_Temp.h | 277 + .../solidified_Matter_Plugin_Light0.h | 41 +- .../solidified_Matter_Plugin_Light1.h | 65 +- .../solidified_Matter_Plugin_Light2.h | 39 +- .../solidified_Matter_Plugin_Light3.h | 111 +- .../solidify/solidified_Matter_Plugin_OnOff.h | 115 +- .../solidify/solidified_Matter_TCP_async.h | 1034 +-- .../src/solidify/solidified_Matter_UI.h | 1982 +++-- .../src/solidify/solidified_Matter_inspect.h | 45 + .../xdrv_52_3_berry_matter.ino | 79 + 53 files changed, 12730 insertions(+), 7339 deletions(-) create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Humidity.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Illuminance.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Pressure.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Temp.be create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Pressure.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h create mode 100644 tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b6890e91..b61bbf7f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,10 @@ All notable changes to this project will be documented in this file. - Command ``WifiPower 0`` to enable dynamic wifi power based on RSSI by @TD-er (#15443) - Command ``WifiPower 1`` to restore default wifi power - HASPmota `meta` attribute and improved `berry_run` +- Matter Border Router for ESP8266 (experimental) ### Breaking Changed +- Matter relay number starts at 1 instead of 0 to match Tasmota numbering ### Changed - InfluxDb resolves DNS name before request (#18015) diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index bed344cda..59f51901c 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -24,6 +24,7 @@ #include "be_constobj.h" #include "be_mapping.h" +#include // Matter logo static const uint8_t MATTER_LOGO[] = @@ -36,6 +37,38 @@ static const uint8_t MATTER_LOGO[] = "118.06a96.93,96.93,0,0,0-68.16,118.06l23.27-13.44a71.1,71.1,0,0,1,3.29-35.17L309.46,300l12.78-" "7.38V277.89l-54.39-31.4a71.13,71.13,0,0,1,28.82-20.43Z'/>"; +// Matter stylesheet +static const uint8_t MATTER_STYLESHEET[] = + ""; + +extern uint32_t matter_convert_seconds_to_dhm(uint32_t seconds, char *unit, uint32_t *color, bbool days); + +char* matter_seconds_to_dhm(int32_t seconds) { + static const char empty_resp[] = " "; + static char res[64]; // static to allow returning to Berry + char unit; + uint32_t color; // color of text + + if (seconds < 0) { return empty_resp; } // no value + + uint32_t val = matter_convert_seconds_to_dhm(seconds, &unit, &color, bfalse); + if (val < 100) { + snprintf(res, sizeof(res), "🕗%02d%c", + (color & 0xFF0000) >> 16, (color & 0x00FF00) >> 8, (color & 0x0000FF), + val, unit); + } else { + return empty_resp; + } + return res; +} +BE_FUNC_CTYPE_DECLARE(matter_seconds_to_dhm, "s", "i") + extern const bclass be_class_Matter_Counter; extern const bclass be_class_Matter_Verhoeff; extern const bclass be_class_Matter_QRCode; @@ -171,6 +204,15 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h" #include "solidify/solidified_Matter_Plugin_Bridge_HTTP.h" #include "solidify/solidified_Matter_Plugin_Bridge_OnOff.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Light0.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Light1.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Light2.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Light3.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Sensor.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Pressure.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h" +#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h" /*********************************************************************************************\ * Get a bytes() object of the certificate DAC/PAI_Cert @@ -198,7 +240,9 @@ static int matter_CD_FFF1_8000(bvm *vm) { return matter_return_static_bytes(vm, module matter (scope: global, strings: weak) { _LOGO, comptr(MATTER_LOGO) + _STYLESHEET, comptr(MATTER_STYLESHEET) MATTER_OPTION, int(151) // SetOption151 enables Matter + seconds_to_dhm, ctype_func(matter_seconds_to_dhm) Verhoeff, class(be_class_Matter_Verhoeff) Counter, class(be_class_Matter_Counter) @@ -214,6 +258,7 @@ module matter (scope: global, strings: weak) { get_opcode_name, ctype_func(matter_get_opcode_name) TLV, class(be_class_Matter_TLV) sort, closure(matter_sort_closure) + jitter, closure(matter_jitter_closure) inspect, closure(matter_inspect_closure) // Status codes @@ -356,6 +401,15 @@ module matter (scope: global, strings: weak) { Plugin_Sensor_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor Plugin_Bridge_HTTP, class(be_class_Matter_Plugin_Bridge_HTTP) // HTTP bridge superclass Plugin_Bridge_OnOff, class(be_class_Matter_Plugin_Bridge_OnOff) // HTTP Relay/Light behavior (OnOff) + Plugin_Bridge_Light0, class(be_class_Matter_Plugin_Bridge_Light0) // HTTP OnOff Light + Plugin_Bridge_Light1, class(be_class_Matter_Plugin_Bridge_Light1) // HTTP Dimmer Light + Plugin_Bridge_Light2, class(be_class_Matter_Plugin_Bridge_Light2) // HTTP CT Light + Plugin_Bridge_Light3, class(be_class_Matter_Plugin_Bridge_Light3) // HTTP RGB Light + Plugin_Bridge_Sensor, class(be_class_Matter_Plugin_Bridge_Sensor) // HTTP generic sensor + Plugin_Bridge_Sensor_Pressure, class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) // HTTP Pressure sensor + Plugin_Bridge_Sensor_Temp, class(be_class_Matter_Plugin_Bridge_Sensor_Temp) // HTTP Temperature sensor + Plugin_Bridge_Sensor_Illuminance, class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) // HTTP Illuminance sensor + Plugin_Bridge_Sensor_Humidity, class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) // HTTP Humidity sensor } @const_object_info_end */ diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be index 82dbfbc06..2231d7960 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be @@ -59,7 +59,7 @@ class Matter_Commisioning_Context return false end - tasmota.log("MTR: received message " + matter.inspect(msg), 3) + tasmota.log("MTR: received message " + matter.inspect(msg), 4) if msg.opcode == 0x10 # don't need to do anything, the message is acked already before this call elif msg.opcode == 0x20 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be index a9b9aaf12..489dd33b2 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be @@ -54,6 +54,8 @@ class Matter_Device # mDNS active announces var mdns_pase_eth # do we have an active PASE mDNS announce for eth var mdns_pase_wifi # do we have an active PASE mDNS announce for wifi + # for brige mode, list of HTTP_remote objects (only one instance per remote object) + var http_remotes # map of 'domain:port' or `nil` if no bridge # saved in parameters var root_discriminator # as `int` var root_passcode # as `int` @@ -1212,6 +1214,28 @@ class Matter_Device end end + ##################################################################### + # Manager HTTP remotes + ##################################################################### + # register new http remote + # + # If already registered, return current instance and check timeout + def register_http_remote(addr, timeout) + if self.http_remotes == nil self.http_remotes = {} end # lazy initialization + var http_remote + + if self.http_remotes.contains(addr) + http_remote = self.http_remotes[addr] + if timeout < http_remote.get_timeout() + http_remote.set_timeout(timeout) # reduce timeout if new value is shorter + end + else + http_remote = matter.HTTP_remote(addr, timeout) + self.http_remotes[addr] = http_remote + end + return http_remote + end + ##################################################################### # Commands `Mtr___` ##################################################################### diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_async.be b/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_async.be index acc87b348..df3989169 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_async.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_async.be @@ -42,7 +42,7 @@ class Matter_HTTP_async : Matter_TCP_async var chunk_size # nil or int, size of the current chunk static var HTTP_GET = "GET %s HTTP/1.1\r\nHost %s:%s\r\nConnection: close\r\n\r\n" # see https://stackoverflow.com/questions/6686261/what-at-the-bare-minimum-is-required-for-an-http-request - static var HTTP_STATUS_REGEX = "HTTP/1\\.[1-2] (\\d+) .*?\r\n" # extract stattus code from first line + static var HTTP_STATUS_REGEX = "HTTP/1\\.[0-1] (\\d+) .*?\r\n" # extract stattus code from first line static var HTTP_HEADER_REGEX = "([A-Za-z0-9-]+): (.*?)\r\n" # extract a header with its 2 parts static var HTTP_BODY_REGEX = "\r\n" # end of headers static var HTTP_CHUNK_REGEX = "\r\n([A-Fa-f0-9]+)[ \t]*.*?\r\n" # extract the length of a chunk @@ -250,7 +250,6 @@ class Matter_HTTP_async : Matter_TCP_async end var req = string.format(self.HTTP_GET, self.cmd, addr, self.port) - #print("sending ", req) var ret = self.write(req) if ret != size(req) # print("Could not send","size=",size(req),"ret=",ret) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be b/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be index 0106ead33..a0a86367f 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be @@ -22,29 +22,107 @@ # dummy declaration for solidification class Matter_HTTP_async end -class Matter_HTTP_remote : Matter_HTTP_async - var cb # call cb(http_status, payload) +############################################################# +# This class has the following purposes: +# +# 1. Have multiple classes registered for async requests +# and dispatch to all instances results calling `cb(status, payload, index)` +# Async requests are currently only `Status ` requests +# and are dispatched with the `` index +# +# 2. Implement rate limiting when sending async `Status ` +# requests to align with the lowest cycle time. +# I.e. if plugin sends every 2 seconds and another every 3 seconds +# we only send every 2 seconds and dispatch results to all plugins. +class Matter_HTTP_remote : Matter_HTTP_async + var probe_update_time_map # number of milliseconds to wait for each async command (map) + var probe_next_timestamp_map # timestamp for last probe (in millis()) for each `Status ` + # if timestamp is `0`, this should be scheduled in priority + var async_cb_map # list of callbacks to call with `cb(http_status, payload)` + + # information about current async command in-flight + var current_cmd # current async command + # `nil` if current request is synchronous + var reachable # is the device reachable + var reachable_utc # last tick when the reachability was seen (avoids sending superfluous ping commands) + + ############################################################# # init - def init(addr, port, timeout, fastloop) - super(self).init(addr, port, timeout, fastloop) - end - - def set_cb(cb) - self.cb = cb + def init(addr, timeout, fastloop) + self.probe_update_time_map = {} + self.probe_next_timestamp_map = {} + self.async_cb_map = {} + self.current_cmd = nil + self.reachable = false # force a valid bool value + super(self).init(addr, 80, timeout, fastloop) end ############################################################# - # begin + # device is alive, update reachable_utc + def device_is_alive(alive) + if alive + # device is known to be reachable + self.reachable = true + self.reachable_utc = tasmota.rtc()['utc'] + else + self.reachable = false + end + end + + ############################################################# + # Add an async command to scheduler # - # returns true if everything is ok, and connection started - # returns false if DNS failed - # returns nil if no network - def begin(cmd) + # cmd: the Tasmota command as string + # update_time: recurrence in ms (min time of all updates) + # cb: callback to this command (optional) + def add_schedule(cmd, update_time, cb) + if !self.probe_update_time_map.contains(cmd) || update_time < self.probe_update_time_map[cmd] + # if cmd is not already registered, or if the update_time needs to be reduced + self.probe_update_time_map[cmd] = update_time + self.probe_next_timestamp_map[cmd] = matter.jitter(update_time) + end + + # do we add a cb? + if cb != nil + self.add_async_cb(cb, cmd) + end + end + + ############################################################# + # Add a callback to be called for a specific `cmd` or `nil` for all commands + def add_async_cb(cb, cmd) + self.async_cb_map[cb] = cmd + end + + ############################################################# + # Send event to all registered cb + # + def dispatch_cb(status, payload) + var idx = 0 + for cb: self.async_cb_map.keys() + var cmd_filter = self.async_cb_map[cb] + if cmd_filter == self.current_cmd || cmd_filter == nil # match command or match any + cb(status, payload, self.current_cmd) # call cb + end + end + end + + ############################################################# + # probe_async + # + # Sends a command like `Status ` asynchronously to get device status. + # Implement rate limiting for devices with multiple sub-devices + def probe_async(cmd) import string - tasmota.log(string.format("MTR: HTTP async request 'http://%s:%i%s'", self.addr, self.port, cmd), 3) - return super(self).begin(cmd) + import webserver + if !tasmota.wifi()['up'] && !tasmota.eth()['up'] return nil end # no network + + self.current_cmd = cmd + var cmd_url = "/cm?cmnd=" + string.tr(cmd, ' ', '+') + tasmota.log(string.format("MTR: HTTP async request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 3) + var ret = self.begin(cmd_url) end ############################################################# @@ -54,34 +132,91 @@ class Matter_HTTP_remote : Matter_HTTP_async # # returns nil if something went wrong # returns the payload as string - def begin_sync(cmd, timeout) + # Note: sync request aborts any ongoing async request + def call_sync(cmd, timeout) import string - tasmota.log(string.format("MTR: HTTP sync request 'http://%s:%i%s'", self.addr, self.port, cmd), 3) - return super(self).begin_sync(cmd, timeout) + import webserver + if !tasmota.wifi()['up'] && !tasmota.eth()['up'] return nil end # no network + + self.current_cmd = nil + var cmd_url = "/cm?cmnd=" + string.tr(cmd, ' ', '+') + tasmota.log(string.format("MTR: HTTP sync request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 2) + var ret = super(self).begin_sync(cmd_url, timeout) + var payload_short = (ret) ? ret : 'nil' + if size(payload_short) > 30 payload_short = payload_short[0..29] + '...' end + tasmota.log(string.format("MTR: HTTP sync-resp in %i ms from %s: [%i] '%s'", tasmota.millis() - self.time_start, self.addr, size(self.payload), payload_short), 2) + return ret end def event_http_finished() + if self.current_cmd == nil return end # do nothing if sync request import string var payload_short = (self.payload != nil) ? self.payload : 'nil' if size(payload_short) > 30 payload_short = payload_short[0..29] + '...' end - tasmota.log(string.format("MTR: HTTP response in %i ms: '%s'", tasmota.millis() - self.time_start, payload_short), 3) - - if self.cb - self.cb(self.http_status, self.payload) - end + tasmota.log(string.format("MTR: HTTP async-resp in %i ms from %s: [%i] '%s'", tasmota.millis() - self.time_start, self.addr, size(self.payload), payload_short), 2) + self.dispatch_cb(self.http_status, self.payload) end def event_http_failed() + if self.current_cmd == nil return end # do nothing if sync request tasmota.log("MTR: HTTP failed", 3) - if self.cb - self.cb(self.http_status, nil) - end + self.dispatch_cb(self.http_status, nil) end def event_http_timeout() - tasmota.log("MTR: HTTP timeout", 3) - if self.cb - self.cb(self.http_status, nil) - end + import string + if self.current_cmd == nil return end # do nothing if sync request + tasmota.log(string.format("MTR: HTTP timeout http_status=%i phase=%i tcp_status=%i size_payload=%i", self.http_status, self.phase, self.status, size(self.payload)), 2) + self.dispatch_cb(self.http_status, nil) end + ############################################################# + # scheduler + # + # check if the timer expired and update_shadow() needs to be called + def scheduler() + var cmd = nil # keep trakck of command + for k: self.probe_next_timestamp_map.keys() + if self.probe_next_timestamp_map[k] == 0 + cmd = k # schedule in priority + break + end + end + + if cmd == nil # if no priotity, find first eligible + for k: self.probe_next_timestamp_map.keys() + if tasmota.time_reached(self.probe_next_timestamp_map[k]) + cmd = k + break + end + end + end + + if cmd == nil return end # nothing to do + + if self.tcp_connected # we have already an async request in-flight + self.probe_next_timestamp_map[cmd] = 0 # mark as priority scheduling for near future + return + end + + # set new next timestamp + self.probe_next_timestamp_map[cmd] = tasmota.millis(self.probe_update_time_map[cmd]) # add update_time for command + + # trigger the command + self.probe_async(cmd) + end + + ############################################################# + # web_last_seen + # + # Show when the device was last seen + def web_last_seen() + import webserver + import string + + var seconds = -1 # default if no known value + if self.reachable_utc != nil + seconds = tasmota.rtc()['utc'] - self.reachable_utc + end + return matter.seconds_to_dhm(seconds) + end end matter.HTTP_remote = Matter_HTTP_remote diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be index 58fc1397a..6d4cd1041 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be @@ -58,20 +58,6 @@ class Matter_Plugin self.clusters = self.consolidate_clusters() end - ############################################################# - # return the map of all types - def get_types() - return self.TYPES - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # TO BE OVERRIDDEN - # This call is synnchronous and blocking. - def parse_update(data) - end - ############################################################# # Stub for updating shadow values (local copies of what we published to the Matter gateway) # @@ -82,7 +68,6 @@ class Matter_Plugin # This call is synnchronous and blocking. def update_shadow() self.tick = self.device.tick - self.parse_update(nil) end ############################################################# @@ -96,16 +81,6 @@ class Matter_Plugin end end - ############################################################# - # probe_shadow_async - # - # TO BE OVERRIDDEN - DON'T CALL SUPER - default is just calling `update_shadow()` - # This is called on a regular basis, depending on the type of plugin. - # Whenever the data is returned, call `parse_update()` to update values - def probe_shadow_async() - self.update_shadow() - end - ############################################################# # signal that an attribute has been changed # @@ -178,7 +153,7 @@ class Matter_Plugin if attribute == 0x0000 # ---------- DeviceTypeList / list[DeviceTypeStruct] ---------- var dtl = TLV.Matter_TLV_array() - var types = self.get_types() + var types = self.TYPES for dt: types.keys() var d1 = dtl.add_struct() d1.add_TLV(0, TLV.U2, dt) # DeviceType @@ -272,14 +247,11 @@ class Matter_Plugin # check if the timer expired and update_shadow() needs to be called def every_250ms() if self.update_next == nil - # initialization to a random value within range - import crypto - var rand31 = crypto.random(4).get(0,4) & 0x7FFFFFFF # random int over 31 bits - self.update_next = tasmota.millis(rand31 % self.UPDATE_TIME) + self.update_next = matter.jitter(self.UPDATE_TIME) else if tasmota.time_reached(self.update_next) if self.tick != self.device.tick - self.probe_shadow_async() # call update_shadow if not already called + self.update_shadow() # call update_shadow if not already called end self.update_next = tasmota.millis(self.UPDATE_TIME) # rearm timer end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be index d03ebe5d5..ca96619f5 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be @@ -30,7 +30,8 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device static var ARG = "" # additional argument name (or empty if none) static var ARG_HTTP = "url" # domain name static var UPDATE_TIME = 3000 # update every 3s - static var PROBE_TIMEOUT = 700 # timeout of 700 ms for probing + static var UPDATE_CMD = "Status 11" # command to send for updates + static var PROBE_TIMEOUT = 1700 # timeout of 1800 ms for probing, which gives at least 1s for TCP recovery static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing static var CLUSTERS = { # 0x001D: inherited # Descriptor Cluster 9.5 p.453 @@ -45,14 +46,7 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device } # static var TYPES = { 0x010A: 2 } # On/Off Light - var reachable # is the device reachable - var reachable_tick # last tick when the reachability was seen (avoids sending superfluous ping commands) - - var http_shadow_map # map of shadows - # : map from json - memorize the result from `Status `` - # each contain a `_tick` attribute to known when they were last loaded var http_remote # instance of Matter_HTTP_remote - var next_probe_timestamp # timestamp for next probe (in millis()) ############################################################# # Constructor @@ -61,60 +55,63 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device super(self).init(device, endpoint, arguments) var addr = arguments.find(self.ARG_HTTP) - self.http_shadow_map = {} - self.reachable = false # force a valid bool value - self.next_probe_timestamp = nil - self.http_remote = matter.HTTP_remote(addr, 80, self.PROBE_TIMEOUT) - self.http_remote.set_cb(/s,p-> self.parse_http_response(s, p)) + self.http_remote = self.device.register_http_remote(addr, self.PROBE_TIMEOUT) + self.register_cmd_cb() end ############################################################# - # return the map of all types, add the bridged type - def get_types() - var types = {} - for k: self.TYPES.keys() - types[k] = self.TYPES[k] - end - # Add Bridged Node - types[0x0013] = 1 # Bridged Node, v1 - return types - end - - ############################################################# - # call_remote_async + # register_cmd_cb # - # Call a remote Tasmota device, returns nothing, callback is called when data arrives - def call_remote_async(cmd, arg) - import string - if !tasmota.wifi()['up'] && !tasmota.eth()['up'] return nil end # no network + # Register recurrent command and callback + # Defined as a separate method to allow override + def register_cmd_cb() + self.http_remote.add_schedule(self.UPDATE_CMD, self.UPDATE_TIME, + / status,payload,cmd -> self.parse_http_response(status,payload,cmd)) + end - var url = string.format("/cm?cmnd=%s%%20%s", cmd, arg ? arg : '') - var ret = self.http_remote.begin(url, self.PROBE_TIMEOUT) + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This method should collect the data from the local or remote device + # and call `parse_update()` when data is available. + def update_shadow() + self.tick = self.device.tick + var ret = self.call_remote_sync(self.UPDATE_CMD) + if ret + self.parse_http_response(1, ret, self.UPDATE_CMD) end + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # TO BE OVERRIDDEN + def parse_update(data, index) + end ############################################################# # call_remote_sync # # Call a remote Tasmota device, returns Berry native map or nil + # arg can be nil, in this case `cmd` has it all def call_remote_sync(cmd, arg) # if !self.http_remote return nil end import string - if !tasmota.wifi()['up'] && !tasmota.eth()['up'] return nil end # no network + import json var retry = 2 # try 2 times if first failed - var url = string.format("/cm?cmnd=%s%%20%s", cmd, arg ? arg : '') + if arg != nil cmd = cmd + ' ' + str(arg) end while retry > 0 - var ret = self.http_remote.begin_sync(url, self.SYNC_TIMEOUT) + var ret = self.http_remote.call_sync(cmd, self.SYNC_TIMEOUT) if ret != nil - # device is known to be reachable - self.reachable = true - self.reachable_tick = self.device.tick - return ret + self.http_remote.device_is_alive(true) + var j = json.load(ret) + return j end retry -= 1 tasmota.log("MTR: HTTP GET retrying", 3) end - self.reachable = false + self.http_remote.device_is_alive(false) return nil end @@ -126,12 +123,11 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device # `Status 8`: {"StatusSNS":{ [...] }} # `Status 11`: {"StatusSTS":{ [...] }} # `Status 13`: {"StatusSHT":{ [...] }} - def parse_http_response(status, payload) + def parse_http_response(status, payload, cmd) if status > 0 # device is known to be reachable - self.reachable = true + self.http_remote.device_is_alive(true) var tick = self.device.tick - self.reachable_tick = tick import json var j = json.load(payload) @@ -148,54 +144,24 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device j = j["StatusSTS"] code = 13 end - - if code != nil - j['_tick'] = tick - self.http_shadow_map[code] = j - end # convert to shadow values self.parse_update(j, code) # call parser end end end - ############################################################# - # is_reachable() - # - # Pings the device and checks if it's reachable - def is_reachable_sync() - if self.device.tick != self.reachable_tick - var ret = self.call_remote_sync("", "") # empty command works as a ping - self.reachable = (ret != nil) - # self.reachable_tick = cur_tick # done by caller - end - return self.reachable - end - - ############################################################# - # get_remote_status_sync() - # - # Get remote `Status ` values of sensors, sync and blocking - def get_remote_status_lazy(x, sync) - var cur_tick = self.device.tick - var shadow_x = self.http_shadow_map.find(x) - if shadow_x - if shadow_x.find('_tick') == cur_tick - return shadow_x # we have already updated in this tick - end - end - return self.call_remote_sync("Status", str(x)) - end - - ############################################################# - # probe_shadow_async - # - # ### TO BE OVERRIDDEN - DON'T CALL SUPER - default is just calling `update_shadow()` - # This is called on a regular basis, depending on the type of plugin. - # Whenever the data is returned, call `update_shadow()` to update values - def probe_shadow_async() - # self.call_remote_async(, ) - end + # ############################################################# + # # is_reachable() + # # + # # Pings the device and checks if it's reachable + # def is_reachable_lazy_sync() + # var cur_tick = self.device.tick + # if cur_tick != self.tick + # var ret = self.call_remote_sync("", "") # empty command works as a ping + # self.http_remote.device_is_alive(ret != nil) + # end + # return self.http_remote.reachable + # end ############################################################# # read attribute @@ -211,7 +177,8 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device if attribute == 0x0000 # ---------- DataModelRevision / CommissioningWindowStatus ---------- # return TLV.create_TLV(TLV.U2, 1) elif attribute == 0x0011 # ---------- Reachable / bool ---------- - return TLV.create_TLV(TLV.BOOL, self.reachable) # TODO find a way to do a ping + # self.is_reachable_lazy_sync() # Not needed anymore + return TLV.create_TLV(TLV.BOOL, self.http_remote.reachable) # TODO find a way to do a ping end else @@ -219,6 +186,15 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device end end + ############################################################# + # every_250ms + # + # check if the timer expired and update_shadow() needs to be called + def every_250ms() + self.http_remote.scheduler() # defer to HTTP scheduler + # avoid calling update_shadow() since it's not applicable for HTTP remote + end + ############################################################# # UI Methods ############################################################# @@ -247,5 +223,14 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device return conf end + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + webserver.content_send("| <-- (" + self.NAME + ") -->") + end + end matter.Plugin_Bridge_HTTP = Matter_Plugin_Bridge_HTTP diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be new file mode 100644 index 000000000..c601a17df --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be @@ -0,0 +1,155 @@ +# +# Matter_Plugin_Bridge_Light0.be - implements the behavior for a remote generic Lighting (OnOff only) via HTTP +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_HTTP end + +#@ solidify:Matter_Plugin_Bridge_Light0,weak + +class Matter_Plugin_Bridge_Light0 : Matter_Plugin_Bridge_HTTP + static var TYPE = "http_light0" # name of the plug-in in json + static var NAME = "🔗 Light 0 On" # display name of the plug-in + static var ARG = "relay" # additional argument name (or empty if none) + static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + # static var UPDATE_TIME = 3000 # update every 3s + # static var UPDATE_CMD = "Status 11" # command to send for updates + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + # 0x0003: inherited # Identify 1.2 p.16 + # 0x0004: inherited # Groups 1.3 p.21 + # 0x0005: inherited # Scenes 1.4 p.30 - no writable + 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 + } + static var TYPES = { 0x0100: 2, 0x0013: 1 } # OnOff Light, but not actually used because Relay is managed by OnOff + + var tasmota_relay_index # Relay number in Tasmota (one based) + var shadow_onoff # fake status for now # TODO + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + super(self).init(device, endpoint, arguments) + self.shadow_onoff = false + self.tasmota_relay_index = int(arguments.find(self.ARG #-'relay'-#, 1)) + if self.tasmota_relay_index <= 0 self.tasmota_relay_index = 1 end + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_update(data, index) + if index == 11 # Status 11 + var state = false + + if self.tasmota_relay_index == 1 && data.contains("POWER") # special case, can be `POWER` or `POWER1` + state = (data.find("POWER") == "ON") + else + state = (data.find("POWER" + str(self.tasmota_relay_index)) == "ON") + end + + if self.shadow_onoff != nil && self.shadow_onoff != bool(state) + self.attribute_updated(0x0006, 0x0000) + end + self.shadow_onoff = state + end + end + + ############################################################# + # Model + # + def set_onoff(v) + var ret = self.call_remote_sync("Power" + str(self.tasmota_relay_index), v ? "1" : "0") + if ret != nil + self.parse_update(ret, 11) # update shadow from return value + end + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== + self.update_shadow_lazy() + if attribute == 0x0000 # ---------- OnOff / bool ---------- + return TLV.create_TLV(TLV.BOOL, self.shadow_onoff) + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # Invoke a command + # + # returns a TLV object if successful, contains the response + # or an `int` to indicate a status + def invoke_request(session, val, ctx) + var TLV = matter.TLV + var cluster = ctx.cluster + var command = ctx.command + + # ==================================================================================================== + if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== + self.update_shadow_lazy() + if command == 0x0000 # ---------- Off ---------- + self.set_onoff(false) + return true + elif command == 0x0001 # ---------- On ---------- + self.set_onoff(true) + return true + elif command == 0x0002 # ---------- Toggle ---------- + self.set_onoff(!self.shadow_onoff) + return true + end + end + + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| Light %s", self.web_value_onoff())) + end + + # Show on/off value as html + def web_value_onoff() + var onoff_html = (self.shadow_onoff != nil ? (self.shadow_onoff ? "On" : "Off") : "") + return onoff_html + end + +end +matter.Plugin_Bridge_Light0 = Matter_Plugin_Bridge_Light0 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be new file mode 100644 index 000000000..d6b4ef551 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be @@ -0,0 +1,188 @@ +# +# Matter_Plugin_Bridge_Light1.be - implements the behavior for a remote generic Lighting (Dimmer) via HTTP +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Light0 end + +#@ solidify:Matter_Plugin_Bridge_Light1,weak + +class Matter_Plugin_Bridge_Light1 : Matter_Plugin_Bridge_Light0 + static var TYPE = "http_light1" # name of the plug-in in json + static var NAME = "🔗 Light 1 Dimmer" # display name of the plug-in + # static var ARG = "relay" # additional argument name (or empty if none) + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + # 0x0003: inherited # Identify 1.2 p.16 + # 0x0004: inherited # Groups 1.3 p.21 + # 0x0005: inherited # Scenes 1.4 p.30 - no writable + # 0x0006: inherited # On/Off 1.5 p.48 + 0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57 + } + static var TYPES = { 0x0101: 2, 0x0013: 1 } # Dimmable Light + + var shadow_bri + # var tasmota_relay_index # ingerited + # var shadow_onoff # inherited + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_update(data, index) + super(self).parse_update(data, index) + + if index == 11 # Status 11 + var dimmer = int(data.find("Dimmer")) # 0..100 + if dimmer != nil + var bri = tasmota.scale_uint(dimmer, 0, 100, 0, 254) + if bri != self.shadow_bri + self.attribute_updated(0x0008, 0x0000) + self.shadow_bri = bri + end + end + end + end + + ############################################################# + # Model + # + def set_bri(v) + var dimmer = tasmota.scale_uint(v, 0, 254, 0, 100) + var ret = self.call_remote_sync("Dimmer", str(dimmer)) + if ret != nil + self.parse_update(ret, 11) # update shadow from return value + end + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== + self.update_shadow_lazy() + if attribute == 0x0000 # ---------- CurrentLevel / u1 ---------- + if self.shadow_bri != nil + return TLV.create_TLV(TLV.U1, self.shadow_bri) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0002 # ---------- MinLevel / u1 ---------- + return TLV.create_TLV(TLV.U1, 0) + elif attribute == 0x0003 # ---------- MaxLevel / u1 ---------- + return TLV.create_TLV(TLV.U1, 254) + elif attribute == 0x000F # ---------- Options / map8 ---------- + return TLV.create_TLV(TLV.U1, 0) # + elif attribute == 0x0011 # ---------- OnLevel / u1 ---------- + if self.shadow_bri != nil + return TLV.create_TLV(TLV.U1, self.shadow_bri) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0X01) # OnOff + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 5) # "new data model format and notation" + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # Invoke a command + # + # returns a TLV object if successful, contains the response + # or an `int` to indicate a status + def invoke_request(session, val, ctx) + var TLV = matter.TLV + var cluster = ctx.cluster + var command = ctx.command + + # ==================================================================================================== + if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== + self.update_shadow_lazy() + if command == 0x0000 # ---------- MoveToLevel ---------- + var bri_in = val.findsubval(0) # Hue 0..254 + self.set_bri(bri_in) + ctx.log = "bri:"+str(bri_in) + return true + elif command == 0x0001 # ---------- Move ---------- + # TODO, we don't really support it + return true + elif command == 0x0002 # ---------- Step ---------- + # TODO, we don't really support it + return true + elif command == 0x0003 # ---------- Stop ---------- + # TODO, we don't really support it + return true + elif command == 0x0004 # ---------- MoveToLevelWithOnOff ---------- + var bri_in = val.findsubval(0) # Hue 0..254 + self.set_bri(bri_in) + var onoff = bri_in > 0 + self.set_onoff(onoff) + ctx.log = "bri:"+str(bri_in) + return true + elif command == 0x0005 # ---------- MoveWithOnOff ---------- + # TODO, we don't really support it + return true + elif command == 0x0006 # ---------- StepWithOnOff ---------- + # TODO, we don't really support it + return true + elif command == 0x0007 # ---------- StopWithOnOff ---------- + # TODO, we don't really support it + return true + end + + else + return super(self).invoke_request(session, val, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| Light %s %s", self.web_value_onoff(), self.web_value_dimmer())) + end + + # Show on/off value as html + def web_value_dimmer() + import string + var bri_html = "" + if self.shadow_bri != nil + var bri = tasmota.scale_uint(self.shadow_bri, 0, 254, 0, 100) + bri_html = string.format("%i%%", bri) + end + return "🔅 " + bri_html; + end +end +matter.Plugin_Bridge_Light1 = Matter_Plugin_Bridge_Light1 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be new file mode 100644 index 000000000..4d7940bbc --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be @@ -0,0 +1,190 @@ +# +# Matter_Plugin_Bridge_Light2.be - implements the behavior for a remote generic Lighting (CT) via HTTP +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Light1 end + +#@ solidify:Matter_Plugin_Bridge_Light2,weak + +class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Bridge_Light1 + static var TYPE = "http_light2" # name of the plug-in in json + static var NAME = "🔗 Light 2 CT" # display name of the plug-in + # static var ARG = "relay" # additional argument name (or empty if none) + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + # 0x0003: inherited # Identify 1.2 p.16 + # 0x0004: inherited # Groups 1.3 p.21 + # 0x0005: inherited # Scenes 1.4 p.30 - no writable + # 0x0006: inherited # On/Off 1.5 p.48 + # 0x0008: inherited # Level Control 1.6 p.57 + 0x0300: [7,8,0xF,0x400B,0x400C,0xFFFC,0xFFFD], # Color Control 3.2 p.111 + } + static var TYPES = { 0x010C: 2, 0x0013: 1 } # Dimmable Light + + var shadow_ct + var ct_min, ct_max + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + super(self).init(device, endpoint, arguments) + self.update_ct_minmax() + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # TO BE OVERRIDDEN + # This call is synnchronous and blocking. + def parse_update(data, index) + super(self).parse_update(data, index) + + if index == 11 # Status 11 + var ct = int(data.find("CT")) # 153..500 + if ct != nil + if ct != self.shadow_ct + if ct < self.ct_min ct = self.ct_min end + if ct > self.ct_max ct = self.ct_max end + self.attribute_updated(0x0300, 0x0007) + self.shadow_ct = ct + end + end + end + end + + ############################################################# + # Update ct_min/max + # + def update_ct_minmax() + var ct_alexa_mode = tasmota.get_option(82) # if set, range is 200..380 instead of 153...500 + self.ct_min = ct_alexa_mode ? 200 : 153 + self.ct_max = ct_alexa_mode ? 380 : 500 + end + + ############################################################# + # Model + # + def set_ct(v) + var ret = self.call_remote_sync("CT", str(v)) + if ret != nil + self.parse_update(ret, 11) # update shadow from return value + end + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + self.update_shadow_lazy() + if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- + if self.shadow_ct != nil + return TLV.create_TLV(TLV.U1, self.shadow_ct) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- + return TLV.create_TLV(TLV.U1, 2)# 2 = ColorTemperatureMireds + elif attribute == 0x000F # ---------- Options / u1 ---------- + return TLV.create_TLV(TLV.U1, 0) + elif attribute == 0x400B # ---------- ColorTempPhysicalMinMireds / u2 ---------- + return TLV.create_TLV(TLV.U1, self.ct_min) + elif attribute == 0x400C # ---------- ColorTempPhysicalMaxMireds / u2 ---------- + return TLV.create_TLV(TLV.U1, self.ct_max) + + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0x10) # CT + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 5) # "new data model format and notation, FeatureMap support" + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # Invoke a command + # + # returns a TLV object if successful, contains the response + # or an `int` to indicate a status + def invoke_request(session, val, ctx) + var TLV = matter.TLV + var cluster = ctx.cluster + var command = ctx.command + + # ==================================================================================================== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + self.update_shadow_lazy() + if command == 0x000A # ---------- MoveToColorTemperature ---------- + var ct_in = val.findsubval(0) # CT + if ct_in < self.ct_min ct_in = self.ct_min end + if ct_in > self.ct_max ct_in = self.ct_max end + self.set_ct(ct_in) + ctx.log = "ct:"+str(ct_in) + return true + elif command == 0x0047 # ---------- StopMoveStep ---------- + # TODO, we don't really support it + return true + elif command == 0x004B # ---------- MoveColorTemperature ---------- + # TODO, we don't really support it + return true + elif command == 0x004C # ---------- StepColorTemperature ---------- + # TODO, we don't really support it + return true + end + + else + return super(self).invoke_request(session, val, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| Light %s %s %s", + self.web_value_onoff(), self.web_value_dimmer(), + self.web_value_ct())) + end + + # Show on/off value as html + def web_value_ct() + import string + var ct_html = "" + if self.shadow_ct != nil + var ct_k = (((1000000 / self.shadow_ct) + 25) / 50) * 50 # convert in Kelvin + ct_html = string.format("%iK", ct_k) + end + return "⚪ " + ct_html; + end +end +matter.Plugin_Bridge_Light2 = Matter_Plugin_Bridge_Light2 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be new file mode 100644 index 000000000..6561ac795 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be @@ -0,0 +1,221 @@ +# +# Matter_Plugin_Bridge_Light3.be - implements the behavior for a remote generic Lighting (RGB) via HTTP +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Light1 end + +#@ solidify:Matter_Plugin_Bridge_Light3,weak + +class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Bridge_Light1 + static var TYPE = "http_light3" # name of the plug-in in json + static var NAME = "🔗 Light 3 RGB" # display name of the plug-in + # static var ARG = "relay" # additional argument name (or empty if none) + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + # 0x0003: inherited # Identify 1.2 p.16 + # 0x0004: inherited # Groups 1.3 p.21 + # 0x0005: inherited # Scenes 1.4 p.30 - no writable + # 0x0006: inherited # On/Off 1.5 p.48 + # 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 TYPES = { 0x010D: 2, 0x0013: 1 } # Extended Color Light + + var shadow_hue, shadow_sat # 0..254 + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + super(self).init(device, endpoint, arguments) + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_update(data, index) + super(self).parse_update(data, index) + + if index == 11 # Status 11 + var hsb = data.find("HSBColor") + if hsb + import string + var hsb_list = string.split(hsb, ",") + var hue = int(hsb_list[0]) + var sat = int(hsb_list[1]) + # dimmer is already available + + if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end + if sat != nil sat = tasmota.scale_uint(sat, 0, 100, 0, 254) else sat = self.shadow_sat end + if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end + if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end + end + end + end + + ############################################################# + # Model + # + def set_hue(v) + var hue_360 = tasmota.scale_uint(v, 0, 254, 0, 360) + var ret = self.call_remote_sync("HSBColor1", hue_360) + if ret != nil + self.parse_update(ret, 11) # update shadow from return value + end + end + def set_sat(v) + var sat_100 = tasmota.scale_uint(v, 0, 254, 0, 100) + var ret = self.call_remote_sync("HSBColor2", sat_100) + if ret != nil + self.parse_update(ret, 11) # update shadow from return value + end + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + self.update_shadow_lazy() + if attribute == 0x0000 # ---------- CurrentHue / u1 ---------- + if self.shadow_hue != nil + return TLV.create_TLV(TLV.U1, self.shadow_hue) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ---------- + if self.shadow_sat != nil + return TLV.create_TLV(TLV.U1, self.shadow_sat) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- + return TLV.create_TLV(TLV.U1, 0) + elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- + return TLV.create_TLV(TLV.U1, 0)# 0 = CurrentHue and CurrentSaturation + elif attribute == 0x000F # ---------- Options / u1 ---------- + return TLV.create_TLV(TLV.U1, 0) + elif attribute == 0x4001 # ---------- EnhancedColorMode / u1 ---------- + return TLV.create_TLV(TLV.U1, 0) + elif attribute == 0x400A # ---------- ColorCapabilities / map2 ---------- + return TLV.create_TLV(TLV.U1, 0) + + # Defined Primaries Information Attribute Set + elif attribute == 0x0010 # ---------- NumberOfPrimaries / u1 ---------- + return TLV.create_TLV(TLV.U1, 0) + + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0x01) # HS + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 5) # "new data model format and notation, FeatureMap support" + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # Invoke a command + # + # returns a TLV object if successful, contains the response + # or an `int` to indicate a status + def invoke_request(session, val, ctx) + var TLV = matter.TLV + var cluster = ctx.cluster + var command = ctx.command + + # ==================================================================================================== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + self.update_shadow_lazy() + if command == 0x0000 # ---------- MoveToHue ---------- + var hue_in = val.findsubval(0) # Hue 0..254 + self.set_hue(hue_in) + ctx.log = "hue:"+str(hue_in) + return true + elif command == 0x0001 # ---------- MoveHue ---------- + # TODO, we don't really support it + return true + elif command == 0x0002 # ---------- StepHue ---------- + # TODO, we don't really support it + return true + elif command == 0x0003 # ---------- MoveToSaturation ---------- + var sat_in = val.findsubval(0) # Sat 0..254 + self.set_sat(sat_in) + ctx.log = "sat:"+str(sat_in) + return true + elif command == 0x0004 # ---------- MoveSaturation ---------- + # TODO, we don't really support it + return true + elif command == 0x0005 # ---------- StepSaturation ---------- + # TODO, we don't really support it + return true + elif command == 0x0006 # ---------- MoveToHueAndSaturation ---------- + var hue_in = val.findsubval(0) # Hue 0..254 + var sat_in = val.findsubval(1) # Sat 0..254 + self.set_hue(hue_in) + self.set_sat(sat_in) + ctx.log = "hue:"+str(hue_in)+" sat:"+str(sat_in) + return true + elif command == 0x0047 # ---------- StopMoveStep ---------- + # TODO, we don't really support it + return true + end + + else + return super(self).invoke_request(session, val, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| Light %s %s %s", + self.web_value_onoff(), self.web_value_dimmer(), + self.web_value_RGB())) + end + + # Show on/off value as html + def web_value_RGB() + import string + if self.shadow_hue != nil && self.shadow_sat != nil + var l = light_state(3) # RGB virtual light state object + l.set_bri(255) # set full brightness to get full range RGB + l.set_huesat(tasmota.scale_uint(self.shadow_hue, 0, 254, 0, 360), tasmota.scale_uint(self.shadow_sat, 0, 254, 0, 255)) + var rgb_hex = string.format("#%02X%02X%02X", l.r, l.g, l.b) + var rgb_html = string.format('%s', rgb_hex, rgb_hex) + return rgb_html + end + return "" + end +end +matter.Plugin_Bridge_Light3 = Matter_Plugin_Bridge_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be index 8a04c9398..e26763aa0 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be @@ -20,131 +20,23 @@ # Matter plug-in for core behavior # dummy declaration for solidification -class Matter_Plugin_Bridge_HTTP end +class Matter_Plugin_Bridge_Light0 end #@ solidify:Matter_Plugin_Bridge_OnOff,weak -class Matter_Plugin_Bridge_OnOff : Matter_Plugin_Bridge_HTTP +class Matter_Plugin_Bridge_OnOff : Matter_Plugin_Bridge_Light0 static var TYPE = "http_relay" # name of the plug-in in json - static var NAME = "🔗 Relay" # display name of the plug-in - static var ARG = "relay" # additional argument name (or empty if none) - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var CLUSTERS = { - # 0x001D: inherited # Descriptor Cluster 9.5 p.453 - # 0x0003: inherited # Identify 1.2 p.16 - # 0x0004: inherited # Groups 1.3 p.21 - # 0x0005: inherited # Scenes 1.4 p.30 - no writable - 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 - } - static var TYPES = { 0x010A: 2 } # On/Off Light - - var tasmota_relay_index # Relay number in Tasmota (zero based) - var shadow_onoff # fake status for now # TODO + static var NAME = "🔗 Relay" # display name of the plug-in + static var TYPES = { 0x010A: 2, 0x0013: 1 } # On/Off Plug-in Unit ############################################################# - # Constructor - def init(device, endpoint, arguments) + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver import string - super(self).init(device, endpoint, arguments) - self.shadow_onoff = false - self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#) - if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end - end - - ############################################################# - # Update shadow - # - def update_shadow() - var ret = self.call_remote_sync("Status", "11") - super(self).update_shadow() - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # TO BE OVERRIDDEN - # This call is synnchronous and blocking. - def parse_update(data, index) - if index == 11 # Status 11 - var state = (data.find("POWER") == "ON") - if self.shadow_onoff != nil && self.shadow_onoff != bool(state) - self.attribute_updated(0x0006, 0x0000) - end - self.shadow_onoff = state - end - end - - ############################################################# - # probe_shadow_async - # - # ### TO BE OVERRIDDEN - DON'T CALL SUPER - default is just calling `update_shadow()` - # This is called on a regular basis, depending on the type of plugin. - # Whenever the data is returned, call `update_shadow()` to update values - def probe_shadow_async() - self.call_remote_async("Status", "11") - end - - ############################################################# - # Model - # - def set_onoff(v) - self.call_remote_sync("Power", v ? "1" : "0") - self.update_shadow() - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx) - import string - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - self.update_shadow_lazy() - if attribute == 0x0000 # ---------- OnOff / bool ---------- - return TLV.create_TLV(TLV.BOOL, self.shadow_onoff) - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting - end - - else - return super(self).read_attribute(session, ctx) - end - end - - ############################################################# - # Invoke a command - # - # returns a TLV object if successful, contains the response - # or an `int` to indicate a status - def invoke_request(session, val, ctx) - var TLV = matter.TLV - var cluster = ctx.cluster - var command = ctx.command - - # ==================================================================================================== - if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - self.update_shadow_lazy() - if command == 0x0000 # ---------- Off ---------- - self.set_onoff(false) - self.update_shadow() - return true - elif command == 0x0001 # ---------- On ---------- - self.set_onoff(true) - self.update_shadow() - return true - elif command == 0x0002 # ---------- Toggle ---------- - self.set_onoff(!self.shadow_onoff) - self.update_shadow() - return true - end - end - + webserver.content_send(string.format("| Relay %i %s", self.tasmota_relay_index, self.web_value_onoff())) end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor.be new file mode 100644 index 000000000..677f54a5a --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor.be @@ -0,0 +1,98 @@ +# +# Matter_Plugin_Bridge_Sensor.be - implements base class for a Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_HTTP end + +#@ solidify:Matter_Plugin_Bridge_Sensor,weak + +class Matter_Plugin_Bridge_Sensor : Matter_Plugin_Bridge_HTTP + # static var TYPE = "" # name of the plug-in in json + # static var NAME = "" # display name of the plug-in + static var ARG = "filter" # additional argument name (or empty if none) + static var ARG_HTTP = "url" # domain name + static var UPDATE_TIME = 5000 # update every 5s + static var UPDATE_CMD = "Status 8" # command to send for updates + static var PROBE_TIMEOUT = 1700 # timeout of 1700 ms for probing, which gives at least 1s for TCP recovery + # static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing + var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature" + var tasmota_sensor_matcher # Actual matcher object + var shadow_value # Last known value + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + super(self).init(device, endpoint, arguments) + self.tasmota_sensor_filter = arguments.find(self.ARG#-'filter'-#) + if self.tasmota_sensor_filter + self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter) + end + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # TO BE OVERRIDDEN + def parse_update(data, index) + if index == 8 # Status 8 + if self.tasmota_sensor_matcher + var val = self.pre_value(real(self.tasmota_sensor_matcher.match(data))) + if val != nil + if val != self.shadow_value + self.value_changed(val) + end + self.shadow_value = val + end + end + end + end + + ############################################################# + # Called when the value changed compared to shadow value + # + # This must be overriden. + # This is where you call `self.attribute_updated(, )` + def value_changed(val) + # self.attribute_updated(0x0402, 0x0000) + end + + ############################################################# + # Pre-process value + # + # This must be overriden. + # This allows to convert the raw sensor value to the target one, typically int + def pre_value(val) + return val + end + + ############################################################# + # Return the first item in the filter + def filter_name_html() + if self.tasmota_sensor_filter + import string + import webserver + return webserver.html_escape(string.split(self.tasmota_sensor_filter, '#')[0]) + end + return "" + end + +end +matter.Plugin_Bridge_Sensor = Matter_Plugin_Bridge_Sensor diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Humidity.be new file mode 100644 index 000000000..cabcec6ac --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Humidity.be @@ -0,0 +1,99 @@ +# +# Matter_Plugin_Bridge_Sensor_Humidity.be - implements base class for a Humidity Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Sensor end + +#@ solidify:Matter_Plugin_Bridge_Sensor_Humidity,weak + +class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Bridge_Sensor + static var TYPE = "http_humidity" # name of the plug-in in json + static var NAME = "🔗 Humidity" # display name of the plug-in + + static var CLUSTERS = { + 0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable + } + static var TYPES = { 0x0307: 2, 0x0013: 1 } # Humidity Sensor, rev 2 + + ############################################################# + # Called when the value changed compared to shadow value + # + # This must be overriden. + # This is where you call `self.attribute_updated(, )` + def value_changed(val) + self.attribute_updated(0x0405, 0x0000) + end + + ############################################################# + # Pre-process value + # + # This must be overriden. + # This allows to convert the raw sensor value to the target one, typically int + def pre_value(val) + return val != nil ? int(val * 100) : nil # 1/100th of percentage + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0405 # ========== Humidity Measurement 2.4 p.98 ========== + if attribute == 0x0000 # ---------- Humidity / u16 ---------- + if self.shadow_value != nil + return TLV.create_TLV(TLV.U2, int(self.shadow_value)) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0001 # ---------- MinMeasuredValue / u16 ---------- + return TLV.create_TLV(TLV.U2, 500) # 0% + elif attribute == 0x0002 # ---------- MaxMeasuredValue / u16 ---------- + return TLV.create_TLV(TLV.U2, 10000) # 100% + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) # 0 = no Extended Range + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| %s 💧 %2.0f%%", + self.filter_name_html(), + self.shadow_value != nil ? real(self.shadow_value) / 100 : nil)) + end + +end +matter.Plugin_Bridge_Sensor_Humidity = Matter_Plugin_Bridge_Sensor_Humidity diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Illuminance.be new file mode 100644 index 000000000..7d3851d41 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Illuminance.be @@ -0,0 +1,99 @@ +# +# Matter_Plugin_Bridge_Sensor_Illuminance.be - implements base class for a Light/Illuminance Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Sensor end + +#@ solidify:Matter_Plugin_Bridge_Sensor_Illuminance,weak + +class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Bridge_Sensor + static var TYPE = "http_illuminance" # name of the plug-in in json + static var NAME = "🔗 Illuminance" # display name of the plug-in + + static var CLUSTERS = { + 0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable + } + static var TYPES = { 0x0106: 2, 0x0013: 1 } # Illuminance Sensor, rev 2 + + ############################################################# + # Called when the value changed compared to shadow value + # + # This must be overriden. + # This is where you call `self.attribute_updated(, )` + def value_changed(val) + self.attribute_updated(0x0400, 0x0000) + end + + ############################################################# + # Pre-process value + # + # This must be overriden. + # This allows to convert the raw sensor value to the target one, typically int + def pre_value(val) + return val != nil ? int(val) : nil # value in lux + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0400 # ========== Illuminance Measurement 2.2 p.95 ========== + if attribute == 0x0000 # ---------- MeasuredValue / i16 ---------- + if self.shadow_value != nil + return TLV.create_TLV(TLV.I2, int(self.shadow_value)) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ---------- + return TLV.create_TLV(TLV.I2, 0) # 0 lux + elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ---------- + return TLV.create_TLV(TLV.I2, 10000) # 10000 lux + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| %s 🔅 %ilux", + self.filter_name_html(), + int(self.shadow_value))) + end + +end +matter.Plugin_Bridge_Sensor_Illuminance = Matter_Plugin_Bridge_Sensor_Illuminance diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Pressure.be new file mode 100644 index 000000000..795a08bcb --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Pressure.be @@ -0,0 +1,99 @@ +# +# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Pressure Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Sensor end + +#@ solidify:Matter_Plugin_Bridge_Sensor_Pressure,weak + +class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Bridge_Sensor + static var TYPE = "http_pressure" # name of the plug-in in json + static var NAME = "🔗 Pressure" # display name of the plug-in + + static var CLUSTERS = { + 0x0403: [0,1,2,0xFFFC,0xFFFD], # Pressure Measurement + } + static var TYPES = { 0x0305: 2, 0x0013: 1 } # Temperature Sensor, rev 2 + + ############################################################# + # Called when the value changed compared to shadow value + # + # This must be overriden. + # This is where you call `self.attribute_updated(, )` + def value_changed(val) + self.attribute_updated(0x0403, 0x0000) + end + + ############################################################# + # Pre-process value + # + # This must be overriden. + # This allows to convert the raw sensor value to the target one, typically int + def pre_value(val) + return val != nil ? int(val) : nil + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0403 # ========== Pressure Measurement 2.4 p.98 ========== + if attribute == 0x0000 # ---------- MeasuredValue / i16 ---------- + if self.shadow_value != nil + return TLV.create_TLV(TLV.I2, int(self.shadow_value)) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ---------- + return TLV.create_TLV(TLV.I2, 500) # 500 hPA + elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ---------- + return TLV.create_TLV(TLV.I2, 1500) # 1500 hPA + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) # 0 = no Extended Range + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| %s ⛅ %i hPa", + self.filter_name_html(), + int(self.shadow_value))) + end + +end +matter.Plugin_Bridge_Sensor_Pressure = Matter_Plugin_Bridge_Sensor_Pressure diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Temp.be new file mode 100644 index 000000000..bd1bd5e03 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Temp.be @@ -0,0 +1,99 @@ +# +# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Temperature Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_Sensor end + +#@ solidify:Matter_Plugin_Bridge_Sensor_Temp,weak + +class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Bridge_Sensor + static var TYPE = "http_temperature" # name of the plug-in in json + static var NAME = "🔗 Temperature" # display name of the plug-in + + static var CLUSTERS = { + 0x0402: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable + } + static var TYPES = { 0x0302: 2, 0x0013: 1 } # Temperature Sensor, rev 2 + + ############################################################# + # Called when the value changed compared to shadow value + # + # This must be overriden. + # This is where you call `self.attribute_updated(, )` + def value_changed(val) + self.attribute_updated(0x0402, 0x0000) + end + + ############################################################# + # Pre-process value + # + # This must be overriden. + # This allows to convert the raw sensor value to the target one, typically int + def pre_value(val) + return val != nil ? int(val * 100) : nil + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0402 # ========== Temperature Measurement 2.3 p.97 ========== + if attribute == 0x0000 # ---------- MeasuredValue / i16 (*100) ---------- + if self.shadow_value != nil + return TLV.create_TLV(TLV.I2, self.shadow_value) + else + return TLV.create_TLV(TLV.NULL, nil) + end + elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 (*100) ---------- + return TLV.create_TLV(TLV.I2, -5000) # -50 °C + elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 (*100) ---------- + return TLV.create_TLV(TLV.I2, 15000) # 150 °C + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 4) # 4 = New data model format and notation + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + import string + webserver.content_send(string.format("| %s ☀️ %.1f °C", + self.filter_name_html(), + self.shadow_value != nil ? real(self.shadow_value) / 100 : nil)) + end + +end +matter.Plugin_Bridge_Sensor_Temp = Matter_Plugin_Bridge_Sensor_Temp diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be index 9e43a8189..b8b16bc36 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be @@ -52,8 +52,10 @@ class Matter_Plugin_Light0 : Matter_Plugin_Device def update_shadow() import light var light_status = light.get() - var pow = light_status.find('power', nil) - if pow != self.shadow_onoff self.attribute_updated(0x0006, 0x0000) self.shadow_onoff = pow end + if light_status != nil + var pow = light_status.find('power', nil) + if pow != self.shadow_onoff self.attribute_updated(0x0006, 0x0000) self.shadow_onoff = pow end + end super(self).update_shadow() end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be index 531f3fd61..f5d965fba 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be @@ -53,12 +53,14 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0 def update_shadow() import light var light_status = light.get() - var bri = light_status.find('bri', nil) - if bri != nil - bri = tasmota.scale_uint(bri, 0, 255, 0, 254) - if bri != self.shadow_bri - self.attribute_updated(0x0008, 0x0000) - self.shadow_bri = bri + if light_status != nil + var bri = light_status.find('bri', nil) + if bri != nil + bri = tasmota.scale_uint(bri, 0, 255, 0, 254) + if bri != self.shadow_bri + self.attribute_updated(0x0008, 0x0000) + self.shadow_bri = bri + end end end super(self).update_shadow() # superclass manages 'power' diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be index 9eee3be00..ad321cc5d 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be @@ -57,9 +57,11 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 self.update_ct_minmax() super(self).update_shadow() var light_status = light.get() - var ct = light_status.find('ct', nil) - if ct == nil ct = self.shadow_ct end - if ct != self.shadow_ct self.attribute_updated(0x0300, 0x0007) self.shadow_ct = ct end + if light_status != nil + var ct = light_status.find('ct', nil) + if ct == nil ct = self.shadow_ct end + if ct != self.shadow_ct self.attribute_updated(0x0300, 0x0007) self.shadow_ct = ct end + end end ############################################################# @@ -79,7 +81,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 var TLV = matter.TLV var cluster = ctx.cluster var attribute = ctx.attribute - + # ==================================================================================================== if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== self.update_shadow_lazy() diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be index acdce0837..da5f107da 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be @@ -55,12 +55,14 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 import light super(self).update_shadow() var light_status = light.get() - var hue = light_status.find('hue', nil) - var sat = light_status.find('sat', nil) - if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end - if sat != nil sat = tasmota.scale_uint(sat, 0, 255, 0, 254) else sat = self.shadow_sat end - if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end - if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end + if light_status != nil + var hue = light_status.find('hue', nil) + var sat = light_status.find('sat', nil) + if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end + if sat != nil sat = tasmota.scale_uint(sat, 0, 255, 0, 254) else sat = self.shadow_sat end + if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end + if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end + end end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be index 585a5bce5..fb0b0f928 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be @@ -37,7 +37,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device # 0x0005: inherited # Scenes 1.4 p.30 - no writable 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 } - static var TYPES = { 0x010A: 2 } # On/Off Light + static var TYPES = { 0x010A: 2 } # On/Off Plug-in Unit var tasmota_relay_index # Relay number in Tasmota (zero based) var shadow_onoff # fake status for now # TODO @@ -47,15 +47,15 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device def init(device, endpoint, arguments) super(self).init(device, endpoint, arguments) self.shadow_onoff = false - self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#) - if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end + self.tasmota_relay_index = int(arguments.find(self.ARG #-'relay'-#, 1)) + if self.tasmota_relay_index <= 0 self.tasmota_relay_index = 1 end end ############################################################# # Update shadow # def update_shadow() - var state = tasmota.get_power(self.tasmota_relay_index) + var state = tasmota.get_power(self.tasmota_relay_index - 1) if state != nil if self.shadow_onoff != nil && self.shadow_onoff != bool(state) self.attribute_updated(0x0006, 0x0000) @@ -69,7 +69,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device # Model # def set_onoff(v) - tasmota.set_power(self.tasmota_relay_index, bool(v)) + tasmota.set_power(self.tasmota_relay_index - 1, bool(v)) self.update_shadow() end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be index 1ba16a5eb..e75ee9b1a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be @@ -30,7 +30,7 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor static var CLUSTERS = { 0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable } - static var TYPES = { 0x0106: 2 } # Temperature Sensor, rev 2 + static var TYPES = { 0x0106: 2 } # Illuminance Sensor, rev 2 ############################################################# # Pre-process value diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be index 0d87d296b..cf539219e 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be @@ -28,9 +28,9 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor static var TYPE = "pressure" # name of the plug-in in json static var NAME = "Pressure" # display name of the plug-in static var CLUSTERS = { - 0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable + 0x0403: [0,1,2,0xFFFC,0xFFFD], # Pressure Measurement } - static var TYPES = { 0x0305: 2 } # Temperature Sensor, rev 2 + static var TYPES = { 0x0305: 2 } # Pressure Sensor, rev 2 ############################################################# # Pre-process value diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_TCP_async.be b/lib/libesp32/berry_matter/src/embedded/Matter_TCP_async.be index 949b263a1..72cd81ceb 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_TCP_async.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_TCP_async.be @@ -95,6 +95,7 @@ class Matter_TCP_async if timeout == nil timeout = self.TIMEOUT end self.timeout = timeout end + def get_timeout() return self.timeout end ############################################################# # Reset the instance to send a open a new connection diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index 019af83d9..5e7429aeb 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -35,7 +35,8 @@ class Matter_UI static var _ROOT_TYPES = "root" static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt" "|temperature|pressure|illuminance|humidity" - "|-http|http_relay" + static var _CLASSES_TYPES2= "-http|http_relay|http_light0|http_light1|http_light2|http_light3" + "|http_temperature|http_pressure|http_illuminance|http_humidity" var device def init(device) @@ -268,7 +269,7 @@ class Matter_UI webserver.content_send(string.format("", i, ep)) webserver.content_send(string.format("")) webserver.content_send(string.format("", i, webserver.html_escape(arg))) @@ -279,7 +280,7 @@ class Matter_UI # add an empty line for adding a configuration webserver.content_send(string.format("", i)) webserver.content_send(string.format("")) webserver.content_send(string.format("", i)) @@ -293,10 +294,13 @@ class Matter_UI #- ---------------------------------------------------------------------- -# #- Show all possible classes for plugin #- ---------------------------------------------------------------------- -# - def plugin_option(cur, class_list) + def plugin_option(cur, *class_list) import webserver import string - var class_types = class_list ? string.split(class_list, '|') : [] + var class_types = [] + for cl: class_list + class_types += string.split(cl, '|') + end var i = 0 while i < size(class_types) @@ -495,6 +499,53 @@ class Matter_UI end end + ####################################################################### + # Show bridge status + ####################################################################### + def show_bridge_status() + import webserver + import string + var bridge_plugin_by_host + + var idx = 0 + while idx < size(self.device.plugins) + var plg = self.device.plugins[idx] + + if isinstance(plg, matter.Plugin_Bridge_HTTP) + if bridge_plugin_by_host == nil bridge_plugin_by_host = {} end + var host = plg.http_remote.addr + + if !bridge_plugin_by_host.contains(host) bridge_plugin_by_host[host] = [] end + bridge_plugin_by_host[host].push(plg) + + end + idx += 1 + end + + if bridge_plugin_by_host == nil return end # no remote device, abort + + # set specific styles + webserver.content_send("
") + webserver.content_send("") + webserver.content_send(matter._STYLESHEET) + + for host: bridge_plugin_by_host.keys() + webserver.content_send(string.format("", webserver.html_escape(host))) + var http_remote = bridge_plugin_by_host[host][0].http_remote # get the http_remote object from the first in list + webserver.content_send(http_remote.web_last_seen()) + + for plg: bridge_plugin_by_host[host] + webserver.content_send("") + end + end + + + webserver.content_send("
%s
") + plg.web_values() # show values + webserver.content_send("

") + + end + #- display sensor value in the web UI -# def web_sensor() import webserver @@ -503,25 +554,31 @@ class Matter_UI var matter_enabled = tasmota.get_option(matter.MATTER_OPTION) if matter_enabled - if self.device.is_root_commissioning_open() - self.show_commissioning_info() - end # mtc0 = close, mtc1 = open commissioning var fabrics_count = self.device.sessions.count_active_fabrics() if fabrics_count == 0 - webserver.content_send(string.format("
%s
", "No active association")) + webserver.content_send(string.format("
%s
", "Matter: No active association")) else var plural = fabrics_count > 1 - webserver.content_send(string.format("
%s
", str(fabrics_count) + " active association" + (plural ? "s" : ""))) + webserver.content_send(string.format("
%s
", "Matter: " + str(fabrics_count) + " active association" + (plural ? "s" : ""))) end - webserver.content_send(string.format("") - else - webserver.content_send(" Close Commissioning") + self.show_bridge_status() + + if self.device.is_root_commissioning_open() + self.show_commissioning_info() + end + + # display the open/close commissioning button only if there is no active session + if fabrics_count == 0 + webserver.content_send(string.format("") + else + webserver.content_send(" Close Commissioning") + end end end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_inspect.be b/lib/libesp32/berry_matter/src/embedded/Matter_inspect.be index c9f9a15d2..c5dfe0be4 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_inspect.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_inspect.be @@ -35,6 +35,19 @@ def sort(l) end matter.sort = sort +#@ solidify:matter.jitter,weak +############################################################# +# jitter +# +# compute a random jitter time for an update_time value +def jitter(update_time) + # initialization to a random value within range + import crypto + var rand31 = crypto.random(4).get(0,4) & 0x7FFFFFFF # random int over 31 bits + return tasmota.millis(rand31 % update_time) +end +matter.jitter = jitter + #@ solidify:matter.inspect,weak # debug function def inspect(p) diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h index dfc95aae1..1123b4a22 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h @@ -1281,7 +1281,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[20]) { /* constants */ + ( &(const bvalue[19]) { /* constants */ /* K0 */ be_nested_str_weak(device), /* K1 */ be_nested_str_weak(is_commissioning_open), /* K2 */ be_nested_str_weak(opcode), @@ -1292,16 +1292,15 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ /* K7 */ be_nested_str_weak(MTR_X3A_X20received_X20message_X20), /* K8 */ be_nested_str_weak(matter), /* K9 */ be_nested_str_weak(inspect), - /* K10 */ be_const_int(3), - /* K11 */ be_nested_str_weak(parse_PBKDFParamRequest), - /* K12 */ be_nested_str_weak(parse_Pake1), - /* K13 */ be_nested_str_weak(parse_Pake3), - /* K14 */ be_nested_str_weak(parse_Sigma1), - /* K15 */ be_nested_str_weak(parse_Sigma3), - /* K16 */ be_nested_str_weak(parse_StatusReport), - /* K17 */ be_nested_str_weak(string), - /* K18 */ be_nested_str_weak(format), - /* K19 */ be_nested_str_weak(MTR_X3A_X20_X3E_X3F_X3F_X3F_X3F_X3F_X3F_X3F_X3F_X3F_X20Unknown_X20OpCode_X20_X28secure_X20channel_X29_X20_X2502X), + /* K10 */ be_nested_str_weak(parse_PBKDFParamRequest), + /* K11 */ be_nested_str_weak(parse_Pake1), + /* K12 */ be_nested_str_weak(parse_Pake3), + /* K13 */ be_nested_str_weak(parse_Sigma1), + /* K14 */ be_nested_str_weak(parse_Sigma3), + /* K15 */ be_nested_str_weak(parse_StatusReport), + /* K16 */ be_nested_str_weak(string), + /* K17 */ be_nested_str_weak(format), + /* K18 */ be_nested_str_weak(MTR_X3A_X20_X3E_X3F_X3F_X3F_X3F_X3F_X3F_X3F_X3F_X3F_X20Unknown_X20OpCode_X20_X28secure_X20channel_X29_X20_X2502X), }), be_str_weak(process_incoming), &be_const_str_solidified, @@ -1332,7 +1331,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x5C180200, // 0017 MOVE R6 R1 0x7C100400, // 0018 CALL R4 2 0x00120E04, // 0019 ADD R4 K7 R4 - 0x5814000A, // 001A LDCONST R5 K10 + 0x54160003, // 001A LDINT R5 4 0x7C080600, // 001B CALL R2 3 0x88080302, // 001C GETMBR R2 R1 K2 0x540E000F, // 001D LDINT R3 16 @@ -1343,7 +1342,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x540E001F, // 0022 LDINT R3 32 0x1C080403, // 0023 EQ R2 R2 R3 0x780A0004, // 0024 JMPF R2 #002A - 0x8C08010B, // 0025 GETMET R2 R0 K11 + 0x8C08010A, // 0025 GETMET R2 R0 K10 0x5C100200, // 0026 MOVE R4 R1 0x7C080400, // 0027 CALL R2 2 0x80040400, // 0028 RET 1 R2 @@ -1352,7 +1351,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x540E0021, // 002B LDINT R3 34 0x1C080403, // 002C EQ R2 R2 R3 0x780A0004, // 002D JMPF R2 #0033 - 0x8C08010C, // 002E GETMET R2 R0 K12 + 0x8C08010B, // 002E GETMET R2 R0 K11 0x5C100200, // 002F MOVE R4 R1 0x7C080400, // 0030 CALL R2 2 0x80040400, // 0031 RET 1 R2 @@ -1361,7 +1360,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x540E0023, // 0034 LDINT R3 36 0x1C080403, // 0035 EQ R2 R2 R3 0x780A0004, // 0036 JMPF R2 #003C - 0x8C08010D, // 0037 GETMET R2 R0 K13 + 0x8C08010C, // 0037 GETMET R2 R0 K12 0x5C100200, // 0038 MOVE R4 R1 0x7C080400, // 0039 CALL R2 2 0x80040400, // 003A RET 1 R2 @@ -1370,7 +1369,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x540E002F, // 003D LDINT R3 48 0x1C080403, // 003E EQ R2 R2 R3 0x780A0004, // 003F JMPF R2 #0045 - 0x8C08010E, // 0040 GETMET R2 R0 K14 + 0x8C08010D, // 0040 GETMET R2 R0 K13 0x5C100200, // 0041 MOVE R4 R1 0x7C080400, // 0042 CALL R2 2 0x80040400, // 0043 RET 1 R2 @@ -1379,7 +1378,7 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x540E0031, // 0046 LDINT R3 50 0x1C080403, // 0047 EQ R2 R2 R3 0x780A0004, // 0048 JMPF R2 #004E - 0x8C08010F, // 0049 GETMET R2 R0 K15 + 0x8C08010E, // 0049 GETMET R2 R0 K14 0x5C100200, // 004A MOVE R4 R1 0x7C080400, // 004B CALL R2 2 0x80040400, // 004C RET 1 R2 @@ -1388,16 +1387,16 @@ be_local_closure(Matter_Commisioning_Context_process_incoming, /* name */ 0x540E003F, // 004F LDINT R3 64 0x1C080403, // 0050 EQ R2 R2 R3 0x780A0004, // 0051 JMPF R2 #0057 - 0x8C080110, // 0052 GETMET R2 R0 K16 + 0x8C08010F, // 0052 GETMET R2 R0 K15 0x5C100200, // 0053 MOVE R4 R1 0x7C080400, // 0054 CALL R2 2 0x80040400, // 0055 RET 1 R2 0x7002000A, // 0056 JMP #0062 - 0xA40A2200, // 0057 IMPORT R2 K17 + 0xA40A2000, // 0057 IMPORT R2 K16 0xB80E0600, // 0058 GETNGBL R3 K3 0x8C0C0704, // 0059 GETMET R3 R3 K4 - 0x8C140512, // 005A GETMET R5 R2 K18 - 0x581C0013, // 005B LDCONST R7 K19 + 0x8C140511, // 005A GETMET R5 R2 K17 + 0x581C0012, // 005B LDCONST R7 K18 0x88200302, // 005C GETMBR R8 R1 K2 0x7C140600, // 005D CALL R5 3 0x58180006, // 005E LDCONST R6 K6 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 42d886046..bf8d29a39 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h @@ -6,6 +6,1626 @@ extern const bclass be_class_Matter_Device; +/******************************************************************** +** Solidified function: k2l_num +********************************************************************/ +be_local_closure(Matter_Device_k2l_num, /* 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(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: register_native_classes +********************************************************************/ +be_local_closure(Matter_Device_register_native_classes, /* name */ + be_nested_proto( + 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[17]) { /* 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), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20), + /* K14 */ be_nested_str_weak(k2l), + /* K15 */ be_nested_str_weak(plugins_classes), + /* K16 */ be_const_int(3), + }), + be_str_weak(register_native_classes), + &be_const_str_solidified, + ( &(const binstruction[43]) { /* 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 + 0xB8161600, // 0020 GETNGBL R5 K11 + 0x8C140B0C, // 0021 GETMET R5 R5 K12 + 0x601C0008, // 0022 GETGBL R7 G8 + 0x8C20010E, // 0023 GETMET R8 R0 K14 + 0x8828010F, // 0024 GETMBR R10 R0 K15 + 0x7C200400, // 0025 CALL R8 2 + 0x7C1C0200, // 0026 CALL R7 1 + 0x001E1A07, // 0027 ADD R7 K13 R7 + 0x58200010, // 0028 LDCONST R8 K16 + 0x7C140600, // 0029 CALL R5 3 + 0x80000000, // 002A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: save_before_restart +********************************************************************/ +be_local_closure(Matter_Device_save_before_restart, /* 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(stop_basic_commissioning), + /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics), + }), + be_str_weak(save_before_restart), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: stop_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device_stop_basic_commissioning, /* 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[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: start_commissioning_complete +********************************************************************/ +be_local_closure(Matter_Device_start_commissioning_complete, /* 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[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(log), + /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A), + /* K3 */ be_const_int(2), + /* K4 */ be_nested_str_weak(stop_basic_commissioning), + }), + be_str_weak(start_commissioning_complete), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x58140003, // 0003 LDCONST R5 K3 + 0x7C080600, // 0004 CALL R2 3 + 0x8C080104, // 0005 GETMET R2 R0 K4 + 0x7C080200, // 0006 CALL R2 1 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: register_commands +********************************************************************/ +be_local_closure(Matter_Device_register_commands, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + 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 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(add_cmd), + /* K2 */ be_nested_str_weak(MtrJoin), + }), + be_str_weak(register_commands), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* 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 + 0xA0000000, // 0005 CLOSE R0 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_plugin_class_displayname +********************************************************************/ +be_local_closure(Matter_Device_get_plugin_class_displayname, /* 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(NAME), + /* K3 */ be_nested_str_weak(), + }), + be_str_weak(get_plugin_class_displayname), + &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: 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: every_50ms +********************************************************************/ +be_local_closure(Matter_Device_every_50ms, /* 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[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_const_int(1), + }), + be_str_weak(every_50ms), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: compute_qrcode_content +********************************************************************/ +be_local_closure(Matter_Device_compute_qrcode_content, /* 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[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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _start_udp +********************************************************************/ +be_local_closure(Matter_Device__start_udp, /* 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( + 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[ 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(_start_udp), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* 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 + 0x58100007, // 0011 LDCONST R4 K7 + 0x5C140200, // 0012 MOVE R5 R1 + 0x7C080600, // 0013 CALL R2 3 + 0x90020002, // 0014 SETMBR R0 K0 R2 + 0x88080100, // 0015 GETMBR R2 R0 K0 + 0x8C080508, // 0016 GETMET R2 R2 K8 + 0x84100000, // 0017 CLOSURE R4 P0 + 0x7C080400, // 0018 CALL R2 2 + 0xA0000000, // 0019 CLOSE R0 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _init_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device__init_basic_commissioning, /* 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[ 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(_init_basic_commissioning), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: compute_manual_pairing_code +********************************************************************/ +be_local_closure(Matter_Device_compute_manual_pairing_code, /* 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[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(root_discriminator), + /* K2 */ be_nested_str_weak(root_passcode), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(Verhoeff), + /* K7 */ be_nested_str_weak(checksum), + }), + be_str_weak(compute_manual_pairing_code), + &be_const_str_solidified, + ( &(const binstruction[31]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x540E0FFE, // 0002 LDINT R3 4095 + 0x2C080403, // 0003 AND R2 R2 R3 + 0x540E0009, // 0004 LDINT R3 10 + 0x3C080403, // 0005 SHR R2 R2 R3 + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x541202FF, // 0007 LDINT R4 768 + 0x2C0C0604, // 0008 AND R3 R3 R4 + 0x54120005, // 0009 LDINT R4 6 + 0x380C0604, // 000A SHL R3 R3 R4 + 0x88100102, // 000B GETMBR R4 R0 K2 + 0x54163FFE, // 000C LDINT R5 16383 + 0x2C100805, // 000D AND R4 R4 R5 + 0x300C0604, // 000E OR R3 R3 R4 + 0x88100102, // 000F GETMBR R4 R0 K2 + 0x5416000D, // 0010 LDINT R5 14 + 0x3C100805, // 0011 SHR R4 R4 R5 + 0x8C140303, // 0012 GETMET R5 R1 K3 + 0x581C0004, // 0013 LDCONST R7 K4 + 0x5C200400, // 0014 MOVE R8 R2 + 0x5C240600, // 0015 MOVE R9 R3 + 0x5C280800, // 0016 MOVE R10 R4 + 0x7C140A00, // 0017 CALL R5 5 + 0xB81A0A00, // 0018 GETNGBL R6 K5 + 0x88180D06, // 0019 GETMBR R6 R6 K6 + 0x8C180D07, // 001A GETMET R6 R6 K7 + 0x5C200A00, // 001B MOVE R8 R5 + 0x7C180400, // 001C CALL R6 2 + 0x00140A06, // 001D ADD R5 R5 R6 + 0x80040A00, // 001E RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** 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), + /* 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(_trigger_read_sensors), + &be_const_str_solidified, + ( &(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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** 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: 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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _mdns_announce_hostname +********************************************************************/ +be_local_closure(Matter_Device__mdns_announce_hostname, /* name */ + be_nested_proto( + 16, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[28]) { /* 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_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(log), + /* K13 */ be_nested_str_weak(format), + /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), + /* K15 */ be_nested_str_weak(ip6local), + /* K16 */ be_nested_str_weak(ip), + /* K17 */ be_const_int(3), + /* K18 */ be_nested_str_weak(add_hostname), + /* K19 */ be_nested_str_weak(ip6), + /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29), + /* K21 */ be_nested_str_weak(wifi), + /* K22 */ be_nested_str_weak(hostname_wifi), + /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27), + /* K24 */ be_const_int(2), + /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K26 */ be_nested_str_weak(_X7C), + /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics), + }), + be_str_weak(_mdns_announce_hostname), + &be_const_str_solidified, + ( &(const binstruction[172]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x8C100502, // 0002 GETMET R4 R2 K2 + 0x7C100200, // 0003 CALL R4 1 + 0xA8020092, // 0004 EXBLK 0 #0098 + 0x78060040, // 0005 JMPF R1 #0047 + 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 + 0x7416001F, // 0012 JMPT R5 #0033 + 0xB8160600, // 0013 GETNGBL R5 K3 + 0x8C140B0C, // 0014 GETMET R5 R5 K12 + 0x8C1C070D, // 0015 GETMET R7 R3 K13 + 0x5824000E, // 0016 LDCONST R9 K14 + 0x88280105, // 0017 GETMBR R10 R0 K5 + 0x8C2C0907, // 0018 GETMET R11 R4 K7 + 0x5834000F, // 0019 LDCONST R13 K15 + 0x5838000A, // 001A LDCONST R14 K10 + 0x7C2C0600, // 001B CALL R11 3 + 0x8C300907, // 001C GETMET R12 R4 K7 + 0x58380010, // 001D LDCONST R14 K16 + 0x583C000A, // 001E LDCONST R15 K10 + 0x7C300600, // 001F CALL R12 3 + 0x7C1C0A00, // 0020 CALL R7 5 + 0x58200011, // 0021 LDCONST R8 K17 + 0x7C140600, // 0022 CALL R5 3 + 0x8C140512, // 0023 GETMET R5 R2 K18 + 0x881C0105, // 0024 GETMBR R7 R0 K5 + 0x8C200907, // 0025 GETMET R8 R4 K7 + 0x5828000F, // 0026 LDCONST R10 K15 + 0x582C000A, // 0027 LDCONST R11 K10 + 0x7C200600, // 0028 CALL R8 3 + 0x8C240907, // 0029 GETMET R9 R4 K7 + 0x582C0010, // 002A LDCONST R11 K16 + 0x5830000A, // 002B LDCONST R12 K10 + 0x7C240600, // 002C CALL R9 3 + 0x8C280907, // 002D GETMET R10 R4 K7 + 0x58300013, // 002E LDCONST R12 K19 + 0x5834000A, // 002F LDCONST R13 K10 + 0x7C280600, // 0030 CALL R10 3 + 0x7C140A00, // 0031 CALL R5 5 + 0x70020012, // 0032 JMP #0046 + 0xB8160600, // 0033 GETNGBL R5 K3 + 0x8C140B0C, // 0034 GETMET R5 R5 K12 + 0x8C1C070D, // 0035 GETMET R7 R3 K13 + 0x58240014, // 0036 LDCONST R9 K20 + 0x88280105, // 0037 GETMBR R10 R0 K5 + 0x8C2C0907, // 0038 GETMET R11 R4 K7 + 0x58340010, // 0039 LDCONST R13 K16 + 0x5838000A, // 003A LDCONST R14 K10 + 0x7C2C0600, // 003B CALL R11 3 + 0x7C1C0800, // 003C CALL R7 4 + 0x58200011, // 003D LDCONST R8 K17 + 0x7C140600, // 003E CALL R5 3 + 0x8C140512, // 003F GETMET R5 R2 K18 + 0x881C0105, // 0040 GETMBR R7 R0 K5 + 0x8C200907, // 0041 GETMET R8 R4 K7 + 0x58280010, // 0042 LDCONST R10 K16 + 0x582C000A, // 0043 LDCONST R11 K10 + 0x7C200600, // 0044 CALL R8 3 + 0x7C140600, // 0045 CALL R5 3 + 0x7002003F, // 0046 JMP #0087 + 0xB8120600, // 0047 GETNGBL R4 K3 + 0x8C100915, // 0048 GETMET R4 R4 K21 + 0x7C100200, // 0049 CALL R4 1 + 0x8C140706, // 004A GETMET R5 R3 K6 + 0x8C1C0907, // 004B GETMET R7 R4 K7 + 0x58240008, // 004C LDCONST R9 K8 + 0x7C1C0400, // 004D CALL R7 2 + 0x58200009, // 004E LDCONST R8 K9 + 0x5824000A, // 004F LDCONST R9 K10 + 0x7C140800, // 0050 CALL R5 4 + 0x90022C05, // 0051 SETMBR R0 K22 R5 + 0x8814010B, // 0052 GETMBR R5 R0 K11 + 0x7416001F, // 0053 JMPT R5 #0074 + 0xB8160600, // 0054 GETNGBL R5 K3 + 0x8C140B0C, // 0055 GETMET R5 R5 K12 + 0x8C1C070D, // 0056 GETMET R7 R3 K13 + 0x5824000E, // 0057 LDCONST R9 K14 + 0x88280116, // 0058 GETMBR R10 R0 K22 + 0x8C2C0907, // 0059 GETMET R11 R4 K7 + 0x5834000F, // 005A LDCONST R13 K15 + 0x5838000A, // 005B LDCONST R14 K10 + 0x7C2C0600, // 005C CALL R11 3 + 0x8C300907, // 005D GETMET R12 R4 K7 + 0x58380010, // 005E LDCONST R14 K16 + 0x583C000A, // 005F LDCONST R15 K10 + 0x7C300600, // 0060 CALL R12 3 + 0x7C1C0A00, // 0061 CALL R7 5 + 0x58200011, // 0062 LDCONST R8 K17 + 0x7C140600, // 0063 CALL R5 3 + 0x8C140512, // 0064 GETMET R5 R2 K18 + 0x881C0116, // 0065 GETMBR R7 R0 K22 + 0x8C200907, // 0066 GETMET R8 R4 K7 + 0x5828000F, // 0067 LDCONST R10 K15 + 0x582C000A, // 0068 LDCONST R11 K10 + 0x7C200600, // 0069 CALL R8 3 + 0x8C240907, // 006A GETMET R9 R4 K7 + 0x582C0010, // 006B LDCONST R11 K16 + 0x5830000A, // 006C LDCONST R12 K10 + 0x7C240600, // 006D CALL R9 3 + 0x8C280907, // 006E GETMET R10 R4 K7 + 0x58300013, // 006F LDCONST R12 K19 + 0x5834000A, // 0070 LDCONST R13 K10 + 0x7C280600, // 0071 CALL R10 3 + 0x7C140A00, // 0072 CALL R5 5 + 0x70020012, // 0073 JMP #0087 + 0xB8160600, // 0074 GETNGBL R5 K3 + 0x8C140B0C, // 0075 GETMET R5 R5 K12 + 0x8C1C070D, // 0076 GETMET R7 R3 K13 + 0x58240014, // 0077 LDCONST R9 K20 + 0x88280105, // 0078 GETMBR R10 R0 K5 + 0x8C2C0907, // 0079 GETMET R11 R4 K7 + 0x58340010, // 007A LDCONST R13 K16 + 0x5838000A, // 007B LDCONST R14 K10 + 0x7C2C0600, // 007C CALL R11 3 + 0x7C1C0800, // 007D CALL R7 4 + 0x58200011, // 007E LDCONST R8 K17 + 0x7C140600, // 007F CALL R5 3 + 0x8C140512, // 0080 GETMET R5 R2 K18 + 0x881C0116, // 0081 GETMBR R7 R0 K22 + 0x8C200907, // 0082 GETMET R8 R4 K7 + 0x58280010, // 0083 LDCONST R10 K16 + 0x582C000A, // 0084 LDCONST R11 K10 + 0x7C200600, // 0085 CALL R8 3 + 0x7C140600, // 0086 CALL R5 3 + 0xB8120600, // 0087 GETNGBL R4 K3 + 0x8C10090C, // 0088 GETMET R4 R4 K12 + 0x8C18070D, // 0089 GETMET R6 R3 K13 + 0x58200017, // 008A LDCONST R8 K23 + 0x78060001, // 008B JMPF R1 #008E + 0x58240004, // 008C LDCONST R9 K4 + 0x70020000, // 008D JMP #008F + 0x58240015, // 008E LDCONST R9 K21 + 0x78060001, // 008F JMPF R1 #0092 + 0x88280105, // 0090 GETMBR R10 R0 K5 + 0x70020000, // 0091 JMP #0093 + 0x88280116, // 0092 GETMBR R10 R0 K22 + 0x7C180800, // 0093 CALL R6 4 + 0x581C0018, // 0094 LDCONST R7 K24 + 0x7C100600, // 0095 CALL R4 3 + 0xA8040001, // 0096 EXBLK 1 1 + 0x70020010, // 0097 JMP #00A9 + 0xAC100002, // 0098 CATCH R4 0 2 + 0x7002000D, // 0099 JMP #00A8 + 0xB81A0600, // 009A GETNGBL R6 K3 + 0x8C180D0C, // 009B GETMET R6 R6 K12 + 0x60200008, // 009C GETGBL R8 G8 + 0x5C240800, // 009D MOVE R9 R4 + 0x7C200200, // 009E CALL R8 1 + 0x00223208, // 009F ADD R8 K25 R8 + 0x0020111A, // 00A0 ADD R8 R8 K26 + 0x60240008, // 00A1 GETGBL R9 G8 + 0x5C280A00, // 00A2 MOVE R10 R5 + 0x7C240200, // 00A3 CALL R9 1 + 0x00201009, // 00A4 ADD R8 R8 R9 + 0x58240018, // 00A5 LDCONST R9 K24 + 0x7C180600, // 00A6 CALL R6 3 + 0x70020000, // 00A7 JMP #00A9 + 0xB0080000, // 00A8 RAISE 2 R0 R0 + 0x8C10011B, // 00A9 GETMET R4 R0 K27 + 0x7C100200, // 00AA CALL R4 1 + 0x80000000, // 00AB RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: msg_received +********************************************************************/ +be_local_closure(Matter_Device_msg_received, /* 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(message_handler), + /* K1 */ be_nested_str_weak(msg_received), + }), + be_str_weak(msg_received), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: attribute_updated +********************************************************************/ +be_local_closure(Matter_Device_attribute_updated, /* 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(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(attribute_updated), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_remove_op_discovery +********************************************************************/ +be_local_closure(Matter_Device_mdns_remove_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[24]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(get_device_id), + /* K3 */ be_nested_str_weak(copy), + /* K4 */ be_nested_str_weak(reverse), + /* K5 */ be_nested_str_weak(get_fabric_compressed), + /* K6 */ be_nested_str_weak(tohex), + /* K7 */ be_nested_str_weak(_X2D), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(eth), + /* K10 */ be_nested_str_weak(find), + /* K11 */ be_nested_str_weak(up), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(format), + /* K14 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), + /* K15 */ be_const_int(2), + /* K16 */ be_nested_str_weak(remove_service), + /* K17 */ be_nested_str_weak(_matter), + /* K18 */ be_nested_str_weak(_tcp), + /* K19 */ be_nested_str_weak(hostname_eth), + /* K20 */ be_nested_str_weak(wifi), + /* K21 */ be_nested_str_weak(hostname_wifi), + /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K23 */ be_nested_str_weak(_X7C), + }), + be_str_weak(mdns_remove_op_discovery), + &be_const_str_solidified, + ( &(const binstruction[81]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xA802003B, // 0002 EXBLK 0 #003F + 0x8C100302, // 0003 GETMET R4 R1 K2 + 0x7C100200, // 0004 CALL R4 1 + 0x8C100903, // 0005 GETMET R4 R4 K3 + 0x7C100200, // 0006 CALL R4 1 + 0x8C100904, // 0007 GETMET R4 R4 K4 + 0x7C100200, // 0008 CALL R4 1 + 0x8C140305, // 0009 GETMET R5 R1 K5 + 0x7C140200, // 000A CALL R5 1 + 0x8C180B06, // 000B GETMET R6 R5 K6 + 0x7C180200, // 000C CALL R6 1 + 0x00180D07, // 000D ADD R6 R6 K7 + 0x8C1C0906, // 000E GETMET R7 R4 K6 + 0x7C1C0200, // 000F CALL R7 1 + 0x00180C07, // 0010 ADD R6 R6 R7 + 0xB81E1000, // 0011 GETNGBL R7 K8 + 0x8C1C0F09, // 0012 GETMET R7 R7 K9 + 0x7C1C0200, // 0013 CALL R7 1 + 0x8C1C0F0A, // 0014 GETMET R7 R7 K10 + 0x5824000B, // 0015 LDCONST R9 K11 + 0x7C1C0400, // 0016 CALL R7 2 + 0x781E000E, // 0017 JMPF R7 #0027 + 0xB81E1000, // 0018 GETNGBL R7 K8 + 0x8C1C0F0C, // 0019 GETMET R7 R7 K12 + 0x8C24070D, // 001A GETMET R9 R3 K13 + 0x582C000E, // 001B LDCONST R11 K14 + 0x58300009, // 001C LDCONST R12 K9 + 0x5C340C00, // 001D MOVE R13 R6 + 0x7C240800, // 001E CALL R9 4 + 0x5828000F, // 001F LDCONST R10 K15 + 0x7C1C0600, // 0020 CALL R7 3 + 0x8C1C0510, // 0021 GETMET R7 R2 K16 + 0x58240011, // 0022 LDCONST R9 K17 + 0x58280012, // 0023 LDCONST R10 K18 + 0x5C2C0C00, // 0024 MOVE R11 R6 + 0x88300113, // 0025 GETMBR R12 R0 K19 + 0x7C1C0A00, // 0026 CALL R7 5 + 0xB81E1000, // 0027 GETNGBL R7 K8 + 0x8C1C0F14, // 0028 GETMET R7 R7 K20 + 0x7C1C0200, // 0029 CALL R7 1 + 0x8C1C0F0A, // 002A GETMET R7 R7 K10 + 0x5824000B, // 002B LDCONST R9 K11 + 0x7C1C0400, // 002C CALL R7 2 + 0x781E000E, // 002D JMPF R7 #003D + 0xB81E1000, // 002E GETNGBL R7 K8 + 0x8C1C0F0C, // 002F GETMET R7 R7 K12 + 0x8C24070D, // 0030 GETMET R9 R3 K13 + 0x582C000E, // 0031 LDCONST R11 K14 + 0x58300014, // 0032 LDCONST R12 K20 + 0x5C340C00, // 0033 MOVE R13 R6 + 0x7C240800, // 0034 CALL R9 4 + 0x5828000F, // 0035 LDCONST R10 K15 + 0x7C1C0600, // 0036 CALL R7 3 + 0x8C1C0510, // 0037 GETMET R7 R2 K16 + 0x58240011, // 0038 LDCONST R9 K17 + 0x58280012, // 0039 LDCONST R10 K18 + 0x5C2C0C00, // 003A MOVE R11 R6 + 0x88300115, // 003B GETMBR R12 R0 K21 + 0x7C1C0A00, // 003C CALL R7 5 + 0xA8040001, // 003D EXBLK 1 1 + 0x70020010, // 003E JMP #0050 + 0xAC100002, // 003F CATCH R4 0 2 + 0x7002000D, // 0040 JMP #004F + 0xB81A1000, // 0041 GETNGBL R6 K8 + 0x8C180D0C, // 0042 GETMET R6 R6 K12 + 0x60200008, // 0043 GETGBL R8 G8 + 0x5C240800, // 0044 MOVE R9 R4 + 0x7C200200, // 0045 CALL R8 1 + 0x00222C08, // 0046 ADD R8 K22 R8 + 0x00201117, // 0047 ADD R8 R8 K23 + 0x60240008, // 0048 GETGBL R9 G8 + 0x5C280A00, // 0049 MOVE R10 R5 + 0x7C240200, // 004A CALL R9 1 + 0x00201009, // 004B ADD R8 R8 R9 + 0x5824000F, // 004C LDCONST R9 K15 + 0x7C180600, // 004D CALL R6 3 + 0x70020000, // 004E JMP #0050 + 0xB0080000, // 004F RAISE 2 R0 R0 + 0x80000000, // 0050 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device_start_basic_commissioning, /* name */ + be_nested_proto( + 13, /* nstack */ + 8, /* 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 + }) + ), + }), + 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), + }), + be_str_weak(start_basic_commissioning), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_remove_op_discovery_all_fabrics +********************************************************************/ +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 */ + 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: start ********************************************************************/ @@ -83,6 +1703,372 @@ be_local_closure(Matter_Device_start, /* name */ /*******************************************************************/ +/******************************************************************** +** 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: _compute_pbkdf +********************************************************************/ +be_local_closure(Matter_Device__compute_pbkdf, /* name */ + be_nested_proto( + 14, /* 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(crypto), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(add), + /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256), + /* K4 */ be_nested_str_weak(derive), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(root_w0), + /* K7 */ be_nested_str_weak(EC_P256), + /* K8 */ be_nested_str_weak(mod), + /* K9 */ be_nested_str_weak(root_L), + /* K10 */ be_nested_str_weak(public_key), + }), + be_str_weak(_compute_pbkdf), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0xA4160200, // 0001 IMPORT R5 K1 + 0x60180015, // 0002 GETGBL R6 G21 + 0x7C180000, // 0003 CALL R6 0 + 0x8C180D02, // 0004 GETMET R6 R6 K2 + 0x5C200200, // 0005 MOVE R8 R1 + 0x54260003, // 0006 LDINT R9 4 + 0x7C180600, // 0007 CALL R6 3 + 0x8C1C0903, // 0008 GETMET R7 R4 K3 + 0x7C1C0200, // 0009 CALL R7 1 + 0x8C1C0F04, // 000A GETMET R7 R7 K4 + 0x5C240C00, // 000B MOVE R9 R6 + 0x5C280600, // 000C MOVE R10 R3 + 0x5C2C0400, // 000D MOVE R11 R2 + 0x5432004F, // 000E LDINT R12 80 + 0x7C1C0A00, // 000F CALL R7 5 + 0x54220026, // 0010 LDINT R8 39 + 0x40220A08, // 0011 CONNECT R8 K5 R8 + 0x94200E08, // 0012 GETIDX R8 R7 R8 + 0x54260027, // 0013 LDINT R9 40 + 0x542A004E, // 0014 LDINT R10 79 + 0x4024120A, // 0015 CONNECT R9 R9 R10 + 0x94240E09, // 0016 GETIDX R9 R7 R9 + 0x8C280907, // 0017 GETMET R10 R4 K7 + 0x7C280200, // 0018 CALL R10 1 + 0x8C281508, // 0019 GETMET R10 R10 K8 + 0x5C301000, // 001A MOVE R12 R8 + 0x7C280400, // 001B CALL R10 2 + 0x90020C0A, // 001C SETMBR R0 K6 R10 + 0x8C280907, // 001D GETMET R10 R4 K7 + 0x7C280200, // 001E CALL R10 1 + 0x8C281508, // 001F GETMET R10 R10 K8 + 0x5C301200, // 0020 MOVE R12 R9 + 0x7C280400, // 0021 CALL R10 2 + 0x8C2C0907, // 0022 GETMET R11 R4 K7 + 0x7C2C0200, // 0023 CALL R11 1 + 0x8C2C170A, // 0024 GETMET R11 R11 K10 + 0x5C341400, // 0025 MOVE R13 R10 + 0x7C2C0400, // 0026 CALL R11 2 + 0x9002120B, // 0027 SETMBR R0 K9 R11 + 0x80000000, // 0028 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_remove_PASE +********************************************************************/ +be_local_closure(Matter_Device_mdns_remove_PASE, /* 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[22]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(mdns_pase_eth), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(log), + /* K5 */ be_nested_str_weak(format), + /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), + /* K7 */ be_nested_str_weak(_matterc), + /* K8 */ be_nested_str_weak(_udp), + /* K9 */ be_nested_str_weak(commissioning_instance_eth), + /* K10 */ be_nested_str_weak(hostname_eth), + /* K11 */ be_const_int(3), + /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), + /* K13 */ be_nested_str_weak(eth), + /* K14 */ be_const_int(2), + /* K15 */ be_nested_str_weak(remove_service), + /* K16 */ be_nested_str_weak(mdns_pase_wifi), + /* K17 */ be_nested_str_weak(commissioning_instance_wifi), + /* K18 */ be_nested_str_weak(hostname_wifi), + /* K19 */ be_nested_str_weak(wifi), + /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K21 */ be_nested_str_weak(_X7C), + }), + be_str_weak(mdns_remove_PASE), + &be_const_str_solidified, + ( &(const binstruction[83]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xA802003D, // 0002 EXBLK 0 #0041 + 0x880C0102, // 0003 GETMBR R3 R0 K2 + 0x780E001B, // 0004 JMPF R3 #0021 + 0xB80E0600, // 0005 GETNGBL R3 K3 + 0x8C0C0704, // 0006 GETMET R3 R3 K4 + 0x8C140505, // 0007 GETMET R5 R2 K5 + 0x581C0006, // 0008 LDCONST R7 K6 + 0x58200007, // 0009 LDCONST R8 K7 + 0x58240008, // 000A LDCONST R9 K8 + 0x88280109, // 000B GETMBR R10 R0 K9 + 0x882C010A, // 000C GETMBR R11 R0 K10 + 0x7C140C00, // 000D CALL R5 6 + 0x5818000B, // 000E LDCONST R6 K11 + 0x7C0C0600, // 000F CALL R3 3 + 0xB80E0600, // 0010 GETNGBL R3 K3 + 0x8C0C0704, // 0011 GETMET R3 R3 K4 + 0x8C140505, // 0012 GETMET R5 R2 K5 + 0x581C000C, // 0013 LDCONST R7 K12 + 0x5820000D, // 0014 LDCONST R8 K13 + 0x88240109, // 0015 GETMBR R9 R0 K9 + 0x7C140800, // 0016 CALL R5 4 + 0x5818000E, // 0017 LDCONST R6 K14 + 0x7C0C0600, // 0018 CALL R3 3 + 0x500C0000, // 0019 LDBOOL R3 0 0 + 0x90020403, // 001A SETMBR R0 K2 R3 + 0x8C0C030F, // 001B GETMET R3 R1 K15 + 0x58140007, // 001C LDCONST R5 K7 + 0x58180008, // 001D LDCONST R6 K8 + 0x881C0109, // 001E GETMBR R7 R0 K9 + 0x8820010A, // 001F GETMBR R8 R0 K10 + 0x7C0C0A00, // 0020 CALL R3 5 + 0x880C0110, // 0021 GETMBR R3 R0 K16 + 0x780E001B, // 0022 JMPF R3 #003F + 0xB80E0600, // 0023 GETNGBL R3 K3 + 0x8C0C0704, // 0024 GETMET R3 R3 K4 + 0x8C140505, // 0025 GETMET R5 R2 K5 + 0x581C0006, // 0026 LDCONST R7 K6 + 0x58200007, // 0027 LDCONST R8 K7 + 0x58240008, // 0028 LDCONST R9 K8 + 0x88280111, // 0029 GETMBR R10 R0 K17 + 0x882C0112, // 002A GETMBR R11 R0 K18 + 0x7C140C00, // 002B CALL R5 6 + 0x5818000B, // 002C LDCONST R6 K11 + 0x7C0C0600, // 002D CALL R3 3 + 0xB80E0600, // 002E GETNGBL R3 K3 + 0x8C0C0704, // 002F GETMET R3 R3 K4 + 0x8C140505, // 0030 GETMET R5 R2 K5 + 0x581C000C, // 0031 LDCONST R7 K12 + 0x58200013, // 0032 LDCONST R8 K19 + 0x88240111, // 0033 GETMBR R9 R0 K17 + 0x7C140800, // 0034 CALL R5 4 + 0x5818000E, // 0035 LDCONST R6 K14 + 0x7C0C0600, // 0036 CALL R3 3 + 0x500C0000, // 0037 LDBOOL R3 0 0 + 0x90022003, // 0038 SETMBR R0 K16 R3 + 0x8C0C030F, // 0039 GETMET R3 R1 K15 + 0x58140007, // 003A LDCONST R5 K7 + 0x58180008, // 003B LDCONST R6 K8 + 0x881C0111, // 003C GETMBR R7 R0 K17 + 0x88200112, // 003D GETMBR R8 R0 K18 + 0x7C0C0A00, // 003E CALL R3 5 + 0xA8040001, // 003F EXBLK 1 1 + 0x70020010, // 0040 JMP #0052 + 0xAC0C0002, // 0041 CATCH R3 0 2 + 0x7002000D, // 0042 JMP #0051 + 0xB8160600, // 0043 GETNGBL R5 K3 + 0x8C140B04, // 0044 GETMET R5 R5 K4 + 0x601C0008, // 0045 GETGBL R7 G8 + 0x5C200600, // 0046 MOVE R8 R3 + 0x7C1C0200, // 0047 CALL R7 1 + 0x001E2807, // 0048 ADD R7 K20 R7 + 0x001C0F15, // 0049 ADD R7 R7 K21 + 0x60200008, // 004A GETGBL R8 G8 + 0x5C240800, // 004B MOVE R9 R4 + 0x7C200200, // 004C CALL R8 1 + 0x001C0E08, // 004D ADD R7 R7 R8 + 0x5820000E, // 004E LDCONST R8 K14 + 0x7C140600, // 004F CALL R5 3 + 0x70020000, // 0050 JMP #0052 + 0xB0080000, // 0051 RAISE 2 R0 R0 + 0x80000000, // 0052 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** 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: 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), + }), + be_str_weak(every_second), + &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: generate_random_passcode ********************************************************************/ @@ -265,6 +2251,286 @@ be_local_closure(Matter_Device_save_param, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: _load_plugins_config +********************************************************************/ +be_local_closure(Matter_Device__load_plugins_config, /* name */ + be_nested_proto( + 19, /* 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(string), + /* K1 */ be_nested_str_weak(k2l_num), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(log), + /* K4 */ be_nested_str_weak(MTR_X3A_X20endpoints_X20to_X20be_X20configured_X20), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str_weak(format), + /* K7 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25i_X20config_X20_X25s), + /* K8 */ be_nested_str_weak(find), + /* K9 */ be_nested_str_weak(type), + /* K10 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping), + /* K11 */ be_nested_str_weak(plugins_classes), + /* K12 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), + /* K13 */ be_nested_str_weak(_X27_X20skipping), + /* K14 */ be_const_int(2), + /* K15 */ be_nested_str_weak(plugins), + /* K16 */ be_nested_str_weak(push), + /* K17 */ be_nested_str_weak(), + /* K18 */ be_nested_str_weak(k2l), + /* K19 */ be_nested_str_weak(_X20_X25s_X3A_X25s), + /* K20 */ be_nested_str_weak(stop_iteration), + /* K21 */ be_nested_str_weak(MTR_X3A_X20endpoint_X3A_X25i_X20type_X3A_X25s_X25s), + /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K23 */ be_nested_str_weak(_X7C), + /* K24 */ be_nested_str_weak(publish_result), + /* K25 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D), + /* K26 */ be_nested_str_weak(Matter), + }), + be_str_weak(_load_plugins_config), + &be_const_str_solidified, + ( &(const binstruction[133]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0101, // 0001 GETMET R3 R0 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0xB8120400, // 0004 GETNGBL R4 K2 + 0x8C100903, // 0005 GETMET R4 R4 K3 + 0x60180008, // 0006 GETGBL R6 G8 + 0x5C1C0600, // 0007 MOVE R7 R3 + 0x7C180200, // 0008 CALL R6 1 + 0x001A0806, // 0009 ADD R6 K4 R6 + 0x581C0005, // 000A LDCONST R7 K5 + 0x7C100600, // 000B CALL R4 3 + 0x60100010, // 000C GETGBL R4 G16 + 0x5C140600, // 000D MOVE R5 R3 + 0x7C100200, // 000E CALL R4 1 + 0xA802006B, // 000F EXBLK 0 #007C + 0x5C140800, // 0010 MOVE R5 R4 + 0x7C140000, // 0011 CALL R5 0 + 0xA8020056, // 0012 EXBLK 0 #006A + 0x60180008, // 0013 GETGBL R6 G8 + 0x5C1C0A00, // 0014 MOVE R7 R5 + 0x7C180200, // 0015 CALL R6 1 + 0x94180206, // 0016 GETIDX R6 R1 R6 + 0xB81E0400, // 0017 GETNGBL R7 K2 + 0x8C1C0F03, // 0018 GETMET R7 R7 K3 + 0x8C240506, // 0019 GETMET R9 R2 K6 + 0x582C0007, // 001A LDCONST R11 K7 + 0x5C300A00, // 001B MOVE R12 R5 + 0x5C340C00, // 001C MOVE R13 R6 + 0x7C240800, // 001D CALL R9 4 + 0x58280005, // 001E LDCONST R10 K5 + 0x7C1C0600, // 001F CALL R7 3 + 0x8C1C0D08, // 0020 GETMET R7 R6 K8 + 0x58240009, // 0021 LDCONST R9 K9 + 0x7C1C0400, // 0022 CALL R7 2 + 0x4C200000, // 0023 LDNIL R8 + 0x1C200E08, // 0024 EQ R8 R7 R8 + 0x78220006, // 0025 JMPF R8 #002D + 0xB8220400, // 0026 GETNGBL R8 K2 + 0x8C201103, // 0027 GETMET R8 R8 K3 + 0x5828000A, // 0028 LDCONST R10 K10 + 0x582C0005, // 0029 LDCONST R11 K5 + 0x7C200600, // 002A CALL R8 3 + 0xA8040001, // 002B EXBLK 1 1 + 0x7001FFE2, // 002C JMP #0010 + 0x8820010B, // 002D GETMBR R8 R0 K11 + 0x8C201108, // 002E GETMET R8 R8 K8 + 0x5C280E00, // 002F MOVE R10 R7 + 0x7C200400, // 0030 CALL R8 2 + 0x4C240000, // 0031 LDNIL R9 + 0x1C241009, // 0032 EQ R9 R8 R9 + 0x7826000A, // 0033 JMPF R9 #003F + 0xB8260400, // 0034 GETNGBL R9 K2 + 0x8C241303, // 0035 GETMET R9 R9 K3 + 0x602C0008, // 0036 GETGBL R11 G8 + 0x5C300E00, // 0037 MOVE R12 R7 + 0x7C2C0200, // 0038 CALL R11 1 + 0x002E180B, // 0039 ADD R11 K12 R11 + 0x002C170D, // 003A ADD R11 R11 K13 + 0x5830000E, // 003B LDCONST R12 K14 + 0x7C240600, // 003C CALL R9 3 + 0xA8040001, // 003D EXBLK 1 1 + 0x7001FFD0, // 003E JMP #0010 + 0x5C241000, // 003F MOVE R9 R8 + 0x5C280000, // 0040 MOVE R10 R0 + 0x5C2C0A00, // 0041 MOVE R11 R5 + 0x5C300C00, // 0042 MOVE R12 R6 + 0x7C240600, // 0043 CALL R9 3 + 0x8828010F, // 0044 GETMBR R10 R0 K15 + 0x8C281510, // 0045 GETMET R10 R10 K16 + 0x5C301200, // 0046 MOVE R12 R9 + 0x7C280400, // 0047 CALL R10 2 + 0x58280011, // 0048 LDCONST R10 K17 + 0x602C0010, // 0049 GETGBL R11 G16 + 0x8C300112, // 004A GETMET R12 R0 K18 + 0x5C380C00, // 004B MOVE R14 R6 + 0x7C300400, // 004C CALL R12 2 + 0x7C2C0200, // 004D CALL R11 1 + 0xA802000B, // 004E EXBLK 0 #005B + 0x5C301600, // 004F MOVE R12 R11 + 0x7C300000, // 0050 CALL R12 0 + 0x1C341909, // 0051 EQ R13 R12 K9 + 0x78360000, // 0052 JMPF R13 #0054 + 0x7001FFFA, // 0053 JMP #004F + 0x8C340506, // 0054 GETMET R13 R2 K6 + 0x583C0013, // 0055 LDCONST R15 K19 + 0x5C401800, // 0056 MOVE R16 R12 + 0x94440C0C, // 0057 GETIDX R17 R6 R12 + 0x7C340800, // 0058 CALL R13 4 + 0x0028140D, // 0059 ADD R10 R10 R13 + 0x7001FFF3, // 005A JMP #004F + 0x582C0014, // 005B LDCONST R11 K20 + 0xAC2C0200, // 005C CATCH R11 1 0 + 0xB0080000, // 005D RAISE 2 R0 R0 + 0xB82E0400, // 005E GETNGBL R11 K2 + 0x8C2C1703, // 005F GETMET R11 R11 K3 + 0x8C340506, // 0060 GETMET R13 R2 K6 + 0x583C0015, // 0061 LDCONST R15 K21 + 0x5C400A00, // 0062 MOVE R16 R5 + 0x5C440E00, // 0063 MOVE R17 R7 + 0x5C481400, // 0064 MOVE R18 R10 + 0x7C340A00, // 0065 CALL R13 5 + 0x5838000E, // 0066 LDCONST R14 K14 + 0x7C2C0600, // 0067 CALL R11 3 + 0xA8040001, // 0068 EXBLK 1 1 + 0x70020010, // 0069 JMP #007B + 0xAC180002, // 006A CATCH R6 0 2 + 0x7002000D, // 006B JMP #007A + 0xB8220400, // 006C GETNGBL R8 K2 + 0x8C201103, // 006D GETMET R8 R8 K3 + 0x60280008, // 006E GETGBL R10 G8 + 0x5C2C0C00, // 006F MOVE R11 R6 + 0x7C280200, // 0070 CALL R10 1 + 0x002A2C0A, // 0071 ADD R10 K22 R10 + 0x00281517, // 0072 ADD R10 R10 K23 + 0x602C0008, // 0073 GETGBL R11 G8 + 0x5C300E00, // 0074 MOVE R12 R7 + 0x7C2C0200, // 0075 CALL R11 1 + 0x0028140B, // 0076 ADD R10 R10 R11 + 0x582C000E, // 0077 LDCONST R11 K14 + 0x7C200600, // 0078 CALL R8 3 + 0x70020000, // 0079 JMP #007B + 0xB0080000, // 007A RAISE 2 R0 R0 + 0x7001FF93, // 007B JMP #0010 + 0x58100014, // 007C LDCONST R4 K20 + 0xAC100200, // 007D CATCH R4 1 0 + 0xB0080000, // 007E RAISE 2 R0 R0 + 0xB8120400, // 007F GETNGBL R4 K2 + 0x8C100918, // 0080 GETMET R4 R4 K24 + 0x58180019, // 0081 LDCONST R6 K25 + 0x581C001A, // 0082 LDCONST R7 K26 + 0x7C100600, // 0083 CALL R4 3 + 0x80000000, // 0084 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start_root_basic_commissioning +********************************************************************/ +be_local_closure(Matter_Device_start_root_basic_commissioning, /* 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[23]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(PASE_TIMEOUT), + /* K2 */ be_nested_str_weak(compute_manual_pairing_code), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(log), + /* K5 */ be_nested_str_weak(format), + /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s), + /* K7 */ be_const_int(0), + /* K8 */ be_const_int(3), + /* K9 */ be_const_int(2147483647), + /* K10 */ be_const_int(2), + /* K11 */ be_nested_str_weak(compute_qrcode_content), + /* K12 */ be_nested_str_weak(publish_result), + /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D), + /* K14 */ be_nested_str_weak(Matter), + /* K15 */ be_nested_str_weak(_compute_pbkdf), + /* K16 */ be_nested_str_weak(root_passcode), + /* K17 */ be_nested_str_weak(root_iterations), + /* K18 */ be_nested_str_weak(root_salt), + /* K19 */ be_nested_str_weak(start_basic_commissioning), + /* K20 */ be_nested_str_weak(root_discriminator), + /* K21 */ be_nested_str_weak(root_w0), + /* K22 */ be_nested_str_weak(root_L), + }), + be_str_weak(start_root_basic_commissioning), + &be_const_str_solidified, + ( &(const binstruction[49]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x1C0C0203, // 0002 EQ R3 R1 R3 + 0x780E0000, // 0003 JMPF R3 #0005 + 0x88040101, // 0004 GETMBR R1 R0 K1 + 0x8C0C0102, // 0005 GETMET R3 R0 K2 + 0x7C0C0200, // 0006 CALL R3 1 + 0xB8120600, // 0007 GETNGBL R4 K3 + 0x8C100904, // 0008 GETMET R4 R4 K4 + 0x8C180505, // 0009 GETMET R6 R2 K5 + 0x58200006, // 000A LDCONST R8 K6 + 0x40260F08, // 000B CONNECT R9 K7 K8 + 0x94240609, // 000C GETIDX R9 R3 R9 + 0x542A0003, // 000D LDINT R10 4 + 0x542E0005, // 000E LDINT R11 6 + 0x4028140B, // 000F CONNECT R10 R10 R11 + 0x9428060A, // 0010 GETIDX R10 R3 R10 + 0x542E0006, // 0011 LDINT R11 7 + 0x402C1709, // 0012 CONNECT R11 R11 K9 + 0x942C060B, // 0013 GETIDX R11 R3 R11 + 0x7C180A00, // 0014 CALL R6 5 + 0x581C000A, // 0015 LDCONST R7 K10 + 0x7C100600, // 0016 CALL R4 3 + 0x8C10010B, // 0017 GETMET R4 R0 K11 + 0x7C100200, // 0018 CALL R4 1 + 0xB8160600, // 0019 GETNGBL R5 K3 + 0x8C140B0C, // 001A GETMET R5 R5 K12 + 0x8C1C0505, // 001B GETMET R7 R2 K5 + 0x5824000D, // 001C LDCONST R9 K13 + 0x5C280600, // 001D MOVE R10 R3 + 0x5C2C0800, // 001E MOVE R11 R4 + 0x7C1C0800, // 001F CALL R7 4 + 0x5820000E, // 0020 LDCONST R8 K14 + 0x7C140600, // 0021 CALL R5 3 + 0x8C14010F, // 0022 GETMET R5 R0 K15 + 0x881C0110, // 0023 GETMBR R7 R0 K16 + 0x88200111, // 0024 GETMBR R8 R0 K17 + 0x88240112, // 0025 GETMBR R9 R0 K18 + 0x7C140800, // 0026 CALL R5 4 + 0x8C140113, // 0027 GETMET R5 R0 K19 + 0x5C1C0200, // 0028 MOVE R7 R1 + 0x88200111, // 0029 GETMBR R8 R0 K17 + 0x88240114, // 002A GETMBR R9 R0 K20 + 0x88280112, // 002B GETMBR R10 R0 K18 + 0x882C0115, // 002C GETMBR R11 R0 K21 + 0x88300116, // 002D GETMBR R12 R0 K22 + 0x4C340000, // 002E LDNIL R13 + 0x7C141000, // 002F CALL R5 8 + 0x80000000, // 0030 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: remove_fabric ********************************************************************/ @@ -345,98 +2611,11 @@ be_local_closure(Matter_Device_remove_fabric, /* name */ /******************************************************************** -** Solidified function: _start_udp +** Solidified function: load_param ********************************************************************/ -be_local_closure(Matter_Device__start_udp, /* name */ +be_local_closure(Matter_Device_load_param, /* 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( - 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[ 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(_start_udp), - &be_const_str_solidified, - ( &(const binstruction[27]) { /* 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 - 0x58100007, // 0011 LDCONST R4 K7 - 0x5C140200, // 0012 MOVE R5 R1 - 0x7C080600, // 0013 CALL R2 3 - 0x90020002, // 0014 SETMBR R0 K0 R2 - 0x88080100, // 0015 GETMBR R2 R0 K0 - 0x8C080508, // 0016 GETMET R2 R2 K8 - 0x84100000, // 0017 CLOSURE R4 P0 - 0x7C080400, // 0018 CALL R2 2 - 0xA0000000, // 0019 CLOSE R0 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_50ms -********************************************************************/ -be_local_closure(Matter_Device_every_50ms, /* name */ - be_nested_proto( - 2, /* nstack */ + 12, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -444,17 +2623,130 @@ 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[28]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(crypto), + /* K2 */ be_nested_str_weak(FILENAME), + /* K3 */ be_nested_str_weak(read), + /* K4 */ be_nested_str_weak(close), + /* K5 */ be_nested_str_weak(json), + /* K6 */ be_nested_str_weak(load), + /* K7 */ be_nested_str_weak(root_discriminator), + /* K8 */ be_nested_str_weak(find), + /* K9 */ be_nested_str_weak(distinguish), + /* K10 */ be_nested_str_weak(root_passcode), + /* K11 */ be_nested_str_weak(passcode), + /* K12 */ be_nested_str_weak(ipv4only), + /* K13 */ be_nested_str_weak(plugins_config), + /* K14 */ be_nested_str_weak(config), + /* K15 */ be_nested_str_weak(_load_plugins_config), + /* K16 */ be_nested_str_weak(plugins_persist), + /* K17 */ be_nested_str_weak(io_error), + /* K18 */ be_nested_str_weak(tasmota), + /* K19 */ be_nested_str_weak(log), + /* K20 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A), + /* K21 */ be_nested_str_weak(_X7C), + /* K22 */ be_const_int(2), + /* K23 */ be_nested_str_weak(random), + /* K24 */ be_nested_str_weak(get), + /* K25 */ be_const_int(0), + /* K26 */ be_nested_str_weak(generate_random_passcode), + /* K27 */ be_nested_str_weak(save_param), }), - be_str_weak(every_50ms), + be_str_weak(load_param), &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[91]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xA8020028, // 0002 EXBLK 0 #002C + 0x600C0011, // 0003 GETGBL R3 G17 + 0x88100102, // 0004 GETMBR R4 R0 K2 + 0x7C0C0200, // 0005 CALL R3 1 + 0x8C100703, // 0006 GETMET R4 R3 K3 + 0x7C100200, // 0007 CALL R4 1 + 0x8C140704, // 0008 GETMET R5 R3 K4 + 0x7C140200, // 0009 CALL R5 1 + 0xA4160A00, // 000A IMPORT R5 K5 + 0x8C180B06, // 000B GETMET R6 R5 K6 + 0x5C200800, // 000C MOVE R8 R4 + 0x7C180400, // 000D CALL R6 2 + 0x8C1C0D08, // 000E GETMET R7 R6 K8 + 0x58240009, // 000F LDCONST R9 K9 + 0x88280107, // 0010 GETMBR R10 R0 K7 + 0x7C1C0600, // 0011 CALL R7 3 + 0x90020E07, // 0012 SETMBR R0 K7 R7 + 0x8C1C0D08, // 0013 GETMET R7 R6 K8 + 0x5824000B, // 0014 LDCONST R9 K11 + 0x8828010A, // 0015 GETMBR R10 R0 K10 + 0x7C1C0600, // 0016 CALL R7 3 + 0x90021407, // 0017 SETMBR R0 K10 R7 + 0x601C0017, // 0018 GETGBL R7 G23 + 0x8C200D08, // 0019 GETMET R8 R6 K8 + 0x5828000C, // 001A LDCONST R10 K12 + 0x502C0000, // 001B LDBOOL R11 0 0 + 0x7C200600, // 001C CALL R8 3 + 0x7C1C0200, // 001D CALL R7 1 + 0x90021807, // 001E SETMBR R0 K12 R7 + 0x8C1C0D08, // 001F GETMET R7 R6 K8 + 0x5824000E, // 0020 LDCONST R9 K14 + 0x7C1C0400, // 0021 CALL R7 2 + 0x90021A07, // 0022 SETMBR R0 K13 R7 + 0x881C010D, // 0023 GETMBR R7 R0 K13 + 0x781E0004, // 0024 JMPF R7 #002A + 0x8C1C010F, // 0025 GETMET R7 R0 K15 + 0x8824010D, // 0026 GETMBR R9 R0 K13 + 0x7C1C0400, // 0027 CALL R7 2 + 0x501C0200, // 0028 LDBOOL R7 1 0 + 0x90022007, // 0029 SETMBR R0 K16 R7 + 0xA8040001, // 002A EXBLK 1 1 + 0x70020012, // 002B JMP #003F + 0xAC0C0002, // 002C CATCH R3 0 2 + 0x7002000F, // 002D JMP #003E + 0x20140711, // 002E NE R5 R3 K17 + 0x7816000C, // 002F JMPF R5 #003D + 0xB8162400, // 0030 GETNGBL R5 K18 + 0x8C140B13, // 0031 GETMET R5 R5 K19 + 0x601C0008, // 0032 GETGBL R7 G8 + 0x5C200600, // 0033 MOVE R8 R3 + 0x7C1C0200, // 0034 CALL R7 1 + 0x001E2807, // 0035 ADD R7 K20 R7 + 0x001C0F15, // 0036 ADD R7 R7 K21 + 0x60200008, // 0037 GETGBL R8 G8 + 0x5C240800, // 0038 MOVE R9 R4 + 0x7C200200, // 0039 CALL R8 1 + 0x001C0E08, // 003A ADD R7 R7 R8 + 0x58200016, // 003B LDCONST R8 K22 + 0x7C140600, // 003C CALL R5 3 + 0x70020000, // 003D JMP #003F + 0xB0080000, // 003E RAISE 2 R0 R0 + 0x500C0000, // 003F LDBOOL R3 0 0 + 0x88100107, // 0040 GETMBR R4 R0 K7 + 0x4C140000, // 0041 LDNIL R5 + 0x1C100805, // 0042 EQ R4 R4 R5 + 0x7812000A, // 0043 JMPF R4 #004F + 0x8C100517, // 0044 GETMET R4 R2 K23 + 0x58180016, // 0045 LDCONST R6 K22 + 0x7C100400, // 0046 CALL R4 2 + 0x8C100918, // 0047 GETMET R4 R4 K24 + 0x58180019, // 0048 LDCONST R6 K25 + 0x581C0016, // 0049 LDCONST R7 K22 + 0x7C100600, // 004A CALL R4 3 + 0x54160FFE, // 004B LDINT R5 4095 + 0x2C100805, // 004C AND R4 R4 R5 + 0x90020E04, // 004D SETMBR R0 K7 R4 + 0x500C0200, // 004E LDBOOL R3 1 0 + 0x8810010A, // 004F GETMBR R4 R0 K10 + 0x4C140000, // 0050 LDNIL R5 + 0x1C100805, // 0051 EQ R4 R4 R5 + 0x78120003, // 0052 JMPF R4 #0057 + 0x8C10011A, // 0053 GETMET R4 R0 K26 + 0x7C100200, // 0054 CALL R4 1 + 0x90021404, // 0055 SETMBR R0 K10 R4 + 0x500C0200, // 0056 LDBOOL R3 1 0 + 0x780E0001, // 0057 JMPF R3 #005A + 0x8C10011B, // 0058 GETMET R4 R0 K27 + 0x7C100200, // 0059 CALL R4 1 + 0x80000000, // 005A RET 0 }) ) ); @@ -462,635 +2754,231 @@ be_local_closure(Matter_Device_every_50ms, /* name */ /******************************************************************** -** Solidified function: stop +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Device_stop, /* name */ +be_local_closure(Matter_Device_init, /* 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(remove_driver), - /* K2 */ be_nested_str_weak(udp_server), - /* K3 */ be_nested_str_weak(stop), - }), - be_str_weak(stop), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_commissioning_complete -********************************************************************/ -be_local_closure(Matter_Device_start_commissioning_complete, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A), - /* K3 */ be_const_int(2), - /* K4 */ be_nested_str_weak(stop_basic_commissioning), - }), - be_str_weak(start_commissioning_complete), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x58140003, // 0003 LDCONST R5 K3 - 0x7C080600, // 0004 CALL R2 3 - 0x8C080104, // 0005 GETMET R2 R0 K4 - 0x7C080200, // 0006 CALL R2 1 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: register_commands -********************************************************************/ -be_local_closure(Matter_Device_register_commands, /* name */ - be_nested_proto( - 5, /* nstack */ + 8, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { + ( &(const struct bproto*[ 2]) { 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 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(add_cmd), - /* K2 */ be_nested_str_weak(MtrJoin), - }), - be_str_weak(register_commands), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* 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 - 0xA0000000, // 0005 CLOSE R0 - 0x80000000, // 0006 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 */ + 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_operational_discovery), + ( &(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_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: register_native_classes -********************************************************************/ -be_local_closure(Matter_Device_register_native_classes, /* name */ - be_nested_proto( - 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[17]) { /* constants */ - /* K0 */ be_nested_str_weak(introspect), + ( &(const bvalue[41]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), /* 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), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(log), - /* K13 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20), - /* K14 */ be_nested_str_weak(k2l), - /* K15 */ be_nested_str_weak(plugins_classes), - /* K16 */ be_const_int(3), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(get_option), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(MATTER_OPTION), + /* K6 */ be_nested_str_weak(UI), + /* K7 */ be_nested_str_weak(started), + /* K8 */ be_nested_str_weak(tick), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(plugins), + /* K11 */ be_nested_str_weak(plugins_persist), + /* K12 */ be_nested_str_weak(plugins_classes), + /* K13 */ be_nested_str_weak(register_native_classes), + /* K14 */ be_nested_str_weak(vendorid), + /* K15 */ be_nested_str_weak(VENDOR_ID), + /* K16 */ be_nested_str_weak(productid), + /* K17 */ be_nested_str_weak(PRODUCT_ID), + /* K18 */ be_nested_str_weak(root_iterations), + /* K19 */ be_nested_str_weak(PBKDF_ITERATIONS), + /* K20 */ be_nested_str_weak(root_salt), + /* K21 */ be_nested_str_weak(random), + /* K22 */ be_nested_str_weak(ipv4only), + /* K23 */ be_nested_str_weak(load_param), + /* K24 */ be_nested_str_weak(sessions), + /* K25 */ be_nested_str_weak(Session_Store), + /* K26 */ be_nested_str_weak(load_fabrics), + /* K27 */ be_nested_str_weak(message_handler), + /* K28 */ be_nested_str_weak(MessageHandler), + /* K29 */ be_nested_str_weak(ui), + /* K30 */ be_nested_str_weak(wifi), + /* K31 */ be_nested_str_weak(up), + /* K32 */ be_nested_str_weak(eth), + /* K33 */ be_nested_str_weak(start), + /* K34 */ be_nested_str_weak(add_rule), + /* K35 */ be_nested_str_weak(Wifi_X23Connected), + /* K36 */ be_nested_str_weak(matter_start), + /* K37 */ be_nested_str_weak(Eth_X23Connected), + /* K38 */ be_nested_str_weak(_init_basic_commissioning), + /* K39 */ be_nested_str_weak(add_driver), + /* K40 */ be_nested_str_weak(register_commands), }), - be_str_weak(register_native_classes), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[43]) { /* 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 - 0xB8161600, // 0020 GETNGBL R5 K11 - 0x8C140B0C, // 0021 GETMET R5 R5 K12 - 0x601C0008, // 0022 GETGBL R7 G8 - 0x8C20010E, // 0023 GETMET R8 R0 K14 - 0x8828010F, // 0024 GETMBR R10 R0 K15 - 0x7C200400, // 0025 CALL R8 2 - 0x7C1C0200, // 0026 CALL R7 1 - 0x001E1A07, // 0027 ADD R7 K13 R7 - 0x58200010, // 0028 LDCONST R8 K16 - 0x7C140600, // 0029 CALL R5 3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: stop_basic_commissioning -********************************************************************/ -be_local_closure(Matter_Device_stop_basic_commissioning, /* 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[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: _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), - /* 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(_trigger_read_sensors), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ + ( &(const binstruction[102]) { /* 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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _init_basic_commissioning -********************************************************************/ -be_local_closure(Matter_Device__init_basic_commissioning, /* 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[ 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(_init_basic_commissioning), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: compute_qrcode_content -********************************************************************/ -be_local_closure(Matter_Device_compute_qrcode_content, /* 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[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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_active_endpoints -********************************************************************/ -be_local_closure(Matter_Device_get_active_endpoints, /* name */ - be_nested_proto( - 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[ 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(get_active_endpoints), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: attribute_updated -********************************************************************/ -be_local_closure(Matter_Device_attribute_updated, /* 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(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(attribute_updated), - &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 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xB80E0400, // 0002 GETNGBL R3 K2 + 0x8C0C0703, // 0003 GETMET R3 R3 K3 + 0xB8160800, // 0004 GETNGBL R5 K4 + 0x88140B05, // 0005 GETMBR R5 R5 K5 + 0x7C0C0400, // 0006 CALL R3 2 + 0x740E0004, // 0007 JMPT R3 #000D + 0xB80E0800, // 0008 GETNGBL R3 K4 + 0x8C0C0706, // 0009 GETMET R3 R3 K6 + 0x5C140000, // 000A MOVE R5 R0 + 0x7C0C0400, // 000B CALL R3 2 + 0x80000600, // 000C RET 0 + 0x500C0000, // 000D LDBOOL R3 0 0 + 0x90020E03, // 000E SETMBR R0 K7 R3 + 0x90021109, // 000F SETMBR R0 K8 K9 + 0x600C0012, // 0010 GETGBL R3 G18 + 0x7C0C0000, // 0011 CALL R3 0 + 0x90021403, // 0012 SETMBR R0 K10 R3 + 0x500C0000, // 0013 LDBOOL R3 0 0 + 0x90021603, // 0014 SETMBR R0 K11 R3 + 0x600C0013, // 0015 GETGBL R3 G19 + 0x7C0C0000, // 0016 CALL R3 0 + 0x90021803, // 0017 SETMBR R0 K12 R3 + 0x8C0C010D, // 0018 GETMET R3 R0 K13 + 0x7C0C0200, // 0019 CALL R3 1 + 0x880C010F, // 001A GETMBR R3 R0 K15 + 0x90021C03, // 001B SETMBR R0 K14 R3 + 0x880C0111, // 001C GETMBR R3 R0 K17 + 0x90022003, // 001D SETMBR R0 K16 R3 + 0x880C0113, // 001E GETMBR R3 R0 K19 + 0x90022403, // 001F SETMBR R0 K18 R3 + 0x8C0C0315, // 0020 GETMET R3 R1 K21 + 0x5416000F, // 0021 LDINT R5 16 + 0x7C0C0400, // 0022 CALL R3 2 + 0x90022803, // 0023 SETMBR R0 K20 R3 + 0x500C0000, // 0024 LDBOOL R3 0 0 + 0x90022C03, // 0025 SETMBR R0 K22 R3 + 0x8C0C0117, // 0026 GETMET R3 R0 K23 + 0x7C0C0200, // 0027 CALL R3 1 + 0xB80E0800, // 0028 GETNGBL R3 K4 + 0x8C0C0719, // 0029 GETMET R3 R3 K25 + 0x5C140000, // 002A MOVE R5 R0 + 0x7C0C0400, // 002B CALL R3 2 + 0x90023003, // 002C SETMBR R0 K24 R3 + 0x880C0118, // 002D GETMBR R3 R0 K24 + 0x8C0C071A, // 002E GETMET R3 R3 K26 + 0x7C0C0200, // 002F CALL R3 1 + 0xB80E0800, // 0030 GETNGBL R3 K4 + 0x8C0C071C, // 0031 GETMET R3 R3 K28 + 0x5C140000, // 0032 MOVE R5 R0 + 0x7C0C0400, // 0033 CALL R3 2 + 0x90023603, // 0034 SETMBR R0 K27 R3 + 0xB80E0800, // 0035 GETNGBL R3 K4 + 0x8C0C0706, // 0036 GETMET R3 R3 K6 + 0x5C140000, // 0037 MOVE R5 R0 + 0x7C0C0400, // 0038 CALL R3 2 + 0x90023A03, // 0039 SETMBR R0 K29 R3 + 0xB80E0400, // 003A GETNGBL R3 K2 + 0x8C0C071E, // 003B GETMET R3 R3 K30 + 0x7C0C0200, // 003C CALL R3 1 + 0x940C071F, // 003D GETIDX R3 R3 K31 + 0x740E0004, // 003E JMPT R3 #0044 + 0xB80E0400, // 003F GETNGBL R3 K2 + 0x8C0C0720, // 0040 GETMET R3 R3 K32 + 0x7C0C0200, // 0041 CALL R3 1 + 0x940C071F, // 0042 GETIDX R3 R3 K31 + 0x780E0001, // 0043 JMPF R3 #0046 + 0x8C0C0121, // 0044 GETMET R3 R0 K33 + 0x7C0C0200, // 0045 CALL R3 1 + 0xB80E0400, // 0046 GETNGBL R3 K2 + 0x8C0C071E, // 0047 GETMET R3 R3 K30 + 0x7C0C0200, // 0048 CALL R3 1 + 0x940C071F, // 0049 GETIDX R3 R3 K31 + 0x740E0005, // 004A JMPT R3 #0051 + 0xB80E0400, // 004B GETNGBL R3 K2 + 0x8C0C0722, // 004C GETMET R3 R3 K34 + 0x58140023, // 004D LDCONST R5 K35 + 0x84180000, // 004E CLOSURE R6 P0 + 0x581C0024, // 004F LDCONST R7 K36 + 0x7C0C0800, // 0050 CALL R3 4 + 0xB80E0400, // 0051 GETNGBL R3 K2 + 0x8C0C0720, // 0052 GETMET R3 R3 K32 + 0x7C0C0200, // 0053 CALL R3 1 + 0x940C071F, // 0054 GETIDX R3 R3 K31 + 0x740E0005, // 0055 JMPT R3 #005C + 0xB80E0400, // 0056 GETNGBL R3 K2 + 0x8C0C0722, // 0057 GETMET R3 R3 K34 + 0x58140025, // 0058 LDCONST R5 K37 + 0x84180001, // 0059 CLOSURE R6 P1 + 0x581C0024, // 005A LDCONST R7 K36 + 0x7C0C0800, // 005B CALL R3 4 + 0x8C0C0126, // 005C GETMET R3 R0 K38 + 0x7C0C0200, // 005D CALL R3 1 + 0xB80E0400, // 005E GETNGBL R3 K2 + 0x8C0C0727, // 005F GETMET R3 R3 K39 + 0x5C140000, // 0060 MOVE R5 R0 + 0x7C0C0400, // 0061 CALL R3 2 + 0x8C0C0128, // 0062 GETMET R3 R0 K40 + 0x7C0C0200, // 0063 CALL R3 1 + 0xA0000000, // 0064 CLOSE R0 + 0x80000000, // 0065 RET 0 }) ) ); @@ -1195,81 +3083,44 @@ be_local_closure(Matter_Device_event_fabrics_saved, /* name */ /******************************************************************** -** Solidified function: sort_distinct +** Solidified function: every_250ms ********************************************************************/ -be_local_closure(Matter_Device_sort_distinct, /* name */ +be_local_closure(Matter_Device_every_250ms, /* name */ be_nested_proto( - 7, /* nstack */ + 4, /* nstack */ 1, /* argc */ - 4, /* varg */ + 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_const_class(be_class_Matter_Device), - /* K1 */ be_const_int(1), + /* K0 */ be_nested_str_weak(message_handler), + /* K1 */ be_nested_str_weak(every_250ms), /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(stop_iteration), - /* K4 */ be_nested_str_weak(remove), + /* K3 */ be_nested_str_weak(plugins), + /* K4 */ be_const_int(1), }), - be_str_weak(sort_distinct), + be_str_weak(every_250ms), &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 + ( &(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 }) ) ); @@ -1277,81 +3128,30 @@ be_local_closure(Matter_Device_sort_distinct, /* name */ /******************************************************************** -** Solidified function: k2l_num +** Solidified function: msg_send ********************************************************************/ -be_local_closure(Matter_Device_k2l_num, /* name */ +be_local_closure(Matter_Device_msg_send, /* name */ be_nested_proto( - 9, /* nstack */ - 1, /* 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[ 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), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(udp_server), + /* K1 */ be_nested_str_weak(send_UDP), }), - be_str_weak(k2l_num), + be_str_weak(msg_send), &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 + ( &(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 }) ) ); @@ -1534,47 +3334,328 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */ /******************************************************************** -** Solidified function: every_second +** Solidified function: process_attribute_expansion ********************************************************************/ -be_local_closure(Matter_Device_every_second, /* name */ +be_local_closure(Matter_Device_process_attribute_expansion, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ + 29, /* 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_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), + 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 + }) + ), }), - be_str_weak(every_second), + 1, /* has constants */ + ( &(const bvalue[22]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(endpoint), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(attribute), + /* K4 */ be_nested_str_weak(plugins), + /* K5 */ be_nested_str_weak(get_endpoint), + /* K6 */ be_nested_str_weak(contains), + /* K7 */ be_nested_str_weak(get_cluster_list), + /* K8 */ be_nested_str_weak(get_attribute_list), + /* K9 */ be_nested_str_weak(push), + /* K10 */ be_nested_str_weak(stop_iteration), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(format), + /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X), + /* K15 */ be_const_int(3), + /* K16 */ be_nested_str_weak(status), + /* K17 */ be_nested_str_weak(matter), + /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), + /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), + /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), + /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE), + }), + be_str_weak(process_attribute_expansion), &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 + ( &(const binstruction[216]) { /* code */ + 0x840C0000, // 0000 CLOSURE R3 P0 + 0xA4120000, // 0001 IMPORT R4 K0 + 0x88140301, // 0002 GETMBR R5 R1 K1 + 0x50180000, // 0003 LDBOOL R6 0 0 + 0x881C0302, // 0004 GETMBR R7 R1 K2 + 0x50200000, // 0005 LDBOOL R8 0 0 + 0x88240303, // 0006 GETMBR R9 R1 K3 + 0x50280000, // 0007 LDBOOL R10 0 0 + 0x882C0301, // 0008 GETMBR R11 R1 K1 + 0x4C300000, // 0009 LDNIL R12 + 0x202C160C, // 000A NE R11 R11 R12 + 0x782E0007, // 000B JMPF R11 #0014 + 0x882C0302, // 000C GETMBR R11 R1 K2 + 0x4C300000, // 000D LDNIL R12 + 0x202C160C, // 000E NE R11 R11 R12 + 0x782E0003, // 000F JMPF R11 #0014 + 0x882C0303, // 0010 GETMBR R11 R1 K3 + 0x4C300000, // 0011 LDNIL R12 + 0x202C160C, // 0012 NE R11 R11 R12 + 0x742E0000, // 0013 JMPT R11 #0015 + 0x502C0001, // 0014 LDBOOL R11 0 1 + 0x502C0200, // 0015 LDBOOL R11 1 0 + 0x60300013, // 0016 GETGBL R12 G19 + 0x7C300000, // 0017 CALL R12 0 + 0x60340010, // 0018 GETGBL R13 G16 + 0x88380104, // 0019 GETMBR R14 R0 K4 + 0x7C340200, // 001A CALL R13 1 + 0xA8020055, // 001B EXBLK 0 #0072 + 0x5C381A00, // 001C MOVE R14 R13 + 0x7C380000, // 001D CALL R14 0 + 0x8C3C1D05, // 001E GETMET R15 R14 K5 + 0x7C3C0200, // 001F CALL R15 1 + 0x4C400000, // 0020 LDNIL R16 + 0x20400A10, // 0021 NE R16 R5 R16 + 0x78420002, // 0022 JMPF R16 #0026 + 0x20401E05, // 0023 NE R16 R15 R5 + 0x78420000, // 0024 JMPF R16 #0026 + 0x7001FFF5, // 0025 JMP #001C + 0x8C401906, // 0026 GETMET R16 R12 K6 + 0x5C481E00, // 0027 MOVE R18 R15 + 0x7C400400, // 0028 CALL R16 2 + 0x74420002, // 0029 JMPT R16 #002D + 0x60400013, // 002A GETGBL R16 G19 + 0x7C400000, // 002B CALL R16 0 + 0x98301E10, // 002C SETIDX R12 R15 R16 + 0x50180200, // 002D LDBOOL R6 1 0 + 0x8C401D07, // 002E GETMET R16 R14 K7 + 0x5C481E00, // 002F MOVE R18 R15 + 0x7C400400, // 0030 CALL R16 2 + 0x60440010, // 0031 GETGBL R17 G16 + 0x5C482000, // 0032 MOVE R18 R16 + 0x7C440200, // 0033 CALL R17 1 + 0xA8020038, // 0034 EXBLK 0 #006E + 0x5C482200, // 0035 MOVE R18 R17 + 0x7C480000, // 0036 CALL R18 0 + 0x4C4C0000, // 0037 LDNIL R19 + 0x204C0E13, // 0038 NE R19 R7 R19 + 0x784E0002, // 0039 JMPF R19 #003D + 0x204C2407, // 003A NE R19 R18 R7 + 0x784E0000, // 003B JMPF R19 #003D + 0x7001FFF7, // 003C JMP #0035 + 0x944C180F, // 003D GETIDX R19 R12 R15 + 0x8C4C2706, // 003E GETMET R19 R19 K6 + 0x5C542400, // 003F MOVE R21 R18 + 0x7C4C0400, // 0040 CALL R19 2 + 0x744E0003, // 0041 JMPT R19 #0046 + 0x944C180F, // 0042 GETIDX R19 R12 R15 + 0x60500013, // 0043 GETGBL R20 G19 + 0x7C500000, // 0044 CALL R20 0 + 0x984C2414, // 0045 SETIDX R19 R18 R20 + 0x50200200, // 0046 LDBOOL R8 1 0 + 0x8C4C1D08, // 0047 GETMET R19 R14 K8 + 0x5C541E00, // 0048 MOVE R21 R15 + 0x5C582400, // 0049 MOVE R22 R18 + 0x7C4C0600, // 004A CALL R19 3 + 0x60500010, // 004B GETGBL R20 G16 + 0x5C542600, // 004C MOVE R21 R19 + 0x7C500200, // 004D CALL R20 1 + 0xA802001A, // 004E EXBLK 0 #006A + 0x5C542800, // 004F MOVE R21 R20 + 0x7C540000, // 0050 CALL R21 0 + 0x4C580000, // 0051 LDNIL R22 + 0x20581216, // 0052 NE R22 R9 R22 + 0x785A0002, // 0053 JMPF R22 #0057 + 0x20582A09, // 0054 NE R22 R21 R9 + 0x785A0000, // 0055 JMPF R22 #0057 + 0x7001FFF7, // 0056 JMP #004F + 0x9458180F, // 0057 GETIDX R22 R12 R15 + 0x94582C12, // 0058 GETIDX R22 R22 R18 + 0x8C582D06, // 0059 GETMET R22 R22 K6 + 0x5C602A00, // 005A MOVE R24 R21 + 0x7C580400, // 005B CALL R22 2 + 0x745A0004, // 005C JMPT R22 #0062 + 0x9458180F, // 005D GETIDX R22 R12 R15 + 0x94582C12, // 005E GETIDX R22 R22 R18 + 0x605C0012, // 005F GETGBL R23 G18 + 0x7C5C0000, // 0060 CALL R23 0 + 0x98582A17, // 0061 SETIDX R22 R21 R23 + 0x50280200, // 0062 LDBOOL R10 1 0 + 0x9458180F, // 0063 GETIDX R22 R12 R15 + 0x94582C12, // 0064 GETIDX R22 R22 R18 + 0x94582C15, // 0065 GETIDX R22 R22 R21 + 0x8C582D09, // 0066 GETMET R22 R22 K9 + 0x5C601C00, // 0067 MOVE R24 R14 + 0x7C580400, // 0068 CALL R22 2 + 0x7001FFE4, // 0069 JMP #004F + 0x5850000A, // 006A LDCONST R20 K10 + 0xAC500200, // 006B CATCH R20 1 0 + 0xB0080000, // 006C RAISE 2 R0 R0 + 0x7001FFC6, // 006D JMP #0035 + 0x5844000A, // 006E LDCONST R17 K10 + 0xAC440200, // 006F CATCH R17 1 0 + 0xB0080000, // 0070 RAISE 2 R0 R0 + 0x7001FFA9, // 0071 JMP #001C + 0x5834000A, // 0072 LDCONST R13 K10 + 0xAC340200, // 0073 CATCH R13 1 0 + 0xB0080000, // 0074 RAISE 2 R0 R0 + 0x60340010, // 0075 GETGBL R13 G16 + 0x5C380600, // 0076 MOVE R14 R3 + 0x5C3C1800, // 0077 MOVE R15 R12 + 0x7C380200, // 0078 CALL R14 1 + 0x7C340200, // 0079 CALL R13 1 + 0xA802003D, // 007A EXBLK 0 #00B9 + 0x5C381A00, // 007B MOVE R14 R13 + 0x7C380000, // 007C CALL R14 0 + 0x603C0010, // 007D GETGBL R15 G16 + 0x5C400600, // 007E MOVE R16 R3 + 0x9444180E, // 007F GETIDX R17 R12 R14 + 0x7C400200, // 0080 CALL R16 1 + 0x7C3C0200, // 0081 CALL R15 1 + 0xA8020031, // 0082 EXBLK 0 #00B5 + 0x5C401E00, // 0083 MOVE R16 R15 + 0x7C400000, // 0084 CALL R16 0 + 0x60440010, // 0085 GETGBL R17 G16 + 0x5C480600, // 0086 MOVE R18 R3 + 0x944C180E, // 0087 GETIDX R19 R12 R14 + 0x944C2610, // 0088 GETIDX R19 R19 R16 + 0x7C480200, // 0089 CALL R18 1 + 0x7C440200, // 008A CALL R17 1 + 0xA8020024, // 008B EXBLK 0 #00B1 + 0x5C482200, // 008C MOVE R18 R17 + 0x7C480000, // 008D CALL R18 0 + 0x604C0010, // 008E GETGBL R19 G16 + 0x9450180E, // 008F GETIDX R20 R12 R14 + 0x94502810, // 0090 GETIDX R20 R20 R16 + 0x94502812, // 0091 GETIDX R20 R20 R18 + 0x7C4C0200, // 0092 CALL R19 1 + 0xA8020018, // 0093 EXBLK 0 #00AD + 0x5C502600, // 0094 MOVE R20 R19 + 0x7C500000, // 0095 CALL R20 0 + 0xB8561600, // 0096 GETNGBL R21 K11 + 0x8C542B0C, // 0097 GETMET R21 R21 K12 + 0x8C5C090D, // 0098 GETMET R23 R4 K13 + 0x5864000E, // 0099 LDCONST R25 K14 + 0x5C681C00, // 009A MOVE R26 R14 + 0x5C6C2000, // 009B MOVE R27 R16 + 0x5C702400, // 009C MOVE R28 R18 + 0x7C5C0A00, // 009D CALL R23 5 + 0x5860000F, // 009E LDCONST R24 K15 + 0x7C540600, // 009F CALL R21 3 + 0x9006020E, // 00A0 SETMBR R1 K1 R14 + 0x90060410, // 00A1 SETMBR R1 K2 R16 + 0x90060612, // 00A2 SETMBR R1 K3 R18 + 0x5C540400, // 00A3 MOVE R21 R2 + 0x5C582800, // 00A4 MOVE R22 R20 + 0x5C5C0200, // 00A5 MOVE R23 R1 + 0x5C601600, // 00A6 MOVE R24 R11 + 0x7C540600, // 00A7 CALL R21 3 + 0x782E0002, // 00A8 JMPF R11 #00AC + 0x78560001, // 00A9 JMPF R21 #00AC + 0xA8040004, // 00AA EXBLK 1 4 + 0x80002C00, // 00AB RET 0 + 0x7001FFE6, // 00AC JMP #0094 + 0x584C000A, // 00AD LDCONST R19 K10 + 0xAC4C0200, // 00AE CATCH R19 1 0 + 0xB0080000, // 00AF RAISE 2 R0 R0 + 0x7001FFDA, // 00B0 JMP #008C + 0x5844000A, // 00B1 LDCONST R17 K10 + 0xAC440200, // 00B2 CATCH R17 1 0 + 0xB0080000, // 00B3 RAISE 2 R0 R0 + 0x7001FFCD, // 00B4 JMP #0083 + 0x583C000A, // 00B5 LDCONST R15 K10 + 0xAC3C0200, // 00B6 CATCH R15 1 0 + 0xB0080000, // 00B7 RAISE 2 R0 R0 + 0x7001FFC1, // 00B8 JMP #007B + 0x5834000A, // 00B9 LDCONST R13 K10 + 0xAC340200, // 00BA CATCH R13 1 0 + 0xB0080000, // 00BB RAISE 2 R0 R0 + 0x782E0019, // 00BC JMPF R11 #00D7 + 0x5C340C00, // 00BD MOVE R13 R6 + 0x74360003, // 00BE JMPT R13 #00C3 + 0xB8362200, // 00BF GETNGBL R13 K17 + 0x88341B12, // 00C0 GETMBR R13 R13 K18 + 0x9006200D, // 00C1 SETMBR R1 K16 R13 + 0x7002000E, // 00C2 JMP #00D2 + 0x5C341000, // 00C3 MOVE R13 R8 + 0x74360003, // 00C4 JMPT R13 #00C9 + 0xB8362200, // 00C5 GETNGBL R13 K17 + 0x88341B13, // 00C6 GETMBR R13 R13 K19 + 0x9006200D, // 00C7 SETMBR R1 K16 R13 + 0x70020008, // 00C8 JMP #00D2 + 0x5C341400, // 00C9 MOVE R13 R10 + 0x74360003, // 00CA JMPT R13 #00CF + 0xB8362200, // 00CB GETNGBL R13 K17 + 0x88341B14, // 00CC GETMBR R13 R13 K20 + 0x9006200D, // 00CD SETMBR R1 K16 R13 + 0x70020002, // 00CE JMP #00D2 + 0xB8362200, // 00CF GETNGBL R13 K17 + 0x88341B15, // 00D0 GETMBR R13 R13 K21 + 0x9006200D, // 00D1 SETMBR R1 K16 R13 + 0x5C340400, // 00D2 MOVE R13 R2 + 0x4C380000, // 00D3 LDNIL R14 + 0x5C3C0200, // 00D4 MOVE R15 R1 + 0x50400200, // 00D5 LDBOOL R16 1 0 + 0x7C340600, // 00D6 CALL R13 3 + 0x80000000, // 00D7 RET 0 }) ) ); @@ -1582,11 +3663,100 @@ be_local_closure(Matter_Device_every_second, /* name */ /******************************************************************** -** Solidified function: get_plugin_class_arg +** Solidified function: is_commissioning_open ********************************************************************/ -be_local_closure(Matter_Device_get_plugin_class_arg, /* name */ +be_local_closure(Matter_Device_is_commissioning_open, /* name */ be_nested_proto( - 5, /* nstack */ + 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( + 8, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1594,24 +3764,31 @@ be_local_closure(Matter_Device_get_plugin_class_arg, /* name */ 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(), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(mdns), + /* K2 */ be_nested_str_weak(string), + /* K3 */ be_nested_str_weak(stop_basic_commissioning), + /* K4 */ be_nested_str_weak(root_w0), + /* K5 */ be_nested_str_weak(root_L), + /* K6 */ be_nested_str_weak(mdns_announce_op_discovery), }), - be_str_weak(get_plugin_class_arg), + be_str_weak(start_operational_discovery), &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[13]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xA4120400, // 0002 IMPORT R4 K2 + 0x8C140103, // 0003 GETMET R5 R0 K3 + 0x7C140200, // 0004 CALL R5 1 + 0x4C140000, // 0005 LDNIL R5 + 0x90020805, // 0006 SETMBR R0 K4 R5 + 0x4C140000, // 0007 LDNIL R5 + 0x90020A05, // 0008 SETMBR R0 K5 R5 + 0x8C140106, // 0009 GETMET R5 R0 K6 + 0x5C1C0200, // 000A MOVE R7 R1 + 0x7C140400, // 000B CALL R5 2 + 0x80000000, // 000C RET 0 }) ) ); @@ -1656,11 +3833,89 @@ be_local_closure(Matter_Device_is_root_commissioning_open, /* name */ /******************************************************************** -** Solidified function: mdns_announce_PASE +** Solidified function: register_plugin_class ********************************************************************/ -be_local_closure(Matter_Device_mdns_announce_PASE, /* name */ +be_local_closure(Matter_Device_register_plugin_class, /* name */ be_nested_proto( - 16, /* nstack */ + 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), + }), + be_str_weak(register_plugin_class), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: MtrJoin +********************************************************************/ +be_local_closure(Matter_Device_MtrJoin, /* name */ + be_nested_proto( + 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[ 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(MtrJoin), + &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 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: autoconf_device +********************************************************************/ +be_local_closure(Matter_Device_autoconf_device, /* name */ + be_nested_proto( + 7, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1668,322 +3923,98 @@ be_local_closure(Matter_Device_mdns_announce_PASE, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[44]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(crypto), - /* K3 */ be_nested_str_weak(VP), - /* K4 */ be_nested_str_weak(vendorid), - /* K5 */ be_nested_str_weak(_X2B), - /* K6 */ be_nested_str_weak(productid), - /* K7 */ be_nested_str_weak(D), - /* K8 */ be_nested_str_weak(commissioning_discriminator), - /* K9 */ be_nested_str_weak(CM), - /* K10 */ be_const_int(1), - /* K11 */ be_nested_str_weak(T), - /* K12 */ be_const_int(0), - /* K13 */ be_nested_str_weak(SII), - /* K14 */ be_nested_str_weak(SAI), - /* K15 */ be_nested_str_weak(commissioning_instance_wifi), - /* K16 */ be_nested_str_weak(random), - /* K17 */ be_nested_str_weak(tohex), - /* K18 */ be_nested_str_weak(commissioning_instance_eth), - /* K19 */ be_nested_str_weak(hostname_eth), - /* K20 */ be_nested_str_weak(tasmota), - /* K21 */ be_nested_str_weak(log), - /* K22 */ be_nested_str_weak(format), - /* K23 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25i_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), - /* K24 */ be_nested_str_weak(_matterc), - /* K25 */ be_nested_str_weak(_udp), - /* K26 */ be_const_int(3), - /* K27 */ be_nested_str_weak(add_service), - /* K28 */ be_nested_str_weak(mdns_pase_eth), - /* K29 */ be_nested_str_weak(MTR_X3A_X20announce_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), - /* K30 */ be_nested_str_weak(eth), - /* K31 */ be_const_int(2), - /* K32 */ be_nested_str_weak(_L), - /* K33 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), - /* K34 */ be_nested_str_weak(add_subtype), - /* K35 */ be_nested_str_weak(_S), - /* K36 */ be_nested_str_weak(_V), - /* K37 */ be_nested_str_weak(_CM1), - /* K38 */ be_nested_str_weak(hostname_wifi), - /* K39 */ be_nested_str_weak(mdns_pase_wifi), - /* K40 */ be_nested_str_weak(MTR_X3A_X20starting_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), - /* K41 */ be_nested_str_weak(wifi), - /* K42 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K43 */ be_nested_str_weak(_X7C), + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(json), + /* K2 */ be_nested_str_weak(plugins), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(plugins_config), + /* K5 */ be_nested_str_weak(autoconf_device_map), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(log), + /* K8 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20), + /* K9 */ be_const_int(3), + /* K10 */ be_nested_str_weak(_load_plugins_config), + /* K11 */ be_nested_str_weak(plugins_persist), + /* K12 */ be_nested_str_weak(sessions), + /* K13 */ be_nested_str_weak(count_active_fabrics), + /* K14 */ be_nested_str_weak(save_param), }), - be_str_weak(mdns_announce_PASE), + be_str_weak(autoconf_device), &be_const_str_solidified, - ( &(const binstruction[267]) { /* code */ + ( &(const binstruction[34]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 - 0xA40E0400, // 0002 IMPORT R3 K2 - 0x60100013, // 0003 GETGBL R4 G19 - 0x7C100000, // 0004 CALL R4 0 - 0x60140008, // 0005 GETGBL R5 G8 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x7C140200, // 0007 CALL R5 1 - 0x00140B05, // 0008 ADD R5 R5 K5 - 0x60180008, // 0009 GETGBL R6 G8 - 0x881C0106, // 000A GETMBR R7 R0 K6 - 0x7C180200, // 000B CALL R6 1 - 0x00140A06, // 000C ADD R5 R5 R6 - 0x98120605, // 000D SETIDX R4 K3 R5 - 0x88140108, // 000E GETMBR R5 R0 K8 - 0x98120E05, // 000F SETIDX R4 K7 R5 - 0x9812130A, // 0010 SETIDX R4 K9 K10 - 0x9812170C, // 0011 SETIDX R4 K11 K12 - 0x54161387, // 0012 LDINT R5 5000 - 0x98121A05, // 0013 SETIDX R4 K13 R5 - 0x5416012B, // 0014 LDINT R5 300 - 0x98121C05, // 0015 SETIDX R4 K14 R5 - 0x8C140710, // 0016 GETMET R5 R3 K16 - 0x541E0007, // 0017 LDINT R7 8 - 0x7C140400, // 0018 CALL R5 2 - 0x8C140B11, // 0019 GETMET R5 R5 K17 - 0x7C140200, // 001A CALL R5 1 - 0x90021E05, // 001B SETMBR R0 K15 R5 - 0x8C140710, // 001C GETMET R5 R3 K16 - 0x541E0007, // 001D LDINT R7 8 - 0x7C140400, // 001E CALL R5 2 - 0x8C140B11, // 001F GETMET R5 R5 K17 - 0x7C140200, // 0020 CALL R5 1 - 0x90022405, // 0021 SETMBR R0 K18 R5 - 0xA80200D5, // 0022 EXBLK 0 #00F9 - 0x88140113, // 0023 GETMBR R5 R0 K19 - 0x78160067, // 0024 JMPF R5 #008D - 0xB8162800, // 0025 GETNGBL R5 K20 - 0x8C140B15, // 0026 GETMET R5 R5 K21 - 0x8C1C0516, // 0027 GETMET R7 R2 K22 - 0x58240017, // 0028 LDCONST R9 K23 - 0x58280018, // 0029 LDCONST R10 K24 - 0x582C0019, // 002A LDCONST R11 K25 - 0x543215A3, // 002B LDINT R12 5540 - 0x60340008, // 002C GETGBL R13 G8 - 0x5C380800, // 002D MOVE R14 R4 - 0x7C340200, // 002E CALL R13 1 - 0x88380112, // 002F GETMBR R14 R0 K18 - 0x883C0113, // 0030 GETMBR R15 R0 K19 - 0x7C1C1000, // 0031 CALL R7 8 - 0x5820001A, // 0032 LDCONST R8 K26 - 0x7C140600, // 0033 CALL R5 3 - 0x8C14031B, // 0034 GETMET R5 R1 K27 - 0x581C0018, // 0035 LDCONST R7 K24 - 0x58200019, // 0036 LDCONST R8 K25 - 0x542615A3, // 0037 LDINT R9 5540 - 0x5C280800, // 0038 MOVE R10 R4 - 0x882C0112, // 0039 GETMBR R11 R0 K18 - 0x88300113, // 003A GETMBR R12 R0 K19 - 0x7C140E00, // 003B CALL R5 7 - 0x50140200, // 003C LDBOOL R5 1 0 - 0x90023805, // 003D SETMBR R0 K28 R5 - 0xB8162800, // 003E GETNGBL R5 K20 - 0x8C140B15, // 003F GETMET R5 R5 K21 - 0x8C1C0516, // 0040 GETMET R7 R2 K22 - 0x5824001D, // 0041 LDCONST R9 K29 - 0x5828001E, // 0042 LDCONST R10 K30 - 0x882C0112, // 0043 GETMBR R11 R0 K18 - 0x88300113, // 0044 GETMBR R12 R0 K19 - 0x7C1C0A00, // 0045 CALL R7 5 - 0x5820001F, // 0046 LDCONST R8 K31 - 0x7C140600, // 0047 CALL R5 3 - 0x60140008, // 0048 GETGBL R5 G8 - 0x88180108, // 0049 GETMBR R6 R0 K8 - 0x541E0FFE, // 004A LDINT R7 4095 - 0x2C180C07, // 004B AND R6 R6 R7 - 0x7C140200, // 004C CALL R5 1 - 0x00164005, // 004D ADD R5 K32 R5 - 0xB81A2800, // 004E GETNGBL R6 K20 - 0x8C180D15, // 004F GETMET R6 R6 K21 - 0x00224205, // 0050 ADD R8 K33 R5 - 0x5824001F, // 0051 LDCONST R9 K31 - 0x7C180600, // 0052 CALL R6 3 - 0x8C180322, // 0053 GETMET R6 R1 K34 - 0x58200018, // 0054 LDCONST R8 K24 - 0x58240019, // 0055 LDCONST R9 K25 - 0x88280112, // 0056 GETMBR R10 R0 K18 - 0x882C0113, // 0057 GETMBR R11 R0 K19 - 0x5C300A00, // 0058 MOVE R12 R5 - 0x7C180C00, // 0059 CALL R6 6 - 0x60180008, // 005A GETGBL R6 G8 - 0x881C0108, // 005B GETMBR R7 R0 K8 - 0x54220EFF, // 005C LDINT R8 3840 - 0x2C1C0E08, // 005D AND R7 R7 R8 - 0x54220007, // 005E LDINT R8 8 - 0x3C1C0E08, // 005F SHR R7 R7 R8 - 0x7C180200, // 0060 CALL R6 1 - 0x001A4606, // 0061 ADD R6 K35 R6 - 0x5C140C00, // 0062 MOVE R5 R6 - 0xB81A2800, // 0063 GETNGBL R6 K20 - 0x8C180D15, // 0064 GETMET R6 R6 K21 - 0x00224205, // 0065 ADD R8 K33 R5 - 0x5824001F, // 0066 LDCONST R9 K31 - 0x7C180600, // 0067 CALL R6 3 - 0x8C180322, // 0068 GETMET R6 R1 K34 - 0x58200018, // 0069 LDCONST R8 K24 - 0x58240019, // 006A LDCONST R9 K25 - 0x88280112, // 006B GETMBR R10 R0 K18 - 0x882C0113, // 006C GETMBR R11 R0 K19 - 0x5C300A00, // 006D MOVE R12 R5 - 0x7C180C00, // 006E CALL R6 6 - 0x60180008, // 006F GETGBL R6 G8 - 0x881C0104, // 0070 GETMBR R7 R0 K4 - 0x7C180200, // 0071 CALL R6 1 - 0x001A4806, // 0072 ADD R6 K36 R6 - 0x5C140C00, // 0073 MOVE R5 R6 - 0xB81A2800, // 0074 GETNGBL R6 K20 - 0x8C180D15, // 0075 GETMET R6 R6 K21 - 0x00224205, // 0076 ADD R8 K33 R5 - 0x5824001F, // 0077 LDCONST R9 K31 - 0x7C180600, // 0078 CALL R6 3 - 0x8C180322, // 0079 GETMET R6 R1 K34 - 0x58200018, // 007A LDCONST R8 K24 - 0x58240019, // 007B LDCONST R9 K25 - 0x88280112, // 007C GETMBR R10 R0 K18 - 0x882C0113, // 007D GETMBR R11 R0 K19 - 0x5C300A00, // 007E MOVE R12 R5 - 0x7C180C00, // 007F CALL R6 6 - 0x58140025, // 0080 LDCONST R5 K37 - 0xB81A2800, // 0081 GETNGBL R6 K20 - 0x8C180D15, // 0082 GETMET R6 R6 K21 - 0x00224205, // 0083 ADD R8 K33 R5 - 0x5824001F, // 0084 LDCONST R9 K31 - 0x7C180600, // 0085 CALL R6 3 - 0x8C180322, // 0086 GETMET R6 R1 K34 - 0x58200018, // 0087 LDCONST R8 K24 - 0x58240019, // 0088 LDCONST R9 K25 - 0x88280112, // 0089 GETMBR R10 R0 K18 - 0x882C0113, // 008A GETMBR R11 R0 K19 - 0x5C300A00, // 008B MOVE R12 R5 - 0x7C180C00, // 008C CALL R6 6 - 0x88140126, // 008D GETMBR R5 R0 K38 - 0x78160067, // 008E JMPF R5 #00F7 - 0xB8162800, // 008F GETNGBL R5 K20 - 0x8C140B15, // 0090 GETMET R5 R5 K21 - 0x8C1C0516, // 0091 GETMET R7 R2 K22 - 0x58240017, // 0092 LDCONST R9 K23 - 0x58280018, // 0093 LDCONST R10 K24 - 0x582C0019, // 0094 LDCONST R11 K25 - 0x543215A3, // 0095 LDINT R12 5540 - 0x60340008, // 0096 GETGBL R13 G8 - 0x5C380800, // 0097 MOVE R14 R4 - 0x7C340200, // 0098 CALL R13 1 - 0x8838010F, // 0099 GETMBR R14 R0 K15 - 0x883C0126, // 009A GETMBR R15 R0 K38 - 0x7C1C1000, // 009B CALL R7 8 - 0x5820001A, // 009C LDCONST R8 K26 - 0x7C140600, // 009D CALL R5 3 - 0x8C14031B, // 009E GETMET R5 R1 K27 - 0x581C0018, // 009F LDCONST R7 K24 - 0x58200019, // 00A0 LDCONST R8 K25 - 0x542615A3, // 00A1 LDINT R9 5540 - 0x5C280800, // 00A2 MOVE R10 R4 - 0x882C010F, // 00A3 GETMBR R11 R0 K15 - 0x88300126, // 00A4 GETMBR R12 R0 K38 - 0x7C140E00, // 00A5 CALL R5 7 - 0x50140200, // 00A6 LDBOOL R5 1 0 - 0x90024E05, // 00A7 SETMBR R0 K39 R5 - 0xB8162800, // 00A8 GETNGBL R5 K20 - 0x8C140B15, // 00A9 GETMET R5 R5 K21 - 0x8C1C0516, // 00AA GETMET R7 R2 K22 - 0x58240028, // 00AB LDCONST R9 K40 - 0x58280029, // 00AC LDCONST R10 K41 - 0x882C010F, // 00AD GETMBR R11 R0 K15 - 0x88300126, // 00AE GETMBR R12 R0 K38 - 0x7C1C0A00, // 00AF CALL R7 5 - 0x5820001F, // 00B0 LDCONST R8 K31 - 0x7C140600, // 00B1 CALL R5 3 - 0x60140008, // 00B2 GETGBL R5 G8 - 0x88180108, // 00B3 GETMBR R6 R0 K8 - 0x541E0FFE, // 00B4 LDINT R7 4095 - 0x2C180C07, // 00B5 AND R6 R6 R7 - 0x7C140200, // 00B6 CALL R5 1 - 0x00164005, // 00B7 ADD R5 K32 R5 - 0xB81A2800, // 00B8 GETNGBL R6 K20 - 0x8C180D15, // 00B9 GETMET R6 R6 K21 - 0x00224205, // 00BA ADD R8 K33 R5 - 0x5824001F, // 00BB LDCONST R9 K31 - 0x7C180600, // 00BC CALL R6 3 - 0x8C180322, // 00BD GETMET R6 R1 K34 - 0x58200018, // 00BE LDCONST R8 K24 - 0x58240019, // 00BF LDCONST R9 K25 - 0x8828010F, // 00C0 GETMBR R10 R0 K15 - 0x882C0126, // 00C1 GETMBR R11 R0 K38 - 0x5C300A00, // 00C2 MOVE R12 R5 - 0x7C180C00, // 00C3 CALL R6 6 - 0x60180008, // 00C4 GETGBL R6 G8 - 0x881C0108, // 00C5 GETMBR R7 R0 K8 - 0x54220EFF, // 00C6 LDINT R8 3840 - 0x2C1C0E08, // 00C7 AND R7 R7 R8 - 0x54220007, // 00C8 LDINT R8 8 - 0x3C1C0E08, // 00C9 SHR R7 R7 R8 - 0x7C180200, // 00CA CALL R6 1 - 0x001A4606, // 00CB ADD R6 K35 R6 - 0x5C140C00, // 00CC MOVE R5 R6 - 0xB81A2800, // 00CD GETNGBL R6 K20 - 0x8C180D15, // 00CE GETMET R6 R6 K21 - 0x00224205, // 00CF ADD R8 K33 R5 - 0x5824001F, // 00D0 LDCONST R9 K31 - 0x7C180600, // 00D1 CALL R6 3 - 0x8C180322, // 00D2 GETMET R6 R1 K34 - 0x58200018, // 00D3 LDCONST R8 K24 - 0x58240019, // 00D4 LDCONST R9 K25 - 0x8828010F, // 00D5 GETMBR R10 R0 K15 - 0x882C0126, // 00D6 GETMBR R11 R0 K38 - 0x5C300A00, // 00D7 MOVE R12 R5 - 0x7C180C00, // 00D8 CALL R6 6 - 0x60180008, // 00D9 GETGBL R6 G8 - 0x881C0104, // 00DA GETMBR R7 R0 K4 - 0x7C180200, // 00DB CALL R6 1 - 0x001A4806, // 00DC ADD R6 K36 R6 - 0x5C140C00, // 00DD MOVE R5 R6 - 0xB81A2800, // 00DE GETNGBL R6 K20 - 0x8C180D15, // 00DF GETMET R6 R6 K21 - 0x00224205, // 00E0 ADD R8 K33 R5 - 0x5824001F, // 00E1 LDCONST R9 K31 - 0x7C180600, // 00E2 CALL R6 3 - 0x8C180322, // 00E3 GETMET R6 R1 K34 - 0x58200018, // 00E4 LDCONST R8 K24 - 0x58240019, // 00E5 LDCONST R9 K25 - 0x8828010F, // 00E6 GETMBR R10 R0 K15 - 0x882C0126, // 00E7 GETMBR R11 R0 K38 - 0x5C300A00, // 00E8 MOVE R12 R5 - 0x7C180C00, // 00E9 CALL R6 6 - 0x58140025, // 00EA LDCONST R5 K37 - 0xB81A2800, // 00EB GETNGBL R6 K20 - 0x8C180D15, // 00EC GETMET R6 R6 K21 - 0x00224205, // 00ED ADD R8 K33 R5 - 0x5824001F, // 00EE LDCONST R9 K31 - 0x7C180600, // 00EF CALL R6 3 - 0x8C180322, // 00F0 GETMET R6 R1 K34 - 0x58200018, // 00F1 LDCONST R8 K24 - 0x58240019, // 00F2 LDCONST R9 K25 - 0x8828010F, // 00F3 GETMBR R10 R0 K15 - 0x882C0126, // 00F4 GETMBR R11 R0 K38 - 0x5C300A00, // 00F5 MOVE R12 R5 - 0x7C180C00, // 00F6 CALL R6 6 - 0xA8040001, // 00F7 EXBLK 1 1 - 0x70020010, // 00F8 JMP #010A - 0xAC140002, // 00F9 CATCH R5 0 2 - 0x7002000D, // 00FA JMP #0109 - 0xB81E2800, // 00FB GETNGBL R7 K20 - 0x8C1C0F15, // 00FC GETMET R7 R7 K21 - 0x60240008, // 00FD GETGBL R9 G8 - 0x5C280A00, // 00FE MOVE R10 R5 - 0x7C240200, // 00FF CALL R9 1 - 0x00265409, // 0100 ADD R9 K42 R9 - 0x0024132B, // 0101 ADD R9 R9 K43 - 0x60280008, // 0102 GETGBL R10 G8 - 0x5C2C0C00, // 0103 MOVE R11 R6 - 0x7C280200, // 0104 CALL R10 1 - 0x0024120A, // 0105 ADD R9 R9 R10 - 0x5828001F, // 0106 LDCONST R10 K31 - 0x7C1C0600, // 0107 CALL R7 3 - 0x70020000, // 0108 JMP #010A - 0xB0080000, // 0109 RAISE 2 R0 R0 - 0x80000000, // 010A RET 0 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x88100102, // 0003 GETMBR R4 R0 K2 + 0x7C0C0200, // 0004 CALL R3 1 + 0x240C0703, // 0005 GT R3 R3 K3 + 0x780E0000, // 0006 JMPF R3 #0008 + 0x80000600, // 0007 RET 0 + 0x8C0C0105, // 0008 GETMET R3 R0 K5 + 0x7C0C0200, // 0009 CALL R3 1 + 0x90020803, // 000A SETMBR R0 K4 R3 + 0xB80E0C00, // 000B GETNGBL R3 K6 + 0x8C0C0707, // 000C GETMET R3 R3 K7 + 0x60140008, // 000D GETGBL R5 G8 + 0x88180104, // 000E GETMBR R6 R0 K4 + 0x7C140200, // 000F CALL R5 1 + 0x00161005, // 0010 ADD R5 K8 R5 + 0x58180009, // 0011 LDCONST R6 K9 + 0x7C0C0600, // 0012 CALL R3 3 + 0x8C0C010A, // 0013 GETMET R3 R0 K10 + 0x88140104, // 0014 GETMBR R5 R0 K4 + 0x7C0C0400, // 0015 CALL R3 2 + 0x880C010B, // 0016 GETMBR R3 R0 K11 + 0x740E0008, // 0017 JMPT R3 #0021 + 0x880C010C, // 0018 GETMBR R3 R0 K12 + 0x8C0C070D, // 0019 GETMET R3 R3 K13 + 0x7C0C0200, // 001A CALL R3 1 + 0x240C0703, // 001B GT R3 R3 K3 + 0x780E0003, // 001C JMPF R3 #0021 + 0x500C0200, // 001D LDBOOL R3 1 0 + 0x90021603, // 001E SETMBR R0 K11 R3 + 0x8C0C010E, // 001F GETMET R3 R0 K14 + 0x7C0C0200, // 0020 CALL R3 1 + 0x80000000, // 0021 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: stop +********************************************************************/ +be_local_closure(Matter_Device_stop, /* 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(remove_driver), + /* K2 */ be_nested_str_weak(udp_server), + /* K3 */ be_nested_str_weak(stop), + }), + be_str_weak(stop), + &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 }) ) ); @@ -2410,613 +4441,396 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */ /******************************************************************** -** Solidified function: is_commissioning_open +** Solidified function: register_http_remote ********************************************************************/ -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: init -********************************************************************/ -be_local_closure(Matter_Device_init, /* name */ +be_local_closure(Matter_Device_register_http_remote, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(http_remotes), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(get_timeout), + /* K3 */ be_nested_str_weak(set_timeout), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(HTTP_remote), + }), + be_str_weak(register_http_remote), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x4C100000, // 0001 LDNIL R4 + 0x1C0C0604, // 0002 EQ R3 R3 R4 + 0x780E0002, // 0003 JMPF R3 #0007 + 0x600C0013, // 0004 GETGBL R3 G19 + 0x7C0C0000, // 0005 CALL R3 0 + 0x90020003, // 0006 SETMBR R0 K0 R3 + 0x4C0C0000, // 0007 LDNIL R3 + 0x88100100, // 0008 GETMBR R4 R0 K0 + 0x8C100901, // 0009 GETMET R4 R4 K1 + 0x5C180200, // 000A MOVE R6 R1 + 0x7C100400, // 000B CALL R4 2 + 0x78120009, // 000C JMPF R4 #0017 + 0x88100100, // 000D GETMBR R4 R0 K0 + 0x940C0801, // 000E GETIDX R3 R4 R1 + 0x8C140702, // 000F GETMET R5 R3 K2 + 0x7C140200, // 0010 CALL R5 1 + 0x14140405, // 0011 LT R5 R2 R5 + 0x78160002, // 0012 JMPF R5 #0016 + 0x8C140703, // 0013 GETMET R5 R3 K3 + 0x5C1C0400, // 0014 MOVE R7 R2 + 0x7C140400, // 0015 CALL R5 2 + 0x70020007, // 0016 JMP #001F + 0xB8120800, // 0017 GETNGBL R4 K4 + 0x8C100905, // 0018 GETMET R4 R4 K5 + 0x5C180200, // 0019 MOVE R6 R1 + 0x5C1C0400, // 001A MOVE R7 R2 + 0x7C100600, // 001B CALL R4 3 + 0x5C0C0800, // 001C MOVE R3 R4 + 0x88100100, // 001D GETMBR R4 R0 K0 + 0x98100203, // 001E SETIDX R4 R1 R3 + 0x80040600, // 001F RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: mdns_announce_PASE +********************************************************************/ +be_local_closure(Matter_Device_mdns_announce_PASE, /* name */ + be_nested_proto( + 16, /* 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(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(_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 - }) - ), - 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 - }) - ), - }), + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[41]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), + ( &(const bvalue[44]) { /* constants */ + /* K0 */ be_nested_str_weak(mdns), /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(get_option), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(MATTER_OPTION), - /* K6 */ be_nested_str_weak(UI), - /* K7 */ be_nested_str_weak(started), - /* K8 */ be_nested_str_weak(tick), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(plugins), - /* K11 */ be_nested_str_weak(plugins_persist), - /* K12 */ be_nested_str_weak(plugins_classes), - /* K13 */ be_nested_str_weak(register_native_classes), - /* K14 */ be_nested_str_weak(vendorid), - /* K15 */ be_nested_str_weak(VENDOR_ID), - /* K16 */ be_nested_str_weak(productid), - /* K17 */ be_nested_str_weak(PRODUCT_ID), - /* K18 */ be_nested_str_weak(root_iterations), - /* K19 */ be_nested_str_weak(PBKDF_ITERATIONS), - /* K20 */ be_nested_str_weak(root_salt), - /* K21 */ be_nested_str_weak(random), - /* K22 */ be_nested_str_weak(ipv4only), - /* K23 */ be_nested_str_weak(load_param), - /* K24 */ be_nested_str_weak(sessions), - /* K25 */ be_nested_str_weak(Session_Store), - /* K26 */ be_nested_str_weak(load_fabrics), - /* K27 */ be_nested_str_weak(message_handler), - /* K28 */ be_nested_str_weak(MessageHandler), - /* K29 */ be_nested_str_weak(ui), - /* K30 */ be_nested_str_weak(wifi), - /* K31 */ be_nested_str_weak(up), - /* K32 */ be_nested_str_weak(eth), - /* K33 */ be_nested_str_weak(start), - /* K34 */ be_nested_str_weak(add_rule), - /* K35 */ be_nested_str_weak(Wifi_X23Connected), - /* K36 */ be_nested_str_weak(matter_start), - /* K37 */ be_nested_str_weak(Eth_X23Connected), - /* K38 */ be_nested_str_weak(_init_basic_commissioning), - /* K39 */ be_nested_str_weak(add_driver), - /* K40 */ be_nested_str_weak(register_commands), + /* K2 */ be_nested_str_weak(crypto), + /* K3 */ be_nested_str_weak(VP), + /* K4 */ be_nested_str_weak(vendorid), + /* K5 */ be_nested_str_weak(_X2B), + /* K6 */ be_nested_str_weak(productid), + /* K7 */ be_nested_str_weak(D), + /* K8 */ be_nested_str_weak(commissioning_discriminator), + /* K9 */ be_nested_str_weak(CM), + /* K10 */ be_const_int(1), + /* K11 */ be_nested_str_weak(T), + /* K12 */ be_const_int(0), + /* K13 */ be_nested_str_weak(SII), + /* K14 */ be_nested_str_weak(SAI), + /* K15 */ be_nested_str_weak(commissioning_instance_wifi), + /* K16 */ be_nested_str_weak(random), + /* K17 */ be_nested_str_weak(tohex), + /* K18 */ be_nested_str_weak(commissioning_instance_eth), + /* K19 */ be_nested_str_weak(hostname_eth), + /* K20 */ be_nested_str_weak(tasmota), + /* K21 */ be_nested_str_weak(log), + /* K22 */ be_nested_str_weak(format), + /* K23 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25i_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), + /* K24 */ be_nested_str_weak(_matterc), + /* K25 */ be_nested_str_weak(_udp), + /* K26 */ be_const_int(3), + /* K27 */ be_nested_str_weak(add_service), + /* K28 */ be_nested_str_weak(mdns_pase_eth), + /* K29 */ be_nested_str_weak(MTR_X3A_X20announce_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), + /* K30 */ be_nested_str_weak(eth), + /* K31 */ be_const_int(2), + /* K32 */ be_nested_str_weak(_L), + /* K33 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20), + /* K34 */ be_nested_str_weak(add_subtype), + /* K35 */ be_nested_str_weak(_S), + /* K36 */ be_nested_str_weak(_V), + /* K37 */ be_nested_str_weak(_CM1), + /* K38 */ be_nested_str_weak(hostname_wifi), + /* K39 */ be_nested_str_weak(mdns_pase_wifi), + /* K40 */ be_nested_str_weak(MTR_X3A_X20starting_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60), + /* K41 */ be_nested_str_weak(wifi), + /* K42 */ be_nested_str_weak(MTR_X3A_X20Exception), + /* K43 */ be_nested_str_weak(_X7C), }), - be_str_weak(init), + be_str_weak(mdns_announce_PASE), &be_const_str_solidified, - ( &(const binstruction[102]) { /* code */ + ( &(const binstruction[267]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 - 0xB80E0400, // 0002 GETNGBL R3 K2 - 0x8C0C0703, // 0003 GETMET R3 R3 K3 - 0xB8160800, // 0004 GETNGBL R5 K4 - 0x88140B05, // 0005 GETMBR R5 R5 K5 - 0x7C0C0400, // 0006 CALL R3 2 - 0x740E0004, // 0007 JMPT R3 #000D - 0xB80E0800, // 0008 GETNGBL R3 K4 - 0x8C0C0706, // 0009 GETMET R3 R3 K6 - 0x5C140000, // 000A MOVE R5 R0 - 0x7C0C0400, // 000B CALL R3 2 - 0x80000600, // 000C RET 0 - 0x500C0000, // 000D LDBOOL R3 0 0 - 0x90020E03, // 000E SETMBR R0 K7 R3 - 0x90021109, // 000F SETMBR R0 K8 K9 - 0x600C0012, // 0010 GETGBL R3 G18 - 0x7C0C0000, // 0011 CALL R3 0 - 0x90021403, // 0012 SETMBR R0 K10 R3 - 0x500C0000, // 0013 LDBOOL R3 0 0 - 0x90021603, // 0014 SETMBR R0 K11 R3 - 0x600C0013, // 0015 GETGBL R3 G19 - 0x7C0C0000, // 0016 CALL R3 0 - 0x90021803, // 0017 SETMBR R0 K12 R3 - 0x8C0C010D, // 0018 GETMET R3 R0 K13 - 0x7C0C0200, // 0019 CALL R3 1 - 0x880C010F, // 001A GETMBR R3 R0 K15 - 0x90021C03, // 001B SETMBR R0 K14 R3 - 0x880C0111, // 001C GETMBR R3 R0 K17 - 0x90022003, // 001D SETMBR R0 K16 R3 - 0x880C0113, // 001E GETMBR R3 R0 K19 - 0x90022403, // 001F SETMBR R0 K18 R3 - 0x8C0C0315, // 0020 GETMET R3 R1 K21 - 0x5416000F, // 0021 LDINT R5 16 - 0x7C0C0400, // 0022 CALL R3 2 - 0x90022803, // 0023 SETMBR R0 K20 R3 - 0x500C0000, // 0024 LDBOOL R3 0 0 - 0x90022C03, // 0025 SETMBR R0 K22 R3 - 0x8C0C0117, // 0026 GETMET R3 R0 K23 - 0x7C0C0200, // 0027 CALL R3 1 - 0xB80E0800, // 0028 GETNGBL R3 K4 - 0x8C0C0719, // 0029 GETMET R3 R3 K25 - 0x5C140000, // 002A MOVE R5 R0 - 0x7C0C0400, // 002B CALL R3 2 - 0x90023003, // 002C SETMBR R0 K24 R3 - 0x880C0118, // 002D GETMBR R3 R0 K24 - 0x8C0C071A, // 002E GETMET R3 R3 K26 - 0x7C0C0200, // 002F CALL R3 1 - 0xB80E0800, // 0030 GETNGBL R3 K4 - 0x8C0C071C, // 0031 GETMET R3 R3 K28 - 0x5C140000, // 0032 MOVE R5 R0 - 0x7C0C0400, // 0033 CALL R3 2 - 0x90023603, // 0034 SETMBR R0 K27 R3 - 0xB80E0800, // 0035 GETNGBL R3 K4 - 0x8C0C0706, // 0036 GETMET R3 R3 K6 - 0x5C140000, // 0037 MOVE R5 R0 - 0x7C0C0400, // 0038 CALL R3 2 - 0x90023A03, // 0039 SETMBR R0 K29 R3 - 0xB80E0400, // 003A GETNGBL R3 K2 - 0x8C0C071E, // 003B GETMET R3 R3 K30 - 0x7C0C0200, // 003C CALL R3 1 - 0x940C071F, // 003D GETIDX R3 R3 K31 - 0x740E0004, // 003E JMPT R3 #0044 - 0xB80E0400, // 003F GETNGBL R3 K2 - 0x8C0C0720, // 0040 GETMET R3 R3 K32 - 0x7C0C0200, // 0041 CALL R3 1 - 0x940C071F, // 0042 GETIDX R3 R3 K31 - 0x780E0001, // 0043 JMPF R3 #0046 - 0x8C0C0121, // 0044 GETMET R3 R0 K33 - 0x7C0C0200, // 0045 CALL R3 1 - 0xB80E0400, // 0046 GETNGBL R3 K2 - 0x8C0C071E, // 0047 GETMET R3 R3 K30 - 0x7C0C0200, // 0048 CALL R3 1 - 0x940C071F, // 0049 GETIDX R3 R3 K31 - 0x740E0005, // 004A JMPT R3 #0051 - 0xB80E0400, // 004B GETNGBL R3 K2 - 0x8C0C0722, // 004C GETMET R3 R3 K34 - 0x58140023, // 004D LDCONST R5 K35 - 0x84180000, // 004E CLOSURE R6 P0 - 0x581C0024, // 004F LDCONST R7 K36 - 0x7C0C0800, // 0050 CALL R3 4 - 0xB80E0400, // 0051 GETNGBL R3 K2 - 0x8C0C0720, // 0052 GETMET R3 R3 K32 - 0x7C0C0200, // 0053 CALL R3 1 - 0x940C071F, // 0054 GETIDX R3 R3 K31 - 0x740E0005, // 0055 JMPT R3 #005C - 0xB80E0400, // 0056 GETNGBL R3 K2 - 0x8C0C0722, // 0057 GETMET R3 R3 K34 - 0x58140025, // 0058 LDCONST R5 K37 - 0x84180001, // 0059 CLOSURE R6 P1 - 0x581C0024, // 005A LDCONST R7 K36 - 0x7C0C0800, // 005B CALL R3 4 - 0x8C0C0126, // 005C GETMET R3 R0 K38 - 0x7C0C0200, // 005D CALL R3 1 - 0xB80E0400, // 005E GETNGBL R3 K2 - 0x8C0C0727, // 005F GETMET R3 R3 K39 - 0x5C140000, // 0060 MOVE R5 R0 - 0x7C0C0400, // 0061 CALL R3 2 - 0x8C0C0128, // 0062 GETMET R3 R0 K40 - 0x7C0C0200, // 0063 CALL R3 1 - 0xA0000000, // 0064 CLOSE R0 - 0x80000000, // 0065 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: mdns_remove_op_discovery -********************************************************************/ -be_local_closure(Matter_Device_mdns_remove_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[24]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(get_device_id), - /* K3 */ be_nested_str_weak(copy), - /* K4 */ be_nested_str_weak(reverse), - /* K5 */ be_nested_str_weak(get_fabric_compressed), - /* K6 */ be_nested_str_weak(tohex), - /* K7 */ be_nested_str_weak(_X2D), - /* K8 */ be_nested_str_weak(tasmota), - /* K9 */ be_nested_str_weak(eth), - /* K10 */ be_nested_str_weak(find), - /* K11 */ be_nested_str_weak(up), - /* K12 */ be_nested_str_weak(log), - /* K13 */ be_nested_str_weak(format), - /* K14 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), - /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_weak(remove_service), - /* K17 */ be_nested_str_weak(_matter), - /* K18 */ be_nested_str_weak(_tcp), - /* K19 */ be_nested_str_weak(hostname_eth), - /* K20 */ be_nested_str_weak(wifi), - /* K21 */ be_nested_str_weak(hostname_wifi), - /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K23 */ be_nested_str_weak(_X7C), - }), - be_str_weak(mdns_remove_op_discovery), - &be_const_str_solidified, - ( &(const binstruction[81]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0xA802003B, // 0002 EXBLK 0 #003F - 0x8C100302, // 0003 GETMET R4 R1 K2 - 0x7C100200, // 0004 CALL R4 1 - 0x8C100903, // 0005 GETMET R4 R4 K3 - 0x7C100200, // 0006 CALL R4 1 - 0x8C100904, // 0007 GETMET R4 R4 K4 - 0x7C100200, // 0008 CALL R4 1 - 0x8C140305, // 0009 GETMET R5 R1 K5 - 0x7C140200, // 000A CALL R5 1 - 0x8C180B06, // 000B GETMET R6 R5 K6 - 0x7C180200, // 000C CALL R6 1 - 0x00180D07, // 000D ADD R6 R6 K7 - 0x8C1C0906, // 000E GETMET R7 R4 K6 - 0x7C1C0200, // 000F CALL R7 1 - 0x00180C07, // 0010 ADD R6 R6 R7 - 0xB81E1000, // 0011 GETNGBL R7 K8 - 0x8C1C0F09, // 0012 GETMET R7 R7 K9 - 0x7C1C0200, // 0013 CALL R7 1 - 0x8C1C0F0A, // 0014 GETMET R7 R7 K10 - 0x5824000B, // 0015 LDCONST R9 K11 - 0x7C1C0400, // 0016 CALL R7 2 - 0x781E000E, // 0017 JMPF R7 #0027 - 0xB81E1000, // 0018 GETNGBL R7 K8 - 0x8C1C0F0C, // 0019 GETMET R7 R7 K12 - 0x8C24070D, // 001A GETMET R9 R3 K13 - 0x582C000E, // 001B LDCONST R11 K14 - 0x58300009, // 001C LDCONST R12 K9 - 0x5C340C00, // 001D MOVE R13 R6 - 0x7C240800, // 001E CALL R9 4 - 0x5828000F, // 001F LDCONST R10 K15 - 0x7C1C0600, // 0020 CALL R7 3 - 0x8C1C0510, // 0021 GETMET R7 R2 K16 - 0x58240011, // 0022 LDCONST R9 K17 - 0x58280012, // 0023 LDCONST R10 K18 - 0x5C2C0C00, // 0024 MOVE R11 R6 - 0x88300113, // 0025 GETMBR R12 R0 K19 - 0x7C1C0A00, // 0026 CALL R7 5 - 0xB81E1000, // 0027 GETNGBL R7 K8 - 0x8C1C0F14, // 0028 GETMET R7 R7 K20 - 0x7C1C0200, // 0029 CALL R7 1 - 0x8C1C0F0A, // 002A GETMET R7 R7 K10 - 0x5824000B, // 002B LDCONST R9 K11 - 0x7C1C0400, // 002C CALL R7 2 - 0x781E000E, // 002D JMPF R7 #003D - 0xB81E1000, // 002E GETNGBL R7 K8 - 0x8C1C0F0C, // 002F GETMET R7 R7 K12 - 0x8C24070D, // 0030 GETMET R9 R3 K13 - 0x582C000E, // 0031 LDCONST R11 K14 - 0x58300014, // 0032 LDCONST R12 K20 - 0x5C340C00, // 0033 MOVE R13 R6 - 0x7C240800, // 0034 CALL R9 4 - 0x5828000F, // 0035 LDCONST R10 K15 - 0x7C1C0600, // 0036 CALL R7 3 - 0x8C1C0510, // 0037 GETMET R7 R2 K16 - 0x58240011, // 0038 LDCONST R9 K17 - 0x58280012, // 0039 LDCONST R10 K18 - 0x5C2C0C00, // 003A MOVE R11 R6 - 0x88300115, // 003B GETMBR R12 R0 K21 - 0x7C1C0A00, // 003C CALL R7 5 - 0xA8040001, // 003D EXBLK 1 1 - 0x70020010, // 003E JMP #0050 - 0xAC100002, // 003F CATCH R4 0 2 - 0x7002000D, // 0040 JMP #004F - 0xB81A1000, // 0041 GETNGBL R6 K8 - 0x8C180D0C, // 0042 GETMET R6 R6 K12 - 0x60200008, // 0043 GETGBL R8 G8 - 0x5C240800, // 0044 MOVE R9 R4 - 0x7C200200, // 0045 CALL R8 1 - 0x00222C08, // 0046 ADD R8 K22 R8 - 0x00201117, // 0047 ADD R8 R8 K23 - 0x60240008, // 0048 GETGBL R9 G8 - 0x5C280A00, // 0049 MOVE R10 R5 - 0x7C240200, // 004A CALL R9 1 - 0x00201009, // 004B ADD R8 R8 R9 - 0x5824000F, // 004C LDCONST R9 K15 - 0x7C180600, // 004D CALL R6 3 - 0x70020000, // 004E JMP #0050 - 0xB0080000, // 004F RAISE 2 R0 R0 - 0x80000000, // 0050 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _mdns_announce_hostname -********************************************************************/ -be_local_closure(Matter_Device__mdns_announce_hostname, /* name */ - be_nested_proto( - 16, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[28]) { /* 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_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(log), - /* K13 */ be_nested_str_weak(format), - /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), - /* K15 */ be_nested_str_weak(ip6local), - /* K16 */ be_nested_str_weak(ip), - /* K17 */ be_const_int(3), - /* K18 */ be_nested_str_weak(add_hostname), - /* K19 */ be_nested_str_weak(ip6), - /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29), - /* K21 */ be_nested_str_weak(wifi), - /* K22 */ be_nested_str_weak(hostname_wifi), - /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27), - /* K24 */ be_const_int(2), - /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K26 */ be_nested_str_weak(_X7C), - /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics), - }), - be_str_weak(_mdns_announce_hostname), - &be_const_str_solidified, - ( &(const binstruction[172]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0x8C100502, // 0002 GETMET R4 R2 K2 - 0x7C100200, // 0003 CALL R4 1 - 0xA8020092, // 0004 EXBLK 0 #0098 - 0x78060040, // 0005 JMPF R1 #0047 - 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 - 0x7416001F, // 0012 JMPT R5 #0033 - 0xB8160600, // 0013 GETNGBL R5 K3 - 0x8C140B0C, // 0014 GETMET R5 R5 K12 - 0x8C1C070D, // 0015 GETMET R7 R3 K13 - 0x5824000E, // 0016 LDCONST R9 K14 - 0x88280105, // 0017 GETMBR R10 R0 K5 - 0x8C2C0907, // 0018 GETMET R11 R4 K7 - 0x5834000F, // 0019 LDCONST R13 K15 - 0x5838000A, // 001A LDCONST R14 K10 - 0x7C2C0600, // 001B CALL R11 3 - 0x8C300907, // 001C GETMET R12 R4 K7 - 0x58380010, // 001D LDCONST R14 K16 - 0x583C000A, // 001E LDCONST R15 K10 - 0x7C300600, // 001F CALL R12 3 - 0x7C1C0A00, // 0020 CALL R7 5 - 0x58200011, // 0021 LDCONST R8 K17 - 0x7C140600, // 0022 CALL R5 3 - 0x8C140512, // 0023 GETMET R5 R2 K18 - 0x881C0105, // 0024 GETMBR R7 R0 K5 - 0x8C200907, // 0025 GETMET R8 R4 K7 - 0x5828000F, // 0026 LDCONST R10 K15 - 0x582C000A, // 0027 LDCONST R11 K10 - 0x7C200600, // 0028 CALL R8 3 - 0x8C240907, // 0029 GETMET R9 R4 K7 - 0x582C0010, // 002A LDCONST R11 K16 - 0x5830000A, // 002B LDCONST R12 K10 - 0x7C240600, // 002C CALL R9 3 - 0x8C280907, // 002D GETMET R10 R4 K7 - 0x58300013, // 002E LDCONST R12 K19 - 0x5834000A, // 002F LDCONST R13 K10 - 0x7C280600, // 0030 CALL R10 3 - 0x7C140A00, // 0031 CALL R5 5 - 0x70020012, // 0032 JMP #0046 - 0xB8160600, // 0033 GETNGBL R5 K3 - 0x8C140B0C, // 0034 GETMET R5 R5 K12 - 0x8C1C070D, // 0035 GETMET R7 R3 K13 - 0x58240014, // 0036 LDCONST R9 K20 - 0x88280105, // 0037 GETMBR R10 R0 K5 - 0x8C2C0907, // 0038 GETMET R11 R4 K7 - 0x58340010, // 0039 LDCONST R13 K16 - 0x5838000A, // 003A LDCONST R14 K10 - 0x7C2C0600, // 003B CALL R11 3 - 0x7C1C0800, // 003C CALL R7 4 - 0x58200011, // 003D LDCONST R8 K17 - 0x7C140600, // 003E CALL R5 3 - 0x8C140512, // 003F GETMET R5 R2 K18 - 0x881C0105, // 0040 GETMBR R7 R0 K5 - 0x8C200907, // 0041 GETMET R8 R4 K7 - 0x58280010, // 0042 LDCONST R10 K16 - 0x582C000A, // 0043 LDCONST R11 K10 - 0x7C200600, // 0044 CALL R8 3 - 0x7C140600, // 0045 CALL R5 3 - 0x7002003F, // 0046 JMP #0087 - 0xB8120600, // 0047 GETNGBL R4 K3 - 0x8C100915, // 0048 GETMET R4 R4 K21 - 0x7C100200, // 0049 CALL R4 1 - 0x8C140706, // 004A GETMET R5 R3 K6 - 0x8C1C0907, // 004B GETMET R7 R4 K7 - 0x58240008, // 004C LDCONST R9 K8 - 0x7C1C0400, // 004D CALL R7 2 - 0x58200009, // 004E LDCONST R8 K9 - 0x5824000A, // 004F LDCONST R9 K10 - 0x7C140800, // 0050 CALL R5 4 - 0x90022C05, // 0051 SETMBR R0 K22 R5 - 0x8814010B, // 0052 GETMBR R5 R0 K11 - 0x7416001F, // 0053 JMPT R5 #0074 - 0xB8160600, // 0054 GETNGBL R5 K3 - 0x8C140B0C, // 0055 GETMET R5 R5 K12 - 0x8C1C070D, // 0056 GETMET R7 R3 K13 - 0x5824000E, // 0057 LDCONST R9 K14 - 0x88280116, // 0058 GETMBR R10 R0 K22 - 0x8C2C0907, // 0059 GETMET R11 R4 K7 - 0x5834000F, // 005A LDCONST R13 K15 - 0x5838000A, // 005B LDCONST R14 K10 - 0x7C2C0600, // 005C CALL R11 3 - 0x8C300907, // 005D GETMET R12 R4 K7 - 0x58380010, // 005E LDCONST R14 K16 - 0x583C000A, // 005F LDCONST R15 K10 - 0x7C300600, // 0060 CALL R12 3 - 0x7C1C0A00, // 0061 CALL R7 5 - 0x58200011, // 0062 LDCONST R8 K17 - 0x7C140600, // 0063 CALL R5 3 - 0x8C140512, // 0064 GETMET R5 R2 K18 - 0x881C0116, // 0065 GETMBR R7 R0 K22 - 0x8C200907, // 0066 GETMET R8 R4 K7 - 0x5828000F, // 0067 LDCONST R10 K15 - 0x582C000A, // 0068 LDCONST R11 K10 - 0x7C200600, // 0069 CALL R8 3 - 0x8C240907, // 006A GETMET R9 R4 K7 - 0x582C0010, // 006B LDCONST R11 K16 - 0x5830000A, // 006C LDCONST R12 K10 - 0x7C240600, // 006D CALL R9 3 - 0x8C280907, // 006E GETMET R10 R4 K7 - 0x58300013, // 006F LDCONST R12 K19 - 0x5834000A, // 0070 LDCONST R13 K10 - 0x7C280600, // 0071 CALL R10 3 - 0x7C140A00, // 0072 CALL R5 5 - 0x70020012, // 0073 JMP #0087 - 0xB8160600, // 0074 GETNGBL R5 K3 - 0x8C140B0C, // 0075 GETMET R5 R5 K12 - 0x8C1C070D, // 0076 GETMET R7 R3 K13 - 0x58240014, // 0077 LDCONST R9 K20 - 0x88280105, // 0078 GETMBR R10 R0 K5 - 0x8C2C0907, // 0079 GETMET R11 R4 K7 - 0x58340010, // 007A LDCONST R13 K16 - 0x5838000A, // 007B LDCONST R14 K10 - 0x7C2C0600, // 007C CALL R11 3 - 0x7C1C0800, // 007D CALL R7 4 - 0x58200011, // 007E LDCONST R8 K17 - 0x7C140600, // 007F CALL R5 3 - 0x8C140512, // 0080 GETMET R5 R2 K18 - 0x881C0116, // 0081 GETMBR R7 R0 K22 - 0x8C200907, // 0082 GETMET R8 R4 K7 - 0x58280010, // 0083 LDCONST R10 K16 - 0x582C000A, // 0084 LDCONST R11 K10 - 0x7C200600, // 0085 CALL R8 3 - 0x7C140600, // 0086 CALL R5 3 - 0xB8120600, // 0087 GETNGBL R4 K3 - 0x8C10090C, // 0088 GETMET R4 R4 K12 - 0x8C18070D, // 0089 GETMET R6 R3 K13 - 0x58200017, // 008A LDCONST R8 K23 - 0x78060001, // 008B JMPF R1 #008E - 0x58240004, // 008C LDCONST R9 K4 - 0x70020000, // 008D JMP #008F - 0x58240015, // 008E LDCONST R9 K21 - 0x78060001, // 008F JMPF R1 #0092 - 0x88280105, // 0090 GETMBR R10 R0 K5 - 0x70020000, // 0091 JMP #0093 - 0x88280116, // 0092 GETMBR R10 R0 K22 - 0x7C180800, // 0093 CALL R6 4 - 0x581C0018, // 0094 LDCONST R7 K24 - 0x7C100600, // 0095 CALL R4 3 - 0xA8040001, // 0096 EXBLK 1 1 - 0x70020010, // 0097 JMP #00A9 - 0xAC100002, // 0098 CATCH R4 0 2 - 0x7002000D, // 0099 JMP #00A8 - 0xB81A0600, // 009A GETNGBL R6 K3 - 0x8C180D0C, // 009B GETMET R6 R6 K12 - 0x60200008, // 009C GETGBL R8 G8 - 0x5C240800, // 009D MOVE R9 R4 - 0x7C200200, // 009E CALL R8 1 - 0x00223208, // 009F ADD R8 K25 R8 - 0x0020111A, // 00A0 ADD R8 R8 K26 - 0x60240008, // 00A1 GETGBL R9 G8 - 0x5C280A00, // 00A2 MOVE R10 R5 - 0x7C240200, // 00A3 CALL R9 1 - 0x00201009, // 00A4 ADD R8 R8 R9 - 0x58240018, // 00A5 LDCONST R9 K24 - 0x7C180600, // 00A6 CALL R6 3 - 0x70020000, // 00A7 JMP #00A9 - 0xB0080000, // 00A8 RAISE 2 R0 R0 - 0x8C10011B, // 00A9 GETMET R4 R0 K27 - 0x7C100200, // 00AA CALL R4 1 - 0x80000000, // 00AB RET 0 + 0xA40E0400, // 0002 IMPORT R3 K2 + 0x60100013, // 0003 GETGBL R4 G19 + 0x7C100000, // 0004 CALL R4 0 + 0x60140008, // 0005 GETGBL R5 G8 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x7C140200, // 0007 CALL R5 1 + 0x00140B05, // 0008 ADD R5 R5 K5 + 0x60180008, // 0009 GETGBL R6 G8 + 0x881C0106, // 000A GETMBR R7 R0 K6 + 0x7C180200, // 000B CALL R6 1 + 0x00140A06, // 000C ADD R5 R5 R6 + 0x98120605, // 000D SETIDX R4 K3 R5 + 0x88140108, // 000E GETMBR R5 R0 K8 + 0x98120E05, // 000F SETIDX R4 K7 R5 + 0x9812130A, // 0010 SETIDX R4 K9 K10 + 0x9812170C, // 0011 SETIDX R4 K11 K12 + 0x54161387, // 0012 LDINT R5 5000 + 0x98121A05, // 0013 SETIDX R4 K13 R5 + 0x5416012B, // 0014 LDINT R5 300 + 0x98121C05, // 0015 SETIDX R4 K14 R5 + 0x8C140710, // 0016 GETMET R5 R3 K16 + 0x541E0007, // 0017 LDINT R7 8 + 0x7C140400, // 0018 CALL R5 2 + 0x8C140B11, // 0019 GETMET R5 R5 K17 + 0x7C140200, // 001A CALL R5 1 + 0x90021E05, // 001B SETMBR R0 K15 R5 + 0x8C140710, // 001C GETMET R5 R3 K16 + 0x541E0007, // 001D LDINT R7 8 + 0x7C140400, // 001E CALL R5 2 + 0x8C140B11, // 001F GETMET R5 R5 K17 + 0x7C140200, // 0020 CALL R5 1 + 0x90022405, // 0021 SETMBR R0 K18 R5 + 0xA80200D5, // 0022 EXBLK 0 #00F9 + 0x88140113, // 0023 GETMBR R5 R0 K19 + 0x78160067, // 0024 JMPF R5 #008D + 0xB8162800, // 0025 GETNGBL R5 K20 + 0x8C140B15, // 0026 GETMET R5 R5 K21 + 0x8C1C0516, // 0027 GETMET R7 R2 K22 + 0x58240017, // 0028 LDCONST R9 K23 + 0x58280018, // 0029 LDCONST R10 K24 + 0x582C0019, // 002A LDCONST R11 K25 + 0x543215A3, // 002B LDINT R12 5540 + 0x60340008, // 002C GETGBL R13 G8 + 0x5C380800, // 002D MOVE R14 R4 + 0x7C340200, // 002E CALL R13 1 + 0x88380112, // 002F GETMBR R14 R0 K18 + 0x883C0113, // 0030 GETMBR R15 R0 K19 + 0x7C1C1000, // 0031 CALL R7 8 + 0x5820001A, // 0032 LDCONST R8 K26 + 0x7C140600, // 0033 CALL R5 3 + 0x8C14031B, // 0034 GETMET R5 R1 K27 + 0x581C0018, // 0035 LDCONST R7 K24 + 0x58200019, // 0036 LDCONST R8 K25 + 0x542615A3, // 0037 LDINT R9 5540 + 0x5C280800, // 0038 MOVE R10 R4 + 0x882C0112, // 0039 GETMBR R11 R0 K18 + 0x88300113, // 003A GETMBR R12 R0 K19 + 0x7C140E00, // 003B CALL R5 7 + 0x50140200, // 003C LDBOOL R5 1 0 + 0x90023805, // 003D SETMBR R0 K28 R5 + 0xB8162800, // 003E GETNGBL R5 K20 + 0x8C140B15, // 003F GETMET R5 R5 K21 + 0x8C1C0516, // 0040 GETMET R7 R2 K22 + 0x5824001D, // 0041 LDCONST R9 K29 + 0x5828001E, // 0042 LDCONST R10 K30 + 0x882C0112, // 0043 GETMBR R11 R0 K18 + 0x88300113, // 0044 GETMBR R12 R0 K19 + 0x7C1C0A00, // 0045 CALL R7 5 + 0x5820001F, // 0046 LDCONST R8 K31 + 0x7C140600, // 0047 CALL R5 3 + 0x60140008, // 0048 GETGBL R5 G8 + 0x88180108, // 0049 GETMBR R6 R0 K8 + 0x541E0FFE, // 004A LDINT R7 4095 + 0x2C180C07, // 004B AND R6 R6 R7 + 0x7C140200, // 004C CALL R5 1 + 0x00164005, // 004D ADD R5 K32 R5 + 0xB81A2800, // 004E GETNGBL R6 K20 + 0x8C180D15, // 004F GETMET R6 R6 K21 + 0x00224205, // 0050 ADD R8 K33 R5 + 0x5824001F, // 0051 LDCONST R9 K31 + 0x7C180600, // 0052 CALL R6 3 + 0x8C180322, // 0053 GETMET R6 R1 K34 + 0x58200018, // 0054 LDCONST R8 K24 + 0x58240019, // 0055 LDCONST R9 K25 + 0x88280112, // 0056 GETMBR R10 R0 K18 + 0x882C0113, // 0057 GETMBR R11 R0 K19 + 0x5C300A00, // 0058 MOVE R12 R5 + 0x7C180C00, // 0059 CALL R6 6 + 0x60180008, // 005A GETGBL R6 G8 + 0x881C0108, // 005B GETMBR R7 R0 K8 + 0x54220EFF, // 005C LDINT R8 3840 + 0x2C1C0E08, // 005D AND R7 R7 R8 + 0x54220007, // 005E LDINT R8 8 + 0x3C1C0E08, // 005F SHR R7 R7 R8 + 0x7C180200, // 0060 CALL R6 1 + 0x001A4606, // 0061 ADD R6 K35 R6 + 0x5C140C00, // 0062 MOVE R5 R6 + 0xB81A2800, // 0063 GETNGBL R6 K20 + 0x8C180D15, // 0064 GETMET R6 R6 K21 + 0x00224205, // 0065 ADD R8 K33 R5 + 0x5824001F, // 0066 LDCONST R9 K31 + 0x7C180600, // 0067 CALL R6 3 + 0x8C180322, // 0068 GETMET R6 R1 K34 + 0x58200018, // 0069 LDCONST R8 K24 + 0x58240019, // 006A LDCONST R9 K25 + 0x88280112, // 006B GETMBR R10 R0 K18 + 0x882C0113, // 006C GETMBR R11 R0 K19 + 0x5C300A00, // 006D MOVE R12 R5 + 0x7C180C00, // 006E CALL R6 6 + 0x60180008, // 006F GETGBL R6 G8 + 0x881C0104, // 0070 GETMBR R7 R0 K4 + 0x7C180200, // 0071 CALL R6 1 + 0x001A4806, // 0072 ADD R6 K36 R6 + 0x5C140C00, // 0073 MOVE R5 R6 + 0xB81A2800, // 0074 GETNGBL R6 K20 + 0x8C180D15, // 0075 GETMET R6 R6 K21 + 0x00224205, // 0076 ADD R8 K33 R5 + 0x5824001F, // 0077 LDCONST R9 K31 + 0x7C180600, // 0078 CALL R6 3 + 0x8C180322, // 0079 GETMET R6 R1 K34 + 0x58200018, // 007A LDCONST R8 K24 + 0x58240019, // 007B LDCONST R9 K25 + 0x88280112, // 007C GETMBR R10 R0 K18 + 0x882C0113, // 007D GETMBR R11 R0 K19 + 0x5C300A00, // 007E MOVE R12 R5 + 0x7C180C00, // 007F CALL R6 6 + 0x58140025, // 0080 LDCONST R5 K37 + 0xB81A2800, // 0081 GETNGBL R6 K20 + 0x8C180D15, // 0082 GETMET R6 R6 K21 + 0x00224205, // 0083 ADD R8 K33 R5 + 0x5824001F, // 0084 LDCONST R9 K31 + 0x7C180600, // 0085 CALL R6 3 + 0x8C180322, // 0086 GETMET R6 R1 K34 + 0x58200018, // 0087 LDCONST R8 K24 + 0x58240019, // 0088 LDCONST R9 K25 + 0x88280112, // 0089 GETMBR R10 R0 K18 + 0x882C0113, // 008A GETMBR R11 R0 K19 + 0x5C300A00, // 008B MOVE R12 R5 + 0x7C180C00, // 008C CALL R6 6 + 0x88140126, // 008D GETMBR R5 R0 K38 + 0x78160067, // 008E JMPF R5 #00F7 + 0xB8162800, // 008F GETNGBL R5 K20 + 0x8C140B15, // 0090 GETMET R5 R5 K21 + 0x8C1C0516, // 0091 GETMET R7 R2 K22 + 0x58240017, // 0092 LDCONST R9 K23 + 0x58280018, // 0093 LDCONST R10 K24 + 0x582C0019, // 0094 LDCONST R11 K25 + 0x543215A3, // 0095 LDINT R12 5540 + 0x60340008, // 0096 GETGBL R13 G8 + 0x5C380800, // 0097 MOVE R14 R4 + 0x7C340200, // 0098 CALL R13 1 + 0x8838010F, // 0099 GETMBR R14 R0 K15 + 0x883C0126, // 009A GETMBR R15 R0 K38 + 0x7C1C1000, // 009B CALL R7 8 + 0x5820001A, // 009C LDCONST R8 K26 + 0x7C140600, // 009D CALL R5 3 + 0x8C14031B, // 009E GETMET R5 R1 K27 + 0x581C0018, // 009F LDCONST R7 K24 + 0x58200019, // 00A0 LDCONST R8 K25 + 0x542615A3, // 00A1 LDINT R9 5540 + 0x5C280800, // 00A2 MOVE R10 R4 + 0x882C010F, // 00A3 GETMBR R11 R0 K15 + 0x88300126, // 00A4 GETMBR R12 R0 K38 + 0x7C140E00, // 00A5 CALL R5 7 + 0x50140200, // 00A6 LDBOOL R5 1 0 + 0x90024E05, // 00A7 SETMBR R0 K39 R5 + 0xB8162800, // 00A8 GETNGBL R5 K20 + 0x8C140B15, // 00A9 GETMET R5 R5 K21 + 0x8C1C0516, // 00AA GETMET R7 R2 K22 + 0x58240028, // 00AB LDCONST R9 K40 + 0x58280029, // 00AC LDCONST R10 K41 + 0x882C010F, // 00AD GETMBR R11 R0 K15 + 0x88300126, // 00AE GETMBR R12 R0 K38 + 0x7C1C0A00, // 00AF CALL R7 5 + 0x5820001F, // 00B0 LDCONST R8 K31 + 0x7C140600, // 00B1 CALL R5 3 + 0x60140008, // 00B2 GETGBL R5 G8 + 0x88180108, // 00B3 GETMBR R6 R0 K8 + 0x541E0FFE, // 00B4 LDINT R7 4095 + 0x2C180C07, // 00B5 AND R6 R6 R7 + 0x7C140200, // 00B6 CALL R5 1 + 0x00164005, // 00B7 ADD R5 K32 R5 + 0xB81A2800, // 00B8 GETNGBL R6 K20 + 0x8C180D15, // 00B9 GETMET R6 R6 K21 + 0x00224205, // 00BA ADD R8 K33 R5 + 0x5824001F, // 00BB LDCONST R9 K31 + 0x7C180600, // 00BC CALL R6 3 + 0x8C180322, // 00BD GETMET R6 R1 K34 + 0x58200018, // 00BE LDCONST R8 K24 + 0x58240019, // 00BF LDCONST R9 K25 + 0x8828010F, // 00C0 GETMBR R10 R0 K15 + 0x882C0126, // 00C1 GETMBR R11 R0 K38 + 0x5C300A00, // 00C2 MOVE R12 R5 + 0x7C180C00, // 00C3 CALL R6 6 + 0x60180008, // 00C4 GETGBL R6 G8 + 0x881C0108, // 00C5 GETMBR R7 R0 K8 + 0x54220EFF, // 00C6 LDINT R8 3840 + 0x2C1C0E08, // 00C7 AND R7 R7 R8 + 0x54220007, // 00C8 LDINT R8 8 + 0x3C1C0E08, // 00C9 SHR R7 R7 R8 + 0x7C180200, // 00CA CALL R6 1 + 0x001A4606, // 00CB ADD R6 K35 R6 + 0x5C140C00, // 00CC MOVE R5 R6 + 0xB81A2800, // 00CD GETNGBL R6 K20 + 0x8C180D15, // 00CE GETMET R6 R6 K21 + 0x00224205, // 00CF ADD R8 K33 R5 + 0x5824001F, // 00D0 LDCONST R9 K31 + 0x7C180600, // 00D1 CALL R6 3 + 0x8C180322, // 00D2 GETMET R6 R1 K34 + 0x58200018, // 00D3 LDCONST R8 K24 + 0x58240019, // 00D4 LDCONST R9 K25 + 0x8828010F, // 00D5 GETMBR R10 R0 K15 + 0x882C0126, // 00D6 GETMBR R11 R0 K38 + 0x5C300A00, // 00D7 MOVE R12 R5 + 0x7C180C00, // 00D8 CALL R6 6 + 0x60180008, // 00D9 GETGBL R6 G8 + 0x881C0104, // 00DA GETMBR R7 R0 K4 + 0x7C180200, // 00DB CALL R6 1 + 0x001A4806, // 00DC ADD R6 K36 R6 + 0x5C140C00, // 00DD MOVE R5 R6 + 0xB81A2800, // 00DE GETNGBL R6 K20 + 0x8C180D15, // 00DF GETMET R6 R6 K21 + 0x00224205, // 00E0 ADD R8 K33 R5 + 0x5824001F, // 00E1 LDCONST R9 K31 + 0x7C180600, // 00E2 CALL R6 3 + 0x8C180322, // 00E3 GETMET R6 R1 K34 + 0x58200018, // 00E4 LDCONST R8 K24 + 0x58240019, // 00E5 LDCONST R9 K25 + 0x8828010F, // 00E6 GETMBR R10 R0 K15 + 0x882C0126, // 00E7 GETMBR R11 R0 K38 + 0x5C300A00, // 00E8 MOVE R12 R5 + 0x7C180C00, // 00E9 CALL R6 6 + 0x58140025, // 00EA LDCONST R5 K37 + 0xB81A2800, // 00EB GETNGBL R6 K20 + 0x8C180D15, // 00EC GETMET R6 R6 K21 + 0x00224205, // 00ED ADD R8 K33 R5 + 0x5824001F, // 00EE LDCONST R9 K31 + 0x7C180600, // 00EF CALL R6 3 + 0x8C180322, // 00F0 GETMET R6 R1 K34 + 0x58200018, // 00F1 LDCONST R8 K24 + 0x58240019, // 00F2 LDCONST R9 K25 + 0x8828010F, // 00F3 GETMBR R10 R0 K15 + 0x882C0126, // 00F4 GETMBR R11 R0 K38 + 0x5C300A00, // 00F5 MOVE R12 R5 + 0x7C180C00, // 00F6 CALL R6 6 + 0xA8040001, // 00F7 EXBLK 1 1 + 0x70020010, // 00F8 JMP #010A + 0xAC140002, // 00F9 CATCH R5 0 2 + 0x7002000D, // 00FA JMP #0109 + 0xB81E2800, // 00FB GETNGBL R7 K20 + 0x8C1C0F15, // 00FC GETMET R7 R7 K21 + 0x60240008, // 00FD GETGBL R9 G8 + 0x5C280A00, // 00FE MOVE R10 R5 + 0x7C240200, // 00FF CALL R9 1 + 0x00265409, // 0100 ADD R9 K42 R9 + 0x0024132B, // 0101 ADD R9 R9 K43 + 0x60280008, // 0102 GETGBL R10 G8 + 0x5C2C0C00, // 0103 MOVE R11 R6 + 0x7C280200, // 0104 CALL R10 1 + 0x0024120A, // 0105 ADD R9 R9 R10 + 0x5828001F, // 0106 LDCONST R10 K31 + 0x7C1C0600, // 0107 CALL R7 3 + 0x70020000, // 0108 JMP #010A + 0xB0080000, // 0109 RAISE 2 R0 R0 + 0x80000000, // 010A RET 0 }) ) ); @@ -3156,1503 +4970,11 @@ be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */ /******************************************************************** -** Solidified function: MtrJoin +** Solidified function: get_active_endpoints ********************************************************************/ -be_local_closure(Matter_Device_MtrJoin, /* name */ - be_nested_proto( - 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[ 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(MtrJoin), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _load_plugins_config -********************************************************************/ -be_local_closure(Matter_Device__load_plugins_config, /* name */ - be_nested_proto( - 19, /* 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(string), - /* K1 */ be_nested_str_weak(k2l_num), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(log), - /* K4 */ be_nested_str_weak(MTR_X3A_X20endpoints_X20to_X20be_X20configured_X20), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(format), - /* K7 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25i_X20config_X20_X25s), - /* K8 */ be_nested_str_weak(find), - /* K9 */ be_nested_str_weak(type), - /* K10 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping), - /* K11 */ be_nested_str_weak(plugins_classes), - /* K12 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), - /* K13 */ be_nested_str_weak(_X27_X20skipping), - /* K14 */ be_const_int(2), - /* K15 */ be_nested_str_weak(plugins), - /* K16 */ be_nested_str_weak(push), - /* K17 */ be_nested_str_weak(), - /* K18 */ be_nested_str_weak(k2l), - /* K19 */ be_nested_str_weak(_X20_X25s_X3A_X25s), - /* K20 */ be_nested_str_weak(stop_iteration), - /* K21 */ be_nested_str_weak(MTR_X3A_X20endpoint_X3A_X25i_X20type_X3A_X25s_X25s), - /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K23 */ be_nested_str_weak(_X7C), - /* K24 */ be_nested_str_weak(publish_result), - /* K25 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D), - /* K26 */ be_nested_str_weak(Matter), - }), - be_str_weak(_load_plugins_config), - &be_const_str_solidified, - ( &(const binstruction[133]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0101, // 0001 GETMET R3 R0 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0xB8120400, // 0004 GETNGBL R4 K2 - 0x8C100903, // 0005 GETMET R4 R4 K3 - 0x60180008, // 0006 GETGBL R6 G8 - 0x5C1C0600, // 0007 MOVE R7 R3 - 0x7C180200, // 0008 CALL R6 1 - 0x001A0806, // 0009 ADD R6 K4 R6 - 0x581C0005, // 000A LDCONST R7 K5 - 0x7C100600, // 000B CALL R4 3 - 0x60100010, // 000C GETGBL R4 G16 - 0x5C140600, // 000D MOVE R5 R3 - 0x7C100200, // 000E CALL R4 1 - 0xA802006B, // 000F EXBLK 0 #007C - 0x5C140800, // 0010 MOVE R5 R4 - 0x7C140000, // 0011 CALL R5 0 - 0xA8020056, // 0012 EXBLK 0 #006A - 0x60180008, // 0013 GETGBL R6 G8 - 0x5C1C0A00, // 0014 MOVE R7 R5 - 0x7C180200, // 0015 CALL R6 1 - 0x94180206, // 0016 GETIDX R6 R1 R6 - 0xB81E0400, // 0017 GETNGBL R7 K2 - 0x8C1C0F03, // 0018 GETMET R7 R7 K3 - 0x8C240506, // 0019 GETMET R9 R2 K6 - 0x582C0007, // 001A LDCONST R11 K7 - 0x5C300A00, // 001B MOVE R12 R5 - 0x5C340C00, // 001C MOVE R13 R6 - 0x7C240800, // 001D CALL R9 4 - 0x58280005, // 001E LDCONST R10 K5 - 0x7C1C0600, // 001F CALL R7 3 - 0x8C1C0D08, // 0020 GETMET R7 R6 K8 - 0x58240009, // 0021 LDCONST R9 K9 - 0x7C1C0400, // 0022 CALL R7 2 - 0x4C200000, // 0023 LDNIL R8 - 0x1C200E08, // 0024 EQ R8 R7 R8 - 0x78220006, // 0025 JMPF R8 #002D - 0xB8220400, // 0026 GETNGBL R8 K2 - 0x8C201103, // 0027 GETMET R8 R8 K3 - 0x5828000A, // 0028 LDCONST R10 K10 - 0x582C0005, // 0029 LDCONST R11 K5 - 0x7C200600, // 002A CALL R8 3 - 0xA8040001, // 002B EXBLK 1 1 - 0x7001FFE2, // 002C JMP #0010 - 0x8820010B, // 002D GETMBR R8 R0 K11 - 0x8C201108, // 002E GETMET R8 R8 K8 - 0x5C280E00, // 002F MOVE R10 R7 - 0x7C200400, // 0030 CALL R8 2 - 0x4C240000, // 0031 LDNIL R9 - 0x1C241009, // 0032 EQ R9 R8 R9 - 0x7826000A, // 0033 JMPF R9 #003F - 0xB8260400, // 0034 GETNGBL R9 K2 - 0x8C241303, // 0035 GETMET R9 R9 K3 - 0x602C0008, // 0036 GETGBL R11 G8 - 0x5C300E00, // 0037 MOVE R12 R7 - 0x7C2C0200, // 0038 CALL R11 1 - 0x002E180B, // 0039 ADD R11 K12 R11 - 0x002C170D, // 003A ADD R11 R11 K13 - 0x5830000E, // 003B LDCONST R12 K14 - 0x7C240600, // 003C CALL R9 3 - 0xA8040001, // 003D EXBLK 1 1 - 0x7001FFD0, // 003E JMP #0010 - 0x5C241000, // 003F MOVE R9 R8 - 0x5C280000, // 0040 MOVE R10 R0 - 0x5C2C0A00, // 0041 MOVE R11 R5 - 0x5C300C00, // 0042 MOVE R12 R6 - 0x7C240600, // 0043 CALL R9 3 - 0x8828010F, // 0044 GETMBR R10 R0 K15 - 0x8C281510, // 0045 GETMET R10 R10 K16 - 0x5C301200, // 0046 MOVE R12 R9 - 0x7C280400, // 0047 CALL R10 2 - 0x58280011, // 0048 LDCONST R10 K17 - 0x602C0010, // 0049 GETGBL R11 G16 - 0x8C300112, // 004A GETMET R12 R0 K18 - 0x5C380C00, // 004B MOVE R14 R6 - 0x7C300400, // 004C CALL R12 2 - 0x7C2C0200, // 004D CALL R11 1 - 0xA802000B, // 004E EXBLK 0 #005B - 0x5C301600, // 004F MOVE R12 R11 - 0x7C300000, // 0050 CALL R12 0 - 0x1C341909, // 0051 EQ R13 R12 K9 - 0x78360000, // 0052 JMPF R13 #0054 - 0x7001FFFA, // 0053 JMP #004F - 0x8C340506, // 0054 GETMET R13 R2 K6 - 0x583C0013, // 0055 LDCONST R15 K19 - 0x5C401800, // 0056 MOVE R16 R12 - 0x94440C0C, // 0057 GETIDX R17 R6 R12 - 0x7C340800, // 0058 CALL R13 4 - 0x0028140D, // 0059 ADD R10 R10 R13 - 0x7001FFF3, // 005A JMP #004F - 0x582C0014, // 005B LDCONST R11 K20 - 0xAC2C0200, // 005C CATCH R11 1 0 - 0xB0080000, // 005D RAISE 2 R0 R0 - 0xB82E0400, // 005E GETNGBL R11 K2 - 0x8C2C1703, // 005F GETMET R11 R11 K3 - 0x8C340506, // 0060 GETMET R13 R2 K6 - 0x583C0015, // 0061 LDCONST R15 K21 - 0x5C400A00, // 0062 MOVE R16 R5 - 0x5C440E00, // 0063 MOVE R17 R7 - 0x5C481400, // 0064 MOVE R18 R10 - 0x7C340A00, // 0065 CALL R13 5 - 0x5838000E, // 0066 LDCONST R14 K14 - 0x7C2C0600, // 0067 CALL R11 3 - 0xA8040001, // 0068 EXBLK 1 1 - 0x70020010, // 0069 JMP #007B - 0xAC180002, // 006A CATCH R6 0 2 - 0x7002000D, // 006B JMP #007A - 0xB8220400, // 006C GETNGBL R8 K2 - 0x8C201103, // 006D GETMET R8 R8 K3 - 0x60280008, // 006E GETGBL R10 G8 - 0x5C2C0C00, // 006F MOVE R11 R6 - 0x7C280200, // 0070 CALL R10 1 - 0x002A2C0A, // 0071 ADD R10 K22 R10 - 0x00281517, // 0072 ADD R10 R10 K23 - 0x602C0008, // 0073 GETGBL R11 G8 - 0x5C300E00, // 0074 MOVE R12 R7 - 0x7C2C0200, // 0075 CALL R11 1 - 0x0028140B, // 0076 ADD R10 R10 R11 - 0x582C000E, // 0077 LDCONST R11 K14 - 0x7C200600, // 0078 CALL R8 3 - 0x70020000, // 0079 JMP #007B - 0xB0080000, // 007A RAISE 2 R0 R0 - 0x7001FF93, // 007B JMP #0010 - 0x58100014, // 007C LDCONST R4 K20 - 0xAC100200, // 007D CATCH R4 1 0 - 0xB0080000, // 007E RAISE 2 R0 R0 - 0xB8120400, // 007F GETNGBL R4 K2 - 0x8C100918, // 0080 GETMET R4 R4 K24 - 0x58180019, // 0081 LDCONST R6 K25 - 0x581C001A, // 0082 LDCONST R7 K26 - 0x7C100600, // 0083 CALL R4 3 - 0x80000000, // 0084 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: save_before_restart -********************************************************************/ -be_local_closure(Matter_Device_save_before_restart, /* 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(stop_basic_commissioning), - /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics), - }), - be_str_weak(save_before_restart), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_root_basic_commissioning -********************************************************************/ -be_local_closure(Matter_Device_start_root_basic_commissioning, /* 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[23]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(PASE_TIMEOUT), - /* K2 */ be_nested_str_weak(compute_manual_pairing_code), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(log), - /* K5 */ be_nested_str_weak(format), - /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s), - /* K7 */ be_const_int(0), - /* K8 */ be_const_int(3), - /* K9 */ be_const_int(2147483647), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(compute_qrcode_content), - /* K12 */ be_nested_str_weak(publish_result), - /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D), - /* K14 */ be_nested_str_weak(Matter), - /* K15 */ be_nested_str_weak(_compute_pbkdf), - /* K16 */ be_nested_str_weak(root_passcode), - /* K17 */ be_nested_str_weak(root_iterations), - /* K18 */ be_nested_str_weak(root_salt), - /* K19 */ be_nested_str_weak(start_basic_commissioning), - /* K20 */ be_nested_str_weak(root_discriminator), - /* K21 */ be_nested_str_weak(root_w0), - /* K22 */ be_nested_str_weak(root_L), - }), - be_str_weak(start_root_basic_commissioning), - &be_const_str_solidified, - ( &(const binstruction[49]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x1C0C0203, // 0002 EQ R3 R1 R3 - 0x780E0000, // 0003 JMPF R3 #0005 - 0x88040101, // 0004 GETMBR R1 R0 K1 - 0x8C0C0102, // 0005 GETMET R3 R0 K2 - 0x7C0C0200, // 0006 CALL R3 1 - 0xB8120600, // 0007 GETNGBL R4 K3 - 0x8C100904, // 0008 GETMET R4 R4 K4 - 0x8C180505, // 0009 GETMET R6 R2 K5 - 0x58200006, // 000A LDCONST R8 K6 - 0x40260F08, // 000B CONNECT R9 K7 K8 - 0x94240609, // 000C GETIDX R9 R3 R9 - 0x542A0003, // 000D LDINT R10 4 - 0x542E0005, // 000E LDINT R11 6 - 0x4028140B, // 000F CONNECT R10 R10 R11 - 0x9428060A, // 0010 GETIDX R10 R3 R10 - 0x542E0006, // 0011 LDINT R11 7 - 0x402C1709, // 0012 CONNECT R11 R11 K9 - 0x942C060B, // 0013 GETIDX R11 R3 R11 - 0x7C180A00, // 0014 CALL R6 5 - 0x581C000A, // 0015 LDCONST R7 K10 - 0x7C100600, // 0016 CALL R4 3 - 0x8C10010B, // 0017 GETMET R4 R0 K11 - 0x7C100200, // 0018 CALL R4 1 - 0xB8160600, // 0019 GETNGBL R5 K3 - 0x8C140B0C, // 001A GETMET R5 R5 K12 - 0x8C1C0505, // 001B GETMET R7 R2 K5 - 0x5824000D, // 001C LDCONST R9 K13 - 0x5C280600, // 001D MOVE R10 R3 - 0x5C2C0800, // 001E MOVE R11 R4 - 0x7C1C0800, // 001F CALL R7 4 - 0x5820000E, // 0020 LDCONST R8 K14 - 0x7C140600, // 0021 CALL R5 3 - 0x8C14010F, // 0022 GETMET R5 R0 K15 - 0x881C0110, // 0023 GETMBR R7 R0 K16 - 0x88200111, // 0024 GETMBR R8 R0 K17 - 0x88240112, // 0025 GETMBR R9 R0 K18 - 0x7C140800, // 0026 CALL R5 4 - 0x8C140113, // 0027 GETMET R5 R0 K19 - 0x5C1C0200, // 0028 MOVE R7 R1 - 0x88200111, // 0029 GETMBR R8 R0 K17 - 0x88240114, // 002A GETMBR R9 R0 K20 - 0x88280112, // 002B GETMBR R10 R0 K18 - 0x882C0115, // 002C GETMBR R11 R0 K21 - 0x88300116, // 002D GETMBR R12 R0 K22 - 0x4C340000, // 002E LDNIL R13 - 0x7C141000, // 002F CALL R5 8 - 0x80000000, // 0030 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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: _compute_pbkdf -********************************************************************/ -be_local_closure(Matter_Device__compute_pbkdf, /* name */ - be_nested_proto( - 14, /* 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(crypto), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(add), - /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256), - /* K4 */ be_nested_str_weak(derive), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(root_w0), - /* K7 */ be_nested_str_weak(EC_P256), - /* K8 */ be_nested_str_weak(mod), - /* K9 */ be_nested_str_weak(root_L), - /* K10 */ be_nested_str_weak(public_key), - }), - be_str_weak(_compute_pbkdf), - &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0xA4160200, // 0001 IMPORT R5 K1 - 0x60180015, // 0002 GETGBL R6 G21 - 0x7C180000, // 0003 CALL R6 0 - 0x8C180D02, // 0004 GETMET R6 R6 K2 - 0x5C200200, // 0005 MOVE R8 R1 - 0x54260003, // 0006 LDINT R9 4 - 0x7C180600, // 0007 CALL R6 3 - 0x8C1C0903, // 0008 GETMET R7 R4 K3 - 0x7C1C0200, // 0009 CALL R7 1 - 0x8C1C0F04, // 000A GETMET R7 R7 K4 - 0x5C240C00, // 000B MOVE R9 R6 - 0x5C280600, // 000C MOVE R10 R3 - 0x5C2C0400, // 000D MOVE R11 R2 - 0x5432004F, // 000E LDINT R12 80 - 0x7C1C0A00, // 000F CALL R7 5 - 0x54220026, // 0010 LDINT R8 39 - 0x40220A08, // 0011 CONNECT R8 K5 R8 - 0x94200E08, // 0012 GETIDX R8 R7 R8 - 0x54260027, // 0013 LDINT R9 40 - 0x542A004E, // 0014 LDINT R10 79 - 0x4024120A, // 0015 CONNECT R9 R9 R10 - 0x94240E09, // 0016 GETIDX R9 R7 R9 - 0x8C280907, // 0017 GETMET R10 R4 K7 - 0x7C280200, // 0018 CALL R10 1 - 0x8C281508, // 0019 GETMET R10 R10 K8 - 0x5C301000, // 001A MOVE R12 R8 - 0x7C280400, // 001B CALL R10 2 - 0x90020C0A, // 001C SETMBR R0 K6 R10 - 0x8C280907, // 001D GETMET R10 R4 K7 - 0x7C280200, // 001E CALL R10 1 - 0x8C281508, // 001F GETMET R10 R10 K8 - 0x5C301200, // 0020 MOVE R12 R9 - 0x7C280400, // 0021 CALL R10 2 - 0x8C2C0907, // 0022 GETMET R11 R4 K7 - 0x7C2C0200, // 0023 CALL R11 1 - 0x8C2C170A, // 0024 GETMET R11 R11 K10 - 0x5C341400, // 0025 MOVE R13 R10 - 0x7C2C0400, // 0026 CALL R11 2 - 0x9002120B, // 0027 SETMBR R0 K9 R11 - 0x80000000, // 0028 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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_basic_commissioning -********************************************************************/ -be_local_closure(Matter_Device_start_basic_commissioning, /* name */ - be_nested_proto( - 13, /* nstack */ - 8, /* 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 - }) - ), - }), - 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), - }), - be_str_weak(start_basic_commissioning), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: load_param -********************************************************************/ -be_local_closure(Matter_Device_load_param, /* 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[28]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(crypto), - /* K2 */ be_nested_str_weak(FILENAME), - /* K3 */ be_nested_str_weak(read), - /* K4 */ be_nested_str_weak(close), - /* K5 */ be_nested_str_weak(json), - /* K6 */ be_nested_str_weak(load), - /* K7 */ be_nested_str_weak(root_discriminator), - /* K8 */ be_nested_str_weak(find), - /* K9 */ be_nested_str_weak(distinguish), - /* K10 */ be_nested_str_weak(root_passcode), - /* K11 */ be_nested_str_weak(passcode), - /* K12 */ be_nested_str_weak(ipv4only), - /* K13 */ be_nested_str_weak(plugins_config), - /* K14 */ be_nested_str_weak(config), - /* K15 */ be_nested_str_weak(_load_plugins_config), - /* K16 */ be_nested_str_weak(plugins_persist), - /* K17 */ be_nested_str_weak(io_error), - /* K18 */ be_nested_str_weak(tasmota), - /* K19 */ be_nested_str_weak(log), - /* K20 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A), - /* K21 */ be_nested_str_weak(_X7C), - /* K22 */ be_const_int(2), - /* K23 */ be_nested_str_weak(random), - /* K24 */ be_nested_str_weak(get), - /* K25 */ be_const_int(0), - /* K26 */ be_nested_str_weak(generate_random_passcode), - /* K27 */ be_nested_str_weak(save_param), - }), - be_str_weak(load_param), - &be_const_str_solidified, - ( &(const binstruction[91]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0xA8020028, // 0002 EXBLK 0 #002C - 0x600C0011, // 0003 GETGBL R3 G17 - 0x88100102, // 0004 GETMBR R4 R0 K2 - 0x7C0C0200, // 0005 CALL R3 1 - 0x8C100703, // 0006 GETMET R4 R3 K3 - 0x7C100200, // 0007 CALL R4 1 - 0x8C140704, // 0008 GETMET R5 R3 K4 - 0x7C140200, // 0009 CALL R5 1 - 0xA4160A00, // 000A IMPORT R5 K5 - 0x8C180B06, // 000B GETMET R6 R5 K6 - 0x5C200800, // 000C MOVE R8 R4 - 0x7C180400, // 000D CALL R6 2 - 0x8C1C0D08, // 000E GETMET R7 R6 K8 - 0x58240009, // 000F LDCONST R9 K9 - 0x88280107, // 0010 GETMBR R10 R0 K7 - 0x7C1C0600, // 0011 CALL R7 3 - 0x90020E07, // 0012 SETMBR R0 K7 R7 - 0x8C1C0D08, // 0013 GETMET R7 R6 K8 - 0x5824000B, // 0014 LDCONST R9 K11 - 0x8828010A, // 0015 GETMBR R10 R0 K10 - 0x7C1C0600, // 0016 CALL R7 3 - 0x90021407, // 0017 SETMBR R0 K10 R7 - 0x601C0017, // 0018 GETGBL R7 G23 - 0x8C200D08, // 0019 GETMET R8 R6 K8 - 0x5828000C, // 001A LDCONST R10 K12 - 0x502C0000, // 001B LDBOOL R11 0 0 - 0x7C200600, // 001C CALL R8 3 - 0x7C1C0200, // 001D CALL R7 1 - 0x90021807, // 001E SETMBR R0 K12 R7 - 0x8C1C0D08, // 001F GETMET R7 R6 K8 - 0x5824000E, // 0020 LDCONST R9 K14 - 0x7C1C0400, // 0021 CALL R7 2 - 0x90021A07, // 0022 SETMBR R0 K13 R7 - 0x881C010D, // 0023 GETMBR R7 R0 K13 - 0x781E0004, // 0024 JMPF R7 #002A - 0x8C1C010F, // 0025 GETMET R7 R0 K15 - 0x8824010D, // 0026 GETMBR R9 R0 K13 - 0x7C1C0400, // 0027 CALL R7 2 - 0x501C0200, // 0028 LDBOOL R7 1 0 - 0x90022007, // 0029 SETMBR R0 K16 R7 - 0xA8040001, // 002A EXBLK 1 1 - 0x70020012, // 002B JMP #003F - 0xAC0C0002, // 002C CATCH R3 0 2 - 0x7002000F, // 002D JMP #003E - 0x20140711, // 002E NE R5 R3 K17 - 0x7816000C, // 002F JMPF R5 #003D - 0xB8162400, // 0030 GETNGBL R5 K18 - 0x8C140B13, // 0031 GETMET R5 R5 K19 - 0x601C0008, // 0032 GETGBL R7 G8 - 0x5C200600, // 0033 MOVE R8 R3 - 0x7C1C0200, // 0034 CALL R7 1 - 0x001E2807, // 0035 ADD R7 K20 R7 - 0x001C0F15, // 0036 ADD R7 R7 K21 - 0x60200008, // 0037 GETGBL R8 G8 - 0x5C240800, // 0038 MOVE R9 R4 - 0x7C200200, // 0039 CALL R8 1 - 0x001C0E08, // 003A ADD R7 R7 R8 - 0x58200016, // 003B LDCONST R8 K22 - 0x7C140600, // 003C CALL R5 3 - 0x70020000, // 003D JMP #003F - 0xB0080000, // 003E RAISE 2 R0 R0 - 0x500C0000, // 003F LDBOOL R3 0 0 - 0x88100107, // 0040 GETMBR R4 R0 K7 - 0x4C140000, // 0041 LDNIL R5 - 0x1C100805, // 0042 EQ R4 R4 R5 - 0x7812000A, // 0043 JMPF R4 #004F - 0x8C100517, // 0044 GETMET R4 R2 K23 - 0x58180016, // 0045 LDCONST R6 K22 - 0x7C100400, // 0046 CALL R4 2 - 0x8C100918, // 0047 GETMET R4 R4 K24 - 0x58180019, // 0048 LDCONST R6 K25 - 0x581C0016, // 0049 LDCONST R7 K22 - 0x7C100600, // 004A CALL R4 3 - 0x54160FFE, // 004B LDINT R5 4095 - 0x2C100805, // 004C AND R4 R4 R5 - 0x90020E04, // 004D SETMBR R0 K7 R4 - 0x500C0200, // 004E LDBOOL R3 1 0 - 0x8810010A, // 004F GETMBR R4 R0 K10 - 0x4C140000, // 0050 LDNIL R5 - 0x1C100805, // 0051 EQ R4 R4 R5 - 0x78120003, // 0052 JMPF R4 #0057 - 0x8C10011A, // 0053 GETMET R4 R0 K26 - 0x7C100200, // 0054 CALL R4 1 - 0x90021404, // 0055 SETMBR R0 K10 R4 - 0x500C0200, // 0056 LDBOOL R3 1 0 - 0x780E0001, // 0057 JMPF R3 #005A - 0x8C10011B, // 0058 GETMET R4 R0 K27 - 0x7C100200, // 0059 CALL R4 1 - 0x80000000, // 005A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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: autoconf_device -********************************************************************/ -be_local_closure(Matter_Device_autoconf_device, /* 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[15]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(json), - /* K2 */ be_nested_str_weak(plugins), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(plugins_config), - /* K5 */ be_nested_str_weak(autoconf_device_map), - /* K6 */ be_nested_str_weak(tasmota), - /* K7 */ be_nested_str_weak(log), - /* K8 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20), - /* K9 */ be_const_int(3), - /* K10 */ be_nested_str_weak(_load_plugins_config), - /* K11 */ be_nested_str_weak(plugins_persist), - /* K12 */ be_nested_str_weak(sessions), - /* K13 */ be_nested_str_weak(count_active_fabrics), - /* K14 */ be_nested_str_weak(save_param), - }), - be_str_weak(autoconf_device), - &be_const_str_solidified, - ( &(const binstruction[34]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0x600C000C, // 0002 GETGBL R3 G12 - 0x88100102, // 0003 GETMBR R4 R0 K2 - 0x7C0C0200, // 0004 CALL R3 1 - 0x240C0703, // 0005 GT R3 R3 K3 - 0x780E0000, // 0006 JMPF R3 #0008 - 0x80000600, // 0007 RET 0 - 0x8C0C0105, // 0008 GETMET R3 R0 K5 - 0x7C0C0200, // 0009 CALL R3 1 - 0x90020803, // 000A SETMBR R0 K4 R3 - 0xB80E0C00, // 000B GETNGBL R3 K6 - 0x8C0C0707, // 000C GETMET R3 R3 K7 - 0x60140008, // 000D GETGBL R5 G8 - 0x88180104, // 000E GETMBR R6 R0 K4 - 0x7C140200, // 000F CALL R5 1 - 0x00161005, // 0010 ADD R5 K8 R5 - 0x58180009, // 0011 LDCONST R6 K9 - 0x7C0C0600, // 0012 CALL R3 3 - 0x8C0C010A, // 0013 GETMET R3 R0 K10 - 0x88140104, // 0014 GETMBR R5 R0 K4 - 0x7C0C0400, // 0015 CALL R3 2 - 0x880C010B, // 0016 GETMBR R3 R0 K11 - 0x740E0008, // 0017 JMPT R3 #0021 - 0x880C010C, // 0018 GETMBR R3 R0 K12 - 0x8C0C070D, // 0019 GETMET R3 R3 K13 - 0x7C0C0200, // 001A CALL R3 1 - 0x240C0703, // 001B GT R3 R3 K3 - 0x780E0003, // 001C JMPF R3 #0021 - 0x500C0200, // 001D LDBOOL R3 1 0 - 0x90021603, // 001E SETMBR R0 K11 R3 - 0x8C0C010E, // 001F GETMET R3 R0 K14 - 0x7C0C0200, // 0020 CALL R3 1 - 0x80000000, // 0021 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_attribute_expansion -********************************************************************/ -be_local_closure(Matter_Device_process_attribute_expansion, /* name */ - be_nested_proto( - 29, /* nstack */ - 3, /* 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 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(endpoint), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_nested_str_weak(plugins), - /* K5 */ be_nested_str_weak(get_endpoint), - /* K6 */ be_nested_str_weak(contains), - /* K7 */ be_nested_str_weak(get_cluster_list), - /* K8 */ be_nested_str_weak(get_attribute_list), - /* K9 */ be_nested_str_weak(push), - /* K10 */ be_nested_str_weak(stop_iteration), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(log), - /* K13 */ be_nested_str_weak(format), - /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X), - /* K15 */ be_const_int(3), - /* K16 */ be_nested_str_weak(status), - /* K17 */ be_nested_str_weak(matter), - /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), - /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), - /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), - /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE), - }), - be_str_weak(process_attribute_expansion), - &be_const_str_solidified, - ( &(const binstruction[216]) { /* code */ - 0x840C0000, // 0000 CLOSURE R3 P0 - 0xA4120000, // 0001 IMPORT R4 K0 - 0x88140301, // 0002 GETMBR R5 R1 K1 - 0x50180000, // 0003 LDBOOL R6 0 0 - 0x881C0302, // 0004 GETMBR R7 R1 K2 - 0x50200000, // 0005 LDBOOL R8 0 0 - 0x88240303, // 0006 GETMBR R9 R1 K3 - 0x50280000, // 0007 LDBOOL R10 0 0 - 0x882C0301, // 0008 GETMBR R11 R1 K1 - 0x4C300000, // 0009 LDNIL R12 - 0x202C160C, // 000A NE R11 R11 R12 - 0x782E0007, // 000B JMPF R11 #0014 - 0x882C0302, // 000C GETMBR R11 R1 K2 - 0x4C300000, // 000D LDNIL R12 - 0x202C160C, // 000E NE R11 R11 R12 - 0x782E0003, // 000F JMPF R11 #0014 - 0x882C0303, // 0010 GETMBR R11 R1 K3 - 0x4C300000, // 0011 LDNIL R12 - 0x202C160C, // 0012 NE R11 R11 R12 - 0x742E0000, // 0013 JMPT R11 #0015 - 0x502C0001, // 0014 LDBOOL R11 0 1 - 0x502C0200, // 0015 LDBOOL R11 1 0 - 0x60300013, // 0016 GETGBL R12 G19 - 0x7C300000, // 0017 CALL R12 0 - 0x60340010, // 0018 GETGBL R13 G16 - 0x88380104, // 0019 GETMBR R14 R0 K4 - 0x7C340200, // 001A CALL R13 1 - 0xA8020055, // 001B EXBLK 0 #0072 - 0x5C381A00, // 001C MOVE R14 R13 - 0x7C380000, // 001D CALL R14 0 - 0x8C3C1D05, // 001E GETMET R15 R14 K5 - 0x7C3C0200, // 001F CALL R15 1 - 0x4C400000, // 0020 LDNIL R16 - 0x20400A10, // 0021 NE R16 R5 R16 - 0x78420002, // 0022 JMPF R16 #0026 - 0x20401E05, // 0023 NE R16 R15 R5 - 0x78420000, // 0024 JMPF R16 #0026 - 0x7001FFF5, // 0025 JMP #001C - 0x8C401906, // 0026 GETMET R16 R12 K6 - 0x5C481E00, // 0027 MOVE R18 R15 - 0x7C400400, // 0028 CALL R16 2 - 0x74420002, // 0029 JMPT R16 #002D - 0x60400013, // 002A GETGBL R16 G19 - 0x7C400000, // 002B CALL R16 0 - 0x98301E10, // 002C SETIDX R12 R15 R16 - 0x50180200, // 002D LDBOOL R6 1 0 - 0x8C401D07, // 002E GETMET R16 R14 K7 - 0x5C481E00, // 002F MOVE R18 R15 - 0x7C400400, // 0030 CALL R16 2 - 0x60440010, // 0031 GETGBL R17 G16 - 0x5C482000, // 0032 MOVE R18 R16 - 0x7C440200, // 0033 CALL R17 1 - 0xA8020038, // 0034 EXBLK 0 #006E - 0x5C482200, // 0035 MOVE R18 R17 - 0x7C480000, // 0036 CALL R18 0 - 0x4C4C0000, // 0037 LDNIL R19 - 0x204C0E13, // 0038 NE R19 R7 R19 - 0x784E0002, // 0039 JMPF R19 #003D - 0x204C2407, // 003A NE R19 R18 R7 - 0x784E0000, // 003B JMPF R19 #003D - 0x7001FFF7, // 003C JMP #0035 - 0x944C180F, // 003D GETIDX R19 R12 R15 - 0x8C4C2706, // 003E GETMET R19 R19 K6 - 0x5C542400, // 003F MOVE R21 R18 - 0x7C4C0400, // 0040 CALL R19 2 - 0x744E0003, // 0041 JMPT R19 #0046 - 0x944C180F, // 0042 GETIDX R19 R12 R15 - 0x60500013, // 0043 GETGBL R20 G19 - 0x7C500000, // 0044 CALL R20 0 - 0x984C2414, // 0045 SETIDX R19 R18 R20 - 0x50200200, // 0046 LDBOOL R8 1 0 - 0x8C4C1D08, // 0047 GETMET R19 R14 K8 - 0x5C541E00, // 0048 MOVE R21 R15 - 0x5C582400, // 0049 MOVE R22 R18 - 0x7C4C0600, // 004A CALL R19 3 - 0x60500010, // 004B GETGBL R20 G16 - 0x5C542600, // 004C MOVE R21 R19 - 0x7C500200, // 004D CALL R20 1 - 0xA802001A, // 004E EXBLK 0 #006A - 0x5C542800, // 004F MOVE R21 R20 - 0x7C540000, // 0050 CALL R21 0 - 0x4C580000, // 0051 LDNIL R22 - 0x20581216, // 0052 NE R22 R9 R22 - 0x785A0002, // 0053 JMPF R22 #0057 - 0x20582A09, // 0054 NE R22 R21 R9 - 0x785A0000, // 0055 JMPF R22 #0057 - 0x7001FFF7, // 0056 JMP #004F - 0x9458180F, // 0057 GETIDX R22 R12 R15 - 0x94582C12, // 0058 GETIDX R22 R22 R18 - 0x8C582D06, // 0059 GETMET R22 R22 K6 - 0x5C602A00, // 005A MOVE R24 R21 - 0x7C580400, // 005B CALL R22 2 - 0x745A0004, // 005C JMPT R22 #0062 - 0x9458180F, // 005D GETIDX R22 R12 R15 - 0x94582C12, // 005E GETIDX R22 R22 R18 - 0x605C0012, // 005F GETGBL R23 G18 - 0x7C5C0000, // 0060 CALL R23 0 - 0x98582A17, // 0061 SETIDX R22 R21 R23 - 0x50280200, // 0062 LDBOOL R10 1 0 - 0x9458180F, // 0063 GETIDX R22 R12 R15 - 0x94582C12, // 0064 GETIDX R22 R22 R18 - 0x94582C15, // 0065 GETIDX R22 R22 R21 - 0x8C582D09, // 0066 GETMET R22 R22 K9 - 0x5C601C00, // 0067 MOVE R24 R14 - 0x7C580400, // 0068 CALL R22 2 - 0x7001FFE4, // 0069 JMP #004F - 0x5850000A, // 006A LDCONST R20 K10 - 0xAC500200, // 006B CATCH R20 1 0 - 0xB0080000, // 006C RAISE 2 R0 R0 - 0x7001FFC6, // 006D JMP #0035 - 0x5844000A, // 006E LDCONST R17 K10 - 0xAC440200, // 006F CATCH R17 1 0 - 0xB0080000, // 0070 RAISE 2 R0 R0 - 0x7001FFA9, // 0071 JMP #001C - 0x5834000A, // 0072 LDCONST R13 K10 - 0xAC340200, // 0073 CATCH R13 1 0 - 0xB0080000, // 0074 RAISE 2 R0 R0 - 0x60340010, // 0075 GETGBL R13 G16 - 0x5C380600, // 0076 MOVE R14 R3 - 0x5C3C1800, // 0077 MOVE R15 R12 - 0x7C380200, // 0078 CALL R14 1 - 0x7C340200, // 0079 CALL R13 1 - 0xA802003D, // 007A EXBLK 0 #00B9 - 0x5C381A00, // 007B MOVE R14 R13 - 0x7C380000, // 007C CALL R14 0 - 0x603C0010, // 007D GETGBL R15 G16 - 0x5C400600, // 007E MOVE R16 R3 - 0x9444180E, // 007F GETIDX R17 R12 R14 - 0x7C400200, // 0080 CALL R16 1 - 0x7C3C0200, // 0081 CALL R15 1 - 0xA8020031, // 0082 EXBLK 0 #00B5 - 0x5C401E00, // 0083 MOVE R16 R15 - 0x7C400000, // 0084 CALL R16 0 - 0x60440010, // 0085 GETGBL R17 G16 - 0x5C480600, // 0086 MOVE R18 R3 - 0x944C180E, // 0087 GETIDX R19 R12 R14 - 0x944C2610, // 0088 GETIDX R19 R19 R16 - 0x7C480200, // 0089 CALL R18 1 - 0x7C440200, // 008A CALL R17 1 - 0xA8020024, // 008B EXBLK 0 #00B1 - 0x5C482200, // 008C MOVE R18 R17 - 0x7C480000, // 008D CALL R18 0 - 0x604C0010, // 008E GETGBL R19 G16 - 0x9450180E, // 008F GETIDX R20 R12 R14 - 0x94502810, // 0090 GETIDX R20 R20 R16 - 0x94502812, // 0091 GETIDX R20 R20 R18 - 0x7C4C0200, // 0092 CALL R19 1 - 0xA8020018, // 0093 EXBLK 0 #00AD - 0x5C502600, // 0094 MOVE R20 R19 - 0x7C500000, // 0095 CALL R20 0 - 0xB8561600, // 0096 GETNGBL R21 K11 - 0x8C542B0C, // 0097 GETMET R21 R21 K12 - 0x8C5C090D, // 0098 GETMET R23 R4 K13 - 0x5864000E, // 0099 LDCONST R25 K14 - 0x5C681C00, // 009A MOVE R26 R14 - 0x5C6C2000, // 009B MOVE R27 R16 - 0x5C702400, // 009C MOVE R28 R18 - 0x7C5C0A00, // 009D CALL R23 5 - 0x5860000F, // 009E LDCONST R24 K15 - 0x7C540600, // 009F CALL R21 3 - 0x9006020E, // 00A0 SETMBR R1 K1 R14 - 0x90060410, // 00A1 SETMBR R1 K2 R16 - 0x90060612, // 00A2 SETMBR R1 K3 R18 - 0x5C540400, // 00A3 MOVE R21 R2 - 0x5C582800, // 00A4 MOVE R22 R20 - 0x5C5C0200, // 00A5 MOVE R23 R1 - 0x5C601600, // 00A6 MOVE R24 R11 - 0x7C540600, // 00A7 CALL R21 3 - 0x782E0002, // 00A8 JMPF R11 #00AC - 0x78560001, // 00A9 JMPF R21 #00AC - 0xA8040004, // 00AA EXBLK 1 4 - 0x80002C00, // 00AB RET 0 - 0x7001FFE6, // 00AC JMP #0094 - 0x584C000A, // 00AD LDCONST R19 K10 - 0xAC4C0200, // 00AE CATCH R19 1 0 - 0xB0080000, // 00AF RAISE 2 R0 R0 - 0x7001FFDA, // 00B0 JMP #008C - 0x5844000A, // 00B1 LDCONST R17 K10 - 0xAC440200, // 00B2 CATCH R17 1 0 - 0xB0080000, // 00B3 RAISE 2 R0 R0 - 0x7001FFCD, // 00B4 JMP #0083 - 0x583C000A, // 00B5 LDCONST R15 K10 - 0xAC3C0200, // 00B6 CATCH R15 1 0 - 0xB0080000, // 00B7 RAISE 2 R0 R0 - 0x7001FFC1, // 00B8 JMP #007B - 0x5834000A, // 00B9 LDCONST R13 K10 - 0xAC340200, // 00BA CATCH R13 1 0 - 0xB0080000, // 00BB RAISE 2 R0 R0 - 0x782E0019, // 00BC JMPF R11 #00D7 - 0x5C340C00, // 00BD MOVE R13 R6 - 0x74360003, // 00BE JMPT R13 #00C3 - 0xB8362200, // 00BF GETNGBL R13 K17 - 0x88341B12, // 00C0 GETMBR R13 R13 K18 - 0x9006200D, // 00C1 SETMBR R1 K16 R13 - 0x7002000E, // 00C2 JMP #00D2 - 0x5C341000, // 00C3 MOVE R13 R8 - 0x74360003, // 00C4 JMPT R13 #00C9 - 0xB8362200, // 00C5 GETNGBL R13 K17 - 0x88341B13, // 00C6 GETMBR R13 R13 K19 - 0x9006200D, // 00C7 SETMBR R1 K16 R13 - 0x70020008, // 00C8 JMP #00D2 - 0x5C341400, // 00C9 MOVE R13 R10 - 0x74360003, // 00CA JMPT R13 #00CF - 0xB8362200, // 00CB GETNGBL R13 K17 - 0x88341B14, // 00CC GETMBR R13 R13 K20 - 0x9006200D, // 00CD SETMBR R1 K16 R13 - 0x70020002, // 00CE JMP #00D2 - 0xB8362200, // 00CF GETNGBL R13 K17 - 0x88341B15, // 00D0 GETMBR R13 R13 K21 - 0x9006200D, // 00D1 SETMBR R1 K16 R13 - 0x5C340400, // 00D2 MOVE R13 R2 - 0x4C380000, // 00D3 LDNIL R14 - 0x5C3C0200, // 00D4 MOVE R15 R1 - 0x50400200, // 00D5 LDBOOL R16 1 0 - 0x7C340600, // 00D6 CALL R13 3 - 0x80000000, // 00D7 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 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_plugin_class_displayname -********************************************************************/ -be_local_closure(Matter_Device_get_plugin_class_displayname, /* 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(NAME), - /* K3 */ be_nested_str_weak(), - }), - be_str_weak(get_plugin_class_displayname), - &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: mdns_remove_op_discovery_all_fabrics -********************************************************************/ -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 */ - 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: msg_received -********************************************************************/ -be_local_closure(Matter_Device_msg_received, /* name */ +be_local_closure(Matter_Device_get_active_endpoints, /* 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(message_handler), - /* K1 */ be_nested_str_weak(msg_received), - }), - be_str_weak(msg_received), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start_operational_discovery -********************************************************************/ -be_local_closure(Matter_Device_start_operational_discovery, /* name */ - be_nested_proto( - 8, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4660,305 +4982,45 @@ be_local_closure(Matter_Device_start_operational_discovery, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(mdns), - /* K2 */ be_nested_str_weak(string), - /* K3 */ be_nested_str_weak(stop_basic_commissioning), - /* K4 */ be_nested_str_weak(root_w0), - /* K5 */ be_nested_str_weak(root_L), - /* K6 */ be_nested_str_weak(mdns_announce_op_discovery), - }), - be_str_weak(start_operational_discovery), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0xA4120400, // 0002 IMPORT R4 K2 - 0x8C140103, // 0003 GETMET R5 R0 K3 - 0x7C140200, // 0004 CALL R5 1 - 0x4C140000, // 0005 LDNIL R5 - 0x90020805, // 0006 SETMBR R0 K4 R5 - 0x4C140000, // 0007 LDNIL R5 - 0x90020A05, // 0008 SETMBR R0 K5 R5 - 0x8C140106, // 0009 GETMET R5 R0 K6 - 0x5C1C0200, // 000A MOVE R7 R1 - 0x7C140400, // 000B CALL R5 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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), + ( &(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(plugins), - /* K4 */ be_const_int(1), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(every_250ms), + be_str_weak(get_active_endpoints), &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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), - }), - be_str_weak(register_plugin_class), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: mdns_remove_PASE -********************************************************************/ -be_local_closure(Matter_Device_mdns_remove_PASE, /* 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[22]) { /* constants */ - /* K0 */ be_nested_str_weak(mdns), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(mdns_pase_eth), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(log), - /* K5 */ be_nested_str_weak(format), - /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29), - /* K7 */ be_nested_str_weak(_matterc), - /* K8 */ be_nested_str_weak(_udp), - /* K9 */ be_nested_str_weak(commissioning_instance_eth), - /* K10 */ be_nested_str_weak(hostname_eth), - /* K11 */ be_const_int(3), - /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27), - /* K13 */ be_nested_str_weak(eth), - /* K14 */ be_const_int(2), - /* K15 */ be_nested_str_weak(remove_service), - /* K16 */ be_nested_str_weak(mdns_pase_wifi), - /* K17 */ be_nested_str_weak(commissioning_instance_wifi), - /* K18 */ be_nested_str_weak(hostname_wifi), - /* K19 */ be_nested_str_weak(wifi), - /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception), - /* K21 */ be_nested_str_weak(_X7C), - }), - be_str_weak(mdns_remove_PASE), - &be_const_str_solidified, - ( &(const binstruction[83]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0xA802003D, // 0002 EXBLK 0 #0041 - 0x880C0102, // 0003 GETMBR R3 R0 K2 - 0x780E001B, // 0004 JMPF R3 #0021 - 0xB80E0600, // 0005 GETNGBL R3 K3 - 0x8C0C0704, // 0006 GETMET R3 R3 K4 - 0x8C140505, // 0007 GETMET R5 R2 K5 - 0x581C0006, // 0008 LDCONST R7 K6 - 0x58200007, // 0009 LDCONST R8 K7 - 0x58240008, // 000A LDCONST R9 K8 - 0x88280109, // 000B GETMBR R10 R0 K9 - 0x882C010A, // 000C GETMBR R11 R0 K10 - 0x7C140C00, // 000D CALL R5 6 - 0x5818000B, // 000E LDCONST R6 K11 - 0x7C0C0600, // 000F CALL R3 3 - 0xB80E0600, // 0010 GETNGBL R3 K3 - 0x8C0C0704, // 0011 GETMET R3 R3 K4 - 0x8C140505, // 0012 GETMET R5 R2 K5 - 0x581C000C, // 0013 LDCONST R7 K12 - 0x5820000D, // 0014 LDCONST R8 K13 - 0x88240109, // 0015 GETMBR R9 R0 K9 - 0x7C140800, // 0016 CALL R5 4 - 0x5818000E, // 0017 LDCONST R6 K14 - 0x7C0C0600, // 0018 CALL R3 3 - 0x500C0000, // 0019 LDBOOL R3 0 0 - 0x90020403, // 001A SETMBR R0 K2 R3 - 0x8C0C030F, // 001B GETMET R3 R1 K15 - 0x58140007, // 001C LDCONST R5 K7 - 0x58180008, // 001D LDCONST R6 K8 - 0x881C0109, // 001E GETMBR R7 R0 K9 - 0x8820010A, // 001F GETMBR R8 R0 K10 - 0x7C0C0A00, // 0020 CALL R3 5 - 0x880C0110, // 0021 GETMBR R3 R0 K16 - 0x780E001B, // 0022 JMPF R3 #003F - 0xB80E0600, // 0023 GETNGBL R3 K3 - 0x8C0C0704, // 0024 GETMET R3 R3 K4 - 0x8C140505, // 0025 GETMET R5 R2 K5 - 0x581C0006, // 0026 LDCONST R7 K6 - 0x58200007, // 0027 LDCONST R8 K7 - 0x58240008, // 0028 LDCONST R9 K8 - 0x88280111, // 0029 GETMBR R10 R0 K17 - 0x882C0112, // 002A GETMBR R11 R0 K18 - 0x7C140C00, // 002B CALL R5 6 - 0x5818000B, // 002C LDCONST R6 K11 - 0x7C0C0600, // 002D CALL R3 3 - 0xB80E0600, // 002E GETNGBL R3 K3 - 0x8C0C0704, // 002F GETMET R3 R3 K4 - 0x8C140505, // 0030 GETMET R5 R2 K5 - 0x581C000C, // 0031 LDCONST R7 K12 - 0x58200013, // 0032 LDCONST R8 K19 - 0x88240111, // 0033 GETMBR R9 R0 K17 - 0x7C140800, // 0034 CALL R5 4 - 0x5818000E, // 0035 LDCONST R6 K14 - 0x7C0C0600, // 0036 CALL R3 3 - 0x500C0000, // 0037 LDBOOL R3 0 0 - 0x90022003, // 0038 SETMBR R0 K16 R3 - 0x8C0C030F, // 0039 GETMET R3 R1 K15 - 0x58140007, // 003A LDCONST R5 K7 - 0x58180008, // 003B LDCONST R6 K8 - 0x881C0111, // 003C GETMBR R7 R0 K17 - 0x88200112, // 003D GETMBR R8 R0 K18 - 0x7C0C0A00, // 003E CALL R3 5 - 0xA8040001, // 003F EXBLK 1 1 - 0x70020010, // 0040 JMP #0052 - 0xAC0C0002, // 0041 CATCH R3 0 2 - 0x7002000D, // 0042 JMP #0051 - 0xB8160600, // 0043 GETNGBL R5 K3 - 0x8C140B04, // 0044 GETMET R5 R5 K4 - 0x601C0008, // 0045 GETGBL R7 G8 - 0x5C200600, // 0046 MOVE R8 R3 - 0x7C1C0200, // 0047 CALL R7 1 - 0x001E2807, // 0048 ADD R7 K20 R7 - 0x001C0F15, // 0049 ADD R7 R7 K21 - 0x60200008, // 004A GETGBL R8 G8 - 0x5C240800, // 004B MOVE R9 R4 - 0x7C200200, // 004C CALL R8 1 - 0x001C0E08, // 004D ADD R7 R7 R8 - 0x5820000E, // 004E LDCONST R8 K14 - 0x7C140600, // 004F CALL R5 3 - 0x70020000, // 0050 JMP #0052 - 0xB0080000, // 0051 RAISE 2 R0 R0 - 0x80000000, // 0052 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: compute_manual_pairing_code -********************************************************************/ -be_local_closure(Matter_Device_compute_manual_pairing_code, /* 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[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(root_discriminator), - /* K2 */ be_nested_str_weak(root_passcode), - /* K3 */ be_nested_str_weak(format), - /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i), - /* K5 */ be_nested_str_weak(matter), - /* K6 */ be_nested_str_weak(Verhoeff), - /* K7 */ be_nested_str_weak(checksum), - }), - be_str_weak(compute_manual_pairing_code), - &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x540E0FFE, // 0002 LDINT R3 4095 - 0x2C080403, // 0003 AND R2 R2 R3 - 0x540E0009, // 0004 LDINT R3 10 - 0x3C080403, // 0005 SHR R2 R2 R3 - 0x880C0101, // 0006 GETMBR R3 R0 K1 - 0x541202FF, // 0007 LDINT R4 768 - 0x2C0C0604, // 0008 AND R3 R3 R4 - 0x54120005, // 0009 LDINT R4 6 - 0x380C0604, // 000A SHL R3 R3 R4 - 0x88100102, // 000B GETMBR R4 R0 K2 - 0x54163FFE, // 000C LDINT R5 16383 - 0x2C100805, // 000D AND R4 R4 R5 - 0x300C0604, // 000E OR R3 R3 R4 - 0x88100102, // 000F GETMBR R4 R0 K2 - 0x5416000D, // 0010 LDINT R5 14 - 0x3C100805, // 0011 SHR R4 R4 R5 - 0x8C140303, // 0012 GETMET R5 R1 K3 - 0x581C0004, // 0013 LDCONST R7 K4 - 0x5C200400, // 0014 MOVE R8 R2 - 0x5C240600, // 0015 MOVE R9 R3 - 0x5C280800, // 0016 MOVE R10 R4 - 0x7C140A00, // 0017 CALL R5 5 - 0xB81A0A00, // 0018 GETNGBL R6 K5 - 0x88180D06, // 0019 GETMBR R6 R6 K6 - 0x8C180D07, // 001A GETMET R6 R6 K7 - 0x5C200A00, // 001B MOVE R8 R5 - 0x7C180400, // 001C CALL R6 2 - 0x00140A06, // 001D ADD R5 R5 R6 - 0x80040A00, // 001E RET 1 R5 + ( &(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 }) ) ); @@ -4969,83 +5031,74 @@ be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */ ** Solidified class: Matter_Device ********************************************************************/ be_local_class(Matter_Device, - 32, + 33, NULL, - be_nested_map(93, + be_nested_map(95, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(message_handler, -1), be_const_var(6) }, - { be_const_key_weak(generate_random_passcode, -1), be_const_closure(Matter_Device_generate_random_passcode_closure) }, - { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) }, - { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(24) }, - { be_const_key_weak(remove_fabric, 28), be_const_closure(Matter_Device_remove_fabric_closure) }, - { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) }, - { be_const_key_weak(root_iterations, -1), be_const_var(28) }, - { be_const_key_weak(commissioning_discriminator, -1), be_const_var(12) }, - { be_const_key_weak(commissioning_w0, -1), be_const_var(14) }, - { be_const_key_weak(compute_manual_pairing_code, 66), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) }, - { be_const_key_weak(root_discriminator, -1), be_const_var(25) }, - { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) }, - { be_const_key_weak(mdns_remove_PASE, 22), be_const_closure(Matter_Device_mdns_remove_PASE_closure) }, - { be_const_key_weak(plugins_config, -1), be_const_var(4) }, - { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) }, - { be_const_key_weak(_trigger_read_sensors, 62), be_const_closure(Matter_Device__trigger_read_sensors_closure) }, - { be_const_key_weak(register_plugin_class, -1), be_const_closure(Matter_Device_register_plugin_class_closure) }, - { be_const_key_weak(root_passcode, 12), be_const_var(26) }, - { be_const_key_weak(every_250ms, 19), be_const_closure(Matter_Device_every_250ms_closure) }, - { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(18) }, - { be_const_key_weak(vendorid, -1), be_const_var(21) }, - { be_const_key_weak(register_native_classes, 89), be_const_closure(Matter_Device_register_native_classes_closure) }, - { be_const_key_weak(start_operational_discovery, 15), be_const_closure(Matter_Device_start_operational_discovery_closure) }, - { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) }, - { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) }, - { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) }, - { be_const_key_weak(commissioning_open, -1), be_const_var(10) }, - { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(17) }, - { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) }, - { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) }, - { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) }, - { be_const_key_weak(productid, 73), be_const_var(22) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) }, - { be_const_key_weak(get_plugin_class_displayname, 59), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) }, - { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) }, - { be_const_key_weak(start, 86), be_const_closure(Matter_Device_start_closure) }, + { be_const_key_weak(plugins_classes, -1), be_const_var(3) }, { be_const_key_weak(k2l_num, -1), be_const_static_closure(Matter_Device_k2l_num_closure) }, - { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) }, - { be_const_key_weak(root_salt, -1), be_const_var(29) }, - { be_const_key_weak(every_second, 78), be_const_closure(Matter_Device_every_second_closure) }, - { be_const_key_weak(commissioning_L, -1), be_const_var(15) }, - { be_const_key_weak(hostname_wifi, 18), be_const_var(19) }, - { be_const_key_weak(get_plugin_class_arg, 61), be_const_closure(Matter_Device_get_plugin_class_arg_closure) }, - { be_const_key_weak(started, 84), be_const_var(0) }, - { be_const_key_weak(root_w0, 25), be_const_var(30) }, - { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) }, - { be_const_key_weak(autoconf_device_map, 82), be_const_closure(Matter_Device_autoconf_device_map_closure) }, - { be_const_key_weak(every_50ms, -1), be_const_closure(Matter_Device_every_50ms_closure) }, + { be_const_key_weak(register_native_classes, -1), be_const_closure(Matter_Device_register_native_classes_closure) }, + { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) }, + { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) }, { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(16) }, - { be_const_key_weak(msg_send, 30), be_const_closure(Matter_Device_msg_send_closure) }, - { be_const_key_weak(commissioning_salt, -1), be_const_var(13) }, - { be_const_key_weak(plugins, -1), be_const_var(1) }, - { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) }, - { be_const_key_weak(_mdns_announce_hostname, 50), be_const_closure(Matter_Device__mdns_announce_hostname_closure) }, - { be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) }, - { be_const_key_weak(attribute_updated, 49), be_const_closure(Matter_Device_attribute_updated_closure) }, - { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) }, - { be_const_key_weak(root_L, -1), be_const_var(31) }, - { be_const_key_weak(register_commands, 77), be_const_closure(Matter_Device_register_commands_closure) }, - { be_const_key_weak(plugins_persist, -1), be_const_var(2) }, - { be_const_key_weak(init, 57), be_const_closure(Matter_Device_init_closure) }, - { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) }, - { be_const_key_weak(hostname_eth, -1), be_const_var(20) }, - { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) }, - { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) }, - { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) }, - { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_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(tick, 70), be_const_var(9) }, - { be_const_key_weak(udp_server, 67), be_const_var(5) }, - { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) }, + { be_const_key_weak(get_plugin_class_arg, -1), be_const_closure(Matter_Device_get_plugin_class_arg_closure) }, + { be_const_key_weak(commissioning_w0, 93), be_const_var(14) }, + { be_const_key_weak(get_active_endpoints, 10), be_const_closure(Matter_Device_get_active_endpoints_closure) }, + { be_const_key_weak(start_mdns_announce_hostnames, 62), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) }, + { be_const_key_weak(mdns_announce_PASE, 18), be_const_closure(Matter_Device_mdns_announce_PASE_closure) }, + { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) }, + { be_const_key_weak(root_discriminator, -1), be_const_var(26) }, + { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) }, - { be_const_key_weak(PASSCODE_INVALID, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { be_const_key_weak(ipv4only, -1), be_const_var(28) }, + { be_const_key_weak(get_plugin_class_displayname, 31), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) }, + { be_const_key_weak(root_salt, -1), be_const_var(30) }, + { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) }, + { be_const_key_weak(PRODUCT_ID, 20), be_const_int(32768) }, + { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) }, + { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) }, + { be_const_key_weak(autoconf_device, 86), be_const_closure(Matter_Device_autoconf_device_closure) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) }, + { be_const_key_weak(_init_basic_commissioning, -1), 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(MtrJoin, 35), be_const_closure(Matter_Device_MtrJoin_closure) }, + { be_const_key_weak(vendorid, 14), be_const_var(21) }, + { be_const_key_weak(root_passcode, 79), be_const_var(27) }, + { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, 22), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) }, + { be_const_key_weak(register_plugin_class, -1), be_const_closure(Matter_Device_register_plugin_class_closure) }, + { be_const_key_weak(generate_random_passcode, -1), be_const_closure(Matter_Device_generate_random_passcode_closure) }, + { be_const_key_weak(ui, -1), be_const_var(8) }, + { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) }, + { be_const_key_weak(save_param, 68), be_const_closure(Matter_Device_save_param_closure) }, + { be_const_key_weak(commissioning_L, -1), be_const_var(15) }, + { be_const_key_weak(start_root_basic_commissioning, -1), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) }, + { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(18) }, + { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) }, + { be_const_key_weak(message_handler, 9), be_const_var(6) }, + { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, 36), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) }, + { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) }, + { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) }, + { be_const_key_weak(start_operational_discovery, -1), be_const_closure(Matter_Device_start_operational_discovery_closure) }, + { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) }, + { be_const_key_weak(plugins_persist, -1), be_const_var(2) }, + { be_const_key_weak(root_iterations, 88), be_const_var(29) }, + { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) }, + { be_const_key_weak(sessions, -1), be_const_var(7) }, + { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) }, + { be_const_key_weak(attribute_updated, 23), be_const_closure(Matter_Device_attribute_updated_closure) }, + { be_const_key_weak(plugins_config, -1), be_const_var(4) }, + { be_const_key_weak(plugins, -1), be_const_var(1) }, + { be_const_key_weak(http_remotes, 34), be_const_var(25) }, + { be_const_key_weak(msg_send, -1), be_const_closure(Matter_Device_msg_send_closure) }, + { be_const_key_weak(every_250ms, 71), be_const_closure(Matter_Device_every_250ms_closure) }, + { be_const_key_weak(hostname_wifi, -1), be_const_var(19) }, + { be_const_key_weak(compute_qrcode_content, 49), be_const_closure(Matter_Device_compute_qrcode_content_closure) }, + { be_const_key_weak(_mdns_announce_hostname, 51), be_const_closure(Matter_Device__mdns_announce_hostname_closure) }, + { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) }, + { be_const_key_weak(commissioning_discriminator, -1), be_const_var(12) }, + { be_const_key_weak(register_commands, 52), be_const_closure(Matter_Device_register_commands_closure) }, + { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) }, + { be_const_key_weak(PASSCODE_INVALID, 54), 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), @@ -5061,26 +5114,37 @@ be_local_class(Matter_Device, be_const_int(12345678), be_const_int(87654321), })) ) } )) }, - { be_const_key_weak(start_root_basic_commissioning, -1), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) }, - { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) }, - { be_const_key_weak(save_before_restart, 56), be_const_closure(Matter_Device_save_before_restart_closure) }, - { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) }, - { be_const_key_weak(_load_plugins_config, -1), be_const_closure(Matter_Device__load_plugins_config_closure) }, + { be_const_key_weak(commissioning_open, -1), be_const_var(10) }, { be_const_key_weak(mdns_pase_eth, -1), be_const_var(23) }, - { be_const_key_weak(PASE_TIMEOUT, 33), be_const_int(600) }, - { be_const_key_weak(is_commissioning_open, 31), be_const_closure(Matter_Device_is_commissioning_open_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_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) }, - { be_const_key_weak(ui, -1), be_const_var(8) }, - { be_const_key_weak(sessions, -1), be_const_var(7) }, - { be_const_key_weak(plugins_classes, -1), be_const_var(3) }, - { be_const_key_weak(sort_distinct, 47), be_const_static_closure(Matter_Device_sort_distinct_closure) }, - { be_const_key_weak(commissioning_iterations, 16), be_const_var(11) }, - { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, - { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) }, - { be_const_key_weak(start_commissioning_complete_deferred, 9), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) }, - { be_const_key_weak(ipv4only, 3), be_const_var(27) }, - { be_const_key_weak(start_operational_discovery_deferred, 0), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) }, + { be_const_key_weak(VENDOR_ID, 69), be_const_int(65521) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) }, + { be_const_key_weak(commissioning_salt, -1), be_const_var(13) }, + { be_const_key_weak(productid, -1), be_const_var(22) }, + { be_const_key_weak(start_commissioning_complete, 55), be_const_closure(Matter_Device_start_commissioning_complete_closure) }, + { be_const_key_weak(init, 89), be_const_closure(Matter_Device_init_closure) }, + { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) }, + { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) }, + { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) }, + { be_const_key_weak(root_w0, 47), be_const_var(31) }, + { be_const_key_weak(started, 45), be_const_var(0) }, + { be_const_key_weak(start_operational_discovery_deferred, 43), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) }, + { be_const_key_weak(root_L, -1), be_const_var(32) }, + { be_const_key_weak(_load_plugins_config, 94), be_const_closure(Matter_Device__load_plugins_config_closure) }, + { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(24) }, + { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) }, + { be_const_key_weak(commissioning_iterations, 30), be_const_var(11) }, + { be_const_key_weak(every_50ms, 28), be_const_closure(Matter_Device_every_50ms_closure) }, + { be_const_key_weak(hostname_eth, 26), be_const_var(20) }, + { be_const_key_weak(udp_server, -1), be_const_var(5) }, + { be_const_key_weak(tick, -1), be_const_var(9) }, + { be_const_key_weak(event_fabrics_saved, 21), be_const_closure(Matter_Device_event_fabrics_saved_closure) }, + { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(17) }, + { be_const_key_weak(mdns_remove_PASE, 11), be_const_closure(Matter_Device_mdns_remove_PASE_closure) }, + { be_const_key_weak(register_http_remote, -1), be_const_closure(Matter_Device_register_http_remote_closure) }, + { be_const_key_weak(PASE_TIMEOUT, -1), be_const_int(600) }, + { be_const_key_weak(sort_distinct, 8), be_const_static_closure(Matter_Device_sort_distinct_closure) }, + { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(Matter_Device__trigger_read_sensors_closure) }, + { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) }, })), be_str_weak(Matter_Device) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_async.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_async.h index 13a3a1112..a649c4ef6 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_async.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_async.h @@ -1097,7 +1097,7 @@ be_local_class(Matter_HTTP_async, { be_const_key_weak(is_chunked, 13), be_const_var(7) }, { be_const_key_weak(SPINLOCK, -1), be_const_int(5) }, { be_const_key_weak(response_offset, 10), be_const_var(2) }, - { be_const_key_weak(HTTP_STATUS_REGEX, -1), be_nested_str_weak(HTTP_X2F1_X5C_X2E_X5B1_X2D2_X5D_X20_X28_X5Cd_X2B_X29_X20_X2E_X2A_X3F_X0D_X0A) }, + { be_const_key_weak(HTTP_STATUS_REGEX, -1), be_nested_str_weak(HTTP_X2F1_X5C_X2E_X5B0_X2D1_X5D_X20_X28_X5Cd_X2B_X29_X20_X2E_X2A_X3F_X0D_X0A) }, { be_const_key_weak(event_established, -1), be_const_closure(Matter_HTTP_async_event_established_closure) }, { be_const_key_weak(event_available, 1), be_const_closure(Matter_HTTP_async_event_available_closure) }, })), diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h index ec18ad0ee..7f0bad2b8 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h @@ -7,34 +7,40 @@ extern const bclass be_class_Matter_HTTP_remote; /******************************************************************** -** Solidified function: init +** Solidified function: device_is_alive ********************************************************************/ -be_local_closure(Matter_HTTP_remote_init, /* name */ +be_local_closure(Matter_HTTP_remote_device_is_alive, /* name */ be_nested_proto( - 11, /* nstack */ - 5, /* argc */ + 4, /* nstack */ + 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(init), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(reachable), + /* K1 */ be_nested_str_weak(reachable_utc), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(rtc), + /* K4 */ be_nested_str_weak(utc), }), - be_str_weak(init), + be_str_weak(device_is_alive), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x60140003, // 0000 GETGBL R5 G3 - 0x5C180000, // 0001 MOVE R6 R0 - 0x7C140200, // 0002 CALL R5 1 - 0x8C140B00, // 0003 GETMET R5 R5 K0 - 0x5C1C0200, // 0004 MOVE R7 R1 - 0x5C200400, // 0005 MOVE R8 R2 - 0x5C240600, // 0006 MOVE R9 R3 - 0x5C280800, // 0007 MOVE R10 R4 - 0x7C140A00, // 0008 CALL R5 5 - 0x80000000, // 0009 RET 0 + ( &(const binstruction[12]) { /* code */ + 0x78060007, // 0000 JMPF R1 #0009 + 0x50080200, // 0001 LDBOOL R2 1 0 + 0x90020002, // 0002 SETMBR R0 K0 R2 + 0xB80A0400, // 0003 GETNGBL R2 K2 + 0x8C080503, // 0004 GETMET R2 R2 K3 + 0x7C080200, // 0005 CALL R2 1 + 0x94080504, // 0006 GETIDX R2 R2 K4 + 0x90020202, // 0007 SETMBR R0 K1 R2 + 0x70020001, // 0008 JMP #000B + 0x50080000, // 0009 LDBOOL R2 0 0 + 0x90020002, // 000A SETMBR R0 K0 R2 + 0x80000000, // 000B RET 0 }) ) ); @@ -42,11 +48,11 @@ be_local_closure(Matter_HTTP_remote_init, /* name */ /******************************************************************** -** Solidified function: begin_sync +** Solidified function: call_sync ********************************************************************/ -be_local_closure(Matter_HTTP_remote_begin_sync, /* name */ +be_local_closure(Matter_HTTP_remote_call_sync, /* name */ be_nested_proto( - 12, /* nstack */ + 17, /* nstack */ 3, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -54,38 +60,158 @@ be_local_closure(Matter_HTTP_remote_begin_sync, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ + ( &(const bvalue[25]) { /* constants */ /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(format), - /* K4 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), - /* K5 */ be_nested_str_weak(addr), - /* K6 */ be_nested_str_weak(port), - /* K7 */ be_const_int(3), - /* K8 */ be_nested_str_weak(begin_sync), + /* K1 */ be_nested_str_weak(webserver), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(wifi), + /* K4 */ be_nested_str_weak(up), + /* K5 */ be_nested_str_weak(eth), + /* K6 */ be_nested_str_weak(current_cmd), + /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D), + /* K8 */ be_nested_str_weak(tr), + /* K9 */ be_nested_str_weak(_X20), + /* K10 */ be_nested_str_weak(_X2B), + /* K11 */ be_nested_str_weak(log), + /* K12 */ be_nested_str_weak(format), + /* K13 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), + /* K14 */ be_nested_str_weak(addr), + /* K15 */ be_nested_str_weak(port), + /* K16 */ be_const_int(2), + /* K17 */ be_nested_str_weak(begin_sync), + /* K18 */ be_nested_str_weak(nil), + /* K19 */ be_const_int(0), + /* K20 */ be_nested_str_weak(_X2E_X2E_X2E), + /* K21 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X2Dresp_X20_X20in_X20_X25i_X20ms_X20from_X20_X25s_X3A_X20_X5B_X25i_X5D_X20_X27_X25s_X27), + /* K22 */ be_nested_str_weak(millis), + /* K23 */ be_nested_str_weak(time_start), + /* K24 */ be_nested_str_weak(payload), }), - be_str_weak(begin_sync), + be_str_weak(call_sync), + &be_const_str_solidified, + ( &(const binstruction[72]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0xB8160400, // 0002 GETNGBL R5 K2 + 0x8C140B03, // 0003 GETMET R5 R5 K3 + 0x7C140200, // 0004 CALL R5 1 + 0x94140B04, // 0005 GETIDX R5 R5 K4 + 0x74160006, // 0006 JMPT R5 #000E + 0xB8160400, // 0007 GETNGBL R5 K2 + 0x8C140B05, // 0008 GETMET R5 R5 K5 + 0x7C140200, // 0009 CALL R5 1 + 0x94140B04, // 000A GETIDX R5 R5 K4 + 0x74160001, // 000B JMPT R5 #000E + 0x4C140000, // 000C LDNIL R5 + 0x80040A00, // 000D RET 1 R5 + 0x4C140000, // 000E LDNIL R5 + 0x90020C05, // 000F SETMBR R0 K6 R5 + 0x8C140708, // 0010 GETMET R5 R3 K8 + 0x5C1C0200, // 0011 MOVE R7 R1 + 0x58200009, // 0012 LDCONST R8 K9 + 0x5824000A, // 0013 LDCONST R9 K10 + 0x7C140800, // 0014 CALL R5 4 + 0x00160E05, // 0015 ADD R5 K7 R5 + 0xB81A0400, // 0016 GETNGBL R6 K2 + 0x8C180D0B, // 0017 GETMET R6 R6 K11 + 0x8C20070C, // 0018 GETMET R8 R3 K12 + 0x5828000D, // 0019 LDCONST R10 K13 + 0x882C010E, // 001A GETMBR R11 R0 K14 + 0x8830010F, // 001B GETMBR R12 R0 K15 + 0x5C340A00, // 001C MOVE R13 R5 + 0x7C200A00, // 001D CALL R8 5 + 0x58240010, // 001E LDCONST R9 K16 + 0x7C180600, // 001F CALL R6 3 + 0x60180003, // 0020 GETGBL R6 G3 + 0x5C1C0000, // 0021 MOVE R7 R0 + 0x7C180200, // 0022 CALL R6 1 + 0x8C180D11, // 0023 GETMET R6 R6 K17 + 0x5C200A00, // 0024 MOVE R8 R5 + 0x5C240400, // 0025 MOVE R9 R2 + 0x7C180600, // 0026 CALL R6 3 + 0x781A0001, // 0027 JMPF R6 #002A + 0x5C1C0C00, // 0028 MOVE R7 R6 + 0x70020000, // 0029 JMP #002B + 0x581C0012, // 002A LDCONST R7 K18 + 0x6020000C, // 002B GETGBL R8 G12 + 0x5C240E00, // 002C MOVE R9 R7 + 0x7C200200, // 002D CALL R8 1 + 0x5426001D, // 002E LDINT R9 30 + 0x24201009, // 002F GT R8 R8 R9 + 0x78220004, // 0030 JMPF R8 #0036 + 0x5422001C, // 0031 LDINT R8 29 + 0x40222608, // 0032 CONNECT R8 K19 R8 + 0x94200E08, // 0033 GETIDX R8 R7 R8 + 0x00201114, // 0034 ADD R8 R8 K20 + 0x5C1C1000, // 0035 MOVE R7 R8 + 0xB8220400, // 0036 GETNGBL R8 K2 + 0x8C20110B, // 0037 GETMET R8 R8 K11 + 0x8C28070C, // 0038 GETMET R10 R3 K12 + 0x58300015, // 0039 LDCONST R12 K21 + 0xB8360400, // 003A GETNGBL R13 K2 + 0x8C341B16, // 003B GETMET R13 R13 K22 + 0x7C340200, // 003C CALL R13 1 + 0x88380117, // 003D GETMBR R14 R0 K23 + 0x04341A0E, // 003E SUB R13 R13 R14 + 0x8838010E, // 003F GETMBR R14 R0 K14 + 0x603C000C, // 0040 GETGBL R15 G12 + 0x88400118, // 0041 GETMBR R16 R0 K24 + 0x7C3C0200, // 0042 CALL R15 1 + 0x5C400E00, // 0043 MOVE R16 R7 + 0x7C280C00, // 0044 CALL R10 6 + 0x582C0010, // 0045 LDCONST R11 K16 + 0x7C200600, // 0046 CALL R8 3 + 0x80040C00, // 0047 RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_last_seen +********************************************************************/ +be_local_closure(Matter_HTTP_remote_web_last_seen, /* 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(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(reachable_utc), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(rtc), + /* K5 */ be_nested_str_weak(utc), + /* K6 */ be_nested_str_weak(matter), + /* K7 */ be_nested_str_weak(seconds_to_dhm), + }), + be_str_weak(web_last_seen), &be_const_str_solidified, ( &(const binstruction[19]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x8C100902, // 0002 GETMET R4 R4 K2 - 0x8C180703, // 0003 GETMET R6 R3 K3 - 0x58200004, // 0004 LDCONST R8 K4 - 0x88240105, // 0005 GETMBR R9 R0 K5 - 0x88280106, // 0006 GETMBR R10 R0 K6 - 0x5C2C0200, // 0007 MOVE R11 R1 - 0x7C180A00, // 0008 CALL R6 5 - 0x581C0007, // 0009 LDCONST R7 K7 - 0x7C100600, // 000A CALL R4 3 - 0x60100003, // 000B GETGBL R4 G3 - 0x5C140000, // 000C MOVE R5 R0 - 0x7C100200, // 000D CALL R4 1 - 0x8C100908, // 000E GETMET R4 R4 K8 - 0x5C180200, // 000F MOVE R6 R1 - 0x5C1C0400, // 0010 MOVE R7 R2 - 0x7C100600, // 0011 CALL R4 3 + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x540DFFFE, // 0002 LDINT R3 -1 + 0x88100102, // 0003 GETMBR R4 R0 K2 + 0x4C140000, // 0004 LDNIL R5 + 0x20100805, // 0005 NE R4 R4 R5 + 0x78120006, // 0006 JMPF R4 #000E + 0xB8120600, // 0007 GETNGBL R4 K3 + 0x8C100904, // 0008 GETMET R4 R4 K4 + 0x7C100200, // 0009 CALL R4 1 + 0x94100905, // 000A GETIDX R4 R4 K5 + 0x88140102, // 000B GETMBR R5 R0 K2 + 0x04100805, // 000C SUB R4 R4 R5 + 0x5C0C0800, // 000D MOVE R3 R4 + 0xB8120C00, // 000E GETNGBL R4 K6 + 0x8C100907, // 000F GETMET R4 R4 K7 + 0x5C180600, // 0010 MOVE R6 R3 + 0x7C100400, // 0011 CALL R4 2 0x80040800, // 0012 RET 1 R4 }) ) @@ -93,12 +219,168 @@ be_local_closure(Matter_HTTP_remote_begin_sync, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: dispatch_cb +********************************************************************/ +be_local_closure(Matter_HTTP_remote_dispatch_cb, /* 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[ 5]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(async_cb_map), + /* K2 */ be_nested_str_weak(keys), + /* K3 */ be_nested_str_weak(current_cmd), + /* K4 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(dispatch_cb), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0x60100010, // 0001 GETGBL R4 G16 + 0x88140101, // 0002 GETMBR R5 R0 K1 + 0x8C140B02, // 0003 GETMET R5 R5 K2 + 0x7C140200, // 0004 CALL R5 1 + 0x7C100200, // 0005 CALL R4 1 + 0xA802000F, // 0006 EXBLK 0 #0017 + 0x5C140800, // 0007 MOVE R5 R4 + 0x7C140000, // 0008 CALL R5 0 + 0x88180101, // 0009 GETMBR R6 R0 K1 + 0x94180C05, // 000A GETIDX R6 R6 R5 + 0x881C0103, // 000B GETMBR R7 R0 K3 + 0x1C1C0C07, // 000C EQ R7 R6 R7 + 0x741E0002, // 000D JMPT R7 #0011 + 0x4C1C0000, // 000E LDNIL R7 + 0x1C1C0C07, // 000F EQ R7 R6 R7 + 0x781E0004, // 0010 JMPF R7 #0016 + 0x5C1C0A00, // 0011 MOVE R7 R5 + 0x5C200200, // 0012 MOVE R8 R1 + 0x5C240400, // 0013 MOVE R9 R2 + 0x88280103, // 0014 GETMBR R10 R0 K3 + 0x7C1C0600, // 0015 CALL R7 3 + 0x7001FFEF, // 0016 JMP #0007 + 0x58100004, // 0017 LDCONST R4 K4 + 0xAC100200, // 0018 CATCH R4 1 0 + 0xB0080000, // 0019 RAISE 2 R0 R0 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: scheduler +********************************************************************/ +be_local_closure(Matter_HTTP_remote_scheduler, /* 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[10]) { /* constants */ + /* K0 */ be_nested_str_weak(probe_next_timestamp_map), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(stop_iteration), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(time_reached), + /* K6 */ be_nested_str_weak(tcp_connected), + /* K7 */ be_nested_str_weak(millis), + /* K8 */ be_nested_str_weak(probe_update_time_map), + /* K9 */ be_nested_str_weak(probe_async), + }), + be_str_weak(scheduler), + &be_const_str_solidified, + ( &(const binstruction[66]) { /* code */ + 0x4C040000, // 0000 LDNIL R1 + 0x60080010, // 0001 GETGBL R2 G16 + 0x880C0100, // 0002 GETMBR R3 R0 K0 + 0x8C0C0701, // 0003 GETMET R3 R3 K1 + 0x7C0C0200, // 0004 CALL R3 1 + 0x7C080200, // 0005 CALL R2 1 + 0xA802000A, // 0006 EXBLK 0 #0012 + 0x5C0C0400, // 0007 MOVE R3 R2 + 0x7C0C0000, // 0008 CALL R3 0 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x94100803, // 000A GETIDX R4 R4 R3 + 0x1C100902, // 000B EQ R4 R4 K2 + 0x78120001, // 000C JMPF R4 #000F + 0x5C040600, // 000D MOVE R1 R3 + 0x70020000, // 000E JMP #0010 + 0x7001FFF6, // 000F JMP #0007 + 0xA8040001, // 0010 EXBLK 1 1 + 0x70020002, // 0011 JMP #0015 + 0x58080003, // 0012 LDCONST R2 K3 + 0xAC080200, // 0013 CATCH R2 1 0 + 0xB0080000, // 0014 RAISE 2 R0 R0 + 0x4C080000, // 0015 LDNIL R2 + 0x1C080202, // 0016 EQ R2 R1 R2 + 0x780A0015, // 0017 JMPF R2 #002E + 0x60080010, // 0018 GETGBL R2 G16 + 0x880C0100, // 0019 GETMBR R3 R0 K0 + 0x8C0C0701, // 001A GETMET R3 R3 K1 + 0x7C0C0200, // 001B CALL R3 1 + 0x7C080200, // 001C CALL R2 1 + 0xA802000C, // 001D EXBLK 0 #002B + 0x5C0C0400, // 001E MOVE R3 R2 + 0x7C0C0000, // 001F CALL R3 0 + 0xB8120800, // 0020 GETNGBL R4 K4 + 0x8C100905, // 0021 GETMET R4 R4 K5 + 0x88180100, // 0022 GETMBR R6 R0 K0 + 0x94180C03, // 0023 GETIDX R6 R6 R3 + 0x7C100400, // 0024 CALL R4 2 + 0x78120001, // 0025 JMPF R4 #0028 + 0x5C040600, // 0026 MOVE R1 R3 + 0x70020000, // 0027 JMP #0029 + 0x7001FFF4, // 0028 JMP #001E + 0xA8040001, // 0029 EXBLK 1 1 + 0x70020002, // 002A JMP #002E + 0x58080003, // 002B LDCONST R2 K3 + 0xAC080200, // 002C CATCH R2 1 0 + 0xB0080000, // 002D RAISE 2 R0 R0 + 0x4C080000, // 002E LDNIL R2 + 0x1C080202, // 002F EQ R2 R1 R2 + 0x780A0000, // 0030 JMPF R2 #0032 + 0x80000400, // 0031 RET 0 + 0x88080106, // 0032 GETMBR R2 R0 K6 + 0x780A0002, // 0033 JMPF R2 #0037 + 0x88080100, // 0034 GETMBR R2 R0 K0 + 0x98080302, // 0035 SETIDX R2 R1 K2 + 0x80000400, // 0036 RET 0 + 0x88080100, // 0037 GETMBR R2 R0 K0 + 0xB80E0800, // 0038 GETNGBL R3 K4 + 0x8C0C0707, // 0039 GETMET R3 R3 K7 + 0x88140108, // 003A GETMBR R5 R0 K8 + 0x94140A01, // 003B GETIDX R5 R5 R1 + 0x7C0C0400, // 003C CALL R3 2 + 0x98080203, // 003D SETIDX R2 R1 R3 + 0x8C080109, // 003E GETMET R2 R0 K9 + 0x5C100200, // 003F MOVE R4 R1 + 0x7C080400, // 0040 CALL R2 2 + 0x80000000, // 0041 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: event_http_finished ********************************************************************/ be_local_closure(Matter_HTTP_remote_event_http_finished, /* name */ be_nested_proto( - 10, /* nstack */ + 12, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -106,64 +388,203 @@ be_local_closure(Matter_HTTP_remote_event_http_finished, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(payload), - /* K2 */ be_nested_str_weak(nil), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(_X2E_X2E_X2E), - /* K5 */ be_nested_str_weak(tasmota), - /* K6 */ be_nested_str_weak(log), - /* K7 */ be_nested_str_weak(format), - /* K8 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20response_X20in_X20_X25i_X20ms_X3A_X20_X27_X25s_X27), - /* K9 */ be_nested_str_weak(millis), - /* K10 */ be_nested_str_weak(time_start), - /* K11 */ be_const_int(3), - /* K12 */ be_nested_str_weak(cb), - /* K13 */ be_nested_str_weak(http_status), + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(current_cmd), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(payload), + /* K3 */ be_nested_str_weak(nil), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(_X2E_X2E_X2E), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(log), + /* K8 */ be_nested_str_weak(format), + /* K9 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20async_X2Dresp_X20in_X20_X25i_X20ms_X20from_X20_X25s_X3A_X20_X5B_X25i_X5D_X20_X27_X25s_X27), + /* K10 */ be_nested_str_weak(millis), + /* K11 */ be_nested_str_weak(time_start), + /* K12 */ be_nested_str_weak(addr), + /* K13 */ be_const_int(2), + /* K14 */ be_nested_str_weak(dispatch_cb), + /* K15 */ be_nested_str_weak(http_status), }), be_str_weak(event_http_finished), &be_const_str_solidified, - ( &(const binstruction[39]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x20080403, // 0003 NE R2 R2 R3 - 0x780A0001, // 0004 JMPF R2 #0007 - 0x88080101, // 0005 GETMBR R2 R0 K1 - 0x70020000, // 0006 JMP #0008 - 0x58080002, // 0007 LDCONST R2 K2 - 0x600C000C, // 0008 GETGBL R3 G12 - 0x5C100400, // 0009 MOVE R4 R2 - 0x7C0C0200, // 000A CALL R3 1 - 0x5412001D, // 000B LDINT R4 30 - 0x240C0604, // 000C GT R3 R3 R4 - 0x780E0004, // 000D JMPF R3 #0013 - 0x540E001C, // 000E LDINT R3 29 - 0x400E0603, // 000F CONNECT R3 K3 R3 - 0x940C0403, // 0010 GETIDX R3 R2 R3 - 0x000C0704, // 0011 ADD R3 R3 K4 - 0x5C080600, // 0012 MOVE R2 R3 - 0xB80E0A00, // 0013 GETNGBL R3 K5 - 0x8C0C0706, // 0014 GETMET R3 R3 K6 - 0x8C140307, // 0015 GETMET R5 R1 K7 - 0x581C0008, // 0016 LDCONST R7 K8 - 0xB8220A00, // 0017 GETNGBL R8 K5 - 0x8C201109, // 0018 GETMET R8 R8 K9 - 0x7C200200, // 0019 CALL R8 1 - 0x8824010A, // 001A GETMBR R9 R0 K10 - 0x04201009, // 001B SUB R8 R8 R9 - 0x5C240400, // 001C MOVE R9 R2 - 0x7C140800, // 001D CALL R5 4 - 0x5818000B, // 001E LDCONST R6 K11 - 0x7C0C0600, // 001F CALL R3 3 - 0x880C010C, // 0020 GETMBR R3 R0 K12 - 0x780E0003, // 0021 JMPF R3 #0026 - 0x8C0C010C, // 0022 GETMET R3 R0 K12 - 0x8814010D, // 0023 GETMBR R5 R0 K13 - 0x88180101, // 0024 GETMBR R6 R0 K1 - 0x7C0C0600, // 0025 CALL R3 3 - 0x80000000, // 0026 RET 0 + ( &(const binstruction[46]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060000, // 0003 JMPF R1 #0005 + 0x80000200, // 0004 RET 0 + 0xA4060200, // 0005 IMPORT R1 K1 + 0x88080102, // 0006 GETMBR R2 R0 K2 + 0x4C0C0000, // 0007 LDNIL R3 + 0x20080403, // 0008 NE R2 R2 R3 + 0x780A0001, // 0009 JMPF R2 #000C + 0x88080102, // 000A GETMBR R2 R0 K2 + 0x70020000, // 000B JMP #000D + 0x58080003, // 000C LDCONST R2 K3 + 0x600C000C, // 000D GETGBL R3 G12 + 0x5C100400, // 000E MOVE R4 R2 + 0x7C0C0200, // 000F CALL R3 1 + 0x5412001D, // 0010 LDINT R4 30 + 0x240C0604, // 0011 GT R3 R3 R4 + 0x780E0004, // 0012 JMPF R3 #0018 + 0x540E001C, // 0013 LDINT R3 29 + 0x400E0803, // 0014 CONNECT R3 K4 R3 + 0x940C0403, // 0015 GETIDX R3 R2 R3 + 0x000C0705, // 0016 ADD R3 R3 K5 + 0x5C080600, // 0017 MOVE R2 R3 + 0xB80E0C00, // 0018 GETNGBL R3 K6 + 0x8C0C0707, // 0019 GETMET R3 R3 K7 + 0x8C140308, // 001A GETMET R5 R1 K8 + 0x581C0009, // 001B LDCONST R7 K9 + 0xB8220C00, // 001C GETNGBL R8 K6 + 0x8C20110A, // 001D GETMET R8 R8 K10 + 0x7C200200, // 001E CALL R8 1 + 0x8824010B, // 001F GETMBR R9 R0 K11 + 0x04201009, // 0020 SUB R8 R8 R9 + 0x8824010C, // 0021 GETMBR R9 R0 K12 + 0x6028000C, // 0022 GETGBL R10 G12 + 0x882C0102, // 0023 GETMBR R11 R0 K2 + 0x7C280200, // 0024 CALL R10 1 + 0x5C2C0400, // 0025 MOVE R11 R2 + 0x7C140C00, // 0026 CALL R5 6 + 0x5818000D, // 0027 LDCONST R6 K13 + 0x7C0C0600, // 0028 CALL R3 3 + 0x8C0C010E, // 0029 GETMET R3 R0 K14 + 0x8814010F, // 002A GETMBR R5 R0 K15 + 0x88180102, // 002B GETMBR R6 R0 K2 + 0x7C0C0600, // 002C CALL R3 3 + 0x80000000, // 002D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: probe_async +********************************************************************/ +be_local_closure(Matter_HTTP_remote_probe_async, /* name */ + be_nested_proto( + 13, /* nstack */ + 2, /* 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(string), + /* K1 */ be_nested_str_weak(webserver), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(wifi), + /* K4 */ be_nested_str_weak(up), + /* K5 */ be_nested_str_weak(eth), + /* K6 */ be_nested_str_weak(current_cmd), + /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D), + /* K8 */ be_nested_str_weak(tr), + /* K9 */ be_nested_str_weak(_X20), + /* K10 */ be_nested_str_weak(_X2B), + /* K11 */ be_nested_str_weak(log), + /* K12 */ be_nested_str_weak(format), + /* K13 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20async_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), + /* K14 */ be_nested_str_weak(addr), + /* K15 */ be_nested_str_weak(port), + /* K16 */ be_const_int(3), + /* K17 */ be_nested_str_weak(begin), + }), + be_str_weak(probe_async), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xB8120400, // 0002 GETNGBL R4 K2 + 0x8C100903, // 0003 GETMET R4 R4 K3 + 0x7C100200, // 0004 CALL R4 1 + 0x94100904, // 0005 GETIDX R4 R4 K4 + 0x74120006, // 0006 JMPT R4 #000E + 0xB8120400, // 0007 GETNGBL R4 K2 + 0x8C100905, // 0008 GETMET R4 R4 K5 + 0x7C100200, // 0009 CALL R4 1 + 0x94100904, // 000A GETIDX R4 R4 K4 + 0x74120001, // 000B JMPT R4 #000E + 0x4C100000, // 000C LDNIL R4 + 0x80040800, // 000D RET 1 R4 + 0x90020C01, // 000E SETMBR R0 K6 R1 + 0x8C100508, // 000F GETMET R4 R2 K8 + 0x5C180200, // 0010 MOVE R6 R1 + 0x581C0009, // 0011 LDCONST R7 K9 + 0x5820000A, // 0012 LDCONST R8 K10 + 0x7C100800, // 0013 CALL R4 4 + 0x00120E04, // 0014 ADD R4 K7 R4 + 0xB8160400, // 0015 GETNGBL R5 K2 + 0x8C140B0B, // 0016 GETMET R5 R5 K11 + 0x8C1C050C, // 0017 GETMET R7 R2 K12 + 0x5824000D, // 0018 LDCONST R9 K13 + 0x8828010E, // 0019 GETMBR R10 R0 K14 + 0x882C010F, // 001A GETMBR R11 R0 K15 + 0x5C300800, // 001B MOVE R12 R4 + 0x7C1C0A00, // 001C CALL R7 5 + 0x58200010, // 001D LDCONST R8 K16 + 0x7C140600, // 001E CALL R5 3 + 0x8C140111, // 001F GETMET R5 R0 K17 + 0x5C1C0800, // 0020 MOVE R7 R4 + 0x7C140400, // 0021 CALL R5 2 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_HTTP_remote_init, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(probe_update_time_map), + /* K1 */ be_nested_str_weak(probe_next_timestamp_map), + /* K2 */ be_nested_str_weak(async_cb_map), + /* K3 */ be_nested_str_weak(current_cmd), + /* K4 */ be_nested_str_weak(reachable), + /* K5 */ be_nested_str_weak(init), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[23]) { /* code */ + 0x60100013, // 0000 GETGBL R4 G19 + 0x7C100000, // 0001 CALL R4 0 + 0x90020004, // 0002 SETMBR R0 K0 R4 + 0x60100013, // 0003 GETGBL R4 G19 + 0x7C100000, // 0004 CALL R4 0 + 0x90020204, // 0005 SETMBR R0 K1 R4 + 0x60100013, // 0006 GETGBL R4 G19 + 0x7C100000, // 0007 CALL R4 0 + 0x90020404, // 0008 SETMBR R0 K2 R4 + 0x4C100000, // 0009 LDNIL R4 + 0x90020604, // 000A SETMBR R0 K3 R4 + 0x50100000, // 000B LDBOOL R4 0 0 + 0x90020804, // 000C SETMBR R0 K4 R4 + 0x60100003, // 000D GETGBL R4 G3 + 0x5C140000, // 000E MOVE R5 R0 + 0x7C100200, // 000F CALL R4 1 + 0x8C100905, // 0010 GETMET R4 R4 K5 + 0x5C180200, // 0011 MOVE R6 R1 + 0x541E004F, // 0012 LDINT R7 80 + 0x5C200400, // 0013 MOVE R8 R2 + 0x5C240600, // 0014 MOVE R9 R3 + 0x7C100A00, // 0015 CALL R4 5 + 0x80000000, // 0016 RET 0 }) ) ); @@ -183,107 +604,33 @@ be_local_closure(Matter_HTTP_remote_event_http_failed, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20failed), - /* K3 */ be_const_int(3), - /* K4 */ be_nested_str_weak(cb), - /* K5 */ be_nested_str_weak(http_status), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(current_cmd), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20failed), + /* K4 */ be_const_int(3), + /* K5 */ be_nested_str_weak(dispatch_cb), + /* K6 */ be_nested_str_weak(http_status), }), be_str_weak(event_http_failed), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x580C0002, // 0002 LDCONST R3 K2 - 0x58100003, // 0003 LDCONST R4 K3 - 0x7C040600, // 0004 CALL R1 3 - 0x88040104, // 0005 GETMBR R1 R0 K4 - 0x78060003, // 0006 JMPF R1 #000B - 0x8C040104, // 0007 GETMET R1 R0 K4 - 0x880C0105, // 0008 GETMBR R3 R0 K5 - 0x4C100000, // 0009 LDNIL R4 - 0x7C040600, // 000A CALL R1 3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_cb -********************************************************************/ -be_local_closure(Matter_HTTP_remote_set_cb, /* name */ - be_nested_proto( - 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[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(cb), - }), - be_str_weak(set_cb), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: begin -********************************************************************/ -be_local_closure(Matter_HTTP_remote_begin, /* 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[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(format), - /* K4 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20async_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), - /* K5 */ be_nested_str_weak(addr), - /* K6 */ be_nested_str_weak(port), - /* K7 */ be_const_int(3), - /* K8 */ be_nested_str_weak(begin), - }), - be_str_weak(begin), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xB80E0200, // 0001 GETNGBL R3 K1 - 0x8C0C0702, // 0002 GETMET R3 R3 K2 - 0x8C140503, // 0003 GETMET R5 R2 K3 - 0x581C0004, // 0004 LDCONST R7 K4 - 0x88200105, // 0005 GETMBR R8 R0 K5 - 0x88240106, // 0006 GETMBR R9 R0 K6 - 0x5C280200, // 0007 MOVE R10 R1 - 0x7C140A00, // 0008 CALL R5 5 - 0x58180007, // 0009 LDCONST R6 K7 - 0x7C0C0600, // 000A CALL R3 3 - 0x600C0003, // 000B GETGBL R3 G3 - 0x5C100000, // 000C MOVE R4 R0 - 0x7C0C0200, // 000D CALL R3 1 - 0x8C0C0708, // 000E GETMET R3 R3 K8 - 0x5C140200, // 000F MOVE R5 R1 - 0x7C0C0400, // 0010 CALL R3 2 - 0x80040600, // 0011 RET 1 R3 + ( &(const binstruction[15]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060000, // 0003 JMPF R1 #0005 + 0x80000200, // 0004 RET 0 + 0xB8060200, // 0005 GETNGBL R1 K1 + 0x8C040302, // 0006 GETMET R1 R1 K2 + 0x580C0003, // 0007 LDCONST R3 K3 + 0x58100004, // 0008 LDCONST R4 K4 + 0x7C040600, // 0009 CALL R1 3 + 0x8C040105, // 000A GETMET R1 R0 K5 + 0x880C0106, // 000B GETMBR R3 R0 K6 + 0x4C100000, // 000C LDNIL R4 + 0x7C040600, // 000D CALL R1 3 + 0x80000000, // 000E RET 0 }) ) ); @@ -295,7 +642,7 @@ be_local_closure(Matter_HTTP_remote_begin, /* name */ ********************************************************************/ be_local_closure(Matter_HTTP_remote_event_http_timeout, /* name */ be_nested_proto( - 5, /* nstack */ + 12, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -303,29 +650,130 @@ be_local_closure(Matter_HTTP_remote_event_http_timeout, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20timeout), - /* K3 */ be_const_int(3), - /* K4 */ be_nested_str_weak(cb), - /* K5 */ be_nested_str_weak(http_status), + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(current_cmd), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(log), + /* K4 */ be_nested_str_weak(format), + /* K5 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20timeout_X20http_status_X3D_X25i_X20phase_X3D_X25i_X20tcp_status_X3D_X25i_X20size_payload_X3D_X25i), + /* K6 */ be_nested_str_weak(http_status), + /* K7 */ be_nested_str_weak(phase), + /* K8 */ be_nested_str_weak(status), + /* K9 */ be_nested_str_weak(payload), + /* K10 */ be_const_int(2), + /* K11 */ be_nested_str_weak(dispatch_cb), }), be_str_weak(event_http_timeout), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x580C0002, // 0002 LDCONST R3 K2 - 0x58100003, // 0003 LDCONST R4 K3 - 0x7C040600, // 0004 CALL R1 3 - 0x88040104, // 0005 GETMBR R1 R0 K4 - 0x78060003, // 0006 JMPF R1 #000B - 0x8C040104, // 0007 GETMET R1 R0 K4 - 0x880C0105, // 0008 GETMBR R3 R0 K5 - 0x4C100000, // 0009 LDNIL R4 - 0x7C040600, // 000A CALL R1 3 - 0x80000000, // 000B RET 0 + ( &(const binstruction[24]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C080403, // 0003 EQ R2 R2 R3 + 0x780A0000, // 0004 JMPF R2 #0006 + 0x80000400, // 0005 RET 0 + 0xB80A0400, // 0006 GETNGBL R2 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x8C100304, // 0008 GETMET R4 R1 K4 + 0x58180005, // 0009 LDCONST R6 K5 + 0x881C0106, // 000A GETMBR R7 R0 K6 + 0x88200107, // 000B GETMBR R8 R0 K7 + 0x88240108, // 000C GETMBR R9 R0 K8 + 0x6028000C, // 000D GETGBL R10 G12 + 0x882C0109, // 000E GETMBR R11 R0 K9 + 0x7C280200, // 000F CALL R10 1 + 0x7C100C00, // 0010 CALL R4 6 + 0x5814000A, // 0011 LDCONST R5 K10 + 0x7C080600, // 0012 CALL R2 3 + 0x8C08010B, // 0013 GETMET R2 R0 K11 + 0x88100106, // 0014 GETMBR R4 R0 K6 + 0x4C140000, // 0015 LDNIL R5 + 0x7C080600, // 0016 CALL R2 3 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_async_cb +********************************************************************/ +be_local_closure(Matter_HTTP_remote_add_async_cb, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* 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(async_cb_map), + }), + be_str_weak(add_async_cb), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x980C0202, // 0001 SETIDX R3 R1 R2 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_schedule +********************************************************************/ +be_local_closure(Matter_HTTP_remote_add_schedule, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(probe_update_time_map), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(probe_next_timestamp_map), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(jitter), + /* K5 */ be_nested_str_weak(add_async_cb), + }), + be_str_weak(add_schedule), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x5C180200, // 0002 MOVE R6 R1 + 0x7C100400, // 0003 CALL R4 2 + 0x78120003, // 0004 JMPF R4 #0009 + 0x88100100, // 0005 GETMBR R4 R0 K0 + 0x94100801, // 0006 GETIDX R4 R4 R1 + 0x14100404, // 0007 LT R4 R2 R4 + 0x78120007, // 0008 JMPF R4 #0011 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x98100202, // 000A SETIDX R4 R1 R2 + 0x88100102, // 000B GETMBR R4 R0 K2 + 0xB8160600, // 000C GETNGBL R5 K3 + 0x8C140B04, // 000D GETMET R5 R5 K4 + 0x5C1C0400, // 000E MOVE R7 R2 + 0x7C140400, // 000F CALL R5 2 + 0x98100205, // 0010 SETIDX R4 R1 R5 + 0x4C100000, // 0011 LDNIL R4 + 0x20100604, // 0012 NE R4 R3 R4 + 0x78120003, // 0013 JMPF R4 #0018 + 0x8C100105, // 0014 GETMET R4 R0 K5 + 0x5C180600, // 0015 MOVE R6 R3 + 0x5C1C0200, // 0016 MOVE R7 R1 + 0x7C100600, // 0017 CALL R4 3 + 0x80000000, // 0018 RET 0 }) ) ); @@ -337,18 +785,28 @@ be_local_closure(Matter_HTTP_remote_event_http_timeout, /* name */ ********************************************************************/ extern const bclass be_class_Matter_HTTP_async; be_local_class(Matter_HTTP_remote, - 1, + 6, &be_class_Matter_HTTP_async, - be_nested_map(8, + be_nested_map(18, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(cb, 1), be_const_var(0) }, - { be_const_key_weak(event_http_timeout, -1), be_const_closure(Matter_HTTP_remote_event_http_timeout_closure) }, - { be_const_key_weak(event_http_failed, -1), be_const_closure(Matter_HTTP_remote_event_http_failed_closure) }, - { be_const_key_weak(init, 7), be_const_closure(Matter_HTTP_remote_init_closure) }, - { be_const_key_weak(begin_sync, 2), be_const_closure(Matter_HTTP_remote_begin_sync_closure) }, - { be_const_key_weak(set_cb, -1), be_const_closure(Matter_HTTP_remote_set_cb_closure) }, - { be_const_key_weak(begin, -1), be_const_closure(Matter_HTTP_remote_begin_closure) }, + { be_const_key_weak(device_is_alive, 4), be_const_closure(Matter_HTTP_remote_device_is_alive_closure) }, + { be_const_key_weak(current_cmd, -1), be_const_var(3) }, + { be_const_key_weak(reachable, -1), be_const_var(4) }, + { be_const_key_weak(probe_next_timestamp_map, -1), be_const_var(1) }, + { be_const_key_weak(web_last_seen, -1), be_const_closure(Matter_HTTP_remote_web_last_seen_closure) }, + { be_const_key_weak(dispatch_cb, -1), be_const_closure(Matter_HTTP_remote_dispatch_cb_closure) }, + { be_const_key_weak(async_cb_map, -1), be_const_var(2) }, + { be_const_key_weak(add_async_cb, -1), be_const_closure(Matter_HTTP_remote_add_async_cb_closure) }, + { be_const_key_weak(probe_update_time_map, 11), be_const_var(0) }, { be_const_key_weak(event_http_finished, -1), be_const_closure(Matter_HTTP_remote_event_http_finished_closure) }, + { be_const_key_weak(probe_async, -1), be_const_closure(Matter_HTTP_remote_probe_async_closure) }, + { be_const_key_weak(scheduler, -1), be_const_closure(Matter_HTTP_remote_scheduler_closure) }, + { be_const_key_weak(event_http_failed, -1), be_const_closure(Matter_HTTP_remote_event_http_failed_closure) }, + { be_const_key_weak(reachable_utc, -1), be_const_var(5) }, + { be_const_key_weak(event_http_timeout, -1), be_const_closure(Matter_HTTP_remote_event_http_timeout_closure) }, + { be_const_key_weak(init, 7), be_const_closure(Matter_HTTP_remote_init_closure) }, + { be_const_key_weak(add_schedule, -1), be_const_closure(Matter_HTTP_remote_add_schedule_closure) }, + { be_const_key_weak(call_sync, 3), be_const_closure(Matter_HTTP_remote_call_sync_closure) }, })), be_str_weak(Matter_HTTP_remote) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h index 56a8e65a6..e12baa6a7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h @@ -7,74 +7,24 @@ extern const bclass be_class_Matter_Plugin; /******************************************************************** -** Solidified function: every_250ms +** Solidified function: read_event ********************************************************************/ -be_local_closure(Matter_Plugin_every_250ms, /* name */ +be_local_closure(Matter_Plugin_read_event, /* name */ be_nested_proto( 6, /* nstack */ - 1, /* argc */ + 5, /* 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_next), - /* K1 */ be_nested_str_weak(crypto), - /* K2 */ be_nested_str_weak(random), - /* K3 */ be_nested_str_weak(get), - /* K4 */ be_const_int(0), - /* K5 */ be_const_int(2147483647), - /* K6 */ be_nested_str_weak(tasmota), - /* K7 */ be_nested_str_weak(millis), - /* K8 */ be_nested_str_weak(UPDATE_TIME), - /* K9 */ be_nested_str_weak(time_reached), - /* K10 */ be_nested_str_weak(tick), - /* K11 */ be_nested_str_weak(device), - /* K12 */ be_nested_str_weak(probe_shadow_async), - }), - be_str_weak(every_250ms), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(read_event), &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x7806000F, // 0003 JMPF R1 #0014 - 0xA4060200, // 0004 IMPORT R1 K1 - 0x8C080302, // 0005 GETMET R2 R1 K2 - 0x54120003, // 0006 LDINT R4 4 - 0x7C080400, // 0007 CALL R2 2 - 0x8C080503, // 0008 GETMET R2 R2 K3 - 0x58100004, // 0009 LDCONST R4 K4 - 0x54160003, // 000A LDINT R5 4 - 0x7C080600, // 000B CALL R2 3 - 0x2C080505, // 000C AND R2 R2 K5 - 0xB80E0C00, // 000D GETNGBL R3 K6 - 0x8C0C0707, // 000E GETMET R3 R3 K7 - 0x88140108, // 000F GETMBR R5 R0 K8 - 0x10140405, // 0010 MOD R5 R2 R5 - 0x7C0C0400, // 0011 CALL R3 2 - 0x90020003, // 0012 SETMBR R0 K0 R3 - 0x70020010, // 0013 JMP #0025 - 0xB8060C00, // 0014 GETNGBL R1 K6 - 0x8C040309, // 0015 GETMET R1 R1 K9 - 0x880C0100, // 0016 GETMBR R3 R0 K0 - 0x7C040400, // 0017 CALL R1 2 - 0x7806000B, // 0018 JMPF R1 #0025 - 0x8804010A, // 0019 GETMBR R1 R0 K10 - 0x8808010B, // 001A GETMBR R2 R0 K11 - 0x8808050A, // 001B GETMBR R2 R2 K10 - 0x20040202, // 001C NE R1 R1 R2 - 0x78060001, // 001D JMPF R1 #0020 - 0x8C04010C, // 001E GETMET R1 R0 K12 - 0x7C040200, // 001F CALL R1 1 - 0xB8060C00, // 0020 GETNGBL R1 K6 - 0x8C040307, // 0021 GETMET R1 R1 K7 - 0x880C0108, // 0022 GETMBR R3 R0 K8 - 0x7C040400, // 0023 CALL R1 2 - 0x90020001, // 0024 SETMBR R0 K0 R1 - 0x80000000, // 0025 RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -127,6 +77,57 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */ /*******************************************************************/ +/******************************************************************** +** 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: parse_sensors +********************************************************************/ +be_local_closure(Matter_Plugin_parse_sensors, /* 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_sensors), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: ********************************************************************/ @@ -154,6 +155,171 @@ be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ /*******************************************************************/ +/******************************************************************** +** 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), + /* K1 */ be_nested_str_weak(device), + /* K2 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow_lazy), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x88080500, // 0002 GETMBR R2 R2 K0 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060004, // 0004 JMPF R1 #000A + 0x8C040102, // 0005 GETMET R1 R0 K2 + 0x7C040200, // 0006 CALL R1 1 + 0x88040101, // 0007 GETMBR R1 R0 K1 + 0x88040300, // 0008 GETMBR R1 R1 K0 + 0x90020001, // 0009 SETMBR R0 K0 R1 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: 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: 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: ui_conf_to_string +********************************************************************/ +be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */ + be_nested_proto( + 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[ 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(ui_conf_to_string), + &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 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: write_attribute ********************************************************************/ @@ -180,12 +346,12 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */ /******************************************************************** -** Solidified function: parse_sensors +** Solidified function: subscribe_attribute ********************************************************************/ -be_local_closure(Matter_Plugin_parse_sensors, /* name */ +be_local_closure(Matter_Plugin_subscribe_attribute, /* name */ be_nested_proto( - 2, /* nstack */ - 2, /* argc */ + 6, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -193,35 +359,11 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */ 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: invoke_request -********************************************************************/ -be_local_closure(Matter_Plugin_invoke_request, /* name */ - be_nested_proto( - 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_str_weak(subscribe_attribute), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -331,6 +473,257 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_read_attribute, /* name */ + be_nested_proto( + 16, /* nstack */ + 3, /* 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(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(create_TLV), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[92]) { /* code */ + 0xB80E0000, // 0000 GETNGBL R3 K0 + 0x880C0701, // 0001 GETMBR R3 R3 K1 + 0x88100502, // 0002 GETMBR R4 R2 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x541A001C, // 0004 LDINT R6 29 + 0x1C180806, // 0005 EQ R6 R4 R6 + 0x781A0051, // 0006 JMPF R6 #0059 + 0x1C180B04, // 0007 EQ R6 R5 K4 + 0x781A001B, // 0008 JMPF R6 #0025 + 0x8C180705, // 0009 GETMET R6 R3 K5 + 0x7C180200, // 000A CALL R6 1 + 0x881C0106, // 000B GETMBR R7 R0 K6 + 0x60200010, // 000C GETGBL R8 G16 + 0x8C240F07, // 000D GETMET R9 R7 K7 + 0x7C240200, // 000E CALL R9 1 + 0x7C200200, // 000F CALL R8 1 + 0xA802000E, // 0010 EXBLK 0 #0020 + 0x5C241000, // 0011 MOVE R9 R8 + 0x7C240000, // 0012 CALL R9 0 + 0x8C280D08, // 0013 GETMET R10 R6 K8 + 0x7C280200, // 0014 CALL R10 1 + 0x8C2C1509, // 0015 GETMET R11 R10 K9 + 0x58340004, // 0016 LDCONST R13 K4 + 0x8838070A, // 0017 GETMBR R14 R3 K10 + 0x5C3C1200, // 0018 MOVE R15 R9 + 0x7C2C0800, // 0019 CALL R11 4 + 0x8C2C1509, // 001A GETMET R11 R10 K9 + 0x5834000B, // 001B LDCONST R13 K11 + 0x8838070A, // 001C GETMBR R14 R3 K10 + 0x943C0E09, // 001D GETIDX R15 R7 R9 + 0x7C2C0800, // 001E CALL R11 4 + 0x7001FFF0, // 001F JMP #0011 + 0x5820000C, // 0020 LDCONST R8 K12 + 0xAC200200, // 0021 CATCH R8 1 0 + 0xB0080000, // 0022 RAISE 2 R0 R0 + 0x80040C00, // 0023 RET 1 R6 + 0x70020032, // 0024 JMP #0058 + 0x1C180B0B, // 0025 EQ R6 R5 K11 + 0x781A0013, // 0026 JMPF R6 #003B + 0x8C180705, // 0027 GETMET R6 R3 K5 + 0x7C180200, // 0028 CALL R6 1 + 0x601C0010, // 0029 GETGBL R7 G16 + 0x8C20010D, // 002A GETMET R8 R0 K13 + 0x7C200200, // 002B CALL R8 1 + 0x7C1C0200, // 002C CALL R7 1 + 0xA8020007, // 002D EXBLK 0 #0036 + 0x5C200E00, // 002E MOVE R8 R7 + 0x7C200000, // 002F CALL R8 0 + 0x8C240D09, // 0030 GETMET R9 R6 K9 + 0x4C2C0000, // 0031 LDNIL R11 + 0x8830070E, // 0032 GETMBR R12 R3 K14 + 0x5C341000, // 0033 MOVE R13 R8 + 0x7C240800, // 0034 CALL R9 4 + 0x7001FFF7, // 0035 JMP #002E + 0x581C000C, // 0036 LDCONST R7 K12 + 0xAC1C0200, // 0037 CATCH R7 1 0 + 0xB0080000, // 0038 RAISE 2 R0 R0 + 0x80040C00, // 0039 RET 1 R6 + 0x7002001C, // 003A JMP #0058 + 0x1C180B0F, // 003B EQ R6 R5 K15 + 0x781A0003, // 003C JMPF R6 #0041 + 0x8C180705, // 003D GETMET R6 R3 K5 + 0x7C180200, // 003E CALL R6 1 + 0x80040C00, // 003F RET 1 R6 + 0x70020016, // 0040 JMP #0058 + 0x1C180B10, // 0041 EQ R6 R5 K16 + 0x781A0003, // 0042 JMPF R6 #0047 + 0x8C180705, // 0043 GETMET R6 R3 K5 + 0x7C180200, // 0044 CALL R6 1 + 0x80040C00, // 0045 RET 1 R6 + 0x70020010, // 0046 JMP #0058 + 0x541AFFFB, // 0047 LDINT R6 65532 + 0x1C180A06, // 0048 EQ R6 R5 R6 + 0x781A0005, // 0049 JMPF R6 #0050 + 0x8C180711, // 004A GETMET R6 R3 K17 + 0x8820070E, // 004B GETMBR R8 R3 K14 + 0x58240004, // 004C LDCONST R9 K4 + 0x7C180600, // 004D CALL R6 3 + 0x80040C00, // 004E RET 1 R6 + 0x70020007, // 004F JMP #0058 + 0x541AFFFC, // 0050 LDINT R6 65533 + 0x1C180A06, // 0051 EQ R6 R5 R6 + 0x781A0004, // 0052 JMPF R6 #0058 + 0x8C180711, // 0053 GETMET R6 R3 K17 + 0x8820070E, // 0054 GETMBR R8 R3 K14 + 0x5824000B, // 0055 LDCONST R9 K11 + 0x7C180600, // 0056 CALL R6 3 + 0x80040C00, // 0057 RET 1 R6 + 0x70020001, // 0058 JMP #005B + 0x4C180000, // 0059 LDNIL R6 + 0x80040C00, // 005A RET 1 R6 + 0x80000000, // 005B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_invoke_request, /* name */ + be_nested_proto( + 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: timed_request +********************************************************************/ +be_local_closure(Matter_Plugin_timed_request, /* name */ + be_nested_proto( + 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(timed_request), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_update_shadow, /* 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[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040101, // 0000 GETMBR R1 R0 K1 + 0x88040300, // 0001 GETMBR R1 R1 K0 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: 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[ 3]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(ARG_TYPE), + }), + be_str_weak(ui_string_to_conf), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0x88100101, // 0001 GETMBR R4 R0 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x780A0004, // 0003 JMPF R2 #0009 + 0x78120003, // 0004 JMPF R4 #0009 + 0x5C180A00, // 0005 MOVE R6 R5 + 0x5C1C0400, // 0006 MOVE R7 R2 + 0x7C180200, // 0007 CALL R6 1 + 0x98040806, // 0008 SETIDX R1 R4 R6 + 0x80040200, // 0009 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: attribute_updated ********************************************************************/ @@ -410,88 +803,32 @@ be_local_closure(Matter_Plugin_has, /* name */ /******************************************************************** -** Solidified function: update_shadow_lazy +** Solidified function: get_attribute_list ********************************************************************/ -be_local_closure(Matter_Plugin_update_shadow_lazy, /* name */ +be_local_closure(Matter_Plugin_get_attribute_list, /* name */ be_nested_proto( - 3, /* 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_weak(tick), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(update_shadow), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), }), - be_str_weak(update_shadow_lazy), + be_str_weak(get_attribute_list), &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: 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: parse_update -********************************************************************/ -be_local_closure(Matter_Plugin_parse_update, /* 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_update), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140400, // 0002 MOVE R5 R2 + 0x60180012, // 0003 GETGBL R6 G18 + 0x7C180000, // 0004 CALL R6 0 + 0x7C0C0600, // 0005 CALL R3 3 + 0x80040600, // 0006 RET 1 R3 }) ) ); @@ -532,474 +869,22 @@ be_local_closure(Matter_Plugin_init, /* name */ /*******************************************************************/ -/******************************************************************** -** 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 */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: subscribe_attribute -********************************************************************/ -be_local_closure(Matter_Plugin_subscribe_attribute, /* 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_attribute), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** 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[ 3]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Plugin), - /* K1 */ be_nested_str_weak(ARG), - /* K2 */ be_nested_str_weak(ARG_TYPE), - }), - be_str_weak(ui_string_to_conf), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x580C0000, // 0000 LDCONST R3 K0 - 0x88100101, // 0001 GETMBR R4 R0 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x780A0004, // 0003 JMPF R2 #0009 - 0x78120003, // 0004 JMPF R4 #0009 - 0x5C180A00, // 0005 MOVE R6 R5 - 0x5C1C0400, // 0006 MOVE R7 R2 - 0x7C180200, // 0007 CALL R6 1 - 0x98040806, // 0008 SETIDX R1 R4 R6 - 0x80040200, // 0009 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: 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_attribute_list -********************************************************************/ -be_local_closure(Matter_Plugin_get_attribute_list, /* 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[ 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 */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140400, // 0002 MOVE R5 R2 - 0x60180012, // 0003 GETGBL R6 G18 - 0x7C180000, // 0004 CALL R6 0 - 0x7C0C0600, // 0005 CALL R3 3 - 0x80040600, // 0006 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: timed_request -********************************************************************/ -be_local_closure(Matter_Plugin_timed_request, /* name */ - be_nested_proto( - 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(timed_request), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_update_shadow, /* 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[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(parse_update), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88040101, // 0000 GETMBR R1 R0 K1 - 0x88040300, // 0001 GETMBR R1 R1 K0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x8C040102, // 0003 GETMET R1 R0 K2 - 0x4C0C0000, // 0004 LDNIL R3 - 0x7C040400, // 0005 CALL R1 2 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: probe_shadow_async -********************************************************************/ -be_local_closure(Matter_Plugin_probe_shadow_async, /* 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(update_shadow), - }), - be_str_weak(probe_shadow_async), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -be_local_closure(Matter_Plugin_read_attribute, /* name */ - be_nested_proto( - 16, /* nstack */ - 3, /* 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(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(get_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(create_TLV), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[93]) { /* code */ - 0xB80E0000, // 0000 GETNGBL R3 K0 - 0x880C0701, // 0001 GETMBR R3 R3 K1 - 0x88100502, // 0002 GETMBR R4 R2 K2 - 0x88140503, // 0003 GETMBR R5 R2 K3 - 0x541A001C, // 0004 LDINT R6 29 - 0x1C180806, // 0005 EQ R6 R4 R6 - 0x781A0052, // 0006 JMPF R6 #005A - 0x1C180B04, // 0007 EQ R6 R5 K4 - 0x781A001C, // 0008 JMPF R6 #0026 - 0x8C180705, // 0009 GETMET R6 R3 K5 - 0x7C180200, // 000A CALL R6 1 - 0x8C1C0106, // 000B GETMET R7 R0 K6 - 0x7C1C0200, // 000C CALL R7 1 - 0x60200010, // 000D GETGBL R8 G16 - 0x8C240F07, // 000E GETMET R9 R7 K7 - 0x7C240200, // 000F CALL R9 1 - 0x7C200200, // 0010 CALL R8 1 - 0xA802000E, // 0011 EXBLK 0 #0021 - 0x5C241000, // 0012 MOVE R9 R8 - 0x7C240000, // 0013 CALL R9 0 - 0x8C280D08, // 0014 GETMET R10 R6 K8 - 0x7C280200, // 0015 CALL R10 1 - 0x8C2C1509, // 0016 GETMET R11 R10 K9 - 0x58340004, // 0017 LDCONST R13 K4 - 0x8838070A, // 0018 GETMBR R14 R3 K10 - 0x5C3C1200, // 0019 MOVE R15 R9 - 0x7C2C0800, // 001A CALL R11 4 - 0x8C2C1509, // 001B GETMET R11 R10 K9 - 0x5834000B, // 001C LDCONST R13 K11 - 0x8838070A, // 001D GETMBR R14 R3 K10 - 0x943C0E09, // 001E GETIDX R15 R7 R9 - 0x7C2C0800, // 001F CALL R11 4 - 0x7001FFF0, // 0020 JMP #0012 - 0x5820000C, // 0021 LDCONST R8 K12 - 0xAC200200, // 0022 CATCH R8 1 0 - 0xB0080000, // 0023 RAISE 2 R0 R0 - 0x80040C00, // 0024 RET 1 R6 - 0x70020032, // 0025 JMP #0059 - 0x1C180B0B, // 0026 EQ R6 R5 K11 - 0x781A0013, // 0027 JMPF R6 #003C - 0x8C180705, // 0028 GETMET R6 R3 K5 - 0x7C180200, // 0029 CALL R6 1 - 0x601C0010, // 002A GETGBL R7 G16 - 0x8C20010D, // 002B GETMET R8 R0 K13 - 0x7C200200, // 002C CALL R8 1 - 0x7C1C0200, // 002D CALL R7 1 - 0xA8020007, // 002E EXBLK 0 #0037 - 0x5C200E00, // 002F MOVE R8 R7 - 0x7C200000, // 0030 CALL R8 0 - 0x8C240D09, // 0031 GETMET R9 R6 K9 - 0x4C2C0000, // 0032 LDNIL R11 - 0x8830070E, // 0033 GETMBR R12 R3 K14 - 0x5C341000, // 0034 MOVE R13 R8 - 0x7C240800, // 0035 CALL R9 4 - 0x7001FFF7, // 0036 JMP #002F - 0x581C000C, // 0037 LDCONST R7 K12 - 0xAC1C0200, // 0038 CATCH R7 1 0 - 0xB0080000, // 0039 RAISE 2 R0 R0 - 0x80040C00, // 003A RET 1 R6 - 0x7002001C, // 003B JMP #0059 - 0x1C180B0F, // 003C EQ R6 R5 K15 - 0x781A0003, // 003D JMPF R6 #0042 - 0x8C180705, // 003E GETMET R6 R3 K5 - 0x7C180200, // 003F CALL R6 1 - 0x80040C00, // 0040 RET 1 R6 - 0x70020016, // 0041 JMP #0059 - 0x1C180B10, // 0042 EQ R6 R5 K16 - 0x781A0003, // 0043 JMPF R6 #0048 - 0x8C180705, // 0044 GETMET R6 R3 K5 - 0x7C180200, // 0045 CALL R6 1 - 0x80040C00, // 0046 RET 1 R6 - 0x70020010, // 0047 JMP #0059 - 0x541AFFFB, // 0048 LDINT R6 65532 - 0x1C180A06, // 0049 EQ R6 R5 R6 - 0x781A0005, // 004A JMPF R6 #0051 - 0x8C180711, // 004B GETMET R6 R3 K17 - 0x8820070E, // 004C GETMBR R8 R3 K14 - 0x58240004, // 004D LDCONST R9 K4 - 0x7C180600, // 004E CALL R6 3 - 0x80040C00, // 004F RET 1 R6 - 0x70020007, // 0050 JMP #0059 - 0x541AFFFC, // 0051 LDINT R6 65533 - 0x1C180A06, // 0052 EQ R6 R5 R6 - 0x781A0004, // 0053 JMPF R6 #0059 - 0x8C180711, // 0054 GETMET R6 R3 K17 - 0x8820070E, // 0055 GETMBR R8 R3 K14 - 0x5824000B, // 0056 LDCONST R9 K11 - 0x7C180600, // 0057 CALL R6 3 - 0x80040C00, // 0058 RET 1 R6 - 0x70020001, // 0059 JMP #005C - 0x4C180000, // 005A LDNIL R6 - 0x80040C00, // 005B RET 1 R6 - 0x80000000, // 005C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: ui_conf_to_string -********************************************************************/ -be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */ - be_nested_proto( - 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[ 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(ui_conf_to_string), - &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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_types -********************************************************************/ -be_local_closure(Matter_Plugin_get_types, /* 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(TYPES), - }), - be_str_weak(get_types), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin ********************************************************************/ be_local_class(Matter_Plugin, 5, NULL, - be_nested_map(34, + be_nested_map(31, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(every_250ms, 11), be_const_closure(Matter_Plugin_every_250ms_closure) }, - { be_const_key_weak(get_cluster_list, 24), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak() }, - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(tick, -1), be_const_var(4) }, - { be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) }, - { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) }, - { be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(parse_sensors, 29), be_const_closure(Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) }, - { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_parse_update_closure) }, - { be_const_key_weak(update_next, -1), be_const_var(0) }, - { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) }, + { be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) }, + { be_const_key_weak(clusters, 21), be_const_var(3) }, + { be_const_key_weak(get_cluster_list, 14), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(clusters, 10), be_const_var(3) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) }, - { be_const_key_weak(read_event, 18), be_const_closure(Matter_Plugin_read_event_closure) }, - { be_const_key_weak(read_attribute, 19), be_const_closure(Matter_Plugin_read_attribute_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_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) }, - { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) }, - { be_const_key_weak(device, -1), be_const_var(1) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, + { be_const_key_weak(tick, 23), be_const_var(4) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak() }, + { be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) }, + { be_const_key_weak(update_shadow_lazy, 28), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { @@ -1014,13 +899,28 @@ be_local_class(Matter_Plugin, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(probe_shadow_async, -1), be_const_closure(Matter_Plugin_probe_shadow_async_closure) }, - { be_const_key_weak(ARG_TYPE, 17), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) }, - { be_const_key_weak(subscribe_attribute, 3), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, + { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_every_250ms_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(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) }, + { be_const_key_weak(parse_sensors, 25), be_const_closure(Matter_Plugin_parse_sensors_closure) }, + { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, + { be_const_key_weak(UPDATE_TIME, 18), be_const_int(5000) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, - { be_const_key_weak(endpoint, 4), be_const_var(2) }, - { be_const_key_weak(get_types, -1), be_const_closure(Matter_Plugin_get_types_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) }, + { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) }, + { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak() }, + { 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, 20), be_const_var(0) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) }, + { be_const_key_weak(update_shadow, 30), be_const_closure(Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) }, + { be_const_key_weak(device, 15), be_const_var(1) }, + { be_const_key_weak(endpoint, -1), be_const_var(2) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) }, + { be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, })), be_str_weak(Matter_Plugin) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h index df532e975..d63c564df 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h @@ -6,6 +6,194 @@ extern const bclass be_class_Matter_Plugin_Bridge_HTTP; +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* 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[10]) { /* 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(create_TLV), + /* K6 */ be_nested_str_weak(BOOL), + /* K7 */ be_nested_str_weak(http_remote), + /* K8 */ be_nested_str_weak(reachable), + /* K9 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[29]) { /* code */ + 0xB80E0000, // 0000 GETNGBL R3 K0 + 0x880C0701, // 0001 GETMBR R3 R3 K1 + 0x88100502, // 0002 GETMBR R4 R2 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x541A0038, // 0004 LDINT R6 57 + 0x1C180806, // 0005 EQ R6 R4 R6 + 0x781A000C, // 0006 JMPF R6 #0014 + 0x1C180B04, // 0007 EQ R6 R5 K4 + 0x781A0000, // 0008 JMPF R6 #000A + 0x70020008, // 0009 JMP #0013 + 0x541A0010, // 000A LDINT R6 17 + 0x1C180A06, // 000B EQ R6 R5 R6 + 0x781A0005, // 000C JMPF R6 #0013 + 0x8C180705, // 000D GETMET R6 R3 K5 + 0x88200706, // 000E GETMBR R8 R3 K6 + 0x88240107, // 000F GETMBR R9 R0 K7 + 0x88241308, // 0010 GETMBR R9 R9 K8 + 0x7C180600, // 0011 CALL R6 3 + 0x80040C00, // 0012 RET 1 R6 + 0x70020007, // 0013 JMP #001C + 0x60180003, // 0014 GETGBL R6 G3 + 0x5C1C0000, // 0015 MOVE R7 R0 + 0x7C180200, // 0016 CALL R6 1 + 0x8C180D09, // 0017 GETMET R6 R6 K9 + 0x5C200200, // 0018 MOVE R8 R1 + 0x5C240400, // 0019 MOVE R9 R2 + 0x7C180600, // 001A CALL R6 3 + 0x80040C00, // 001B RET 1 R6 + 0x80000000, // 001C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: call_remote_sync +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync, /* 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[15]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(json), + /* K2 */ be_const_int(2), + /* K3 */ be_nested_str_weak(_X20), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(http_remote), + /* K6 */ be_nested_str_weak(call_sync), + /* K7 */ be_nested_str_weak(SYNC_TIMEOUT), + /* K8 */ be_nested_str_weak(device_is_alive), + /* K9 */ be_nested_str_weak(load), + /* K10 */ be_const_int(1), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying), + /* K14 */ be_const_int(3), + }), + be_str_weak(call_remote_sync), + &be_const_str_solidified, + ( &(const binstruction[43]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x4C180000, // 0003 LDNIL R6 + 0x20180406, // 0004 NE R6 R2 R6 + 0x781A0005, // 0005 JMPF R6 #000C + 0x00180303, // 0006 ADD R6 R1 K3 + 0x601C0008, // 0007 GETGBL R7 G8 + 0x5C200400, // 0008 MOVE R8 R2 + 0x7C1C0200, // 0009 CALL R7 1 + 0x00180C07, // 000A ADD R6 R6 R7 + 0x5C040C00, // 000B MOVE R1 R6 + 0x24180B04, // 000C GT R6 R5 K4 + 0x781A0016, // 000D JMPF R6 #0025 + 0x88180105, // 000E GETMBR R6 R0 K5 + 0x8C180D06, // 000F GETMET R6 R6 K6 + 0x5C200200, // 0010 MOVE R8 R1 + 0x88240107, // 0011 GETMBR R9 R0 K7 + 0x7C180600, // 0012 CALL R6 3 + 0x4C1C0000, // 0013 LDNIL R7 + 0x201C0C07, // 0014 NE R7 R6 R7 + 0x781E0007, // 0015 JMPF R7 #001E + 0x881C0105, // 0016 GETMBR R7 R0 K5 + 0x8C1C0F08, // 0017 GETMET R7 R7 K8 + 0x50240200, // 0018 LDBOOL R9 1 0 + 0x7C1C0400, // 0019 CALL R7 2 + 0x8C1C0909, // 001A GETMET R7 R4 K9 + 0x5C240C00, // 001B MOVE R9 R6 + 0x7C1C0400, // 001C CALL R7 2 + 0x80040E00, // 001D RET 1 R7 + 0x04140B0A, // 001E SUB R5 R5 K10 + 0xB81E1600, // 001F GETNGBL R7 K11 + 0x8C1C0F0C, // 0020 GETMET R7 R7 K12 + 0x5824000D, // 0021 LDCONST R9 K13 + 0x5828000E, // 0022 LDCONST R10 K14 + 0x7C1C0600, // 0023 CALL R7 3 + 0x7001FFE6, // 0024 JMP #000C + 0x88180105, // 0025 GETMBR R6 R0 K5 + 0x8C180D08, // 0026 GETMET R6 R6 K8 + 0x50200000, // 0027 LDBOOL R8 0 0 + 0x7C180400, // 0028 CALL R6 2 + 0x4C180000, // 0029 LDNIL R6 + 0x80040C00, // 002A RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_update_shadow, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), + /* K2 */ be_nested_str_weak(call_remote_sync), + /* K3 */ be_nested_str_weak(UPDATE_CMD), + /* K4 */ be_nested_str_weak(parse_http_response), + /* K5 */ be_const_int(1), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x88040101, // 0000 GETMBR R1 R0 K1 + 0x88040300, // 0001 GETMBR R1 R1 K0 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x8C040102, // 0003 GETMET R1 R0 K2 + 0x880C0103, // 0004 GETMBR R3 R0 K3 + 0x7C040400, // 0005 CALL R1 2 + 0x78060004, // 0006 JMPF R1 #000C + 0x8C080104, // 0007 GETMET R2 R0 K4 + 0x58100005, // 0008 LDCONST R4 K5 + 0x5C140200, // 0009 MOVE R5 R1 + 0x88180103, // 000A GETMBR R6 R0 K3 + 0x7C080800, // 000B CALL R2 4 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: ui_conf_to_string ********************************************************************/ @@ -53,227 +241,75 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */ - be_nested_proto( - 11, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 6, /* nstack */ - 2, /* 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(parse_http_response), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x68080000, // 0000 GETUPV R2 U0 - 0x8C080500, // 0001 GETMET R2 R2 K0 - 0x5C100000, // 0002 MOVE R4 R0 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C080600, // 0004 CALL R2 3 - 0x80040400, // 0005 RET 1 R2 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(init), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(ARG_HTTP), - /* K4 */ be_nested_str_weak(http_shadow_map), - /* K5 */ be_nested_str_weak(reachable), - /* K6 */ be_nested_str_weak(next_probe_timestamp), - /* K7 */ be_nested_str_weak(http_remote), - /* K8 */ be_nested_str_weak(matter), - /* K9 */ be_nested_str_weak(HTTP_remote), - /* K10 */ be_nested_str_weak(PROBE_TIMEOUT), - /* K11 */ be_nested_str_weak(set_cb), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0x60140003, // 0001 GETGBL R5 G3 - 0x5C180000, // 0002 MOVE R6 R0 - 0x7C140200, // 0003 CALL R5 1 - 0x8C140B01, // 0004 GETMET R5 R5 K1 - 0x5C1C0200, // 0005 MOVE R7 R1 - 0x5C200400, // 0006 MOVE R8 R2 - 0x5C240600, // 0007 MOVE R9 R3 - 0x7C140800, // 0008 CALL R5 4 - 0x8C140702, // 0009 GETMET R5 R3 K2 - 0x881C0103, // 000A GETMBR R7 R0 K3 - 0x7C140400, // 000B CALL R5 2 - 0x60180013, // 000C GETGBL R6 G19 - 0x7C180000, // 000D CALL R6 0 - 0x90020806, // 000E SETMBR R0 K4 R6 - 0x50180000, // 000F LDBOOL R6 0 0 - 0x90020A06, // 0010 SETMBR R0 K5 R6 - 0x4C180000, // 0011 LDNIL R6 - 0x90020C06, // 0012 SETMBR R0 K6 R6 - 0xB81A1000, // 0013 GETNGBL R6 K8 - 0x8C180D09, // 0014 GETMET R6 R6 K9 - 0x5C200A00, // 0015 MOVE R8 R5 - 0x5426004F, // 0016 LDINT R9 80 - 0x8828010A, // 0017 GETMBR R10 R0 K10 - 0x7C180800, // 0018 CALL R6 4 - 0x90020E06, // 0019 SETMBR R0 K7 R6 - 0x88180107, // 001A GETMBR R6 R0 K7 - 0x8C180D0B, // 001B GETMET R6 R6 K11 - 0x84200000, // 001C CLOSURE R8 P0 - 0x7C180400, // 001D CALL R6 2 - 0xA0000000, // 001E CLOSE R0 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_remote_status_lazy -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_get_remote_status_lazy, /* 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[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(tick), - /* K2 */ be_nested_str_weak(http_shadow_map), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(_tick), - /* K5 */ be_nested_str_weak(call_remote_sync), - /* K6 */ be_nested_str_weak(Status), - }), - be_str_weak(get_remote_status_lazy), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x880C0701, // 0001 GETMBR R3 R3 K1 - 0x88100102, // 0002 GETMBR R4 R0 K2 - 0x8C100903, // 0003 GETMET R4 R4 K3 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C100400, // 0005 CALL R4 2 - 0x78120005, // 0006 JMPF R4 #000D - 0x8C140903, // 0007 GETMET R5 R4 K3 - 0x581C0004, // 0008 LDCONST R7 K4 - 0x7C140400, // 0009 CALL R5 2 - 0x1C140A03, // 000A EQ R5 R5 R3 - 0x78160000, // 000B JMPF R5 #000D - 0x80040800, // 000C RET 1 R4 - 0x8C140105, // 000D GETMET R5 R0 K5 - 0x581C0006, // 000E LDCONST R7 K6 - 0x60200008, // 000F GETGBL R8 G8 - 0x5C240200, // 0010 MOVE R9 R1 - 0x7C200200, // 0011 CALL R8 1 - 0x7C140600, // 0012 CALL R5 3 - 0x80040A00, // 0013 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: parse_http_response ********************************************************************/ be_local_closure(Matter_Plugin_Bridge_HTTP_parse_http_response, /* name */ be_nested_proto( - 11, /* 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[14]) { /* constants */ + ( &(const bvalue[12]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(reachable), - /* K2 */ be_nested_str_weak(device), - /* K3 */ be_nested_str_weak(tick), - /* K4 */ be_nested_str_weak(reachable_tick), + /* K1 */ be_nested_str_weak(http_remote), + /* K2 */ be_nested_str_weak(device_is_alive), + /* K3 */ be_nested_str_weak(device), + /* K4 */ be_nested_str_weak(tick), /* K5 */ be_nested_str_weak(json), /* K6 */ be_nested_str_weak(load), /* K7 */ be_nested_str_weak(contains), /* K8 */ be_nested_str_weak(StatusSNS), /* K9 */ be_nested_str_weak(StatusSTS), /* K10 */ be_nested_str_weak(StatusSHT), - /* K11 */ be_nested_str_weak(_tick), - /* K12 */ be_nested_str_weak(http_shadow_map), - /* K13 */ be_nested_str_weak(parse_update), + /* K11 */ be_nested_str_weak(parse_update), }), be_str_weak(parse_http_response), &be_const_str_solidified, - ( &(const binstruction[44]) { /* code */ - 0x240C0300, // 0000 GT R3 R1 K0 - 0x780E0028, // 0001 JMPF R3 #002B - 0x500C0200, // 0002 LDBOOL R3 1 0 - 0x90020203, // 0003 SETMBR R0 K1 R3 - 0x880C0102, // 0004 GETMBR R3 R0 K2 - 0x880C0703, // 0005 GETMBR R3 R3 K3 - 0x90020803, // 0006 SETMBR R0 K4 R3 - 0xA4120A00, // 0007 IMPORT R4 K5 - 0x8C140906, // 0008 GETMET R5 R4 K6 - 0x5C1C0400, // 0009 MOVE R7 R2 - 0x7C140400, // 000A CALL R5 2 - 0x4C180000, // 000B LDNIL R6 - 0x7816001D, // 000C JMPF R5 #002B - 0x8C1C0B07, // 000D GETMET R7 R5 K7 - 0x58240008, // 000E LDCONST R9 K8 - 0x7C1C0400, // 000F CALL R7 2 - 0x781E0002, // 0010 JMPF R7 #0014 - 0x94140B08, // 0011 GETIDX R5 R5 K8 - 0x541A0007, // 0012 LDINT R6 8 - 0x7002000C, // 0013 JMP #0021 - 0x8C1C0B07, // 0014 GETMET R7 R5 K7 - 0x58240009, // 0015 LDCONST R9 K9 - 0x7C1C0400, // 0016 CALL R7 2 - 0x781E0002, // 0017 JMPF R7 #001B - 0x94140B09, // 0018 GETIDX R5 R5 K9 - 0x541A000A, // 0019 LDINT R6 11 - 0x70020005, // 001A JMP #0021 - 0x8C1C0B07, // 001B GETMET R7 R5 K7 - 0x5824000A, // 001C LDCONST R9 K10 - 0x7C1C0400, // 001D CALL R7 2 - 0x781E0001, // 001E JMPF R7 #0021 - 0x94140B09, // 001F GETIDX R5 R5 K9 - 0x541A000C, // 0020 LDINT R6 13 - 0x4C1C0000, // 0021 LDNIL R7 - 0x201C0C07, // 0022 NE R7 R6 R7 - 0x781E0002, // 0023 JMPF R7 #0027 - 0x98161603, // 0024 SETIDX R5 K11 R3 - 0x881C010C, // 0025 GETMBR R7 R0 K12 - 0x981C0C05, // 0026 SETIDX R7 R6 R5 - 0x8C1C010D, // 0027 GETMET R7 R0 K13 - 0x5C240A00, // 0028 MOVE R9 R5 - 0x5C280C00, // 0029 MOVE R10 R6 - 0x7C1C0600, // 002A CALL R7 3 - 0x80000000, // 002B RET 0 + ( &(const binstruction[39]) { /* code */ + 0x24100300, // 0000 GT R4 R1 K0 + 0x78120023, // 0001 JMPF R4 #0026 + 0x88100101, // 0002 GETMBR R4 R0 K1 + 0x8C100902, // 0003 GETMET R4 R4 K2 + 0x50180200, // 0004 LDBOOL R6 1 0 + 0x7C100400, // 0005 CALL R4 2 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x88100904, // 0007 GETMBR R4 R4 K4 + 0xA4160A00, // 0008 IMPORT R5 K5 + 0x8C180B06, // 0009 GETMET R6 R5 K6 + 0x5C200400, // 000A MOVE R8 R2 + 0x7C180400, // 000B CALL R6 2 + 0x4C1C0000, // 000C LDNIL R7 + 0x781A0017, // 000D JMPF R6 #0026 + 0x8C200D07, // 000E GETMET R8 R6 K7 + 0x58280008, // 000F LDCONST R10 K8 + 0x7C200400, // 0010 CALL R8 2 + 0x78220002, // 0011 JMPF R8 #0015 + 0x94180D08, // 0012 GETIDX R6 R6 K8 + 0x541E0007, // 0013 LDINT R7 8 + 0x7002000C, // 0014 JMP #0022 + 0x8C200D07, // 0015 GETMET R8 R6 K7 + 0x58280009, // 0016 LDCONST R10 K9 + 0x7C200400, // 0017 CALL R8 2 + 0x78220002, // 0018 JMPF R8 #001C + 0x94180D09, // 0019 GETIDX R6 R6 K9 + 0x541E000A, // 001A LDINT R7 11 + 0x70020005, // 001B JMP #0022 + 0x8C200D07, // 001C GETMET R8 R6 K7 + 0x5828000A, // 001D LDCONST R10 K10 + 0x7C200400, // 001E CALL R8 2 + 0x78220001, // 001F JMPF R8 #0022 + 0x94180D09, // 0020 GETIDX R6 R6 K9 + 0x541E000C, // 0021 LDINT R7 13 + 0x8C20010B, // 0022 GETMET R8 R0 K11 + 0x5C280C00, // 0023 MOVE R10 R6 + 0x5C2C0E00, // 0024 MOVE R11 R7 + 0x7C200600, // 0025 CALL R8 3 + 0x80000000, // 0026 RET 0 }) ) ); @@ -281,9 +317,39 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_parse_http_response, /* name */ /******************************************************************** -** Solidified function: get_types +** Solidified function: every_250ms ********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_get_types, /* name */ +be_local_closure(Matter_Plugin_Bridge_HTTP_every_250ms, /* 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(http_remote), + /* K1 */ be_nested_str_weak(scheduler), + }), + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_web_values, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -293,35 +359,23 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_get_types, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(TYPES), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(stop_iteration), - /* K3 */ be_const_int(1), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(content_send), + /* K2 */ be_nested_str_weak(_X7C_X20_X26lt_X3B_X2D_X2D_X20_X28), + /* K3 */ be_nested_str_weak(NAME), + /* K4 */ be_nested_str_weak(_X29_X20_X2D_X2D_X26gt_X3B), }), - be_str_weak(get_types), + be_str_weak(web_values), &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x60040013, // 0000 GETGBL R1 G19 - 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 - 0x88100100, // 000A GETMBR R4 R0 K0 - 0x94100803, // 000B GETIDX R4 R4 R3 - 0x98040604, // 000C SETIDX R1 R3 R4 - 0x7001FFF9, // 000D JMP #0008 - 0x58080002, // 000E LDCONST R2 K2 - 0xAC080200, // 000F CATCH R2 1 0 - 0xB0080000, // 0010 RAISE 2 R0 R0 - 0x540A0012, // 0011 LDINT R2 19 - 0x98040503, // 0012 SETIDX R1 R2 K3 - 0x80040200, // 0013 RET 1 R1 + ( &(const binstruction[ 7]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x88100103, // 0002 GETMBR R4 R0 K3 + 0x00120404, // 0003 ADD R4 K2 R4 + 0x00100904, // 0004 ADD R4 R4 K4 + 0x7C080400, // 0005 CALL R2 2 + 0x80000000, // 0006 RET 0 }) ) ); @@ -381,12 +435,12 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf, /* name */ /******************************************************************** -** Solidified function: probe_shadow_async +** Solidified function: parse_update ********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_probe_shadow_async, /* name */ +be_local_closure(Matter_Plugin_Bridge_HTTP_parse_update, /* name */ be_nested_proto( - 1, /* nstack */ - 1, /* argc */ + 3, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -394,7 +448,7 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_probe_shadow_async, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(probe_shadow_async), + be_str_weak(parse_update), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 @@ -405,12 +459,12 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_probe_shadow_async, /* name */ /******************************************************************** -** Solidified function: read_attribute +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* name */ +be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */ be_nested_proto( 10, /* nstack */ - 3, /* argc */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -418,47 +472,40 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 9]) { /* 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(create_TLV), - /* K6 */ be_nested_str_weak(BOOL), - /* K7 */ be_nested_str_weak(reachable), - /* K8 */ be_nested_str_weak(read_attribute), + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(init), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG_HTTP), + /* K4 */ be_nested_str_weak(http_remote), + /* K5 */ be_nested_str_weak(device), + /* K6 */ be_nested_str_weak(register_http_remote), + /* K7 */ be_nested_str_weak(PROBE_TIMEOUT), + /* K8 */ be_nested_str_weak(register_cmd_cb), }), - be_str_weak(read_attribute), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0xB80E0000, // 0000 GETNGBL R3 K0 - 0x880C0701, // 0001 GETMBR R3 R3 K1 - 0x88100502, // 0002 GETMBR R4 R2 K2 - 0x88140503, // 0003 GETMBR R5 R2 K3 - 0x541A0038, // 0004 LDINT R6 57 - 0x1C180806, // 0005 EQ R6 R4 R6 - 0x781A000B, // 0006 JMPF R6 #0013 - 0x1C180B04, // 0007 EQ R6 R5 K4 - 0x781A0000, // 0008 JMPF R6 #000A - 0x70020007, // 0009 JMP #0012 - 0x541A0010, // 000A LDINT R6 17 - 0x1C180A06, // 000B EQ R6 R5 R6 - 0x781A0004, // 000C JMPF R6 #0012 - 0x8C180705, // 000D GETMET R6 R3 K5 - 0x88200706, // 000E GETMBR R8 R3 K6 + ( &(const binstruction[21]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0x60140003, // 0001 GETGBL R5 G3 + 0x5C180000, // 0002 MOVE R6 R0 + 0x7C140200, // 0003 CALL R5 1 + 0x8C140B01, // 0004 GETMET R5 R5 K1 + 0x5C1C0200, // 0005 MOVE R7 R1 + 0x5C200400, // 0006 MOVE R8 R2 + 0x5C240600, // 0007 MOVE R9 R3 + 0x7C140800, // 0008 CALL R5 4 + 0x8C140702, // 0009 GETMET R5 R3 K2 + 0x881C0103, // 000A GETMBR R7 R0 K3 + 0x7C140400, // 000B CALL R5 2 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x8C180D06, // 000D GETMET R6 R6 K6 + 0x5C200A00, // 000E MOVE R8 R5 0x88240107, // 000F GETMBR R9 R0 K7 0x7C180600, // 0010 CALL R6 3 - 0x80040C00, // 0011 RET 1 R6 - 0x70020007, // 0012 JMP #001B - 0x60180003, // 0013 GETGBL R6 G3 - 0x5C1C0000, // 0014 MOVE R7 R0 - 0x7C180200, // 0015 CALL R6 1 - 0x8C180D08, // 0016 GETMET R6 R6 K8 - 0x5C200200, // 0017 MOVE R8 R1 - 0x5C240400, // 0018 MOVE R9 R2 - 0x7C180600, // 0019 CALL R6 3 - 0x80040C00, // 001A RET 1 R6 - 0x80000000, // 001B RET 0 + 0x90020806, // 0011 SETMBR R0 K4 R6 + 0x8C180108, // 0012 GETMET R6 R0 K8 + 0x7C180200, // 0013 CALL R6 1 + 0x80000000, // 0014 RET 0 }) ) ); @@ -466,199 +513,62 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* name */ /******************************************************************** -** Solidified function: is_reachable_sync +** Solidified function: register_cmd_cb ********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_is_reachable_sync, /* name */ +be_local_closure(Matter_Plugin_Bridge_HTTP_register_cmd_cb, /* name */ be_nested_proto( - 5, /* nstack */ + 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(device), - /* K1 */ be_nested_str_weak(tick), - /* K2 */ be_nested_str_weak(reachable_tick), - /* K3 */ be_nested_str_weak(call_remote_sync), - /* K4 */ be_nested_str_weak(), - /* K5 */ be_nested_str_weak(reachable), + 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(parse_http_response), + }), + 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 + }) + ), }), - be_str_weak(is_reachable_sync), + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(http_remote), + /* K1 */ be_nested_str_weak(add_schedule), + /* K2 */ be_nested_str_weak(UPDATE_CMD), + /* K3 */ be_nested_str_weak(UPDATE_TIME), + }), + be_str_weak(register_cmd_cb), &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ + ( &(const binstruction[ 8]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88040301, // 0001 GETMBR R1 R1 K1 - 0x88080102, // 0002 GETMBR R2 R0 K2 - 0x20040202, // 0003 NE R1 R1 R2 - 0x78060006, // 0004 JMPF R1 #000C - 0x8C040103, // 0005 GETMET R1 R0 K3 - 0x580C0004, // 0006 LDCONST R3 K4 - 0x58100004, // 0007 LDCONST R4 K4 - 0x7C040600, // 0008 CALL R1 3 - 0x4C080000, // 0009 LDNIL R2 - 0x20080202, // 000A NE R2 R1 R2 - 0x90020A02, // 000B SETMBR R0 K5 R2 - 0x88040105, // 000C GETMBR R1 R0 K5 - 0x80040200, // 000D RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: call_remote_sync -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync, /* 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[21]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(wifi), - /* K3 */ be_nested_str_weak(up), - /* K4 */ be_nested_str_weak(eth), - /* K5 */ be_const_int(2), - /* K6 */ be_nested_str_weak(format), - /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D_X25s_X25_X2520_X25s), - /* K8 */ be_nested_str_weak(), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(http_remote), - /* K11 */ be_nested_str_weak(begin_sync), - /* K12 */ be_nested_str_weak(SYNC_TIMEOUT), - /* K13 */ be_nested_str_weak(reachable), - /* K14 */ be_nested_str_weak(reachable_tick), - /* K15 */ be_nested_str_weak(device), - /* K16 */ be_nested_str_weak(tick), - /* K17 */ be_const_int(1), - /* K18 */ be_nested_str_weak(log), - /* K19 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying), - /* K20 */ be_const_int(3), - }), - be_str_weak(call_remote_sync), - &be_const_str_solidified, - ( &(const binstruction[49]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x8C100902, // 0002 GETMET R4 R4 K2 - 0x7C100200, // 0003 CALL R4 1 - 0x94100903, // 0004 GETIDX R4 R4 K3 - 0x74120006, // 0005 JMPT R4 #000D - 0xB8120200, // 0006 GETNGBL R4 K1 - 0x8C100904, // 0007 GETMET R4 R4 K4 - 0x7C100200, // 0008 CALL R4 1 - 0x94100903, // 0009 GETIDX R4 R4 K3 - 0x74120001, // 000A JMPT R4 #000D - 0x4C100000, // 000B LDNIL R4 - 0x80040800, // 000C RET 1 R4 - 0x58100005, // 000D LDCONST R4 K5 - 0x8C140706, // 000E GETMET R5 R3 K6 - 0x581C0007, // 000F LDCONST R7 K7 - 0x5C200200, // 0010 MOVE R8 R1 - 0x780A0001, // 0011 JMPF R2 #0014 - 0x5C240400, // 0012 MOVE R9 R2 - 0x70020000, // 0013 JMP #0015 - 0x58240008, // 0014 LDCONST R9 K8 - 0x7C140800, // 0015 CALL R5 4 - 0x24180909, // 0016 GT R6 R4 K9 - 0x781A0014, // 0017 JMPF R6 #002D - 0x8818010A, // 0018 GETMBR R6 R0 K10 - 0x8C180D0B, // 0019 GETMET R6 R6 K11 - 0x5C200A00, // 001A MOVE R8 R5 - 0x8824010C, // 001B GETMBR R9 R0 K12 - 0x7C180600, // 001C CALL R6 3 - 0x4C1C0000, // 001D LDNIL R7 - 0x201C0C07, // 001E NE R7 R6 R7 - 0x781E0005, // 001F JMPF R7 #0026 - 0x501C0200, // 0020 LDBOOL R7 1 0 - 0x90021A07, // 0021 SETMBR R0 K13 R7 - 0x881C010F, // 0022 GETMBR R7 R0 K15 - 0x881C0F10, // 0023 GETMBR R7 R7 K16 - 0x90021C07, // 0024 SETMBR R0 K14 R7 - 0x80040C00, // 0025 RET 1 R6 - 0x04100911, // 0026 SUB R4 R4 K17 - 0xB81E0200, // 0027 GETNGBL R7 K1 - 0x8C1C0F12, // 0028 GETMET R7 R7 K18 - 0x58240013, // 0029 LDCONST R9 K19 - 0x58280014, // 002A LDCONST R10 K20 - 0x7C1C0600, // 002B CALL R7 3 - 0x7001FFE8, // 002C JMP #0016 - 0x50180000, // 002D LDBOOL R6 0 0 - 0x90021A06, // 002E SETMBR R0 K13 R6 - 0x4C180000, // 002F LDNIL R6 - 0x80040C00, // 0030 RET 1 R6 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: call_remote_async -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote_async, /* 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[11]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(wifi), - /* K3 */ be_nested_str_weak(up), - /* K4 */ be_nested_str_weak(eth), - /* K5 */ be_nested_str_weak(format), - /* K6 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D_X25s_X25_X2520_X25s), - /* K7 */ be_nested_str_weak(), - /* K8 */ be_nested_str_weak(http_remote), - /* K9 */ be_nested_str_weak(begin), - /* K10 */ be_nested_str_weak(PROBE_TIMEOUT), - }), - be_str_weak(call_remote_async), - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x8C100902, // 0002 GETMET R4 R4 K2 - 0x7C100200, // 0003 CALL R4 1 - 0x94100903, // 0004 GETIDX R4 R4 K3 - 0x74120006, // 0005 JMPT R4 #000D - 0xB8120200, // 0006 GETNGBL R4 K1 - 0x8C100904, // 0007 GETMET R4 R4 K4 - 0x7C100200, // 0008 CALL R4 1 - 0x94100903, // 0009 GETIDX R4 R4 K3 - 0x74120001, // 000A JMPT R4 #000D - 0x4C100000, // 000B LDNIL R4 - 0x80040800, // 000C RET 1 R4 - 0x8C100705, // 000D GETMET R4 R3 K5 - 0x58180006, // 000E LDCONST R6 K6 - 0x5C1C0200, // 000F MOVE R7 R1 - 0x780A0001, // 0010 JMPF R2 #0013 - 0x5C200400, // 0011 MOVE R8 R2 - 0x70020000, // 0012 JMP #0014 - 0x58200007, // 0013 LDCONST R8 K7 - 0x7C100800, // 0014 CALL R4 4 - 0x88140108, // 0015 GETMBR R5 R0 K8 - 0x8C140B09, // 0016 GETMET R5 R5 K9 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x8820010A, // 0018 GETMBR R8 R0 K10 - 0x7C140600, // 0019 CALL R5 3 - 0x80000000, // 001A RET 0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x88100103, // 0003 GETMBR R4 R0 K3 + 0x84140000, // 0004 CLOSURE R5 P0 + 0x7C040800, // 0005 CALL R1 4 + 0xA0000000, // 0006 CLOSE R0 + 0x80000000, // 0007 RET 0 }) ) ); @@ -670,27 +580,12 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote_async, /* name */ ********************************************************************/ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Bridge_HTTP, - 5, + 1, &be_class_Matter_Plugin_Device, - be_nested_map(24, + be_nested_map(21, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_HTTP, 1), be_nested_str_weak(url) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) }, - { be_const_key_weak(SYNC_TIMEOUT, -1), be_const_int(500) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_init_closure) }, - { be_const_key_weak(get_remote_status_lazy, 19), be_const_closure(Matter_Plugin_Bridge_HTTP_get_remote_status_lazy_closure) }, - { be_const_key_weak(parse_http_response, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_http_response_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak() }, - { be_const_key_weak(call_remote_sync, 16), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync_closure) }, - { be_const_key_weak(reachable, -1), be_const_var(0) }, - { be_const_key_weak(get_types, 12), be_const_closure(Matter_Plugin_Bridge_HTTP_get_types_closure) }, - { be_const_key_weak(ui_conf_to_string, 7), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string_closure) }, - { be_const_key_weak(http_shadow_map, -1), be_const_var(2) }, - { be_const_key_weak(probe_shadow_async, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_probe_shadow_async_closure) }, - { be_const_key_weak(TYPE, 14), be_nested_str_weak() }, - { be_const_key_weak(PROBE_TIMEOUT, -1), be_const_int(700) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, - { be_const_key_weak(CLUSTERS, 22), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_read_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(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -699,13 +594,25 @@ be_local_class(Matter_Plugin_Bridge_HTTP, be_const_int(17), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_read_attribute_closure) }, - { be_const_key_weak(next_probe_timestamp, 17), be_const_var(4) }, - { be_const_key_weak(http_remote, -1), be_const_var(3) }, - { be_const_key_weak(reachable_tick, -1), be_const_var(1) }, - { be_const_key_weak(is_reachable_sync, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_is_reachable_sync_closure) }, + { be_const_key_weak(SYNC_TIMEOUT, -1), be_const_int(500) }, + { be_const_key_weak(http_remote, -1), be_const_var(0) }, + { be_const_key_weak(init, 17), be_const_closure(Matter_Plugin_Bridge_HTTP_init_closure) }, + { be_const_key_weak(parse_http_response, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_http_response_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak() }, + { be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_Bridge_HTTP_update_shadow_closure) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_every_250ms_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_web_values_closure) }, + { be_const_key_weak(ARG_HTTP, 4), be_nested_str_weak(url) }, + { be_const_key_weak(PROBE_TIMEOUT, 18), be_const_int(1700) }, + { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_update_closure) }, + { be_const_key_weak(NAME, 6), be_nested_str_weak() }, + { be_const_key_weak(call_remote_sync, 14), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync_closure) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2011) }, { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf_closure) }, - { be_const_key_weak(call_remote_async, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_async_closure) }, + { be_const_key_weak(ui_conf_to_string, 3), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string_closure) }, + { be_const_key_weak(register_cmd_cb, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_register_cmd_cb_closure) }, })), be_str_weak(Matter_Plugin_Bridge_HTTP) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h new file mode 100644 index 000000000..3da8f171b --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h @@ -0,0 +1,492 @@ +/* Solidification of Matter_Plugin_Bridge_Light0.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light0; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_onoff), + /* K2 */ be_nested_str_weak(tasmota_relay_index), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(ARG), + /* K5 */ be_const_int(1), + /* K6 */ be_const_int(0), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* 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 + 0x60100009, // 000A GETGBL R4 G9 + 0x8C140703, // 000B GETMET R5 R3 K3 + 0x881C0104, // 000C GETMBR R7 R0 K4 + 0x58200005, // 000D LDCONST R8 K5 + 0x7C140600, // 000E CALL R5 3 + 0x7C100200, // 000F CALL R4 1 + 0x90020404, // 0010 SETMBR R0 K2 R4 + 0x88100102, // 0011 GETMBR R4 R0 K2 + 0x18100906, // 0012 LE R4 R4 K6 + 0x78120000, // 0013 JMPF R4 #0015 + 0x90020505, // 0014 SETMBR R0 K2 K5 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_update +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_parse_update, /* 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[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_relay_index), + /* K1 */ be_const_int(1), + /* K2 */ be_nested_str_weak(contains), + /* K3 */ be_nested_str_weak(POWER), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(ON), + /* K6 */ be_nested_str_weak(shadow_onoff), + /* K7 */ be_nested_str_weak(attribute_updated), + /* K8 */ be_const_int(0), + }), + be_str_weak(parse_update), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* code */ + 0x540E000A, // 0000 LDINT R3 11 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0024, // 0002 JMPF R3 #0028 + 0x500C0000, // 0003 LDBOOL R3 0 0 + 0x88100100, // 0004 GETMBR R4 R0 K0 + 0x1C100901, // 0005 EQ R4 R4 K1 + 0x78120009, // 0006 JMPF R4 #0011 + 0x8C100302, // 0007 GETMET R4 R1 K2 + 0x58180003, // 0008 LDCONST R6 K3 + 0x7C100400, // 0009 CALL R4 2 + 0x78120005, // 000A JMPF R4 #0011 + 0x8C100304, // 000B GETMET R4 R1 K4 + 0x58180003, // 000C LDCONST R6 K3 + 0x7C100400, // 000D CALL R4 2 + 0x1C100905, // 000E EQ R4 R4 K5 + 0x5C0C0800, // 000F MOVE R3 R4 + 0x70020007, // 0010 JMP #0019 + 0x8C100304, // 0011 GETMET R4 R1 K4 + 0x60180008, // 0012 GETGBL R6 G8 + 0x881C0100, // 0013 GETMBR R7 R0 K0 + 0x7C180200, // 0014 CALL R6 1 + 0x001A0606, // 0015 ADD R6 K3 R6 + 0x7C100400, // 0016 CALL R4 2 + 0x1C100905, // 0017 EQ R4 R4 K5 + 0x5C0C0800, // 0018 MOVE R3 R4 + 0x88100106, // 0019 GETMBR R4 R0 K6 + 0x4C140000, // 001A LDNIL R5 + 0x20100805, // 001B NE R4 R4 R5 + 0x78120009, // 001C JMPF R4 #0027 + 0x88100106, // 001D GETMBR R4 R0 K6 + 0x60140017, // 001E GETGBL R5 G23 + 0x5C180600, // 001F MOVE R6 R3 + 0x7C140200, // 0020 CALL R5 1 + 0x20100805, // 0021 NE R4 R4 R5 + 0x78120003, // 0022 JMPF R4 #0027 + 0x8C100107, // 0023 GETMET R4 R0 K7 + 0x541A0005, // 0024 LDINT R6 6 + 0x581C0008, // 0025 LDCONST R7 K8 + 0x7C100600, // 0026 CALL R4 3 + 0x90020C03, // 0027 SETMBR R0 K6 R3 + 0x80000000, // 0028 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_invoke_request, /* 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[10]) { /* 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_nested_str_weak(update_shadow_lazy), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(set_onoff), + /* K7 */ be_const_int(1), + /* K8 */ be_const_int(2), + /* K9 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[36]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x541E0005, // 0004 LDINT R7 6 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E001B, // 0006 JMPF R7 #0023 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E0005, // 000A JMPF R7 #0011 + 0x8C1C0106, // 000B GETMET R7 R0 K6 + 0x50240000, // 000C LDBOOL R9 0 0 + 0x7C1C0400, // 000D CALL R7 2 + 0x501C0200, // 000E LDBOOL R7 1 0 + 0x80040E00, // 000F RET 1 R7 + 0x70020011, // 0010 JMP #0023 + 0x1C1C0D07, // 0011 EQ R7 R6 K7 + 0x781E0005, // 0012 JMPF R7 #0019 + 0x8C1C0106, // 0013 GETMET R7 R0 K6 + 0x50240200, // 0014 LDBOOL R9 1 0 + 0x7C1C0400, // 0015 CALL R7 2 + 0x501C0200, // 0016 LDBOOL R7 1 0 + 0x80040E00, // 0017 RET 1 R7 + 0x70020009, // 0018 JMP #0023 + 0x1C1C0D08, // 0019 EQ R7 R6 K8 + 0x781E0007, // 001A JMPF R7 #0023 + 0x8C1C0106, // 001B GETMET R7 R0 K6 + 0x88240109, // 001C GETMBR R9 R0 K9 + 0x78260000, // 001D JMPF R9 #001F + 0x50240001, // 001E LDBOOL R9 0 1 + 0x50240200, // 001F LDBOOL R9 1 0 + 0x7C1C0400, // 0020 CALL R7 2 + 0x501C0200, // 0021 LDBOOL R7 1 0 + 0x80040E00, // 0022 RET 1 R7 + 0x80000000, // 0023 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_onoff +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(call_remote_sync), + /* K1 */ be_nested_str_weak(Power), + /* K2 */ be_nested_str_weak(tasmota_relay_index), + /* K3 */ be_nested_str_weak(1), + /* K4 */ be_nested_str_weak(0), + /* K5 */ be_nested_str_weak(parse_update), + }), + be_str_weak(set_onoff), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x60100008, // 0001 GETGBL R4 G8 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x7C100200, // 0003 CALL R4 1 + 0x00120204, // 0004 ADD R4 K1 R4 + 0x78060001, // 0005 JMPF R1 #0008 + 0x58140003, // 0006 LDCONST R5 K3 + 0x70020000, // 0007 JMP #0009 + 0x58140004, // 0008 LDCONST R5 K4 + 0x7C080600, // 0009 CALL R2 3 + 0x4C0C0000, // 000A LDNIL R3 + 0x200C0403, // 000B NE R3 R2 R3 + 0x780E0003, // 000C JMPF R3 #0011 + 0x8C0C0105, // 000D GETMET R3 R0 K5 + 0x5C140400, // 000E MOVE R5 R2 + 0x541A000A, // 000F LDINT R6 11 + 0x7C0C0600, // 0010 CALL R3 3 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0__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: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_web_values, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s), + /* K5 */ be_nested_str_weak(web_value_onoff), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x7C140600, // 0007 CALL R5 3 + 0x7C0C0400, // 0008 CALL R3 2 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_onoff +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_web_value_onoff, /* 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[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_onoff), + /* K1 */ be_nested_str_weak(_X3Cb_X3EOn_X3C_X2Fb_X3E), + /* K2 */ be_nested_str_weak(Off), + /* K3 */ be_nested_str_weak(), + }), + be_str_weak(web_value_onoff), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x78060005, // 0003 JMPF R1 #000A + 0x88040100, // 0004 GETMBR R1 R0 K0 + 0x78060001, // 0005 JMPF R1 #0008 + 0x58040001, // 0006 LDCONST R1 K1 + 0x70020000, // 0007 JMP #0009 + 0x58040002, // 0008 LDCONST R1 K2 + 0x70020000, // 0009 JMP #000B + 0x58040003, // 000A LDCONST R1 K3 + 0x80040200, // 000B RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light0_read_attribute, /* 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[12]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(BOOL), + /* K9 */ be_nested_str_weak(shadow_onoff), + /* K10 */ be_nested_str_weak(U4), + /* K11 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0005, // 0005 LDINT R7 6 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E001B, // 0007 JMPF R7 #0024 + 0x8C1C0105, // 0008 GETMET R7 R0 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x1C1C0D06, // 000A EQ R7 R6 K6 + 0x781E0005, // 000B JMPF R7 #0012 + 0x8C1C0907, // 000C GETMET R7 R4 K7 + 0x88240908, // 000D GETMBR R9 R4 K8 + 0x88280109, // 000E GETMBR R10 R0 K9 + 0x7C1C0600, // 000F CALL R7 3 + 0x80040E00, // 0010 RET 1 R7 + 0x70020010, // 0011 JMP #0023 + 0x541EFFFB, // 0012 LDINT R7 65532 + 0x1C1C0C07, // 0013 EQ R7 R6 R7 + 0x781E0005, // 0014 JMPF R7 #001B + 0x8C1C0907, // 0015 GETMET R7 R4 K7 + 0x8824090A, // 0016 GETMBR R9 R4 K10 + 0x58280006, // 0017 LDCONST R10 K6 + 0x7C1C0600, // 0018 CALL R7 3 + 0x80040E00, // 0019 RET 1 R7 + 0x70020007, // 001A JMP #0023 + 0x541EFFFC, // 001B LDINT R7 65533 + 0x1C1C0C07, // 001C EQ R7 R6 R7 + 0x781E0004, // 001D JMPF R7 #0023 + 0x8C1C0907, // 001E GETMET R7 R4 K7 + 0x8824090A, // 001F GETMBR R9 R4 K10 + 0x542A0003, // 0020 LDINT R10 4 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020007, // 0023 JMP #002C + 0x601C0003, // 0024 GETGBL R7 G3 + 0x5C200000, // 0025 MOVE R8 R0 + 0x7C1C0200, // 0026 CALL R7 1 + 0x8C1C0F0B, // 0027 GETMET R7 R7 K11 + 0x5C240200, // 0028 MOVE R9 R1 + 0x5C280400, // 0029 MOVE R10 R2 + 0x7C1C0600, // 002A CALL R7 3 + 0x80040E00, // 002B RET 1 R7 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light0 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_HTTP; +be_local_class(Matter_Plugin_Bridge_Light0, + 2, + &be_class_Matter_Plugin_Bridge_HTTP, + be_nested_map(15, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Light0_init_closure) }, + { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Light0_parse_update_closure) }, + { be_const_key_weak(invoke_request, 14), be_const_closure(Matter_Plugin_Bridge_Light0_invoke_request_closure) }, + { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Bridge_Light0_set_onoff_closure) }, + { be_const_key_weak(ARG_TYPE, 11), be_const_static_closure(Matter_Plugin_Bridge_Light0__X3Clambda_X3E_closure) }, + { be_const_key_weak(tasmota_relay_index, 7), be_const_var(0) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(256, -1), be_const_int(2) }, + { be_const_key_int(19, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) }, + { be_const_key_weak(NAME, 6), be_nested_str_weak(_X26_X23x1F517_X3B_X20Light_X200_X20On) }, + { be_const_key_weak(web_value_onoff, -1), be_const_closure(Matter_Plugin_Bridge_Light0_web_value_onoff_closure) }, + { be_const_key_weak(CLUSTERS, 8), 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(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(3, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_Light0_read_attribute_closure) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Light0_web_values_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light0) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Light0_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Light0); + be_setglobal(vm, "Matter_Plugin_Bridge_Light0"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h new file mode 100644 index 000000000..2ff2c9f37 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h @@ -0,0 +1,542 @@ +/* Solidification of Matter_Plugin_Bridge_Light1.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light1; + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light1_invoke_request, /* 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[15]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(command), + /* K4 */ be_nested_str_weak(update_shadow_lazy), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(findsubval), + /* K7 */ be_nested_str_weak(set_bri), + /* K8 */ be_nested_str_weak(log), + /* K9 */ be_nested_str_weak(bri_X3A), + /* K10 */ be_const_int(1), + /* K11 */ be_const_int(2), + /* K12 */ be_const_int(3), + /* K13 */ be_nested_str_weak(set_onoff), + /* K14 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[89]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x541E0007, // 0004 LDINT R7 8 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0047, // 0006 JMPF R7 #004F + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E000D, // 000A JMPF R7 #0019 + 0x8C1C0506, // 000B GETMET R7 R2 K6 + 0x58240005, // 000C LDCONST R9 K5 + 0x7C1C0400, // 000D CALL R7 2 + 0x8C200107, // 000E GETMET R8 R0 K7 + 0x5C280E00, // 000F MOVE R10 R7 + 0x7C200400, // 0010 CALL R8 2 + 0x60200008, // 0011 GETGBL R8 G8 + 0x5C240E00, // 0012 MOVE R9 R7 + 0x7C200200, // 0013 CALL R8 1 + 0x00221208, // 0014 ADD R8 K9 R8 + 0x900E1008, // 0015 SETMBR R3 K8 R8 + 0x50200200, // 0016 LDBOOL R8 1 0 + 0x80041000, // 0017 RET 1 R8 + 0x70020034, // 0018 JMP #004E + 0x1C1C0D0A, // 0019 EQ R7 R6 K10 + 0x781E0002, // 001A JMPF R7 #001E + 0x501C0200, // 001B LDBOOL R7 1 0 + 0x80040E00, // 001C RET 1 R7 + 0x7002002F, // 001D JMP #004E + 0x1C1C0D0B, // 001E EQ R7 R6 K11 + 0x781E0002, // 001F JMPF R7 #0023 + 0x501C0200, // 0020 LDBOOL R7 1 0 + 0x80040E00, // 0021 RET 1 R7 + 0x7002002A, // 0022 JMP #004E + 0x1C1C0D0C, // 0023 EQ R7 R6 K12 + 0x781E0002, // 0024 JMPF R7 #0028 + 0x501C0200, // 0025 LDBOOL R7 1 0 + 0x80040E00, // 0026 RET 1 R7 + 0x70020025, // 0027 JMP #004E + 0x541E0003, // 0028 LDINT R7 4 + 0x1C1C0C07, // 0029 EQ R7 R6 R7 + 0x781E0011, // 002A JMPF R7 #003D + 0x8C1C0506, // 002B GETMET R7 R2 K6 + 0x58240005, // 002C LDCONST R9 K5 + 0x7C1C0400, // 002D CALL R7 2 + 0x8C200107, // 002E GETMET R8 R0 K7 + 0x5C280E00, // 002F MOVE R10 R7 + 0x7C200400, // 0030 CALL R8 2 + 0x24200F05, // 0031 GT R8 R7 K5 + 0x8C24010D, // 0032 GETMET R9 R0 K13 + 0x5C2C1000, // 0033 MOVE R11 R8 + 0x7C240400, // 0034 CALL R9 2 + 0x60240008, // 0035 GETGBL R9 G8 + 0x5C280E00, // 0036 MOVE R10 R7 + 0x7C240200, // 0037 CALL R9 1 + 0x00261209, // 0038 ADD R9 K9 R9 + 0x900E1009, // 0039 SETMBR R3 K8 R9 + 0x50240200, // 003A LDBOOL R9 1 0 + 0x80041200, // 003B RET 1 R9 + 0x70020010, // 003C JMP #004E + 0x541E0004, // 003D LDINT R7 5 + 0x1C1C0C07, // 003E EQ R7 R6 R7 + 0x781E0002, // 003F JMPF R7 #0043 + 0x501C0200, // 0040 LDBOOL R7 1 0 + 0x80040E00, // 0041 RET 1 R7 + 0x7002000A, // 0042 JMP #004E + 0x541E0005, // 0043 LDINT R7 6 + 0x1C1C0C07, // 0044 EQ R7 R6 R7 + 0x781E0002, // 0045 JMPF R7 #0049 + 0x501C0200, // 0046 LDBOOL R7 1 0 + 0x80040E00, // 0047 RET 1 R7 + 0x70020004, // 0048 JMP #004E + 0x541E0006, // 0049 LDINT R7 7 + 0x1C1C0C07, // 004A EQ R7 R6 R7 + 0x781E0001, // 004B JMPF R7 #004E + 0x501C0200, // 004C LDBOOL R7 1 0 + 0x80040E00, // 004D RET 1 R7 + 0x70020008, // 004E JMP #0058 + 0x601C0003, // 004F GETGBL R7 G3 + 0x5C200000, // 0050 MOVE R8 R0 + 0x7C1C0200, // 0051 CALL R7 1 + 0x8C1C0F0E, // 0052 GETMET R7 R7 K14 + 0x5C240200, // 0053 MOVE R9 R1 + 0x5C280400, // 0054 MOVE R10 R2 + 0x5C2C0600, // 0055 MOVE R11 R3 + 0x7C1C0800, // 0056 CALL R7 4 + 0x80040E00, // 0057 RET 1 R7 + 0x80000000, // 0058 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light1_read_attribute, /* 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[16]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(shadow_bri), + /* K8 */ be_nested_str_weak(create_TLV), + /* K9 */ be_nested_str_weak(U1), + /* K10 */ be_nested_str_weak(NULL), + /* K11 */ be_const_int(2), + /* K12 */ be_const_int(3), + /* K13 */ be_nested_str_weak(U4), + /* K14 */ be_const_int(1), + /* K15 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[99]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0007, // 0005 LDINT R7 8 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E0051, // 0007 JMPF R7 #005A + 0x8C1C0105, // 0008 GETMET R7 R0 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x1C1C0D06, // 000A EQ R7 R6 K6 + 0x781E000F, // 000B JMPF R7 #001C + 0x881C0107, // 000C GETMBR R7 R0 K7 + 0x4C200000, // 000D LDNIL R8 + 0x201C0E08, // 000E NE R7 R7 R8 + 0x781E0005, // 000F JMPF R7 #0016 + 0x8C1C0908, // 0010 GETMET R7 R4 K8 + 0x88240909, // 0011 GETMBR R9 R4 K9 + 0x88280107, // 0012 GETMBR R10 R0 K7 + 0x7C1C0600, // 0013 CALL R7 3 + 0x80040E00, // 0014 RET 1 R7 + 0x70020004, // 0015 JMP #001B + 0x8C1C0908, // 0016 GETMET R7 R4 K8 + 0x8824090A, // 0017 GETMBR R9 R4 K10 + 0x4C280000, // 0018 LDNIL R10 + 0x7C1C0600, // 0019 CALL R7 3 + 0x80040E00, // 001A RET 1 R7 + 0x7002003C, // 001B JMP #0059 + 0x1C1C0D0B, // 001C EQ R7 R6 K11 + 0x781E0005, // 001D JMPF R7 #0024 + 0x8C1C0908, // 001E GETMET R7 R4 K8 + 0x88240909, // 001F GETMBR R9 R4 K9 + 0x58280006, // 0020 LDCONST R10 K6 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020034, // 0023 JMP #0059 + 0x1C1C0D0C, // 0024 EQ R7 R6 K12 + 0x781E0005, // 0025 JMPF R7 #002C + 0x8C1C0908, // 0026 GETMET R7 R4 K8 + 0x88240909, // 0027 GETMBR R9 R4 K9 + 0x542A00FD, // 0028 LDINT R10 254 + 0x7C1C0600, // 0029 CALL R7 3 + 0x80040E00, // 002A RET 1 R7 + 0x7002002C, // 002B JMP #0059 + 0x541E000E, // 002C LDINT R7 15 + 0x1C1C0C07, // 002D EQ R7 R6 R7 + 0x781E0005, // 002E JMPF R7 #0035 + 0x8C1C0908, // 002F GETMET R7 R4 K8 + 0x88240909, // 0030 GETMBR R9 R4 K9 + 0x58280006, // 0031 LDCONST R10 K6 + 0x7C1C0600, // 0032 CALL R7 3 + 0x80040E00, // 0033 RET 1 R7 + 0x70020023, // 0034 JMP #0059 + 0x541E0010, // 0035 LDINT R7 17 + 0x1C1C0C07, // 0036 EQ R7 R6 R7 + 0x781E000F, // 0037 JMPF R7 #0048 + 0x881C0107, // 0038 GETMBR R7 R0 K7 + 0x4C200000, // 0039 LDNIL R8 + 0x201C0E08, // 003A NE R7 R7 R8 + 0x781E0005, // 003B JMPF R7 #0042 + 0x8C1C0908, // 003C GETMET R7 R4 K8 + 0x88240909, // 003D GETMBR R9 R4 K9 + 0x88280107, // 003E GETMBR R10 R0 K7 + 0x7C1C0600, // 003F CALL R7 3 + 0x80040E00, // 0040 RET 1 R7 + 0x70020004, // 0041 JMP #0047 + 0x8C1C0908, // 0042 GETMET R7 R4 K8 + 0x8824090A, // 0043 GETMBR R9 R4 K10 + 0x4C280000, // 0044 LDNIL R10 + 0x7C1C0600, // 0045 CALL R7 3 + 0x80040E00, // 0046 RET 1 R7 + 0x70020010, // 0047 JMP #0059 + 0x541EFFFB, // 0048 LDINT R7 65532 + 0x1C1C0C07, // 0049 EQ R7 R6 R7 + 0x781E0005, // 004A JMPF R7 #0051 + 0x8C1C0908, // 004B GETMET R7 R4 K8 + 0x8824090D, // 004C GETMBR R9 R4 K13 + 0x5828000E, // 004D LDCONST R10 K14 + 0x7C1C0600, // 004E CALL R7 3 + 0x80040E00, // 004F RET 1 R7 + 0x70020007, // 0050 JMP #0059 + 0x541EFFFC, // 0051 LDINT R7 65533 + 0x1C1C0C07, // 0052 EQ R7 R6 R7 + 0x781E0004, // 0053 JMPF R7 #0059 + 0x8C1C0908, // 0054 GETMET R7 R4 K8 + 0x8824090D, // 0055 GETMBR R9 R4 K13 + 0x542A0004, // 0056 LDINT R10 5 + 0x7C1C0600, // 0057 CALL R7 3 + 0x80040E00, // 0058 RET 1 R7 + 0x70020007, // 0059 JMP #0062 + 0x601C0003, // 005A GETGBL R7 G3 + 0x5C200000, // 005B MOVE R8 R0 + 0x7C1C0200, // 005C CALL R7 1 + 0x8C1C0F0F, // 005D GETMET R7 R7 K15 + 0x5C240200, // 005E MOVE R9 R1 + 0x5C280400, // 005F MOVE R10 R2 + 0x7C1C0600, // 0060 CALL R7 3 + 0x80040E00, // 0061 RET 1 R7 + 0x80000000, // 0062 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light1_web_values, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s_X20_X25s), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(web_value_dimmer), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x8C240106, // 0007 GETMET R9 R0 K6 + 0x7C240200, // 0008 CALL R9 1 + 0x7C140800, // 0009 CALL R5 4 + 0x7C0C0400, // 000A CALL R3 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_bri +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light1_set_bri, /* name */ + be_nested_proto( + 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(scale_uint), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(call_remote_sync), + /* K4 */ be_nested_str_weak(Dimmer), + /* K5 */ be_nested_str_weak(parse_update), + }), + be_str_weak(set_bri), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x58140002, // 0003 LDCONST R5 K2 + 0x541A00FD, // 0004 LDINT R6 254 + 0x581C0002, // 0005 LDCONST R7 K2 + 0x54220063, // 0006 LDINT R8 100 + 0x7C080C00, // 0007 CALL R2 6 + 0x8C0C0103, // 0008 GETMET R3 R0 K3 + 0x58140004, // 0009 LDCONST R5 K4 + 0x60180008, // 000A GETGBL R6 G8 + 0x5C1C0400, // 000B MOVE R7 R2 + 0x7C180200, // 000C CALL R6 1 + 0x7C0C0600, // 000D CALL R3 3 + 0x4C100000, // 000E LDNIL R4 + 0x20100604, // 000F NE R4 R3 R4 + 0x78120003, // 0010 JMPF R4 #0015 + 0x8C100105, // 0011 GETMET R4 R0 K5 + 0x5C180600, // 0012 MOVE R6 R3 + 0x541E000A, // 0013 LDINT R7 11 + 0x7C100600, // 0014 CALL R4 3 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_update +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light1_parse_update, /* 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[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_update), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(Dimmer), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(scale_uint), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_bri), + /* K7 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(parse_update), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C0700, // 0003 GETMET R3 R3 K0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x540E000A, // 0007 LDINT R3 11 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E0017, // 0009 JMPF R3 #0022 + 0x600C0009, // 000A GETGBL R3 G9 + 0x8C100301, // 000B GETMET R4 R1 K1 + 0x58180002, // 000C LDCONST R6 K2 + 0x7C100400, // 000D CALL R4 2 + 0x7C0C0200, // 000E CALL R3 1 + 0x4C100000, // 000F LDNIL R4 + 0x20100604, // 0010 NE R4 R3 R4 + 0x7812000F, // 0011 JMPF R4 #0022 + 0xB8120600, // 0012 GETNGBL R4 K3 + 0x8C100904, // 0013 GETMET R4 R4 K4 + 0x5C180600, // 0014 MOVE R6 R3 + 0x581C0005, // 0015 LDCONST R7 K5 + 0x54220063, // 0016 LDINT R8 100 + 0x58240005, // 0017 LDCONST R9 K5 + 0x542A00FD, // 0018 LDINT R10 254 + 0x7C100C00, // 0019 CALL R4 6 + 0x88140106, // 001A GETMBR R5 R0 K6 + 0x20140805, // 001B NE R5 R4 R5 + 0x78160004, // 001C JMPF R5 #0022 + 0x8C140107, // 001D GETMET R5 R0 K7 + 0x541E0007, // 001E LDINT R7 8 + 0x58200005, // 001F LDCONST R8 K5 + 0x7C140600, // 0020 CALL R5 3 + 0x90020C04, // 0021 SETMBR R0 K6 R4 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_dimmer +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light1_web_value_dimmer, /* 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[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(shadow_bri), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(scale_uint), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(format), + /* K7 */ be_nested_str_weak(_X25i_X25_X25), + /* K8 */ be_nested_str_weak(_X26_X23128261_X3B_X20), + }), + be_str_weak(web_value_dimmer), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x58080001, // 0001 LDCONST R2 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x4C100000, // 0003 LDNIL R4 + 0x200C0604, // 0004 NE R3 R3 R4 + 0x780E000C, // 0005 JMPF R3 #0013 + 0xB80E0600, // 0006 GETNGBL R3 K3 + 0x8C0C0704, // 0007 GETMET R3 R3 K4 + 0x88140102, // 0008 GETMBR R5 R0 K2 + 0x58180005, // 0009 LDCONST R6 K5 + 0x541E00FD, // 000A LDINT R7 254 + 0x58200005, // 000B LDCONST R8 K5 + 0x54260063, // 000C LDINT R9 100 + 0x7C0C0C00, // 000D CALL R3 6 + 0x8C100306, // 000E GETMET R4 R1 K6 + 0x58180007, // 000F LDCONST R6 K7 + 0x5C1C0600, // 0010 MOVE R7 R3 + 0x7C100600, // 0011 CALL R4 3 + 0x5C080800, // 0012 MOVE R2 R4 + 0x000E1002, // 0013 ADD R3 K8 R2 + 0x80040600, // 0014 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light1 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Light0; +be_local_class(Matter_Plugin_Bridge_Light1, + 1, + &be_class_Matter_Plugin_Bridge_Light0, + be_nested_map(11, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(web_value_dimmer, -1), be_const_closure(Matter_Plugin_Bridge_Light1_web_value_dimmer_closure) }, + { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Light1_parse_update_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(257, -1), be_const_int(2) }, + { be_const_key_int(19, 0), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_Light1_read_attribute_closure) }, + { be_const_key_weak(TYPE, 2), be_nested_str_weak(http_light1) }, + { be_const_key_weak(shadow_bri, 8), be_const_var(0) }, + { be_const_key_weak(CLUSTERS, 5), 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(8, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(2), + be_const_int(3), + be_const_int(15), + be_const_int(17), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(set_bri, -1), be_const_closure(Matter_Plugin_Bridge_Light1_set_bri_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Light_X201_X20Dimmer) }, + { be_const_key_weak(web_values, 1), be_const_closure(Matter_Plugin_Bridge_Light1_web_values_closure) }, + { be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_Bridge_Light1_invoke_request_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light1) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Light1_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Light1); + be_setglobal(vm, "Matter_Plugin_Bridge_Light1"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h new file mode 100644 index 000000000..88870f768 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h @@ -0,0 +1,579 @@ +/* Solidification of Matter_Plugin_Bridge_Light2.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light2; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_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(update_ct_minmax), + }), + 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 + 0x8C100101, // 0008 GETMET R4 R0 K1 + 0x7C100200, // 0009 CALL R4 1 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_update +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_parse_update, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_update), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(CT), + /* K3 */ be_nested_str_weak(shadow_ct), + /* K4 */ be_nested_str_weak(ct_min), + /* K5 */ be_nested_str_weak(ct_max), + /* K6 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(parse_update), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C0700, // 0003 GETMET R3 R3 K0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x540E000A, // 0007 LDINT R3 11 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E0017, // 0009 JMPF R3 #0022 + 0x600C0009, // 000A GETGBL R3 G9 + 0x8C100301, // 000B GETMET R4 R1 K1 + 0x58180002, // 000C LDCONST R6 K2 + 0x7C100400, // 000D CALL R4 2 + 0x7C0C0200, // 000E CALL R3 1 + 0x4C100000, // 000F LDNIL R4 + 0x20100604, // 0010 NE R4 R3 R4 + 0x7812000F, // 0011 JMPF R4 #0022 + 0x88100103, // 0012 GETMBR R4 R0 K3 + 0x20100604, // 0013 NE R4 R3 R4 + 0x7812000C, // 0014 JMPF R4 #0022 + 0x88100104, // 0015 GETMBR R4 R0 K4 + 0x14100604, // 0016 LT R4 R3 R4 + 0x78120000, // 0017 JMPF R4 #0019 + 0x880C0104, // 0018 GETMBR R3 R0 K4 + 0x88100105, // 0019 GETMBR R4 R0 K5 + 0x24100604, // 001A GT R4 R3 R4 + 0x78120000, // 001B JMPF R4 #001D + 0x880C0105, // 001C GETMBR R3 R0 K5 + 0x8C100106, // 001D GETMET R4 R0 K6 + 0x541A02FF, // 001E LDINT R6 768 + 0x541E0006, // 001F LDINT R7 7 + 0x7C100600, // 0020 CALL R4 3 + 0x90020603, // 0021 SETMBR R0 K3 R3 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_web_values, /* 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[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s_X20_X25s_X20_X25s), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(web_value_dimmer), + /* K7 */ be_nested_str_weak(web_value_ct), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x8C240106, // 0007 GETMET R9 R0 K6 + 0x7C240200, // 0008 CALL R9 1 + 0x8C280107, // 0009 GETMET R10 R0 K7 + 0x7C280200, // 000A CALL R10 1 + 0x7C140A00, // 000B CALL R5 5 + 0x7C0C0400, // 000C CALL R3 2 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_ct +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_web_value_ct, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(shadow_ct), + /* K3 */ be_const_int(1000000), + /* K4 */ be_nested_str_weak(format), + /* K5 */ be_nested_str_weak(_X25iK), + /* K6 */ be_nested_str_weak(_X26_X239898_X3B_X20), + }), + be_str_weak(web_value_ct), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x58080001, // 0001 LDCONST R2 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x4C100000, // 0003 LDNIL R4 + 0x200C0604, // 0004 NE R3 R3 R4 + 0x780E000C, // 0005 JMPF R3 #0013 + 0x880C0102, // 0006 GETMBR R3 R0 K2 + 0x0C0E0603, // 0007 DIV R3 K3 R3 + 0x54120018, // 0008 LDINT R4 25 + 0x000C0604, // 0009 ADD R3 R3 R4 + 0x54120031, // 000A LDINT R4 50 + 0x0C0C0604, // 000B DIV R3 R3 R4 + 0x54120031, // 000C LDINT R4 50 + 0x080C0604, // 000D MUL R3 R3 R4 + 0x8C100304, // 000E GETMET R4 R1 K4 + 0x58180005, // 000F LDCONST R6 K5 + 0x5C1C0600, // 0010 MOVE R7 R3 + 0x7C100600, // 0011 CALL R4 3 + 0x5C080800, // 0012 MOVE R2 R4 + 0x000E0C02, // 0013 ADD R3 K6 R2 + 0x80040600, // 0014 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_ct +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_set_ct, /* 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[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(call_remote_sync), + /* K1 */ be_nested_str_weak(CT), + /* K2 */ be_nested_str_weak(parse_update), + }), + be_str_weak(set_ct), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x60140008, // 0002 GETGBL R5 G8 + 0x5C180200, // 0003 MOVE R6 R1 + 0x7C140200, // 0004 CALL R5 1 + 0x7C080600, // 0005 CALL R2 3 + 0x4C0C0000, // 0006 LDNIL R3 + 0x200C0403, // 0007 NE R3 R2 R3 + 0x780E0003, // 0008 JMPF R3 #000D + 0x8C0C0102, // 0009 GETMET R3 R0 K2 + 0x5C140400, // 000A MOVE R5 R2 + 0x541A000A, // 000B LDINT R6 11 + 0x7C0C0600, // 000C CALL R3 3 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_invoke_request, /* 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[13]) { /* 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_nested_str_weak(update_shadow_lazy), + /* K5 */ be_nested_str_weak(findsubval), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(ct_min), + /* K8 */ be_nested_str_weak(ct_max), + /* K9 */ be_nested_str_weak(set_ct), + /* K10 */ be_nested_str_weak(log), + /* K11 */ be_nested_str_weak(ct_X3A), + /* K12 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[62]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x541E02FF, // 0004 LDINT R7 768 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E002C, // 0006 JMPF R7 #0034 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x541E0009, // 0009 LDINT R7 10 + 0x1C1C0C07, // 000A EQ R7 R6 R7 + 0x781E0015, // 000B JMPF R7 #0022 + 0x8C1C0505, // 000C GETMET R7 R2 K5 + 0x58240006, // 000D LDCONST R9 K6 + 0x7C1C0400, // 000E CALL R7 2 + 0x88200107, // 000F GETMBR R8 R0 K7 + 0x14200E08, // 0010 LT R8 R7 R8 + 0x78220000, // 0011 JMPF R8 #0013 + 0x881C0107, // 0012 GETMBR R7 R0 K7 + 0x88200108, // 0013 GETMBR R8 R0 K8 + 0x24200E08, // 0014 GT R8 R7 R8 + 0x78220000, // 0015 JMPF R8 #0017 + 0x881C0108, // 0016 GETMBR R7 R0 K8 + 0x8C200109, // 0017 GETMET R8 R0 K9 + 0x5C280E00, // 0018 MOVE R10 R7 + 0x7C200400, // 0019 CALL R8 2 + 0x60200008, // 001A GETGBL R8 G8 + 0x5C240E00, // 001B MOVE R9 R7 + 0x7C200200, // 001C CALL R8 1 + 0x00221608, // 001D ADD R8 K11 R8 + 0x900E1408, // 001E SETMBR R3 K10 R8 + 0x50200200, // 001F LDBOOL R8 1 0 + 0x80041000, // 0020 RET 1 R8 + 0x70020010, // 0021 JMP #0033 + 0x541E0046, // 0022 LDINT R7 71 + 0x1C1C0C07, // 0023 EQ R7 R6 R7 + 0x781E0002, // 0024 JMPF R7 #0028 + 0x501C0200, // 0025 LDBOOL R7 1 0 + 0x80040E00, // 0026 RET 1 R7 + 0x7002000A, // 0027 JMP #0033 + 0x541E004A, // 0028 LDINT R7 75 + 0x1C1C0C07, // 0029 EQ R7 R6 R7 + 0x781E0002, // 002A JMPF R7 #002E + 0x501C0200, // 002B LDBOOL R7 1 0 + 0x80040E00, // 002C RET 1 R7 + 0x70020004, // 002D JMP #0033 + 0x541E004B, // 002E LDINT R7 76 + 0x1C1C0C07, // 002F EQ R7 R6 R7 + 0x781E0001, // 0030 JMPF R7 #0033 + 0x501C0200, // 0031 LDBOOL R7 1 0 + 0x80040E00, // 0032 RET 1 R7 + 0x70020008, // 0033 JMP #003D + 0x601C0003, // 0034 GETGBL R7 G3 + 0x5C200000, // 0035 MOVE R8 R0 + 0x7C1C0200, // 0036 CALL R7 1 + 0x8C1C0F0C, // 0037 GETMET R7 R7 K12 + 0x5C240200, // 0038 MOVE R9 R1 + 0x5C280400, // 0039 MOVE R10 R2 + 0x5C2C0600, // 003A MOVE R11 R3 + 0x7C1C0800, // 003B CALL R7 4 + 0x80040E00, // 003C RET 1 R7 + 0x80000000, // 003D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_ct_minmax +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light2_read_attribute, /* 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[16]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_nested_str_weak(shadow_ct), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(U1), + /* K9 */ be_nested_str_weak(NULL), + /* K10 */ be_const_int(2), + /* K11 */ be_const_int(0), + /* K12 */ be_nested_str_weak(ct_min), + /* K13 */ be_nested_str_weak(ct_max), + /* K14 */ be_nested_str_weak(U4), + /* K15 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[92]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E02FF, // 0005 LDINT R7 768 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E004A, // 0007 JMPF R7 #0053 + 0x8C1C0105, // 0008 GETMET R7 R0 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x541E0006, // 000A LDINT R7 7 + 0x1C1C0C07, // 000B EQ R7 R6 R7 + 0x781E000F, // 000C JMPF R7 #001D + 0x881C0106, // 000D GETMBR R7 R0 K6 + 0x4C200000, // 000E LDNIL R8 + 0x201C0E08, // 000F NE R7 R7 R8 + 0x781E0005, // 0010 JMPF R7 #0017 + 0x8C1C0907, // 0011 GETMET R7 R4 K7 + 0x88240908, // 0012 GETMBR R9 R4 K8 + 0x88280106, // 0013 GETMBR R10 R0 K6 + 0x7C1C0600, // 0014 CALL R7 3 + 0x80040E00, // 0015 RET 1 R7 + 0x70020004, // 0016 JMP #001C + 0x8C1C0907, // 0017 GETMET R7 R4 K7 + 0x88240909, // 0018 GETMBR R9 R4 K9 + 0x4C280000, // 0019 LDNIL R10 + 0x7C1C0600, // 001A CALL R7 3 + 0x80040E00, // 001B RET 1 R7 + 0x70020034, // 001C JMP #0052 + 0x541E0007, // 001D LDINT R7 8 + 0x1C1C0C07, // 001E EQ R7 R6 R7 + 0x781E0005, // 001F JMPF R7 #0026 + 0x8C1C0907, // 0020 GETMET R7 R4 K7 + 0x88240908, // 0021 GETMBR R9 R4 K8 + 0x5828000A, // 0022 LDCONST R10 K10 + 0x7C1C0600, // 0023 CALL R7 3 + 0x80040E00, // 0024 RET 1 R7 + 0x7002002B, // 0025 JMP #0052 + 0x541E000E, // 0026 LDINT R7 15 + 0x1C1C0C07, // 0027 EQ R7 R6 R7 + 0x781E0005, // 0028 JMPF R7 #002F + 0x8C1C0907, // 0029 GETMET R7 R4 K7 + 0x88240908, // 002A GETMBR R9 R4 K8 + 0x5828000B, // 002B LDCONST R10 K11 + 0x7C1C0600, // 002C CALL R7 3 + 0x80040E00, // 002D RET 1 R7 + 0x70020022, // 002E JMP #0052 + 0x541E400A, // 002F LDINT R7 16395 + 0x1C1C0C07, // 0030 EQ R7 R6 R7 + 0x781E0005, // 0031 JMPF R7 #0038 + 0x8C1C0907, // 0032 GETMET R7 R4 K7 + 0x88240908, // 0033 GETMBR R9 R4 K8 + 0x8828010C, // 0034 GETMBR R10 R0 K12 + 0x7C1C0600, // 0035 CALL R7 3 + 0x80040E00, // 0036 RET 1 R7 + 0x70020019, // 0037 JMP #0052 + 0x541E400B, // 0038 LDINT R7 16396 + 0x1C1C0C07, // 0039 EQ R7 R6 R7 + 0x781E0005, // 003A JMPF R7 #0041 + 0x8C1C0907, // 003B GETMET R7 R4 K7 + 0x88240908, // 003C GETMBR R9 R4 K8 + 0x8828010D, // 003D GETMBR R10 R0 K13 + 0x7C1C0600, // 003E CALL R7 3 + 0x80040E00, // 003F RET 1 R7 + 0x70020010, // 0040 JMP #0052 + 0x541EFFFB, // 0041 LDINT R7 65532 + 0x1C1C0C07, // 0042 EQ R7 R6 R7 + 0x781E0005, // 0043 JMPF R7 #004A + 0x8C1C0907, // 0044 GETMET R7 R4 K7 + 0x8824090E, // 0045 GETMBR R9 R4 K14 + 0x542A000F, // 0046 LDINT R10 16 + 0x7C1C0600, // 0047 CALL R7 3 + 0x80040E00, // 0048 RET 1 R7 + 0x70020007, // 0049 JMP #0052 + 0x541EFFFC, // 004A LDINT R7 65533 + 0x1C1C0C07, // 004B EQ R7 R6 R7 + 0x781E0004, // 004C JMPF R7 #0052 + 0x8C1C0907, // 004D GETMET R7 R4 K7 + 0x8824090E, // 004E GETMBR R9 R4 K14 + 0x542A0004, // 004F LDINT R10 5 + 0x7C1C0600, // 0050 CALL R7 3 + 0x80040E00, // 0051 RET 1 R7 + 0x70020007, // 0052 JMP #005B + 0x601C0003, // 0053 GETGBL R7 G3 + 0x5C200000, // 0054 MOVE R8 R0 + 0x7C1C0200, // 0055 CALL R7 1 + 0x8C1C0F0F, // 0056 GETMET R7 R7 K15 + 0x5C240200, // 0057 MOVE R9 R1 + 0x5C280400, // 0058 MOVE R10 R2 + 0x7C1C0600, // 0059 CALL R7 3 + 0x80040E00, // 005A RET 1 R7 + 0x80000000, // 005B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light2 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Light1; +be_local_class(Matter_Plugin_Bridge_Light2, + 3, + &be_class_Matter_Plugin_Bridge_Light1, + be_nested_map(15, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Light2_init_closure) }, + { be_const_key_weak(parse_update, 10), be_const_closure(Matter_Plugin_Bridge_Light2_parse_update_closure) }, + { be_const_key_weak(web_values, 11), be_const_closure(Matter_Plugin_Bridge_Light2_web_values_closure) }, + { be_const_key_weak(ct_max, -1), be_const_var(2) }, + { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(7), + be_const_int(8), + be_const_int(15), + be_const_int(16395), + be_const_int(16396), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(268, -1), be_const_int(2) }, + { be_const_key_int(19, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(web_value_ct, -1), be_const_closure(Matter_Plugin_Bridge_Light2_web_value_ct_closure) }, + { be_const_key_weak(set_ct, -1), be_const_closure(Matter_Plugin_Bridge_Light2_set_ct_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_Light2_read_attribute_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Light_X202_X20CT) }, + { be_const_key_weak(shadow_ct, -1), be_const_var(0) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Bridge_Light2_invoke_request_closure) }, + { be_const_key_weak(update_ct_minmax, 8), be_const_closure(Matter_Plugin_Bridge_Light2_update_ct_minmax_closure) }, + { be_const_key_weak(ct_min, -1), be_const_var(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light2) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light2) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Light2_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Light2); + be_setglobal(vm, "Matter_Plugin_Bridge_Light2"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h new file mode 100644 index 000000000..13daccf0e --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h @@ -0,0 +1,752 @@ +/* Solidification of Matter_Plugin_Bridge_Light3.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light3; + +/******************************************************************** +** Solidified function: set_sat +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_set_sat, /* name */ + be_nested_proto( + 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(scale_uint), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(call_remote_sync), + /* K4 */ be_nested_str_weak(HSBColor2), + /* K5 */ be_nested_str_weak(parse_update), + }), + be_str_weak(set_sat), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x58140002, // 0003 LDCONST R5 K2 + 0x541A00FD, // 0004 LDINT R6 254 + 0x581C0002, // 0005 LDCONST R7 K2 + 0x54220063, // 0006 LDINT R8 100 + 0x7C080C00, // 0007 CALL R2 6 + 0x8C0C0103, // 0008 GETMET R3 R0 K3 + 0x58140004, // 0009 LDCONST R5 K4 + 0x5C180400, // 000A MOVE R6 R2 + 0x7C0C0600, // 000B CALL R3 3 + 0x4C100000, // 000C LDNIL R4 + 0x20100604, // 000D NE R4 R3 R4 + 0x78120003, // 000E JMPF R4 #0013 + 0x8C100105, // 000F GETMET R4 R0 K5 + 0x5C180600, // 0010 MOVE R6 R3 + 0x541E000A, // 0011 LDINT R7 11 + 0x7C100600, // 0012 CALL R4 3 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_update +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_parse_update, /* name */ + be_nested_proto( + 15, /* 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_nested_str_weak(parse_update), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(HSBColor), + /* K3 */ be_nested_str_weak(string), + /* K4 */ be_nested_str_weak(split), + /* K5 */ be_nested_str_weak(_X2C), + /* K6 */ be_const_int(0), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(scale_uint), + /* K10 */ be_nested_str_weak(shadow_hue), + /* K11 */ be_nested_str_weak(shadow_sat), + /* K12 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(parse_update), + &be_const_str_solidified, + ( &(const binstruction[70]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C0700, // 0003 GETMET R3 R3 K0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x540E000A, // 0007 LDINT R3 11 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E003A, // 0009 JMPF R3 #0045 + 0x8C0C0301, // 000A GETMET R3 R1 K1 + 0x58140002, // 000B LDCONST R5 K2 + 0x7C0C0400, // 000C CALL R3 2 + 0x780E0036, // 000D JMPF R3 #0045 + 0xA4120600, // 000E IMPORT R4 K3 + 0x8C140904, // 000F GETMET R5 R4 K4 + 0x5C1C0600, // 0010 MOVE R7 R3 + 0x58200005, // 0011 LDCONST R8 K5 + 0x7C140600, // 0012 CALL R5 3 + 0x60180009, // 0013 GETGBL R6 G9 + 0x941C0B06, // 0014 GETIDX R7 R5 K6 + 0x7C180200, // 0015 CALL R6 1 + 0x601C0009, // 0016 GETGBL R7 G9 + 0x94200B07, // 0017 GETIDX R8 R5 K7 + 0x7C1C0200, // 0018 CALL R7 1 + 0x4C200000, // 0019 LDNIL R8 + 0x20200C08, // 001A NE R8 R6 R8 + 0x78220009, // 001B JMPF R8 #0026 + 0xB8221000, // 001C GETNGBL R8 K8 + 0x8C201109, // 001D GETMET R8 R8 K9 + 0x5C280C00, // 001E MOVE R10 R6 + 0x582C0006, // 001F LDCONST R11 K6 + 0x54320167, // 0020 LDINT R12 360 + 0x58340006, // 0021 LDCONST R13 K6 + 0x543A00FD, // 0022 LDINT R14 254 + 0x7C200C00, // 0023 CALL R8 6 + 0x5C181000, // 0024 MOVE R6 R8 + 0x70020000, // 0025 JMP #0027 + 0x8818010A, // 0026 GETMBR R6 R0 K10 + 0x4C200000, // 0027 LDNIL R8 + 0x20200E08, // 0028 NE R8 R7 R8 + 0x78220009, // 0029 JMPF R8 #0034 + 0xB8221000, // 002A GETNGBL R8 K8 + 0x8C201109, // 002B GETMET R8 R8 K9 + 0x5C280E00, // 002C MOVE R10 R7 + 0x582C0006, // 002D LDCONST R11 K6 + 0x54320063, // 002E LDINT R12 100 + 0x58340006, // 002F LDCONST R13 K6 + 0x543A00FD, // 0030 LDINT R14 254 + 0x7C200C00, // 0031 CALL R8 6 + 0x5C1C1000, // 0032 MOVE R7 R8 + 0x70020000, // 0033 JMP #0035 + 0x881C010B, // 0034 GETMBR R7 R0 K11 + 0x8820010A, // 0035 GETMBR R8 R0 K10 + 0x20200C08, // 0036 NE R8 R6 R8 + 0x78220004, // 0037 JMPF R8 #003D + 0x8C20010C, // 0038 GETMET R8 R0 K12 + 0x542A02FF, // 0039 LDINT R10 768 + 0x582C0006, // 003A LDCONST R11 K6 + 0x7C200600, // 003B CALL R8 3 + 0x90021406, // 003C SETMBR R0 K10 R6 + 0x8820010B, // 003D GETMBR R8 R0 K11 + 0x20200E08, // 003E NE R8 R7 R8 + 0x78220004, // 003F JMPF R8 #0045 + 0x8C20010C, // 0040 GETMET R8 R0 K12 + 0x542A02FF, // 0041 LDINT R10 768 + 0x582C0007, // 0042 LDCONST R11 K7 + 0x7C200600, // 0043 CALL R8 3 + 0x90021607, // 0044 SETMBR R0 K11 R7 + 0x80000000, // 0045 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_web_values, /* 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[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s_X20_X25s_X20_X25s), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(web_value_dimmer), + /* K7 */ be_nested_str_weak(web_value_RGB), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x8C240106, // 0007 GETMET R9 R0 K6 + 0x7C240200, // 0008 CALL R9 1 + 0x8C280107, // 0009 GETMET R10 R0 K7 + 0x7C280200, // 000A CALL R10 1 + 0x7C140A00, // 000B CALL R5 5 + 0x7C0C0400, // 000C CALL R3 2 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_RGB +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_web_value_RGB, /* name */ + be_nested_proto( + 13, /* nstack */ + 1, /* 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_weak(string), + /* K1 */ be_nested_str_weak(shadow_hue), + /* K2 */ be_nested_str_weak(shadow_sat), + /* K3 */ be_nested_str_weak(light_state), + /* K4 */ be_const_int(3), + /* K5 */ be_nested_str_weak(set_bri), + /* K6 */ be_nested_str_weak(set_huesat), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(scale_uint), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(format), + /* K11 */ be_nested_str_weak(_X23_X2502X_X2502X_X2502X), + /* K12 */ be_nested_str_weak(r), + /* K13 */ be_nested_str_weak(g), + /* K14 */ be_nested_str_weak(b), + /* K15 */ be_nested_str_weak(_X3Ci_X20class_X3D_X22bxm_X22_X20style_X3D_X22_X2D_X2Dcl_X3A_X25s_X22_X3E_X3C_X2Fi_X3E_X25s), + /* K16 */ be_nested_str_weak(), + }), + be_str_weak(web_value_RGB), + &be_const_str_solidified, + ( &(const binstruction[46]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x20080403, // 0003 NE R2 R2 R3 + 0x780A0027, // 0004 JMPF R2 #002D + 0x88080102, // 0005 GETMBR R2 R0 K2 + 0x4C0C0000, // 0006 LDNIL R3 + 0x20080403, // 0007 NE R2 R2 R3 + 0x780A0023, // 0008 JMPF R2 #002D + 0xB80A0600, // 0009 GETNGBL R2 K3 + 0x580C0004, // 000A LDCONST R3 K4 + 0x7C080200, // 000B CALL R2 1 + 0x8C0C0505, // 000C GETMET R3 R2 K5 + 0x541600FE, // 000D LDINT R5 255 + 0x7C0C0400, // 000E CALL R3 2 + 0x8C0C0506, // 000F GETMET R3 R2 K6 + 0xB8160E00, // 0010 GETNGBL R5 K7 + 0x8C140B08, // 0011 GETMET R5 R5 K8 + 0x881C0101, // 0012 GETMBR R7 R0 K1 + 0x58200009, // 0013 LDCONST R8 K9 + 0x542600FD, // 0014 LDINT R9 254 + 0x58280009, // 0015 LDCONST R10 K9 + 0x542E0167, // 0016 LDINT R11 360 + 0x7C140C00, // 0017 CALL R5 6 + 0xB81A0E00, // 0018 GETNGBL R6 K7 + 0x8C180D08, // 0019 GETMET R6 R6 K8 + 0x88200102, // 001A GETMBR R8 R0 K2 + 0x58240009, // 001B LDCONST R9 K9 + 0x542A00FD, // 001C LDINT R10 254 + 0x582C0009, // 001D LDCONST R11 K9 + 0x543200FE, // 001E LDINT R12 255 + 0x7C180C00, // 001F CALL R6 6 + 0x7C0C0600, // 0020 CALL R3 3 + 0x8C0C030A, // 0021 GETMET R3 R1 K10 + 0x5814000B, // 0022 LDCONST R5 K11 + 0x8818050C, // 0023 GETMBR R6 R2 K12 + 0x881C050D, // 0024 GETMBR R7 R2 K13 + 0x8820050E, // 0025 GETMBR R8 R2 K14 + 0x7C0C0A00, // 0026 CALL R3 5 + 0x8C10030A, // 0027 GETMET R4 R1 K10 + 0x5818000F, // 0028 LDCONST R6 K15 + 0x5C1C0600, // 0029 MOVE R7 R3 + 0x5C200600, // 002A MOVE R8 R3 + 0x7C100800, // 002B CALL R4 4 + 0x80040800, // 002C RET 1 R4 + 0x80062000, // 002D RET 1 K16 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_invoke_request, /* 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[17]) { /* 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_nested_str_weak(update_shadow_lazy), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(findsubval), + /* K7 */ be_nested_str_weak(set_hue), + /* K8 */ be_nested_str_weak(log), + /* K9 */ be_nested_str_weak(hue_X3A), + /* K10 */ be_const_int(1), + /* K11 */ be_const_int(2), + /* K12 */ be_const_int(3), + /* K13 */ be_nested_str_weak(set_sat), + /* K14 */ be_nested_str_weak(sat_X3A), + /* K15 */ be_nested_str_weak(_X20sat_X3A), + /* K16 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[107]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x541E02FF, // 0004 LDINT R7 768 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0059, // 0006 JMPF R7 #0061 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E000D, // 000A JMPF R7 #0019 + 0x8C1C0506, // 000B GETMET R7 R2 K6 + 0x58240005, // 000C LDCONST R9 K5 + 0x7C1C0400, // 000D CALL R7 2 + 0x8C200107, // 000E GETMET R8 R0 K7 + 0x5C280E00, // 000F MOVE R10 R7 + 0x7C200400, // 0010 CALL R8 2 + 0x60200008, // 0011 GETGBL R8 G8 + 0x5C240E00, // 0012 MOVE R9 R7 + 0x7C200200, // 0013 CALL R8 1 + 0x00221208, // 0014 ADD R8 K9 R8 + 0x900E1008, // 0015 SETMBR R3 K8 R8 + 0x50200200, // 0016 LDBOOL R8 1 0 + 0x80041000, // 0017 RET 1 R8 + 0x70020046, // 0018 JMP #0060 + 0x1C1C0D0A, // 0019 EQ R7 R6 K10 + 0x781E0002, // 001A JMPF R7 #001E + 0x501C0200, // 001B LDBOOL R7 1 0 + 0x80040E00, // 001C RET 1 R7 + 0x70020041, // 001D JMP #0060 + 0x1C1C0D0B, // 001E EQ R7 R6 K11 + 0x781E0002, // 001F JMPF R7 #0023 + 0x501C0200, // 0020 LDBOOL R7 1 0 + 0x80040E00, // 0021 RET 1 R7 + 0x7002003C, // 0022 JMP #0060 + 0x1C1C0D0C, // 0023 EQ R7 R6 K12 + 0x781E000D, // 0024 JMPF R7 #0033 + 0x8C1C0506, // 0025 GETMET R7 R2 K6 + 0x58240005, // 0026 LDCONST R9 K5 + 0x7C1C0400, // 0027 CALL R7 2 + 0x8C20010D, // 0028 GETMET R8 R0 K13 + 0x5C280E00, // 0029 MOVE R10 R7 + 0x7C200400, // 002A CALL R8 2 + 0x60200008, // 002B GETGBL R8 G8 + 0x5C240E00, // 002C MOVE R9 R7 + 0x7C200200, // 002D CALL R8 1 + 0x00221C08, // 002E ADD R8 K14 R8 + 0x900E1008, // 002F SETMBR R3 K8 R8 + 0x50200200, // 0030 LDBOOL R8 1 0 + 0x80041000, // 0031 RET 1 R8 + 0x7002002C, // 0032 JMP #0060 + 0x541E0003, // 0033 LDINT R7 4 + 0x1C1C0C07, // 0034 EQ R7 R6 R7 + 0x781E0002, // 0035 JMPF R7 #0039 + 0x501C0200, // 0036 LDBOOL R7 1 0 + 0x80040E00, // 0037 RET 1 R7 + 0x70020026, // 0038 JMP #0060 + 0x541E0004, // 0039 LDINT R7 5 + 0x1C1C0C07, // 003A EQ R7 R6 R7 + 0x781E0002, // 003B JMPF R7 #003F + 0x501C0200, // 003C LDBOOL R7 1 0 + 0x80040E00, // 003D RET 1 R7 + 0x70020020, // 003E JMP #0060 + 0x541E0005, // 003F LDINT R7 6 + 0x1C1C0C07, // 0040 EQ R7 R6 R7 + 0x781E0018, // 0041 JMPF R7 #005B + 0x8C1C0506, // 0042 GETMET R7 R2 K6 + 0x58240005, // 0043 LDCONST R9 K5 + 0x7C1C0400, // 0044 CALL R7 2 + 0x8C200506, // 0045 GETMET R8 R2 K6 + 0x5828000A, // 0046 LDCONST R10 K10 + 0x7C200400, // 0047 CALL R8 2 + 0x8C240107, // 0048 GETMET R9 R0 K7 + 0x5C2C0E00, // 0049 MOVE R11 R7 + 0x7C240400, // 004A CALL R9 2 + 0x8C24010D, // 004B GETMET R9 R0 K13 + 0x5C2C1000, // 004C MOVE R11 R8 + 0x7C240400, // 004D CALL R9 2 + 0x60240008, // 004E GETGBL R9 G8 + 0x5C280E00, // 004F MOVE R10 R7 + 0x7C240200, // 0050 CALL R9 1 + 0x00261209, // 0051 ADD R9 K9 R9 + 0x0024130F, // 0052 ADD R9 R9 K15 + 0x60280008, // 0053 GETGBL R10 G8 + 0x5C2C1000, // 0054 MOVE R11 R8 + 0x7C280200, // 0055 CALL R10 1 + 0x0024120A, // 0056 ADD R9 R9 R10 + 0x900E1009, // 0057 SETMBR R3 K8 R9 + 0x50240200, // 0058 LDBOOL R9 1 0 + 0x80041200, // 0059 RET 1 R9 + 0x70020004, // 005A JMP #0060 + 0x541E0046, // 005B LDINT R7 71 + 0x1C1C0C07, // 005C EQ R7 R6 R7 + 0x781E0001, // 005D JMPF R7 #0060 + 0x501C0200, // 005E LDBOOL R7 1 0 + 0x80040E00, // 005F RET 1 R7 + 0x70020008, // 0060 JMP #006A + 0x601C0003, // 0061 GETGBL R7 G3 + 0x5C200000, // 0062 MOVE R8 R0 + 0x7C1C0200, // 0063 CALL R7 1 + 0x8C1C0F10, // 0064 GETMET R7 R7 K16 + 0x5C240200, // 0065 MOVE R9 R1 + 0x5C280400, // 0066 MOVE R10 R2 + 0x5C2C0600, // 0067 MOVE R11 R3 + 0x7C1C0800, // 0068 CALL R7 4 + 0x80040E00, // 0069 RET 1 R7 + 0x80000000, // 006A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_read_attribute, /* 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[15]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(shadow_hue), + /* K8 */ be_nested_str_weak(create_TLV), + /* K9 */ be_nested_str_weak(U1), + /* K10 */ be_nested_str_weak(NULL), + /* K11 */ be_const_int(1), + /* K12 */ be_nested_str_weak(shadow_sat), + /* K13 */ be_nested_str_weak(U4), + /* K14 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[127]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E02FF, // 0005 LDINT R7 768 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E006D, // 0007 JMPF R7 #0076 + 0x8C1C0105, // 0008 GETMET R7 R0 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x1C1C0D06, // 000A EQ R7 R6 K6 + 0x781E000F, // 000B JMPF R7 #001C + 0x881C0107, // 000C GETMBR R7 R0 K7 + 0x4C200000, // 000D LDNIL R8 + 0x201C0E08, // 000E NE R7 R7 R8 + 0x781E0005, // 000F JMPF R7 #0016 + 0x8C1C0908, // 0010 GETMET R7 R4 K8 + 0x88240909, // 0011 GETMBR R9 R4 K9 + 0x88280107, // 0012 GETMBR R10 R0 K7 + 0x7C1C0600, // 0013 CALL R7 3 + 0x80040E00, // 0014 RET 1 R7 + 0x70020004, // 0015 JMP #001B + 0x8C1C0908, // 0016 GETMET R7 R4 K8 + 0x8824090A, // 0017 GETMBR R9 R4 K10 + 0x4C280000, // 0018 LDNIL R10 + 0x7C1C0600, // 0019 CALL R7 3 + 0x80040E00, // 001A RET 1 R7 + 0x70020058, // 001B JMP #0075 + 0x1C1C0D0B, // 001C EQ R7 R6 K11 + 0x781E000F, // 001D JMPF R7 #002E + 0x881C010C, // 001E GETMBR R7 R0 K12 + 0x4C200000, // 001F LDNIL R8 + 0x201C0E08, // 0020 NE R7 R7 R8 + 0x781E0005, // 0021 JMPF R7 #0028 + 0x8C1C0908, // 0022 GETMET R7 R4 K8 + 0x88240909, // 0023 GETMBR R9 R4 K9 + 0x8828010C, // 0024 GETMBR R10 R0 K12 + 0x7C1C0600, // 0025 CALL R7 3 + 0x80040E00, // 0026 RET 1 R7 + 0x70020004, // 0027 JMP #002D + 0x8C1C0908, // 0028 GETMET R7 R4 K8 + 0x8824090A, // 0029 GETMBR R9 R4 K10 + 0x4C280000, // 002A LDNIL R10 + 0x7C1C0600, // 002B CALL R7 3 + 0x80040E00, // 002C RET 1 R7 + 0x70020046, // 002D JMP #0075 + 0x541E0006, // 002E LDINT R7 7 + 0x1C1C0C07, // 002F EQ R7 R6 R7 + 0x781E0005, // 0030 JMPF R7 #0037 + 0x8C1C0908, // 0031 GETMET R7 R4 K8 + 0x88240909, // 0032 GETMBR R9 R4 K9 + 0x58280006, // 0033 LDCONST R10 K6 + 0x7C1C0600, // 0034 CALL R7 3 + 0x80040E00, // 0035 RET 1 R7 + 0x7002003D, // 0036 JMP #0075 + 0x541E0007, // 0037 LDINT R7 8 + 0x1C1C0C07, // 0038 EQ R7 R6 R7 + 0x781E0005, // 0039 JMPF R7 #0040 + 0x8C1C0908, // 003A GETMET R7 R4 K8 + 0x88240909, // 003B GETMBR R9 R4 K9 + 0x58280006, // 003C LDCONST R10 K6 + 0x7C1C0600, // 003D CALL R7 3 + 0x80040E00, // 003E RET 1 R7 + 0x70020034, // 003F JMP #0075 + 0x541E000E, // 0040 LDINT R7 15 + 0x1C1C0C07, // 0041 EQ R7 R6 R7 + 0x781E0005, // 0042 JMPF R7 #0049 + 0x8C1C0908, // 0043 GETMET R7 R4 K8 + 0x88240909, // 0044 GETMBR R9 R4 K9 + 0x58280006, // 0045 LDCONST R10 K6 + 0x7C1C0600, // 0046 CALL R7 3 + 0x80040E00, // 0047 RET 1 R7 + 0x7002002B, // 0048 JMP #0075 + 0x541E4000, // 0049 LDINT R7 16385 + 0x1C1C0C07, // 004A EQ R7 R6 R7 + 0x781E0005, // 004B JMPF R7 #0052 + 0x8C1C0908, // 004C GETMET R7 R4 K8 + 0x88240909, // 004D GETMBR R9 R4 K9 + 0x58280006, // 004E LDCONST R10 K6 + 0x7C1C0600, // 004F CALL R7 3 + 0x80040E00, // 0050 RET 1 R7 + 0x70020022, // 0051 JMP #0075 + 0x541E4009, // 0052 LDINT R7 16394 + 0x1C1C0C07, // 0053 EQ R7 R6 R7 + 0x781E0005, // 0054 JMPF R7 #005B + 0x8C1C0908, // 0055 GETMET R7 R4 K8 + 0x88240909, // 0056 GETMBR R9 R4 K9 + 0x58280006, // 0057 LDCONST R10 K6 + 0x7C1C0600, // 0058 CALL R7 3 + 0x80040E00, // 0059 RET 1 R7 + 0x70020019, // 005A JMP #0075 + 0x541E000F, // 005B LDINT R7 16 + 0x1C1C0C07, // 005C EQ R7 R6 R7 + 0x781E0005, // 005D JMPF R7 #0064 + 0x8C1C0908, // 005E GETMET R7 R4 K8 + 0x88240909, // 005F GETMBR R9 R4 K9 + 0x58280006, // 0060 LDCONST R10 K6 + 0x7C1C0600, // 0061 CALL R7 3 + 0x80040E00, // 0062 RET 1 R7 + 0x70020010, // 0063 JMP #0075 + 0x541EFFFB, // 0064 LDINT R7 65532 + 0x1C1C0C07, // 0065 EQ R7 R6 R7 + 0x781E0005, // 0066 JMPF R7 #006D + 0x8C1C0908, // 0067 GETMET R7 R4 K8 + 0x8824090D, // 0068 GETMBR R9 R4 K13 + 0x5828000B, // 0069 LDCONST R10 K11 + 0x7C1C0600, // 006A CALL R7 3 + 0x80040E00, // 006B RET 1 R7 + 0x70020007, // 006C JMP #0075 + 0x541EFFFC, // 006D LDINT R7 65533 + 0x1C1C0C07, // 006E EQ R7 R6 R7 + 0x781E0004, // 006F JMPF R7 #0075 + 0x8C1C0908, // 0070 GETMET R7 R4 K8 + 0x8824090D, // 0071 GETMBR R9 R4 K13 + 0x542A0004, // 0072 LDINT R10 5 + 0x7C1C0600, // 0073 CALL R7 3 + 0x80040E00, // 0074 RET 1 R7 + 0x70020007, // 0075 JMP #007E + 0x601C0003, // 0076 GETGBL R7 G3 + 0x5C200000, // 0077 MOVE R8 R0 + 0x7C1C0200, // 0078 CALL R7 1 + 0x8C1C0F0E, // 0079 GETMET R7 R7 K14 + 0x5C240200, // 007A MOVE R9 R1 + 0x5C280400, // 007B MOVE R10 R2 + 0x7C1C0600, // 007C CALL R7 3 + 0x80040E00, // 007D RET 1 R7 + 0x80000000, // 007E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_hue +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_set_hue, /* name */ + be_nested_proto( + 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(scale_uint), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(call_remote_sync), + /* K4 */ be_nested_str_weak(HSBColor1), + /* K5 */ be_nested_str_weak(parse_update), + }), + be_str_weak(set_hue), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x58140002, // 0003 LDCONST R5 K2 + 0x541A00FD, // 0004 LDINT R6 254 + 0x581C0002, // 0005 LDCONST R7 K2 + 0x54220167, // 0006 LDINT R8 360 + 0x7C080C00, // 0007 CALL R2 6 + 0x8C0C0103, // 0008 GETMET R3 R0 K3 + 0x58140004, // 0009 LDCONST R5 K4 + 0x5C180400, // 000A MOVE R6 R2 + 0x7C0C0600, // 000B CALL R3 3 + 0x4C100000, // 000C LDNIL R4 + 0x20100604, // 000D NE R4 R3 R4 + 0x78120003, // 000E JMPF R4 #0013 + 0x8C100105, // 000F GETMET R4 R0 K5 + 0x5C180600, // 0010 MOVE R6 R3 + 0x541E000A, // 0011 LDINT R7 11 + 0x7C100600, // 0012 CALL R4 3 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Light3_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[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* 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 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light3 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Light1; +be_local_class(Matter_Plugin_Bridge_Light3, + 2, + &be_class_Matter_Plugin_Bridge_Light1, + be_nested_map(14, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(set_sat, 12), be_const_closure(Matter_Plugin_Bridge_Light3_set_sat_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Light3_init_closure) }, + { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Light3_parse_update_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light3) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Light3_web_values_closure) }, + { be_const_key_weak(web_value_RGB, 1), be_const_closure(Matter_Plugin_Bridge_Light3_web_value_RGB_closure) }, + { be_const_key_weak(shadow_sat, 9), be_const_var(1) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Bridge_Light3_invoke_request_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Light_X203_X20RGB) }, + { be_const_key_weak(TYPES, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(269, -1), be_const_int(2) }, + { be_const_key_int(19, 0), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(shadow_hue, 6), be_const_var(0) }, + { be_const_key_weak(set_hue, -1), be_const_closure(Matter_Plugin_Bridge_Light3_set_hue_closure) }, + { be_const_key_weak(read_attribute, 13), be_const_closure(Matter_Plugin_Bridge_Light3_read_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(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(9, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(7), + be_const_int(8), + be_const_int(15), + be_const_int(16385), + be_const_int(16394), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light3) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Light3_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Light3); + be_setglobal(vm, "Matter_Plugin_Bridge_Light3"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h index 6a210e0ee..d80c3e6fa 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h @@ -7,12 +7,12 @@ extern const bclass be_class_Matter_Plugin_Bridge_OnOff; /******************************************************************** -** Solidified function: init +** Solidified function: web_values ********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_init, /* name */ +be_local_closure(Matter_Plugin_Bridge_OnOff_web_values, /* name */ be_nested_proto( - 10, /* nstack */ - 4, /* argc */ + 11, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -20,385 +20,28 @@ be_local_closure(Matter_Plugin_Bridge_OnOff_init, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(init), - /* K2 */ be_nested_str_weak(shadow_onoff), - /* K3 */ be_nested_str_weak(tasmota_relay_index), - /* K4 */ be_nested_str_weak(find), - /* K5 */ be_nested_str_weak(ARG), - /* K6 */ be_const_int(0), + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20Relay_X20_X25i_X20_X25s), + /* K5 */ be_nested_str_weak(tasmota_relay_index), + /* K6 */ be_nested_str_weak(web_value_onoff), }), - be_str_weak(init), + be_str_weak(web_values), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0x60140003, // 0001 GETGBL R5 G3 - 0x5C180000, // 0002 MOVE R6 R0 - 0x7C140200, // 0003 CALL R5 1 - 0x8C140B01, // 0004 GETMET R5 R5 K1 - 0x5C1C0200, // 0005 MOVE R7 R1 - 0x5C200400, // 0006 MOVE R8 R2 - 0x5C240600, // 0007 MOVE R9 R3 + ( &(const binstruction[11]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x88200105, // 0005 GETMBR R8 R0 K5 + 0x8C240106, // 0006 GETMET R9 R0 K6 + 0x7C240200, // 0007 CALL R9 1 0x7C140800, // 0008 CALL R5 4 - 0x50140000, // 0009 LDBOOL R5 0 0 - 0x90020405, // 000A SETMBR R0 K2 R5 - 0x8C140704, // 000B GETMET R5 R3 K4 - 0x881C0105, // 000C GETMBR R7 R0 K5 - 0x7C140400, // 000D CALL R5 2 - 0x90020605, // 000E SETMBR R0 K3 R5 - 0x88140103, // 000F GETMBR R5 R0 K3 - 0x4C180000, // 0010 LDNIL R6 - 0x1C140A06, // 0011 EQ R5 R5 R6 - 0x78160000, // 0012 JMPF R5 #0014 - 0x90020706, // 0013 SETMBR R0 K3 K6 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_parse_update, /* 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[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(POWER), - /* K2 */ be_nested_str_weak(ON), - /* K3 */ be_nested_str_weak(shadow_onoff), - /* K4 */ be_nested_str_weak(attribute_updated), - /* K5 */ be_const_int(0), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0x540E000A, // 0000 LDINT R3 11 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0012, // 0002 JMPF R3 #0016 - 0x8C0C0300, // 0003 GETMET R3 R1 K0 - 0x58140001, // 0004 LDCONST R5 K1 - 0x7C0C0400, // 0005 CALL R3 2 - 0x1C0C0702, // 0006 EQ R3 R3 K2 - 0x88100103, // 0007 GETMBR R4 R0 K3 - 0x4C140000, // 0008 LDNIL R5 - 0x20100805, // 0009 NE R4 R4 R5 - 0x78120009, // 000A JMPF R4 #0015 - 0x88100103, // 000B GETMBR R4 R0 K3 - 0x60140017, // 000C GETGBL R5 G23 - 0x5C180600, // 000D MOVE R6 R3 - 0x7C140200, // 000E CALL R5 1 - 0x20100805, // 000F NE R4 R4 R5 - 0x78120003, // 0010 JMPF R4 #0015 - 0x8C100104, // 0011 GETMET R4 R0 K4 - 0x541A0005, // 0012 LDINT R6 6 - 0x581C0005, // 0013 LDCONST R7 K5 - 0x7C100600, // 0014 CALL R4 3 - 0x90020603, // 0015 SETMBR R0 K3 R3 - 0x80000000, // 0016 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_invoke_request, /* 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[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_nested_str_weak(update_shadow_lazy), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(set_onoff), - /* K7 */ be_nested_str_weak(update_shadow), - /* K8 */ be_const_int(1), - /* K9 */ be_const_int(2), - /* K10 */ be_nested_str_weak(shadow_onoff), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140702, // 0002 GETMBR R5 R3 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x541E0005, // 0004 LDINT R7 6 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0021, // 0006 JMPF R7 #0029 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E0007, // 000A JMPF R7 #0013 - 0x8C1C0106, // 000B GETMET R7 R0 K6 - 0x50240000, // 000C LDBOOL R9 0 0 - 0x7C1C0400, // 000D CALL R7 2 - 0x8C1C0107, // 000E GETMET R7 R0 K7 - 0x7C1C0200, // 000F CALL R7 1 - 0x501C0200, // 0010 LDBOOL R7 1 0 - 0x80040E00, // 0011 RET 1 R7 - 0x70020015, // 0012 JMP #0029 - 0x1C1C0D08, // 0013 EQ R7 R6 K8 - 0x781E0007, // 0014 JMPF R7 #001D - 0x8C1C0106, // 0015 GETMET R7 R0 K6 - 0x50240200, // 0016 LDBOOL R9 1 0 - 0x7C1C0400, // 0017 CALL R7 2 - 0x8C1C0107, // 0018 GETMET R7 R0 K7 - 0x7C1C0200, // 0019 CALL R7 1 - 0x501C0200, // 001A LDBOOL R7 1 0 - 0x80040E00, // 001B RET 1 R7 - 0x7002000B, // 001C JMP #0029 - 0x1C1C0D09, // 001D EQ R7 R6 K9 - 0x781E0009, // 001E JMPF R7 #0029 - 0x8C1C0106, // 001F GETMET R7 R0 K6 - 0x8824010A, // 0020 GETMBR R9 R0 K10 - 0x78260000, // 0021 JMPF R9 #0023 - 0x50240001, // 0022 LDBOOL R9 0 1 - 0x50240200, // 0023 LDBOOL R9 1 0 - 0x7C1C0400, // 0024 CALL R7 2 - 0x8C1C0107, // 0025 GETMET R7 R0 K7 - 0x7C1C0200, // 0026 CALL R7 1 - 0x501C0200, // 0027 LDBOOL R7 1 0 - 0x80040E00, // 0028 RET 1 R7 - 0x80000000, // 0029 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_onoff -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_set_onoff, /* 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[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(call_remote_sync), - /* K1 */ be_nested_str_weak(Power), - /* K2 */ be_nested_str_weak(1), - /* K3 */ be_nested_str_weak(0), - /* K4 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(set_onoff), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x78060001, // 0002 JMPF R1 #0005 - 0x58140002, // 0003 LDCONST R5 K2 - 0x70020000, // 0004 JMP #0006 - 0x58140003, // 0005 LDCONST R5 K3 - 0x7C080600, // 0006 CALL R2 3 - 0x8C080104, // 0007 GETMET R2 R0 K4 - 0x7C080200, // 0008 CALL R2 1 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_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: probe_shadow_async -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_probe_shadow_async, /* 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(call_remote_async), - /* K1 */ be_nested_str_weak(Status), - /* K2 */ be_nested_str_weak(11), - }), - be_str_weak(probe_shadow_async), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x580C0001, // 0001 LDCONST R3 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x7C040600, // 0003 CALL R1 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_read_attribute, /* 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[12]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(attribute), - /* K5 */ be_nested_str_weak(update_shadow_lazy), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(create_TLV), - /* K8 */ be_nested_str_weak(BOOL), - /* K9 */ be_nested_str_weak(shadow_onoff), - /* K10 */ be_nested_str_weak(U4), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x88100902, // 0002 GETMBR R4 R4 K2 - 0x88140503, // 0003 GETMBR R5 R2 K3 - 0x88180504, // 0004 GETMBR R6 R2 K4 - 0x541E0005, // 0005 LDINT R7 6 - 0x1C1C0A07, // 0006 EQ R7 R5 R7 - 0x781E001B, // 0007 JMPF R7 #0024 - 0x8C1C0105, // 0008 GETMET R7 R0 K5 - 0x7C1C0200, // 0009 CALL R7 1 - 0x1C1C0D06, // 000A EQ R7 R6 K6 - 0x781E0005, // 000B JMPF R7 #0012 - 0x8C1C0907, // 000C GETMET R7 R4 K7 - 0x88240908, // 000D GETMBR R9 R4 K8 - 0x88280109, // 000E GETMBR R10 R0 K9 - 0x7C1C0600, // 000F CALL R7 3 - 0x80040E00, // 0010 RET 1 R7 - 0x70020010, // 0011 JMP #0023 - 0x541EFFFB, // 0012 LDINT R7 65532 - 0x1C1C0C07, // 0013 EQ R7 R6 R7 - 0x781E0005, // 0014 JMPF R7 #001B - 0x8C1C0907, // 0015 GETMET R7 R4 K7 - 0x8824090A, // 0016 GETMBR R9 R4 K10 - 0x58280006, // 0017 LDCONST R10 K6 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x70020007, // 001A JMP #0023 - 0x541EFFFC, // 001B LDINT R7 65533 - 0x1C1C0C07, // 001C EQ R7 R6 R7 - 0x781E0004, // 001D JMPF R7 #0023 - 0x8C1C0907, // 001E GETMET R7 R4 K7 - 0x8824090A, // 001F GETMBR R9 R4 K10 - 0x542A0003, // 0020 LDINT R10 4 - 0x7C1C0600, // 0021 CALL R7 3 - 0x80040E00, // 0022 RET 1 R7 - 0x70020007, // 0023 JMP #002C - 0x601C0003, // 0024 GETGBL R7 G3 - 0x5C200000, // 0025 MOVE R8 R0 - 0x7C1C0200, // 0026 CALL R7 1 - 0x8C1C0F0B, // 0027 GETMET R7 R7 K11 - 0x5C240200, // 0028 MOVE R9 R1 - 0x5C280400, // 0029 MOVE R10 R2 - 0x7C1C0600, // 002A CALL R7 3 - 0x80040E00, // 002B RET 1 R7 - 0x80000000, // 002C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_Bridge_OnOff_update_shadow, /* 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[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(call_remote_sync), - /* K1 */ be_nested_str_weak(Status), - /* K2 */ be_nested_str_weak(11), - /* K3 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x580C0001, // 0001 LDCONST R3 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x7C040600, // 0003 CALL R1 3 - 0x60080003, // 0004 GETGBL R2 G3 - 0x5C0C0000, // 0005 MOVE R3 R0 - 0x7C080200, // 0006 CALL R2 1 - 0x8C080503, // 0007 GETMET R2 R2 K3 - 0x7C080200, // 0008 CALL R2 1 - 0x80000000, // 0009 RET 0 + 0x7C0C0400, // 0009 CALL R3 2 + 0x80000000, // 000A RET 0 }) ) ); @@ -408,40 +51,20 @@ be_local_closure(Matter_Plugin_Bridge_OnOff_update_shadow, /* name */ /******************************************************************** ** Solidified class: Matter_Plugin_Bridge_OnOff ********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; +extern const bclass be_class_Matter_Plugin_Bridge_Light0; be_local_class(Matter_Plugin_Bridge_OnOff, - 2, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(15, + 0, + &be_class_Matter_Plugin_Bridge_Light0, + be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_init_closure) }, - { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_parse_update_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_invoke_request_closure) }, - { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_set_onoff_closure) }, - { be_const_key_weak(ARG_TYPE, 7), be_const_static_closure(Matter_Plugin_Bridge_OnOff__X3Clambda_X3E_closure) }, - { be_const_key_weak(tasmota_relay_index, 11), be_const_var(0) }, - { be_const_key_weak(probe_shadow_async, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_probe_shadow_async_closure) }, - { be_const_key_weak(update_shadow, 10), be_const_closure(Matter_Plugin_Bridge_OnOff_update_shadow_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Relay) }, - { be_const_key_weak(ARG, 8), be_nested_str_weak(relay) }, - { be_const_key_weak(TYPE, 14), be_nested_str_weak(http_relay) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_web_values_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_relay) }, + { be_const_key_weak(NAME, 3), be_nested_str_weak(_X26_X23x1F517_X3B_X20Relay) }, { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, + be_const_map( * be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(266, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_read_attribute_closure) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, - { be_const_key_weak(CLUSTERS, -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(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(3, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, + { be_const_key_int(19, -1), be_const_int(1) }, })) ) } )) }, })), be_str_weak(Matter_Plugin_Bridge_OnOff) diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor.h new file mode 100644 index 000000000..5569b9ba6 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor.h @@ -0,0 +1,241 @@ +/* Solidification of Matter_Plugin_Bridge_Sensor.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor; + +/******************************************************************** +** Solidified function: filter_name_html +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_filter_name_html, /* 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(tasmota_sensor_filter), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(webserver), + /* K3 */ be_nested_str_weak(html_escape), + /* K4 */ be_nested_str_weak(split), + /* K5 */ be_nested_str_weak(_X23), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(filter_name_html), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060009, // 0001 JMPF R1 #000C + 0xA4060200, // 0002 IMPORT R1 K1 + 0xA40A0400, // 0003 IMPORT R2 K2 + 0x8C0C0503, // 0004 GETMET R3 R2 K3 + 0x8C140304, // 0005 GETMET R5 R1 K4 + 0x881C0100, // 0006 GETMBR R7 R0 K0 + 0x58200005, // 0007 LDCONST R8 K5 + 0x7C140600, // 0008 CALL R5 3 + 0x94140B06, // 0009 GETIDX R5 R5 K6 + 0x7C0C0400, // 000A CALL R3 2 + 0x80040600, // 000B RET 1 R3 + 0x80060E00, // 000C RET 1 K7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_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[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(tasmota_sensor_filter), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG), + /* K4 */ be_nested_str_weak(tasmota_sensor_matcher), + /* K5 */ be_nested_str_weak(tasmota), + /* K6 */ be_nested_str_weak(Rule_Matcher), + /* K7 */ be_nested_str_weak(parse), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* 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 + 0x8C100702, // 0008 GETMET R4 R3 K2 + 0x88180103, // 0009 GETMBR R6 R0 K3 + 0x7C100400, // 000A CALL R4 2 + 0x90020204, // 000B SETMBR R0 K1 R4 + 0x88100101, // 000C GETMBR R4 R0 K1 + 0x78120005, // 000D JMPF R4 #0014 + 0xB8120A00, // 000E GETNGBL R4 K5 + 0x88100906, // 000F GETMBR R4 R4 K6 + 0x8C100907, // 0010 GETMET R4 R4 K7 + 0x88180101, // 0011 GETMBR R6 R0 K1 + 0x7C100400, // 0012 CALL R4 2 + 0x90020804, // 0013 SETMBR R0 K4 R4 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_pre_value, /* 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(pre_value), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80040200, // 0000 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_update +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_parse_update, /* 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[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_sensor_matcher), + /* K1 */ be_nested_str_weak(pre_value), + /* K2 */ be_nested_str_weak(match), + /* K3 */ be_nested_str_weak(shadow_value), + /* K4 */ be_nested_str_weak(value_changed), + }), + be_str_weak(parse_update), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x540E0007, // 0000 LDINT R3 8 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0013, // 0002 JMPF R3 #0017 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x780E0011, // 0004 JMPF R3 #0017 + 0x8C0C0101, // 0005 GETMET R3 R0 K1 + 0x6014000A, // 0006 GETGBL R5 G10 + 0x88180100, // 0007 GETMBR R6 R0 K0 + 0x8C180D02, // 0008 GETMET R6 R6 K2 + 0x5C200200, // 0009 MOVE R8 R1 + 0x7C180400, // 000A CALL R6 2 + 0x7C140200, // 000B CALL R5 1 + 0x7C0C0400, // 000C CALL R3 2 + 0x4C100000, // 000D LDNIL R4 + 0x20100604, // 000E NE R4 R3 R4 + 0x78120006, // 000F JMPF R4 #0017 + 0x88100103, // 0010 GETMBR R4 R0 K3 + 0x20100604, // 0011 NE R4 R3 R4 + 0x78120002, // 0012 JMPF R4 #0016 + 0x8C100104, // 0013 GETMET R4 R0 K4 + 0x5C180600, // 0014 MOVE R6 R3 + 0x7C100400, // 0015 CALL R4 2 + 0x90020603, // 0016 SETMBR R0 K3 R3 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_value_changed, /* 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(value_changed), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_HTTP; +be_local_class(Matter_Plugin_Bridge_Sensor, + 3, + &be_class_Matter_Plugin_Bridge_HTTP, + be_nested_map(13, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(ARG, 1), be_nested_str_weak(filter) }, + { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_value_changed_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(tasmota_sensor_filter, 8), be_const_var(0) }, + { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) }, + { be_const_key_weak(PROBE_TIMEOUT, -1), be_const_int(1700) }, + { be_const_key_weak(filter_name_html, 12), be_const_closure(Matter_Plugin_Bridge_Sensor_filter_name_html_closure) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) }, + { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_pre_value_closure) }, + { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_parse_update_closure) }, + { be_const_key_weak(shadow_value, 7), be_const_var(2) }, + { be_const_key_weak(ARG_HTTP, 2), be_nested_str_weak(url) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_init_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Sensor_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor); + be_setglobal(vm, "Matter_Plugin_Bridge_Sensor"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h new file mode 100644 index 000000000..1fa58bec6 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h @@ -0,0 +1,280 @@ +/* Solidification of Matter_Plugin_Bridge_Sensor_Humidity.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; + +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Humidity_read_attribute, /* name */ + be_nested_proto( + 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[15]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_value), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(U2), + /* K9 */ be_nested_str_weak(NULL), + /* K10 */ be_const_int(1), + /* K11 */ be_const_int(2), + /* K12 */ be_nested_str_weak(U4), + /* K13 */ be_const_int(3), + /* K14 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[71]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0404, // 0005 LDINT R7 1029 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E0035, // 0007 JMPF R7 #003E + 0x1C1C0D05, // 0008 EQ R7 R6 K5 + 0x781E0011, // 0009 JMPF R7 #001C + 0x881C0106, // 000A GETMBR R7 R0 K6 + 0x4C200000, // 000B LDNIL R8 + 0x201C0E08, // 000C NE R7 R7 R8 + 0x781E0007, // 000D JMPF R7 #0016 + 0x8C1C0907, // 000E GETMET R7 R4 K7 + 0x88240908, // 000F GETMBR R9 R4 K8 + 0x60280009, // 0010 GETGBL R10 G9 + 0x882C0106, // 0011 GETMBR R11 R0 K6 + 0x7C280200, // 0012 CALL R10 1 + 0x7C1C0600, // 0013 CALL R7 3 + 0x80040E00, // 0014 RET 1 R7 + 0x70020004, // 0015 JMP #001B + 0x8C1C0907, // 0016 GETMET R7 R4 K7 + 0x88240909, // 0017 GETMBR R9 R4 K9 + 0x4C280000, // 0018 LDNIL R10 + 0x7C1C0600, // 0019 CALL R7 3 + 0x80040E00, // 001A RET 1 R7 + 0x70020020, // 001B JMP #003D + 0x1C1C0D0A, // 001C EQ R7 R6 K10 + 0x781E0005, // 001D JMPF R7 #0024 + 0x8C1C0907, // 001E GETMET R7 R4 K7 + 0x88240908, // 001F GETMBR R9 R4 K8 + 0x542A01F3, // 0020 LDINT R10 500 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020018, // 0023 JMP #003D + 0x1C1C0D0B, // 0024 EQ R7 R6 K11 + 0x781E0005, // 0025 JMPF R7 #002C + 0x8C1C0907, // 0026 GETMET R7 R4 K7 + 0x88240908, // 0027 GETMBR R9 R4 K8 + 0x542A270F, // 0028 LDINT R10 10000 + 0x7C1C0600, // 0029 CALL R7 3 + 0x80040E00, // 002A RET 1 R7 + 0x70020010, // 002B JMP #003D + 0x541EFFFB, // 002C LDINT R7 65532 + 0x1C1C0C07, // 002D EQ R7 R6 R7 + 0x781E0005, // 002E JMPF R7 #0035 + 0x8C1C0907, // 002F GETMET R7 R4 K7 + 0x8824090C, // 0030 GETMBR R9 R4 K12 + 0x58280005, // 0031 LDCONST R10 K5 + 0x7C1C0600, // 0032 CALL R7 3 + 0x80040E00, // 0033 RET 1 R7 + 0x70020007, // 0034 JMP #003D + 0x541EFFFC, // 0035 LDINT R7 65533 + 0x1C1C0C07, // 0036 EQ R7 R6 R7 + 0x781E0004, // 0037 JMPF R7 #003D + 0x8C1C0907, // 0038 GETMET R7 R4 K7 + 0x8824090C, // 0039 GETMBR R9 R4 K12 + 0x5828000D, // 003A LDCONST R10 K13 + 0x7C1C0600, // 003B CALL R7 3 + 0x80040E00, // 003C RET 1 R7 + 0x70020007, // 003D JMP #0046 + 0x601C0003, // 003E GETGBL R7 G3 + 0x5C200000, // 003F MOVE R8 R0 + 0x7C1C0200, // 0040 CALL R7 1 + 0x8C1C0F0E, // 0041 GETMET R7 R7 K14 + 0x5C240200, // 0042 MOVE R9 R1 + 0x5C280400, // 0043 MOVE R10 R2 + 0x7C1C0600, // 0044 CALL R7 3 + 0x80040E00, // 0045 RET 1 R7 + 0x80000000, // 0046 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Humidity_web_values, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20_X25s_X20_X26_X23x1F4A7_X3B_X20_X252_X2E0f_X25_X25), + /* K5 */ be_nested_str_weak(filter_name_html), + /* K6 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x88240106, // 0007 GETMBR R9 R0 K6 + 0x4C280000, // 0008 LDNIL R10 + 0x2024120A, // 0009 NE R9 R9 R10 + 0x78260005, // 000A JMPF R9 #0011 + 0x6024000A, // 000B GETGBL R9 G10 + 0x88280106, // 000C GETMBR R10 R0 K6 + 0x7C240200, // 000D CALL R9 1 + 0x542A0063, // 000E LDINT R10 100 + 0x0C24120A, // 000F DIV R9 R9 R10 + 0x70020000, // 0010 JMP #0012 + 0x4C240000, // 0011 LDNIL R9 + 0x7C140800, // 0012 CALL R5 4 + 0x7C0C0400, // 0013 CALL R3 2 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Humidity +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor; +be_local_class(Matter_Plugin_Bridge_Sensor_Humidity, + 0, + &be_class_Matter_Plugin_Bridge_Sensor, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(pre_value, 1), be_const_closure(Matter_Plugin_Bridge_Sensor_Humidity_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Humidity_web_values_closure) }, + { be_const_key_weak(CLUSTERS, 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(1029, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(5, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Bridge_Sensor_Humidity_read_attribute_closure) }, + { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Humidity_value_changed_closure) }, + { be_const_key_weak(TYPE, 4), be_nested_str_weak(http_humidity) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Humidity) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(775, -1), be_const_int(2) }, + { be_const_key_int(19, 0), be_const_int(1) }, + })) ) } )) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Humidity) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Sensor_Humidity_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor_Humidity); + be_setglobal(vm, "Matter_Plugin_Bridge_Sensor_Humidity"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h new file mode 100644 index 000000000..2db6b0396 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h @@ -0,0 +1,271 @@ +/* Solidification of Matter_Plugin_Bridge_Sensor_Illuminance.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; + +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Illuminance_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: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Illuminance_read_attribute, /* name */ + be_nested_proto( + 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[15]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_value), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(I2), + /* K9 */ be_nested_str_weak(NULL), + /* K10 */ be_const_int(1), + /* K11 */ be_const_int(2), + /* K12 */ be_nested_str_weak(U4), + /* K13 */ be_const_int(3), + /* K14 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[71]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E03FF, // 0005 LDINT R7 1024 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E0035, // 0007 JMPF R7 #003E + 0x1C1C0D05, // 0008 EQ R7 R6 K5 + 0x781E0011, // 0009 JMPF R7 #001C + 0x881C0106, // 000A GETMBR R7 R0 K6 + 0x4C200000, // 000B LDNIL R8 + 0x201C0E08, // 000C NE R7 R7 R8 + 0x781E0007, // 000D JMPF R7 #0016 + 0x8C1C0907, // 000E GETMET R7 R4 K7 + 0x88240908, // 000F GETMBR R9 R4 K8 + 0x60280009, // 0010 GETGBL R10 G9 + 0x882C0106, // 0011 GETMBR R11 R0 K6 + 0x7C280200, // 0012 CALL R10 1 + 0x7C1C0600, // 0013 CALL R7 3 + 0x80040E00, // 0014 RET 1 R7 + 0x70020004, // 0015 JMP #001B + 0x8C1C0907, // 0016 GETMET R7 R4 K7 + 0x88240909, // 0017 GETMBR R9 R4 K9 + 0x4C280000, // 0018 LDNIL R10 + 0x7C1C0600, // 0019 CALL R7 3 + 0x80040E00, // 001A RET 1 R7 + 0x70020020, // 001B JMP #003D + 0x1C1C0D0A, // 001C EQ R7 R6 K10 + 0x781E0005, // 001D JMPF R7 #0024 + 0x8C1C0907, // 001E GETMET R7 R4 K7 + 0x88240908, // 001F GETMBR R9 R4 K8 + 0x58280005, // 0020 LDCONST R10 K5 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020018, // 0023 JMP #003D + 0x1C1C0D0B, // 0024 EQ R7 R6 K11 + 0x781E0005, // 0025 JMPF R7 #002C + 0x8C1C0907, // 0026 GETMET R7 R4 K7 + 0x88240908, // 0027 GETMBR R9 R4 K8 + 0x542A270F, // 0028 LDINT R10 10000 + 0x7C1C0600, // 0029 CALL R7 3 + 0x80040E00, // 002A RET 1 R7 + 0x70020010, // 002B JMP #003D + 0x541EFFFB, // 002C LDINT R7 65532 + 0x1C1C0C07, // 002D EQ R7 R6 R7 + 0x781E0005, // 002E JMPF R7 #0035 + 0x8C1C0907, // 002F GETMET R7 R4 K7 + 0x8824090C, // 0030 GETMBR R9 R4 K12 + 0x58280005, // 0031 LDCONST R10 K5 + 0x7C1C0600, // 0032 CALL R7 3 + 0x80040E00, // 0033 RET 1 R7 + 0x70020007, // 0034 JMP #003D + 0x541EFFFC, // 0035 LDINT R7 65533 + 0x1C1C0C07, // 0036 EQ R7 R6 R7 + 0x781E0004, // 0037 JMPF R7 #003D + 0x8C1C0907, // 0038 GETMET R7 R4 K7 + 0x8824090C, // 0039 GETMBR R9 R4 K12 + 0x5828000D, // 003A LDCONST R10 K13 + 0x7C1C0600, // 003B CALL R7 3 + 0x80040E00, // 003C RET 1 R7 + 0x70020007, // 003D JMP #0046 + 0x601C0003, // 003E GETGBL R7 G3 + 0x5C200000, // 003F MOVE R8 R0 + 0x7C1C0200, // 0040 CALL R7 1 + 0x8C1C0F0E, // 0041 GETMET R7 R7 K14 + 0x5C240200, // 0042 MOVE R9 R1 + 0x5C280400, // 0043 MOVE R10 R2 + 0x7C1C0600, // 0044 CALL R7 3 + 0x80040E00, // 0045 RET 1 R7 + 0x80000000, // 0046 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Illuminance_web_values, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20_X25s_X20_X26_X23128261_X3B_X20_X25ilux), + /* K5 */ be_nested_str_weak(filter_name_html), + /* K6 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x60240009, // 0007 GETGBL R9 G9 + 0x88280106, // 0008 GETMBR R10 R0 K6 + 0x7C240200, // 0009 CALL R9 1 + 0x7C140800, // 000A CALL R5 4 + 0x7C0C0400, // 000B CALL R3 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Illuminance +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor; +be_local_class(Matter_Plugin_Bridge_Sensor_Illuminance, + 0, + &be_class_Matter_Plugin_Bridge_Sensor, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(pre_value, 1), be_const_closure(Matter_Plugin_Bridge_Sensor_Illuminance_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Illuminance_web_values_closure) }, + { be_const_key_weak(CLUSTERS, 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(1024, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(5, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Bridge_Sensor_Illuminance_read_attribute_closure) }, + { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Illuminance_value_changed_closure) }, + { be_const_key_weak(TYPE, 4), be_nested_str_weak(http_illuminance) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Illuminance) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(262, -1), be_const_int(2) }, + { be_const_key_int(19, -1), be_const_int(1) }, + })) ) } )) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Illuminance) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Sensor_Illuminance_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor_Illuminance); + be_setglobal(vm, "Matter_Plugin_Bridge_Sensor_Illuminance"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Pressure.h new file mode 100644 index 000000000..3b36094c4 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Pressure.h @@ -0,0 +1,271 @@ +/* Solidification of Matter_Plugin_Bridge_Sensor_Pressure.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; + +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Pressure_read_attribute, /* name */ + be_nested_proto( + 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[15]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_value), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(I2), + /* K9 */ be_nested_str_weak(NULL), + /* K10 */ be_const_int(1), + /* K11 */ be_const_int(2), + /* K12 */ be_nested_str_weak(U4), + /* K13 */ be_const_int(3), + /* K14 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[71]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0402, // 0005 LDINT R7 1027 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E0035, // 0007 JMPF R7 #003E + 0x1C1C0D05, // 0008 EQ R7 R6 K5 + 0x781E0011, // 0009 JMPF R7 #001C + 0x881C0106, // 000A GETMBR R7 R0 K6 + 0x4C200000, // 000B LDNIL R8 + 0x201C0E08, // 000C NE R7 R7 R8 + 0x781E0007, // 000D JMPF R7 #0016 + 0x8C1C0907, // 000E GETMET R7 R4 K7 + 0x88240908, // 000F GETMBR R9 R4 K8 + 0x60280009, // 0010 GETGBL R10 G9 + 0x882C0106, // 0011 GETMBR R11 R0 K6 + 0x7C280200, // 0012 CALL R10 1 + 0x7C1C0600, // 0013 CALL R7 3 + 0x80040E00, // 0014 RET 1 R7 + 0x70020004, // 0015 JMP #001B + 0x8C1C0907, // 0016 GETMET R7 R4 K7 + 0x88240909, // 0017 GETMBR R9 R4 K9 + 0x4C280000, // 0018 LDNIL R10 + 0x7C1C0600, // 0019 CALL R7 3 + 0x80040E00, // 001A RET 1 R7 + 0x70020020, // 001B JMP #003D + 0x1C1C0D0A, // 001C EQ R7 R6 K10 + 0x781E0005, // 001D JMPF R7 #0024 + 0x8C1C0907, // 001E GETMET R7 R4 K7 + 0x88240908, // 001F GETMBR R9 R4 K8 + 0x542A01F3, // 0020 LDINT R10 500 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020018, // 0023 JMP #003D + 0x1C1C0D0B, // 0024 EQ R7 R6 K11 + 0x781E0005, // 0025 JMPF R7 #002C + 0x8C1C0907, // 0026 GETMET R7 R4 K7 + 0x88240908, // 0027 GETMBR R9 R4 K8 + 0x542A05DB, // 0028 LDINT R10 1500 + 0x7C1C0600, // 0029 CALL R7 3 + 0x80040E00, // 002A RET 1 R7 + 0x70020010, // 002B JMP #003D + 0x541EFFFB, // 002C LDINT R7 65532 + 0x1C1C0C07, // 002D EQ R7 R6 R7 + 0x781E0005, // 002E JMPF R7 #0035 + 0x8C1C0907, // 002F GETMET R7 R4 K7 + 0x8824090C, // 0030 GETMBR R9 R4 K12 + 0x58280005, // 0031 LDCONST R10 K5 + 0x7C1C0600, // 0032 CALL R7 3 + 0x80040E00, // 0033 RET 1 R7 + 0x70020007, // 0034 JMP #003D + 0x541EFFFC, // 0035 LDINT R7 65533 + 0x1C1C0C07, // 0036 EQ R7 R6 R7 + 0x781E0004, // 0037 JMPF R7 #003D + 0x8C1C0907, // 0038 GETMET R7 R4 K7 + 0x8824090C, // 0039 GETMBR R9 R4 K12 + 0x5828000D, // 003A LDCONST R10 K13 + 0x7C1C0600, // 003B CALL R7 3 + 0x80040E00, // 003C RET 1 R7 + 0x70020007, // 003D JMP #0046 + 0x601C0003, // 003E GETGBL R7 G3 + 0x5C200000, // 003F MOVE R8 R0 + 0x7C1C0200, // 0040 CALL R7 1 + 0x8C1C0F0E, // 0041 GETMET R7 R7 K14 + 0x5C240200, // 0042 MOVE R9 R1 + 0x5C280400, // 0043 MOVE R10 R2 + 0x7C1C0600, // 0044 CALL R7 3 + 0x80040E00, // 0045 RET 1 R7 + 0x80000000, // 0046 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Pressure_web_values, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20_X25s_X20_X26_X23x26C5_X3B_X20_X25i_X20hPa), + /* K5 */ be_nested_str_weak(filter_name_html), + /* K6 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x60240009, // 0007 GETGBL R9 G9 + 0x88280106, // 0008 GETMBR R10 R0 K6 + 0x7C240200, // 0009 CALL R9 1 + 0x7C140800, // 000A CALL R5 4 + 0x7C0C0400, // 000B CALL R3 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Pressure +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor; +be_local_class(Matter_Plugin_Bridge_Sensor_Pressure, + 0, + &be_class_Matter_Plugin_Bridge_Sensor, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(pre_value, 1), be_const_closure(Matter_Plugin_Bridge_Sensor_Pressure_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Pressure_web_values_closure) }, + { be_const_key_weak(CLUSTERS, 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(1027, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(5, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Bridge_Sensor_Pressure_read_attribute_closure) }, + { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Pressure_value_changed_closure) }, + { be_const_key_weak(TYPE, 4), be_nested_str_weak(http_pressure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Pressure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(773, -1), be_const_int(2) }, + { be_const_key_int(19, 0), be_const_int(1) }, + })) ) } )) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Pressure) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Sensor_Pressure_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor_Pressure); + be_setglobal(vm, "Matter_Plugin_Bridge_Sensor_Pressure"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h new file mode 100644 index 000000000..fb5ab423a --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h @@ -0,0 +1,277 @@ +/* Solidification of Matter_Plugin_Bridge_Sensor_Temp.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; + +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Temp_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: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Temp_read_attribute, /* 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[14]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_value), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(I2), + /* K9 */ be_nested_str_weak(NULL), + /* K10 */ be_const_int(1), + /* K11 */ be_const_int(2), + /* K12 */ be_nested_str_weak(U4), + /* K13 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[69]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0401, // 0005 LDINT R7 1026 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E0033, // 0007 JMPF R7 #003C + 0x1C1C0D05, // 0008 EQ R7 R6 K5 + 0x781E000F, // 0009 JMPF R7 #001A + 0x881C0106, // 000A GETMBR R7 R0 K6 + 0x4C200000, // 000B LDNIL R8 + 0x201C0E08, // 000C NE R7 R7 R8 + 0x781E0005, // 000D JMPF R7 #0014 + 0x8C1C0907, // 000E GETMET R7 R4 K7 + 0x88240908, // 000F GETMBR R9 R4 K8 + 0x88280106, // 0010 GETMBR R10 R0 K6 + 0x7C1C0600, // 0011 CALL R7 3 + 0x80040E00, // 0012 RET 1 R7 + 0x70020004, // 0013 JMP #0019 + 0x8C1C0907, // 0014 GETMET R7 R4 K7 + 0x88240909, // 0015 GETMBR R9 R4 K9 + 0x4C280000, // 0016 LDNIL R10 + 0x7C1C0600, // 0017 CALL R7 3 + 0x80040E00, // 0018 RET 1 R7 + 0x70020020, // 0019 JMP #003B + 0x1C1C0D0A, // 001A EQ R7 R6 K10 + 0x781E0005, // 001B JMPF R7 #0022 + 0x8C1C0907, // 001C GETMET R7 R4 K7 + 0x88240908, // 001D GETMBR R9 R4 K8 + 0x5429EC77, // 001E LDINT R10 -5000 + 0x7C1C0600, // 001F CALL R7 3 + 0x80040E00, // 0020 RET 1 R7 + 0x70020018, // 0021 JMP #003B + 0x1C1C0D0B, // 0022 EQ R7 R6 K11 + 0x781E0005, // 0023 JMPF R7 #002A + 0x8C1C0907, // 0024 GETMET R7 R4 K7 + 0x88240908, // 0025 GETMBR R9 R4 K8 + 0x542A3A97, // 0026 LDINT R10 15000 + 0x7C1C0600, // 0027 CALL R7 3 + 0x80040E00, // 0028 RET 1 R7 + 0x70020010, // 0029 JMP #003B + 0x541EFFFB, // 002A LDINT R7 65532 + 0x1C1C0C07, // 002B EQ R7 R6 R7 + 0x781E0005, // 002C JMPF R7 #0033 + 0x8C1C0907, // 002D GETMET R7 R4 K7 + 0x8824090C, // 002E GETMBR R9 R4 K12 + 0x58280005, // 002F LDCONST R10 K5 + 0x7C1C0600, // 0030 CALL R7 3 + 0x80040E00, // 0031 RET 1 R7 + 0x70020007, // 0032 JMP #003B + 0x541EFFFC, // 0033 LDINT R7 65533 + 0x1C1C0C07, // 0034 EQ R7 R6 R7 + 0x781E0004, // 0035 JMPF R7 #003B + 0x8C1C0907, // 0036 GETMET R7 R4 K7 + 0x8824090C, // 0037 GETMBR R9 R4 K12 + 0x542A0003, // 0038 LDINT R10 4 + 0x7C1C0600, // 0039 CALL R7 3 + 0x80040E00, // 003A RET 1 R7 + 0x70020007, // 003B JMP #0044 + 0x601C0003, // 003C GETGBL R7 G3 + 0x5C200000, // 003D MOVE R8 R0 + 0x7C1C0200, // 003E CALL R7 1 + 0x8C1C0F0D, // 003F GETMET R7 R7 K13 + 0x5C240200, // 0040 MOVE R9 R1 + 0x5C280400, // 0041 MOVE R10 R2 + 0x7C1C0600, // 0042 CALL R7 3 + 0x80040E00, // 0043 RET 1 R7 + 0x80000000, // 0044 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_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: web_values +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_Sensor_Temp_web_values, /* 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[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(_X7C_X20_X25s_X20_X26_X23x2600_X3B_X26_X23xFE0F_X3B_X20_X25_X2E1f_X20_XC2_XB0C), + /* K5 */ be_nested_str_weak(filter_name_html), + /* K6 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x8C140503, // 0003 GETMET R5 R2 K3 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x8C200105, // 0005 GETMET R8 R0 K5 + 0x7C200200, // 0006 CALL R8 1 + 0x88240106, // 0007 GETMBR R9 R0 K6 + 0x4C280000, // 0008 LDNIL R10 + 0x2024120A, // 0009 NE R9 R9 R10 + 0x78260005, // 000A JMPF R9 #0011 + 0x6024000A, // 000B GETGBL R9 G10 + 0x88280106, // 000C GETMBR R10 R0 K6 + 0x7C240200, // 000D CALL R9 1 + 0x542A0063, // 000E LDINT R10 100 + 0x0C24120A, // 000F DIV R9 R9 R10 + 0x70020000, // 0010 JMP #0012 + 0x4C240000, // 0011 LDNIL R9 + 0x7C140800, // 0012 CALL R5 4 + 0x7C0C0400, // 0013 CALL R3 2 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Temp +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor; +be_local_class(Matter_Plugin_Bridge_Sensor_Temp, + 0, + &be_class_Matter_Plugin_Bridge_Sensor, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(pre_value, 1), be_const_closure(Matter_Plugin_Bridge_Sensor_Temp_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Temp_web_values_closure) }, + { be_const_key_weak(CLUSTERS, 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(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(5, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Bridge_Sensor_Temp_read_attribute_closure) }, + { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Temp_value_changed_closure) }, + { be_const_key_weak(TYPE, 4), be_nested_str_weak(http_temperature) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Temperature) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(770, -1), be_const_int(2) }, + { be_const_key_int(19, -1), be_const_int(1) }, + })) ) } )) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Temp) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_Sensor_Temp_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor_Temp); + be_setglobal(vm, "Matter_Plugin_Bridge_Sensor_Temp"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h index d8782dcac..1cdb57d29 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h @@ -31,28 +31,31 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */ }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ + ( &(const binstruction[24]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x7C080200, // 0002 CALL R2 1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x58140003, // 0004 LDCONST R5 K3 - 0x4C180000, // 0005 LDNIL R6 - 0x7C0C0600, // 0006 CALL R3 3 - 0x88100104, // 0007 GETMBR R4 R0 K4 - 0x20100604, // 0008 NE R4 R3 R4 - 0x78120004, // 0009 JMPF R4 #000F - 0x8C100105, // 000A GETMET R4 R0 K5 - 0x541A0005, // 000B LDINT R6 6 - 0x581C0006, // 000C LDCONST R7 K6 - 0x7C100600, // 000D CALL R4 3 - 0x90020803, // 000E SETMBR R0 K4 R3 - 0x60100003, // 000F GETGBL R4 G3 - 0x5C140000, // 0010 MOVE R5 R0 - 0x7C100200, // 0011 CALL R4 1 - 0x8C100907, // 0012 GETMET R4 R4 K7 - 0x7C100200, // 0013 CALL R4 1 - 0x80000000, // 0014 RET 0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E000B, // 0005 JMPF R3 #0012 + 0x8C0C0502, // 0006 GETMET R3 R2 K2 + 0x58140003, // 0007 LDCONST R5 K3 + 0x4C180000, // 0008 LDNIL R6 + 0x7C0C0600, // 0009 CALL R3 3 + 0x88100104, // 000A GETMBR R4 R0 K4 + 0x20100604, // 000B NE R4 R3 R4 + 0x78120004, // 000C JMPF R4 #0012 + 0x8C100105, // 000D GETMET R4 R0 K5 + 0x541A0005, // 000E LDINT R6 6 + 0x581C0006, // 000F LDCONST R7 K6 + 0x7C100600, // 0010 CALL R4 3 + 0x90020803, // 0011 SETMBR R0 K4 R3 + 0x600C0003, // 0012 GETGBL R3 G3 + 0x5C100000, // 0013 MOVE R4 R0 + 0x7C0C0200, // 0014 CALL R3 1 + 0x8C0C0707, // 0015 GETMET R3 R3 K7 + 0x7C0C0200, // 0016 CALL R3 1 + 0x80000000, // 0017 RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h index 4fad7a876..df604d067 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h @@ -33,40 +33,43 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */ }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ + ( &(const binstruction[36]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x7C080200, // 0002 CALL R2 1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x58140003, // 0004 LDCONST R5 K3 - 0x4C180000, // 0005 LDNIL R6 - 0x7C0C0600, // 0006 CALL R3 3 - 0x4C100000, // 0007 LDNIL R4 - 0x20100604, // 0008 NE R4 R3 R4 - 0x78120010, // 0009 JMPF R4 #001B - 0xB8120800, // 000A GETNGBL R4 K4 - 0x8C100905, // 000B GETMET R4 R4 K5 - 0x5C180600, // 000C MOVE R6 R3 - 0x581C0006, // 000D LDCONST R7 K6 - 0x542200FE, // 000E LDINT R8 255 - 0x58240006, // 000F LDCONST R9 K6 - 0x542A00FD, // 0010 LDINT R10 254 - 0x7C100C00, // 0011 CALL R4 6 - 0x5C0C0800, // 0012 MOVE R3 R4 - 0x88100107, // 0013 GETMBR R4 R0 K7 - 0x20100604, // 0014 NE R4 R3 R4 - 0x78120004, // 0015 JMPF R4 #001B - 0x8C100108, // 0016 GETMET R4 R0 K8 - 0x541A0007, // 0017 LDINT R6 8 - 0x581C0006, // 0018 LDCONST R7 K6 - 0x7C100600, // 0019 CALL R4 3 - 0x90020E03, // 001A SETMBR R0 K7 R3 - 0x60100003, // 001B GETGBL R4 G3 - 0x5C140000, // 001C MOVE R5 R0 - 0x7C100200, // 001D CALL R4 1 - 0x8C100909, // 001E GETMET R4 R4 K9 - 0x7C100200, // 001F CALL R4 1 - 0x80000000, // 0020 RET 0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E0017, // 0005 JMPF R3 #001E + 0x8C0C0502, // 0006 GETMET R3 R2 K2 + 0x58140003, // 0007 LDCONST R5 K3 + 0x4C180000, // 0008 LDNIL R6 + 0x7C0C0600, // 0009 CALL R3 3 + 0x4C100000, // 000A LDNIL R4 + 0x20100604, // 000B NE R4 R3 R4 + 0x78120010, // 000C JMPF R4 #001E + 0xB8120800, // 000D GETNGBL R4 K4 + 0x8C100905, // 000E GETMET R4 R4 K5 + 0x5C180600, // 000F MOVE R6 R3 + 0x581C0006, // 0010 LDCONST R7 K6 + 0x542200FE, // 0011 LDINT R8 255 + 0x58240006, // 0012 LDCONST R9 K6 + 0x542A00FD, // 0013 LDINT R10 254 + 0x7C100C00, // 0014 CALL R4 6 + 0x5C0C0800, // 0015 MOVE R3 R4 + 0x88100107, // 0016 GETMBR R4 R0 K7 + 0x20100604, // 0017 NE R4 R3 R4 + 0x78120004, // 0018 JMPF R4 #001E + 0x8C100108, // 0019 GETMET R4 R0 K8 + 0x541A0007, // 001A LDINT R6 8 + 0x581C0006, // 001B LDCONST R7 K6 + 0x7C100600, // 001C CALL R4 3 + 0x90020E03, // 001D SETMBR R0 K7 R3 + 0x600C0003, // 001E GETGBL R3 G3 + 0x5C100000, // 001F MOVE R4 R0 + 0x7C0C0200, // 0020 CALL R3 1 + 0x8C0C0709, // 0021 GETMET R3 R3 K9 + 0x7C0C0200, // 0022 CALL R3 1 + 0x80000000, // 0023 RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h index 50328f5df..51ed67fe8 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h @@ -152,7 +152,7 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */ }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ + ( &(const binstruction[30]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080101, // 0001 GETMET R2 R0 K1 0x7C080200, // 0002 CALL R2 1 @@ -163,23 +163,26 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */ 0x7C080200, // 0007 CALL R2 1 0x8C080303, // 0008 GETMET R2 R1 K3 0x7C080200, // 0009 CALL R2 1 - 0x8C0C0504, // 000A GETMET R3 R2 K4 - 0x58140005, // 000B LDCONST R5 K5 - 0x4C180000, // 000C LDNIL R6 - 0x7C0C0600, // 000D CALL R3 3 - 0x4C100000, // 000E LDNIL R4 - 0x1C100604, // 000F EQ R4 R3 R4 - 0x78120000, // 0010 JMPF R4 #0012 - 0x880C0106, // 0011 GETMBR R3 R0 K6 - 0x88100106, // 0012 GETMBR R4 R0 K6 - 0x20100604, // 0013 NE R4 R3 R4 - 0x78120004, // 0014 JMPF R4 #001A - 0x8C100107, // 0015 GETMET R4 R0 K7 - 0x541A02FF, // 0016 LDINT R6 768 - 0x541E0006, // 0017 LDINT R7 7 - 0x7C100600, // 0018 CALL R4 3 - 0x90020C03, // 0019 SETMBR R0 K6 R3 - 0x80000000, // 001A RET 0 + 0x4C0C0000, // 000A LDNIL R3 + 0x200C0403, // 000B NE R3 R2 R3 + 0x780E000F, // 000C JMPF R3 #001D + 0x8C0C0504, // 000D GETMET R3 R2 K4 + 0x58140005, // 000E LDCONST R5 K5 + 0x4C180000, // 000F LDNIL R6 + 0x7C0C0600, // 0010 CALL R3 3 + 0x4C100000, // 0011 LDNIL R4 + 0x1C100604, // 0012 EQ R4 R3 R4 + 0x78120000, // 0013 JMPF R4 #0015 + 0x880C0106, // 0014 GETMBR R3 R0 K6 + 0x88100106, // 0015 GETMBR R4 R0 K6 + 0x20100604, // 0016 NE R4 R3 R4 + 0x78120004, // 0017 JMPF R4 #001D + 0x8C100107, // 0018 GETMET R4 R0 K7 + 0x541A02FF, // 0019 LDINT R6 768 + 0x541E0006, // 001A LDINT R7 7 + 0x7C100600, // 001B CALL R4 3 + 0x90020C03, // 001C SETMBR R0 K6 R3 + 0x80000000, // 001D RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h index abfb7e030..025159bc7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h @@ -36,7 +36,7 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */ }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[61]) { /* code */ + ( &(const binstruction[64]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x60080003, // 0001 GETGBL R2 G3 0x5C0C0000, // 0002 MOVE R3 R0 @@ -45,59 +45,62 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */ 0x7C080200, // 0005 CALL R2 1 0x8C080302, // 0006 GETMET R2 R1 K2 0x7C080200, // 0007 CALL R2 1 - 0x8C0C0503, // 0008 GETMET R3 R2 K3 - 0x58140004, // 0009 LDCONST R5 K4 - 0x4C180000, // 000A LDNIL R6 - 0x7C0C0600, // 000B CALL R3 3 - 0x8C100503, // 000C GETMET R4 R2 K3 - 0x58180005, // 000D LDCONST R6 K5 - 0x4C1C0000, // 000E LDNIL R7 - 0x7C100600, // 000F CALL R4 3 - 0x4C140000, // 0010 LDNIL R5 - 0x20140605, // 0011 NE R5 R3 R5 - 0x78160009, // 0012 JMPF R5 #001D - 0xB8160C00, // 0013 GETNGBL R5 K6 - 0x8C140B07, // 0014 GETMET R5 R5 K7 - 0x5C1C0600, // 0015 MOVE R7 R3 - 0x58200008, // 0016 LDCONST R8 K8 - 0x54260167, // 0017 LDINT R9 360 - 0x58280008, // 0018 LDCONST R10 K8 - 0x542E00FD, // 0019 LDINT R11 254 - 0x7C140C00, // 001A CALL R5 6 - 0x5C0C0A00, // 001B MOVE R3 R5 - 0x70020000, // 001C JMP #001E - 0x880C0109, // 001D GETMBR R3 R0 K9 - 0x4C140000, // 001E LDNIL R5 - 0x20140805, // 001F NE R5 R4 R5 - 0x78160009, // 0020 JMPF R5 #002B - 0xB8160C00, // 0021 GETNGBL R5 K6 - 0x8C140B07, // 0022 GETMET R5 R5 K7 - 0x5C1C0800, // 0023 MOVE R7 R4 - 0x58200008, // 0024 LDCONST R8 K8 - 0x542600FE, // 0025 LDINT R9 255 - 0x58280008, // 0026 LDCONST R10 K8 - 0x542E00FD, // 0027 LDINT R11 254 - 0x7C140C00, // 0028 CALL R5 6 - 0x5C100A00, // 0029 MOVE R4 R5 - 0x70020000, // 002A JMP #002C - 0x8810010A, // 002B GETMBR R4 R0 K10 - 0x88140109, // 002C GETMBR R5 R0 K9 - 0x20140605, // 002D NE R5 R3 R5 - 0x78160004, // 002E JMPF R5 #0034 - 0x8C14010B, // 002F GETMET R5 R0 K11 - 0x541E02FF, // 0030 LDINT R7 768 - 0x58200008, // 0031 LDCONST R8 K8 - 0x7C140600, // 0032 CALL R5 3 - 0x90021203, // 0033 SETMBR R0 K9 R3 - 0x8814010A, // 0034 GETMBR R5 R0 K10 - 0x20140805, // 0035 NE R5 R4 R5 - 0x78160004, // 0036 JMPF R5 #003C - 0x8C14010B, // 0037 GETMET R5 R0 K11 - 0x541E02FF, // 0038 LDINT R7 768 - 0x5820000C, // 0039 LDCONST R8 K12 - 0x7C140600, // 003A CALL R5 3 - 0x90021404, // 003B SETMBR R0 K10 R4 - 0x80000000, // 003C RET 0 + 0x4C0C0000, // 0008 LDNIL R3 + 0x200C0403, // 0009 NE R3 R2 R3 + 0x780E0033, // 000A JMPF R3 #003F + 0x8C0C0503, // 000B GETMET R3 R2 K3 + 0x58140004, // 000C LDCONST R5 K4 + 0x4C180000, // 000D LDNIL R6 + 0x7C0C0600, // 000E CALL R3 3 + 0x8C100503, // 000F GETMET R4 R2 K3 + 0x58180005, // 0010 LDCONST R6 K5 + 0x4C1C0000, // 0011 LDNIL R7 + 0x7C100600, // 0012 CALL R4 3 + 0x4C140000, // 0013 LDNIL R5 + 0x20140605, // 0014 NE R5 R3 R5 + 0x78160009, // 0015 JMPF R5 #0020 + 0xB8160C00, // 0016 GETNGBL R5 K6 + 0x8C140B07, // 0017 GETMET R5 R5 K7 + 0x5C1C0600, // 0018 MOVE R7 R3 + 0x58200008, // 0019 LDCONST R8 K8 + 0x54260167, // 001A LDINT R9 360 + 0x58280008, // 001B LDCONST R10 K8 + 0x542E00FD, // 001C LDINT R11 254 + 0x7C140C00, // 001D CALL R5 6 + 0x5C0C0A00, // 001E MOVE R3 R5 + 0x70020000, // 001F JMP #0021 + 0x880C0109, // 0020 GETMBR R3 R0 K9 + 0x4C140000, // 0021 LDNIL R5 + 0x20140805, // 0022 NE R5 R4 R5 + 0x78160009, // 0023 JMPF R5 #002E + 0xB8160C00, // 0024 GETNGBL R5 K6 + 0x8C140B07, // 0025 GETMET R5 R5 K7 + 0x5C1C0800, // 0026 MOVE R7 R4 + 0x58200008, // 0027 LDCONST R8 K8 + 0x542600FE, // 0028 LDINT R9 255 + 0x58280008, // 0029 LDCONST R10 K8 + 0x542E00FD, // 002A LDINT R11 254 + 0x7C140C00, // 002B CALL R5 6 + 0x5C100A00, // 002C MOVE R4 R5 + 0x70020000, // 002D JMP #002F + 0x8810010A, // 002E GETMBR R4 R0 K10 + 0x88140109, // 002F GETMBR R5 R0 K9 + 0x20140605, // 0030 NE R5 R3 R5 + 0x78160004, // 0031 JMPF R5 #0037 + 0x8C14010B, // 0032 GETMET R5 R0 K11 + 0x541E02FF, // 0033 LDINT R7 768 + 0x58200008, // 0034 LDCONST R8 K8 + 0x7C140600, // 0035 CALL R5 3 + 0x90021203, // 0036 SETMBR R0 K9 R3 + 0x8814010A, // 0037 GETMBR R5 R0 K10 + 0x20140805, // 0038 NE R5 R4 R5 + 0x78160004, // 0039 JMPF R5 #003F + 0x8C14010B, // 003A GETMET R5 R0 K11 + 0x541E02FF, // 003B LDINT R7 768 + 0x5820000C, // 003C LDCONST R8 K12 + 0x7C140600, // 003D CALL R5 3 + 0x90021404, // 003E SETMBR R0 K10 R4 + 0x80000000, // 003F RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h index 4d753eca5..0c816dfe8 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h @@ -46,17 +46,18 @@ be_local_closure(Matter_Plugin_OnOff_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ + ( &(const bvalue[ 7]) { /* constants */ /* K0 */ be_nested_str_weak(init), /* K1 */ be_nested_str_weak(shadow_onoff), /* K2 */ be_nested_str_weak(tasmota_relay_index), /* K3 */ be_nested_str_weak(find), /* K4 */ be_nested_str_weak(ARG), - /* K5 */ be_const_int(0), + /* K5 */ be_const_int(1), + /* K6 */ be_const_int(0), }), be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ + ( &(const binstruction[22]) { /* code */ 0x60100003, // 0000 GETGBL R4 G3 0x5C140000, // 0001 MOVE R5 R0 0x7C100200, // 0002 CALL R4 1 @@ -67,16 +68,18 @@ be_local_closure(Matter_Plugin_OnOff_init, /* name */ 0x7C100800, // 0007 CALL R4 4 0x50100000, // 0008 LDBOOL R4 0 0 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x8C100703, // 000A GETMET R4 R3 K3 - 0x88180104, // 000B GETMBR R6 R0 K4 - 0x7C100400, // 000C CALL R4 2 - 0x90020404, // 000D SETMBR R0 K2 R4 - 0x88100102, // 000E GETMBR R4 R0 K2 - 0x4C140000, // 000F LDNIL R5 - 0x1C100805, // 0010 EQ R4 R4 R5 - 0x78120000, // 0011 JMPF R4 #0013 - 0x90020505, // 0012 SETMBR R0 K2 K5 - 0x80000000, // 0013 RET 0 + 0x60100009, // 000A GETGBL R4 G9 + 0x8C140703, // 000B GETMET R5 R3 K3 + 0x881C0104, // 000C GETMBR R7 R0 K4 + 0x58200005, // 000D LDCONST R8 K5 + 0x7C140600, // 000E CALL R5 3 + 0x7C100200, // 000F CALL R4 1 + 0x90020404, // 0010 SETMBR R0 K2 R4 + 0x88100102, // 0011 GETMBR R4 R0 K2 + 0x18100906, // 0012 LE R4 R4 K6 + 0x78120000, // 0013 JMPF R4 #0015 + 0x90020505, // 0014 SETMBR R0 K2 K5 + 0x80000000, // 0015 RET 0 }) ) ); @@ -96,25 +99,27 @@ be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str_weak(tasmota), /* K1 */ be_nested_str_weak(set_power), /* K2 */ be_nested_str_weak(tasmota_relay_index), - /* K3 */ be_nested_str_weak(update_shadow), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(update_shadow), }), be_str_weak(set_onoff), &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ + ( &(const binstruction[11]) { /* code */ 0xB80A0000, // 0000 GETNGBL R2 K0 0x8C080501, // 0001 GETMET R2 R2 K1 0x88100102, // 0002 GETMBR R4 R0 K2 - 0x60140017, // 0003 GETGBL R5 G23 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C140200, // 0005 CALL R5 1 - 0x7C080600, // 0006 CALL R2 3 - 0x8C080103, // 0007 GETMET R2 R0 K3 - 0x7C080200, // 0008 CALL R2 1 - 0x80000000, // 0009 RET 0 + 0x04100903, // 0003 SUB R4 R4 K3 + 0x60140017, // 0004 GETGBL R5 G23 + 0x5C180200, // 0005 MOVE R6 R1 + 0x7C140200, // 0006 CALL R5 1 + 0x7C080600, // 0007 CALL R2 3 + 0x8C080104, // 0008 GETMET R2 R0 K4 + 0x7C080200, // 0009 CALL R2 1 + 0x80000000, // 000A RET 0 }) ) ); @@ -292,46 +297,48 @@ be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ + ( &(const bvalue[ 8]) { /* constants */ /* K0 */ be_nested_str_weak(tasmota), /* K1 */ be_nested_str_weak(get_power), /* K2 */ be_nested_str_weak(tasmota_relay_index), - /* K3 */ be_nested_str_weak(shadow_onoff), - /* K4 */ be_nested_str_weak(attribute_updated), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(update_shadow), + /* K3 */ be_const_int(1), + /* K4 */ be_nested_str_weak(shadow_onoff), + /* K5 */ be_nested_str_weak(attribute_updated), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(update_shadow), }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ + ( &(const binstruction[29]) { /* code */ 0xB8060000, // 0000 GETNGBL R1 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x4C080000, // 0004 LDNIL R2 - 0x20080202, // 0005 NE R2 R1 R2 - 0x780A000E, // 0006 JMPF R2 #0016 - 0x88080103, // 0007 GETMBR R2 R0 K3 - 0x4C0C0000, // 0008 LDNIL R3 - 0x20080403, // 0009 NE R2 R2 R3 - 0x780A0009, // 000A JMPF R2 #0015 - 0x88080103, // 000B GETMBR R2 R0 K3 - 0x600C0017, // 000C GETGBL R3 G23 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C0C0200, // 000E CALL R3 1 - 0x20080403, // 000F NE R2 R2 R3 - 0x780A0003, // 0010 JMPF R2 #0015 - 0x8C080104, // 0011 GETMET R2 R0 K4 - 0x54120005, // 0012 LDINT R4 6 - 0x58140005, // 0013 LDCONST R5 K5 - 0x7C080600, // 0014 CALL R2 3 - 0x90020601, // 0015 SETMBR R0 K3 R1 - 0x60080003, // 0016 GETGBL R2 G3 - 0x5C0C0000, // 0017 MOVE R3 R0 - 0x7C080200, // 0018 CALL R2 1 - 0x8C080506, // 0019 GETMET R2 R2 K6 - 0x7C080200, // 001A CALL R2 1 - 0x80000000, // 001B RET 0 + 0x040C0703, // 0003 SUB R3 R3 K3 + 0x7C040400, // 0004 CALL R1 2 + 0x4C080000, // 0005 LDNIL R2 + 0x20080202, // 0006 NE R2 R1 R2 + 0x780A000E, // 0007 JMPF R2 #0017 + 0x88080104, // 0008 GETMBR R2 R0 K4 + 0x4C0C0000, // 0009 LDNIL R3 + 0x20080403, // 000A NE R2 R2 R3 + 0x780A0009, // 000B JMPF R2 #0016 + 0x88080104, // 000C GETMBR R2 R0 K4 + 0x600C0017, // 000D GETGBL R3 G23 + 0x5C100200, // 000E MOVE R4 R1 + 0x7C0C0200, // 000F CALL R3 1 + 0x20080403, // 0010 NE R2 R2 R3 + 0x780A0003, // 0011 JMPF R2 #0016 + 0x8C080105, // 0012 GETMET R2 R0 K5 + 0x54120005, // 0013 LDINT R4 6 + 0x58140006, // 0014 LDCONST R5 K6 + 0x7C080600, // 0015 CALL R2 3 + 0x90020801, // 0016 SETMBR R0 K4 R1 + 0x60080003, // 0017 GETGBL R2 G3 + 0x5C0C0000, // 0018 MOVE R3 R0 + 0x7C080200, // 0019 CALL R2 1 + 0x8C080507, // 001A GETMET R2 R2 K7 + 0x7C080200, // 001B CALL R2 1 + 0x80000000, // 001C RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TCP_async.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TCP_async.h index 62c3ff37e..6893bc3ce 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TCP_async.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TCP_async.h @@ -6,456 +6,6 @@ extern const bclass be_class_Matter_TCP_async; -/******************************************************************** -** Solidified function: write -********************************************************************/ -be_local_closure(Matter_TCP_async_write, /* 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(tcp_connected), - /* K1 */ be_nested_str_weak(tcp), - /* K2 */ be_nested_str_weak(write), - /* K3 */ be_const_int(0), - }), - be_str_weak(write), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0004, // 0001 JMPF R2 #0007 - 0x88080101, // 0002 GETMBR R2 R0 K1 - 0x8C080502, // 0003 GETMET R2 R2 K2 - 0x5C100200, // 0004 MOVE R4 R1 - 0x7C080400, // 0005 CALL R2 2 - 0x80040400, // 0006 RET 1 R2 - 0x80060600, // 0007 RET 1 K3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: readbytes -********************************************************************/ -be_local_closure(Matter_TCP_async_readbytes, /* 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(tcp_connected), - /* K1 */ be_nested_str_weak(tcp), - /* K2 */ be_nested_str_weak(readbytes), - }), - be_str_weak(readbytes), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060003, // 0001 JMPF R1 #0006 - 0x88040101, // 0002 GETMBR R1 R0 K1 - 0x8C040302, // 0003 GETMET R1 R1 K2 - 0x7C040200, // 0004 CALL R1 1 - 0x80040200, // 0005 RET 1 R1 - 0x4C040000, // 0006 LDNIL R1 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_50ms -********************************************************************/ -be_local_closure(Matter_TCP_async_every_50ms, /* 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(loop), - }), - be_str_weak(every_50ms), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: listening -********************************************************************/ -be_local_closure(Matter_TCP_async_listening, /* 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(tcp_connected), - /* K1 */ be_nested_str_weak(tcp), - /* K2 */ be_nested_str_weak(listening), - }), - be_str_weak(listening), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060003, // 0001 JMPF R1 #0006 - 0x88040101, // 0002 GETMBR R1 R0 K1 - 0x8C040302, // 0003 GETMET R1 R1 K2 - 0x7C040200, // 0004 CALL R1 1 - 0x80040200, // 0005 RET 1 R1 - 0x50040000, // 0006 LDBOOL R1 0 0 - 0x80040200, // 0007 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: loop -********************************************************************/ -be_local_closure(Matter_TCP_async_loop, /* 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[18]) { /* constants */ - /* K0 */ be_nested_str_weak(tcp_connected), - /* K1 */ be_nested_str_weak(status), - /* K2 */ be_nested_str_weak(close), - /* K3 */ be_nested_str_weak(tcp), - /* K4 */ be_nested_str_weak(connected), - /* K5 */ be_const_int(1), - /* K6 */ be_nested_str_weak(event_established), - /* K7 */ be_nested_str_weak(event_refused), - /* K8 */ be_nested_str_weak(tasmota), - /* K9 */ be_nested_str_weak(millis), - /* K10 */ be_nested_str_weak(time_start), - /* K11 */ be_nested_str_weak(timeout), - /* K12 */ be_nested_str_weak(event_timeout), - /* K13 */ be_nested_str_weak(event_closed), - /* K14 */ be_nested_str_weak(available), - /* K15 */ be_nested_str_weak(event_available), - /* K16 */ be_nested_str_weak(listening), - /* K17 */ be_nested_str_weak(event_listening), - }), - be_str_weak(loop), - &be_const_str_solidified, - ( &(const binstruction[89]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x1C080403, // 0003 EQ R2 R2 R3 - 0x780A0002, // 0004 JMPF R2 #0008 - 0x8C080102, // 0005 GETMET R2 R0 K2 - 0x7C080200, // 0006 CALL R2 1 - 0x80000400, // 0007 RET 0 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x8C080504, // 0009 GETMET R2 R2 K4 - 0x7C080200, // 000A CALL R2 1 - 0x90020002, // 000B SETMBR R0 K0 R2 - 0x4C080000, // 000C LDNIL R2 - 0x1C080202, // 000D EQ R2 R1 R2 - 0x780A0021, // 000E JMPF R2 #0031 - 0x88080100, // 000F GETMBR R2 R0 K0 - 0x500C0200, // 0010 LDBOOL R3 1 0 - 0x1C080403, // 0011 EQ R2 R2 R3 - 0x780A0003, // 0012 JMPF R2 #0017 - 0x90020305, // 0013 SETMBR R0 K1 K5 - 0x8C080106, // 0014 GETMET R2 R0 K6 - 0x7C080200, // 0015 CALL R2 1 - 0x70020019, // 0016 JMP #0031 - 0x88080100, // 0017 GETMBR R2 R0 K0 - 0x500C0000, // 0018 LDBOOL R3 0 0 - 0x1C080403, // 0019 EQ R2 R2 R3 - 0x780A0007, // 001A JMPF R2 #0023 - 0x5409FFFD, // 001B LDINT R2 -2 - 0x90020202, // 001C SETMBR R0 K1 R2 - 0x8C080107, // 001D GETMET R2 R0 K7 - 0x7C080200, // 001E CALL R2 1 - 0x8C080102, // 001F GETMET R2 R0 K2 - 0x7C080200, // 0020 CALL R2 1 - 0x80000400, // 0021 RET 0 - 0x7002000D, // 0022 JMP #0031 - 0xB80A1000, // 0023 GETNGBL R2 K8 - 0x8C080509, // 0024 GETMET R2 R2 K9 - 0x7C080200, // 0025 CALL R2 1 - 0x880C010A, // 0026 GETMBR R3 R0 K10 - 0x04080403, // 0027 SUB R2 R2 R3 - 0x880C010B, // 0028 GETMBR R3 R0 K11 - 0x24080403, // 0029 GT R2 R2 R3 - 0x780A0005, // 002A JMPF R2 #0031 - 0x5409FFFC, // 002B LDINT R2 -3 - 0x90020202, // 002C SETMBR R0 K1 R2 - 0x50080000, // 002D LDBOOL R2 0 0 - 0x90020002, // 002E SETMBR R0 K0 R2 - 0x8C08010C, // 002F GETMET R2 R0 K12 - 0x7C080200, // 0030 CALL R2 1 - 0xB80A1000, // 0031 GETNGBL R2 K8 - 0x8C080509, // 0032 GETMET R2 R2 K9 - 0x7C080200, // 0033 CALL R2 1 - 0x880C010A, // 0034 GETMBR R3 R0 K10 - 0x04080403, // 0035 SUB R2 R2 R3 - 0x880C010B, // 0036 GETMBR R3 R0 K11 - 0x24080403, // 0037 GT R2 R2 R3 - 0x780A0006, // 0038 JMPF R2 #0040 - 0x8C080102, // 0039 GETMET R2 R0 K2 - 0x7C080200, // 003A CALL R2 1 - 0x5409FFFC, // 003B LDINT R2 -3 - 0x90020202, // 003C SETMBR R0 K1 R2 - 0x8C08010C, // 003D GETMET R2 R0 K12 - 0x7C080200, // 003E CALL R2 1 - 0x80000400, // 003F RET 0 - 0x88080100, // 0040 GETMBR R2 R0 K0 - 0x500C0000, // 0041 LDBOOL R3 0 0 - 0x1C080403, // 0042 EQ R2 R2 R3 - 0x780A0007, // 0043 JMPF R2 #004C - 0x50080200, // 0044 LDBOOL R2 1 0 - 0x1C080202, // 0045 EQ R2 R1 R2 - 0x780A0001, // 0046 JMPF R2 #0049 - 0x8C08010D, // 0047 GETMET R2 R0 K13 - 0x7C080200, // 0048 CALL R2 1 - 0x8C080102, // 0049 GETMET R2 R0 K2 - 0x7C080200, // 004A CALL R2 1 - 0x80000400, // 004B RET 0 - 0x88080103, // 004C GETMBR R2 R0 K3 - 0x8C08050E, // 004D GETMET R2 R2 K14 - 0x7C080200, // 004E CALL R2 1 - 0x780A0001, // 004F JMPF R2 #0052 - 0x8C08010F, // 0050 GETMET R2 R0 K15 - 0x7C080200, // 0051 CALL R2 1 - 0x88080103, // 0052 GETMBR R2 R0 K3 - 0x8C080510, // 0053 GETMET R2 R2 K16 - 0x7C080200, // 0054 CALL R2 1 - 0x780A0001, // 0055 JMPF R2 #0058 - 0x8C080111, // 0056 GETMET R2 R0 K17 - 0x7C080200, // 0057 CALL R2 1 - 0x80000000, // 0058 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: event_established -********************************************************************/ -be_local_closure(Matter_TCP_async_event_established, /* name */ - be_nested_proto( - 1, /* 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(event_established), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: reset -********************************************************************/ -be_local_closure(Matter_TCP_async_reset, /* 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(tcp), - /* K1 */ be_nested_str_weak(close), - /* K2 */ be_nested_str_weak(tcp_connected), - }), - be_str_weak(reset), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x4C040000, // 0003 LDNIL R1 - 0x90020401, // 0004 SETMBR R0 K2 R1 - 0x80000000, // 0005 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: event_listening -********************************************************************/ -be_local_closure(Matter_TCP_async_event_listening, /* name */ - be_nested_proto( - 1, /* 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(event_listening), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_TCP_async_init, /* name */ - be_nested_proto( - 7, /* nstack */ - 5, /* 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(loop), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0x80040000, // 0003 RET 1 R0 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(TIMEOUT), - /* K1 */ be_nested_str_weak(addr), - /* K2 */ be_nested_str_weak(port), - /* K3 */ be_nested_str_weak(timeout), - /* K4 */ be_nested_str_weak(tcp), - /* K5 */ be_nested_str_weak(tcpclientasync), - /* K6 */ be_nested_str_weak(fast_loop), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x1C140605, // 0001 EQ R5 R3 R5 - 0x78160000, // 0002 JMPF R5 #0004 - 0x880C0100, // 0003 GETMBR R3 R0 K0 - 0x4C140000, // 0004 LDNIL R5 - 0x1C140405, // 0005 EQ R5 R2 R5 - 0x78160000, // 0006 JMPF R5 #0008 - 0x540A004F, // 0007 LDINT R2 80 - 0x60140008, // 0008 GETGBL R5 G8 - 0x5C180200, // 0009 MOVE R6 R1 - 0x7C140200, // 000A CALL R5 1 - 0x90020205, // 000B SETMBR R0 K1 R5 - 0x60140009, // 000C GETGBL R5 G9 - 0x5C180400, // 000D MOVE R6 R2 - 0x7C140200, // 000E CALL R5 1 - 0x90020405, // 000F SETMBR R0 K2 R5 - 0x90020603, // 0010 SETMBR R0 K3 R3 - 0xB8160A00, // 0011 GETNGBL R5 K5 - 0x7C140000, // 0012 CALL R5 0 - 0x90020805, // 0013 SETMBR R0 K4 R5 - 0x78120001, // 0014 JMPF R4 #0017 - 0x84140000, // 0015 CLOSURE R5 P0 - 0x90020C05, // 0016 SETMBR R0 K6 R5 - 0xA0000000, // 0017 CLOSE R0 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: event_closed -********************************************************************/ -be_local_closure(Matter_TCP_async_event_closed, /* name */ - be_nested_proto( - 1, /* 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(event_closed), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read ********************************************************************/ @@ -605,9 +155,44 @@ be_local_closure(Matter_TCP_async_begin, /* name */ /******************************************************************** -** Solidified function: event_timeout +** Solidified function: readbytes ********************************************************************/ -be_local_closure(Matter_TCP_async_event_timeout, /* name */ +be_local_closure(Matter_TCP_async_readbytes, /* 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(tcp_connected), + /* K1 */ be_nested_str_weak(tcp), + /* K2 */ be_nested_str_weak(readbytes), + }), + be_str_weak(readbytes), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060003, // 0001 JMPF R1 #0006 + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x8C040302, // 0003 GETMET R1 R1 K2 + 0x7C040200, // 0004 CALL R1 1 + 0x80040200, // 0005 RET 1 R1 + 0x4C040000, // 0006 LDNIL R1 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: event_closed +********************************************************************/ +be_local_closure(Matter_TCP_async_event_closed, /* name */ be_nested_proto( 1, /* nstack */ 1, /* argc */ @@ -618,7 +203,7 @@ be_local_closure(Matter_TCP_async_event_timeout, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(event_timeout), + be_str_weak(event_closed), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 @@ -664,9 +249,9 @@ be_local_closure(Matter_TCP_async_available, /* name */ /******************************************************************** -** Solidified function: event_refused +** Solidified function: event_listening ********************************************************************/ -be_local_closure(Matter_TCP_async_event_refused, /* name */ +be_local_closure(Matter_TCP_async_event_listening, /* name */ be_nested_proto( 1, /* nstack */ 1, /* argc */ @@ -677,7 +262,7 @@ be_local_closure(Matter_TCP_async_event_refused, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(event_refused), + be_str_weak(event_listening), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 @@ -688,9 +273,144 @@ be_local_closure(Matter_TCP_async_event_refused, /* name */ /******************************************************************** -** Solidified function: event_dnsfailed +** Solidified function: get_timeout ********************************************************************/ -be_local_closure(Matter_TCP_async_event_dnsfailed, /* name */ +be_local_closure(Matter_TCP_async_get_timeout, /* 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(timeout), + }), + be_str_weak(get_timeout), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_TCP_async_init, /* name */ + be_nested_proto( + 7, /* nstack */ + 5, /* 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(loop), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x7C000200, // 0002 CALL R0 1 + 0x80040000, // 0003 RET 1 R0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(TIMEOUT), + /* K1 */ be_nested_str_weak(addr), + /* K2 */ be_nested_str_weak(port), + /* K3 */ be_nested_str_weak(timeout), + /* K4 */ be_nested_str_weak(tcp), + /* K5 */ be_nested_str_weak(tcpclientasync), + /* K6 */ be_nested_str_weak(fast_loop), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x1C140605, // 0001 EQ R5 R3 R5 + 0x78160000, // 0002 JMPF R5 #0004 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x4C140000, // 0004 LDNIL R5 + 0x1C140405, // 0005 EQ R5 R2 R5 + 0x78160000, // 0006 JMPF R5 #0008 + 0x540A004F, // 0007 LDINT R2 80 + 0x60140008, // 0008 GETGBL R5 G8 + 0x5C180200, // 0009 MOVE R6 R1 + 0x7C140200, // 000A CALL R5 1 + 0x90020205, // 000B SETMBR R0 K1 R5 + 0x60140009, // 000C GETGBL R5 G9 + 0x5C180400, // 000D MOVE R6 R2 + 0x7C140200, // 000E CALL R5 1 + 0x90020405, // 000F SETMBR R0 K2 R5 + 0x90020603, // 0010 SETMBR R0 K3 R3 + 0xB8160A00, // 0011 GETNGBL R5 K5 + 0x7C140000, // 0012 CALL R5 0 + 0x90020805, // 0013 SETMBR R0 K4 R5 + 0x78120001, // 0014 JMPF R4 #0017 + 0x84140000, // 0015 CLOSURE R5 P0 + 0x90020C05, // 0016 SETMBR R0 K6 R5 + 0xA0000000, // 0017 CLOSE R0 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_50ms +********************************************************************/ +be_local_closure(Matter_TCP_async_every_50ms, /* 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(loop), + }), + be_str_weak(every_50ms), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: event_timeout +********************************************************************/ +be_local_closure(Matter_TCP_async_event_timeout, /* name */ be_nested_proto( 1, /* nstack */ 1, /* argc */ @@ -701,7 +421,7 @@ be_local_closure(Matter_TCP_async_event_dnsfailed, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(event_dnsfailed), + be_str_weak(event_timeout), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 @@ -735,6 +455,321 @@ be_local_closure(Matter_TCP_async_event_available, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: write +********************************************************************/ +be_local_closure(Matter_TCP_async_write, /* 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(tcp_connected), + /* K1 */ be_nested_str_weak(tcp), + /* K2 */ be_nested_str_weak(write), + /* K3 */ be_const_int(0), + }), + be_str_weak(write), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0004, // 0001 JMPF R2 #0007 + 0x88080101, // 0002 GETMBR R2 R0 K1 + 0x8C080502, // 0003 GETMET R2 R2 K2 + 0x5C100200, // 0004 MOVE R4 R1 + 0x7C080400, // 0005 CALL R2 2 + 0x80040400, // 0006 RET 1 R2 + 0x80060600, // 0007 RET 1 K3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: event_established +********************************************************************/ +be_local_closure(Matter_TCP_async_event_established, /* name */ + be_nested_proto( + 1, /* 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(event_established), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: reset +********************************************************************/ +be_local_closure(Matter_TCP_async_reset, /* 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(tcp), + /* K1 */ be_nested_str_weak(close), + /* K2 */ be_nested_str_weak(tcp_connected), + }), + be_str_weak(reset), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x4C040000, // 0003 LDNIL R1 + 0x90020401, // 0004 SETMBR R0 K2 R1 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: loop +********************************************************************/ +be_local_closure(Matter_TCP_async_loop, /* 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[18]) { /* constants */ + /* K0 */ be_nested_str_weak(tcp_connected), + /* K1 */ be_nested_str_weak(status), + /* K2 */ be_nested_str_weak(close), + /* K3 */ be_nested_str_weak(tcp), + /* K4 */ be_nested_str_weak(connected), + /* K5 */ be_const_int(1), + /* K6 */ be_nested_str_weak(event_established), + /* K7 */ be_nested_str_weak(event_refused), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(millis), + /* K10 */ be_nested_str_weak(time_start), + /* K11 */ be_nested_str_weak(timeout), + /* K12 */ be_nested_str_weak(event_timeout), + /* K13 */ be_nested_str_weak(event_closed), + /* K14 */ be_nested_str_weak(available), + /* K15 */ be_nested_str_weak(event_available), + /* K16 */ be_nested_str_weak(listening), + /* K17 */ be_nested_str_weak(event_listening), + }), + be_str_weak(loop), + &be_const_str_solidified, + ( &(const binstruction[89]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x1C080403, // 0003 EQ R2 R2 R3 + 0x780A0002, // 0004 JMPF R2 #0008 + 0x8C080102, // 0005 GETMET R2 R0 K2 + 0x7C080200, // 0006 CALL R2 1 + 0x80000400, // 0007 RET 0 + 0x88080103, // 0008 GETMBR R2 R0 K3 + 0x8C080504, // 0009 GETMET R2 R2 K4 + 0x7C080200, // 000A CALL R2 1 + 0x90020002, // 000B SETMBR R0 K0 R2 + 0x4C080000, // 000C LDNIL R2 + 0x1C080202, // 000D EQ R2 R1 R2 + 0x780A0021, // 000E JMPF R2 #0031 + 0x88080100, // 000F GETMBR R2 R0 K0 + 0x500C0200, // 0010 LDBOOL R3 1 0 + 0x1C080403, // 0011 EQ R2 R2 R3 + 0x780A0003, // 0012 JMPF R2 #0017 + 0x90020305, // 0013 SETMBR R0 K1 K5 + 0x8C080106, // 0014 GETMET R2 R0 K6 + 0x7C080200, // 0015 CALL R2 1 + 0x70020019, // 0016 JMP #0031 + 0x88080100, // 0017 GETMBR R2 R0 K0 + 0x500C0000, // 0018 LDBOOL R3 0 0 + 0x1C080403, // 0019 EQ R2 R2 R3 + 0x780A0007, // 001A JMPF R2 #0023 + 0x5409FFFD, // 001B LDINT R2 -2 + 0x90020202, // 001C SETMBR R0 K1 R2 + 0x8C080107, // 001D GETMET R2 R0 K7 + 0x7C080200, // 001E CALL R2 1 + 0x8C080102, // 001F GETMET R2 R0 K2 + 0x7C080200, // 0020 CALL R2 1 + 0x80000400, // 0021 RET 0 + 0x7002000D, // 0022 JMP #0031 + 0xB80A1000, // 0023 GETNGBL R2 K8 + 0x8C080509, // 0024 GETMET R2 R2 K9 + 0x7C080200, // 0025 CALL R2 1 + 0x880C010A, // 0026 GETMBR R3 R0 K10 + 0x04080403, // 0027 SUB R2 R2 R3 + 0x880C010B, // 0028 GETMBR R3 R0 K11 + 0x24080403, // 0029 GT R2 R2 R3 + 0x780A0005, // 002A JMPF R2 #0031 + 0x5409FFFC, // 002B LDINT R2 -3 + 0x90020202, // 002C SETMBR R0 K1 R2 + 0x50080000, // 002D LDBOOL R2 0 0 + 0x90020002, // 002E SETMBR R0 K0 R2 + 0x8C08010C, // 002F GETMET R2 R0 K12 + 0x7C080200, // 0030 CALL R2 1 + 0xB80A1000, // 0031 GETNGBL R2 K8 + 0x8C080509, // 0032 GETMET R2 R2 K9 + 0x7C080200, // 0033 CALL R2 1 + 0x880C010A, // 0034 GETMBR R3 R0 K10 + 0x04080403, // 0035 SUB R2 R2 R3 + 0x880C010B, // 0036 GETMBR R3 R0 K11 + 0x24080403, // 0037 GT R2 R2 R3 + 0x780A0006, // 0038 JMPF R2 #0040 + 0x8C080102, // 0039 GETMET R2 R0 K2 + 0x7C080200, // 003A CALL R2 1 + 0x5409FFFC, // 003B LDINT R2 -3 + 0x90020202, // 003C SETMBR R0 K1 R2 + 0x8C08010C, // 003D GETMET R2 R0 K12 + 0x7C080200, // 003E CALL R2 1 + 0x80000400, // 003F RET 0 + 0x88080100, // 0040 GETMBR R2 R0 K0 + 0x500C0000, // 0041 LDBOOL R3 0 0 + 0x1C080403, // 0042 EQ R2 R2 R3 + 0x780A0007, // 0043 JMPF R2 #004C + 0x50080200, // 0044 LDBOOL R2 1 0 + 0x1C080202, // 0045 EQ R2 R1 R2 + 0x780A0001, // 0046 JMPF R2 #0049 + 0x8C08010D, // 0047 GETMET R2 R0 K13 + 0x7C080200, // 0048 CALL R2 1 + 0x8C080102, // 0049 GETMET R2 R0 K2 + 0x7C080200, // 004A CALL R2 1 + 0x80000400, // 004B RET 0 + 0x88080103, // 004C GETMBR R2 R0 K3 + 0x8C08050E, // 004D GETMET R2 R2 K14 + 0x7C080200, // 004E CALL R2 1 + 0x780A0001, // 004F JMPF R2 #0052 + 0x8C08010F, // 0050 GETMET R2 R0 K15 + 0x7C080200, // 0051 CALL R2 1 + 0x88080103, // 0052 GETMBR R2 R0 K3 + 0x8C080510, // 0053 GETMET R2 R2 K16 + 0x7C080200, // 0054 CALL R2 1 + 0x780A0001, // 0055 JMPF R2 #0058 + 0x8C080111, // 0056 GETMET R2 R0 K17 + 0x7C080200, // 0057 CALL R2 1 + 0x80000000, // 0058 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: listening +********************************************************************/ +be_local_closure(Matter_TCP_async_listening, /* 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(tcp_connected), + /* K1 */ be_nested_str_weak(tcp), + /* K2 */ be_nested_str_weak(listening), + }), + be_str_weak(listening), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060003, // 0001 JMPF R1 #0006 + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x8C040302, // 0003 GETMET R1 R1 K2 + 0x7C040200, // 0004 CALL R1 1 + 0x80040200, // 0005 RET 1 R1 + 0x50040000, // 0006 LDBOOL R1 0 0 + 0x80040200, // 0007 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_timeout +********************************************************************/ +be_local_closure(Matter_TCP_async_set_timeout, /* name */ + be_nested_proto( + 3, /* 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(TIMEOUT), + /* K1 */ be_nested_str_weak(timeout), + }), + be_str_weak(set_timeout), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0000, // 0002 JMPF R2 #0004 + 0x88040100, // 0003 GETMBR R1 R0 K0 + 0x90020201, // 0004 SETMBR R0 K1 R1 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: event_dnsfailed +********************************************************************/ +be_local_closure(Matter_TCP_async_event_dnsfailed, /* name */ + be_nested_proto( + 1, /* 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(event_dnsfailed), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: close ********************************************************************/ @@ -791,31 +826,23 @@ be_local_closure(Matter_TCP_async_close, /* name */ /******************************************************************** -** Solidified function: set_timeout +** Solidified function: event_refused ********************************************************************/ -be_local_closure(Matter_TCP_async_set_timeout, /* name */ +be_local_closure(Matter_TCP_async_event_refused, /* name */ be_nested_proto( - 3, /* nstack */ - 2, /* argc */ + 1, /* 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(TIMEOUT), - /* K1 */ be_nested_str_weak(timeout), - }), - be_str_weak(set_timeout), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(event_refused), &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0000, // 0002 JMPF R2 #0004 - 0x88040100, // 0003 GETMBR R1 R0 K0 - 0x90020201, // 0004 SETMBR R0 K1 R1 - 0x80000000, // 0005 RET 0 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -828,36 +855,37 @@ be_local_closure(Matter_TCP_async_set_timeout, /* name */ be_local_class(Matter_TCP_async, 8, NULL, - be_nested_map(28, + be_nested_map(29, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(write, -1), be_const_closure(Matter_TCP_async_write_closure) }, - { be_const_key_weak(timeout, -1), be_const_var(2) }, - { be_const_key_weak(port, -1), be_const_var(1) }, - { be_const_key_weak(close, 7), be_const_closure(Matter_TCP_async_close_closure) }, - { be_const_key_weak(tcp, -1), be_const_var(3) }, - { be_const_key_weak(tcp_connected, -1), be_const_var(5) }, - { be_const_key_weak(listening, -1), be_const_closure(Matter_TCP_async_listening_closure) }, - { be_const_key_weak(event_available, -1), be_const_closure(Matter_TCP_async_event_available_closure) }, - { be_const_key_weak(readbytes, 1), be_const_closure(Matter_TCP_async_readbytes_closure) }, - { be_const_key_weak(event_dnsfailed, -1), be_const_closure(Matter_TCP_async_event_dnsfailed_closure) }, - { be_const_key_weak(event_established, -1), be_const_closure(Matter_TCP_async_event_established_closure) }, - { be_const_key_weak(event_refused, 21), be_const_closure(Matter_TCP_async_event_refused_closure) }, - { be_const_key_weak(reset, -1), be_const_closure(Matter_TCP_async_reset_closure) }, - { be_const_key_weak(event_listening, -1), be_const_closure(Matter_TCP_async_event_listening_closure) }, - { be_const_key_weak(event_timeout, -1), be_const_closure(Matter_TCP_async_event_timeout_closure) }, - { be_const_key_weak(status, 25), be_const_var(6) }, - { be_const_key_weak(every_50ms, 11), be_const_closure(Matter_TCP_async_every_50ms_closure) }, - { be_const_key_weak(read, -1), be_const_closure(Matter_TCP_async_read_closure) }, + { be_const_key_weak(read, 13), be_const_closure(Matter_TCP_async_read_closure) }, + { be_const_key_weak(addr, -1), be_const_var(0) }, + { be_const_key_weak(event_refused, -1), be_const_closure(Matter_TCP_async_event_refused_closure) }, { be_const_key_weak(begin, -1), be_const_closure(Matter_TCP_async_begin_closure) }, - { be_const_key_weak(init, 14), be_const_closure(Matter_TCP_async_init_closure) }, - { be_const_key_weak(available, -1), be_const_closure(Matter_TCP_async_available_closure) }, - { be_const_key_weak(event_closed, -1), be_const_closure(Matter_TCP_async_event_closed_closure) }, - { be_const_key_weak(addr, 9), be_const_var(0) }, - { be_const_key_weak(loop, 3), be_const_closure(Matter_TCP_async_loop_closure) }, - { be_const_key_weak(TIMEOUT, 5), be_const_int(1000) }, - { be_const_key_weak(time_start, -1), be_const_var(4) }, - { be_const_key_weak(fast_loop, 2), be_const_var(7) }, + { be_const_key_weak(readbytes, -1), be_const_closure(Matter_TCP_async_readbytes_closure) }, + { be_const_key_weak(event_closed, 11), be_const_closure(Matter_TCP_async_event_closed_closure) }, + { be_const_key_weak(event_listening, -1), be_const_closure(Matter_TCP_async_event_listening_closure) }, + { be_const_key_weak(tcp_connected, -1), be_const_var(5) }, + { be_const_key_weak(get_timeout, -1), be_const_closure(Matter_TCP_async_get_timeout_closure) }, + { be_const_key_weak(timeout, 18), be_const_var(2) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_TCP_async_init_closure) }, + { be_const_key_weak(event_timeout, 6), be_const_closure(Matter_TCP_async_event_timeout_closure) }, { be_const_key_weak(set_timeout, -1), be_const_closure(Matter_TCP_async_set_timeout_closure) }, + { be_const_key_weak(listening, 23), be_const_closure(Matter_TCP_async_listening_closure) }, + { be_const_key_weak(tcp, -1), be_const_var(3) }, + { be_const_key_weak(event_available, -1), be_const_closure(Matter_TCP_async_event_available_closure) }, + { be_const_key_weak(write, -1), be_const_closure(Matter_TCP_async_write_closure) }, + { be_const_key_weak(event_established, -1), be_const_closure(Matter_TCP_async_event_established_closure) }, + { be_const_key_weak(TIMEOUT, 7), be_const_int(1000) }, + { be_const_key_weak(time_start, 22), be_const_var(4) }, + { be_const_key_weak(reset, -1), be_const_closure(Matter_TCP_async_reset_closure) }, + { be_const_key_weak(loop, -1), be_const_closure(Matter_TCP_async_loop_closure) }, + { be_const_key_weak(status, -1), be_const_var(6) }, + { be_const_key_weak(port, -1), be_const_var(1) }, + { be_const_key_weak(every_50ms, 12), be_const_closure(Matter_TCP_async_every_50ms_closure) }, + { be_const_key_weak(fast_loop, -1), be_const_var(7) }, + { be_const_key_weak(event_dnsfailed, -1), be_const_closure(Matter_TCP_async_event_dnsfailed_closure) }, + { be_const_key_weak(close, -1), be_const_closure(Matter_TCP_async_close_closure) }, + { be_const_key_weak(available, 2), be_const_closure(Matter_TCP_async_available_closure) }, })), be_str_weak(Matter_TCP_async) ); 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 76d72c390..fe0022411 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -6,247 +6,6 @@ extern const bclass be_class_Matter_UI; -/******************************************************************** -** Solidified function: show_plugins_configuration -********************************************************************/ -be_local_closure(Matter_UI_show_plugins_configuration, /* name */ - be_nested_proto( - 19, /* nstack */ - 1, /* 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(webserver), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCurrent_X20Configuration_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27), - /* K5 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20RESET_X20the_X20configuration_X20to_X20the_X20default_X2E_X20You_X20will_X20need_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E), - /* K6 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27auto_X27_X20class_X3D_X27button_X20bred_X27_X3EReset_X20to_X20default_X3C_X2Fbutton_X3E_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Fform_X3E), - /* K7 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22Changing_X20the_X20configuration_X20requires_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E), - /* K8 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E), - /* K9 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X20width_X3D_X2735_X27_X3E_X3Cb_X3EEp_X2E_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EType_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EParam_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3C_X2Ftr_X3E), - /* K10 */ be_nested_str_weak(device), - /* K11 */ be_nested_str_weak(k2l_num), - /* K12 */ be_nested_str_weak(plugins_config), - /* K13 */ be_const_int(0), - /* K14 */ be_nested_str_weak(find), - /* K15 */ be_nested_str_weak(type), - /* K16 */ be_nested_str_weak(format), - /* K17 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20value_X3D_X270_X27_X20readonly_X3E_X3C_X2Ftd_X3E), - /* K18 */ be_nested_str_weak(_X3Ctd_X3E_X3Cselect_X20name_X3D_X27pi_X2503i_X27_X3E), - /* K19 */ be_nested_str_weak(plugin_option), - /* K20 */ be_nested_str_weak(), - /* K21 */ be_nested_str_weak(_ROOT_TYPES), - /* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E), - /* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X26nbsp_X3B_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), - /* K24 */ be_const_int(1), - /* K25 */ be_nested_str_weak(plugins_classes), - /* K26 */ be_nested_str_weak(ui_conf_to_string), - /* K27 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E), - /* K28 */ be_nested_str_weak(_CLASSES_TYPES), - /* K29 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), - /* K30 */ be_nested_str_weak(html_escape), - /* K31 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E), - /* K32 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), - /* K33 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K34 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E), - /* K35 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - }), - be_str_weak(show_plugins_configuration), - &be_const_str_solidified, - ( &(const binstruction[181]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0x8C0C0302, // 0002 GETMET R3 R1 K2 - 0x58140003, // 0003 LDCONST R5 K3 - 0x7C0C0400, // 0004 CALL R3 2 - 0x8C0C0302, // 0005 GETMET R3 R1 K2 - 0x58140004, // 0006 LDCONST R5 K4 - 0x7C0C0400, // 0007 CALL R3 2 - 0x8C0C0302, // 0008 GETMET R3 R1 K2 - 0x58140005, // 0009 LDCONST R5 K5 - 0x7C0C0400, // 000A CALL R3 2 - 0x8C0C0302, // 000B GETMET R3 R1 K2 - 0x58140006, // 000C LDCONST R5 K6 - 0x7C0C0400, // 000D CALL R3 2 - 0x8C0C0302, // 000E GETMET R3 R1 K2 - 0x58140004, // 000F LDCONST R5 K4 - 0x7C0C0400, // 0010 CALL R3 2 - 0x8C0C0302, // 0011 GETMET R3 R1 K2 - 0x58140007, // 0012 LDCONST R5 K7 - 0x7C0C0400, // 0013 CALL R3 2 - 0x8C0C0302, // 0014 GETMET R3 R1 K2 - 0x58140008, // 0015 LDCONST R5 K8 - 0x7C0C0400, // 0016 CALL R3 2 - 0x8C0C0302, // 0017 GETMET R3 R1 K2 - 0x58140009, // 0018 LDCONST R5 K9 - 0x7C0C0400, // 0019 CALL R3 2 - 0x880C010A, // 001A GETMBR R3 R0 K10 - 0x8C0C070B, // 001B GETMET R3 R3 K11 - 0x8814010A, // 001C GETMBR R5 R0 K10 - 0x88140B0C, // 001D GETMBR R5 R5 K12 - 0x7C0C0400, // 001E CALL R3 2 - 0x5810000D, // 001F LDCONST R4 K13 - 0x9414070D, // 0020 GETIDX R5 R3 K13 - 0x1C140B0D, // 0021 EQ R5 R5 K13 - 0x78160026, // 0022 JMPF R5 #004A - 0x94140604, // 0023 GETIDX R5 R3 R4 - 0x8818010A, // 0024 GETMBR R6 R0 K10 - 0x601C0008, // 0025 GETGBL R7 G8 - 0x5C200A00, // 0026 MOVE R8 R5 - 0x7C1C0200, // 0027 CALL R7 1 - 0x88180D0C, // 0028 GETMBR R6 R6 K12 - 0x94180C07, // 0029 GETIDX R6 R6 R7 - 0x8C200D0E, // 002A GETMET R8 R6 K14 - 0x5828000F, // 002B LDCONST R10 K15 - 0x7C200400, // 002C CALL R8 2 - 0x5C1C1000, // 002D MOVE R7 R8 - 0x8C200302, // 002E GETMET R8 R1 K2 - 0x8C280510, // 002F GETMET R10 R2 K16 - 0x58300011, // 0030 LDCONST R12 K17 - 0x5C340800, // 0031 MOVE R13 R4 - 0x7C280600, // 0032 CALL R10 3 - 0x7C200400, // 0033 CALL R8 2 - 0x8C200302, // 0034 GETMET R8 R1 K2 - 0x8C280510, // 0035 GETMET R10 R2 K16 - 0x58300012, // 0036 LDCONST R12 K18 - 0x5C340800, // 0037 MOVE R13 R4 - 0x7C280600, // 0038 CALL R10 3 - 0x7C200400, // 0039 CALL R8 2 - 0x8C200113, // 003A GETMET R8 R0 K19 - 0x8C280D0E, // 003B GETMET R10 R6 K14 - 0x5830000F, // 003C LDCONST R12 K15 - 0x58340014, // 003D LDCONST R13 K20 - 0x7C280600, // 003E CALL R10 3 - 0x882C0115, // 003F GETMBR R11 R0 K21 - 0x7C200600, // 0040 CALL R8 3 - 0x8C200302, // 0041 GETMET R8 R1 K2 - 0x8C280510, // 0042 GETMET R10 R2 K16 - 0x58300016, // 0043 LDCONST R12 K22 - 0x7C280400, // 0044 CALL R10 2 - 0x7C200400, // 0045 CALL R8 2 - 0x8C200302, // 0046 GETMET R8 R1 K2 - 0x58280017, // 0047 LDCONST R10 K23 - 0x7C200400, // 0048 CALL R8 2 - 0x00100918, // 0049 ADD R4 R4 K24 - 0x6014000C, // 004A GETGBL R5 G12 - 0x5C180600, // 004B MOVE R6 R3 - 0x7C140200, // 004C CALL R5 1 - 0x14140805, // 004D LT R5 R4 R5 - 0x78160040, // 004E JMPF R5 #0090 - 0x94140604, // 004F GETIDX R5 R3 R4 - 0x8818010A, // 0050 GETMBR R6 R0 K10 - 0x601C0008, // 0051 GETGBL R7 G8 - 0x5C200A00, // 0052 MOVE R8 R5 - 0x7C1C0200, // 0053 CALL R7 1 - 0x88180D0C, // 0054 GETMBR R6 R6 K12 - 0x94180C07, // 0055 GETIDX R6 R6 R7 - 0x8C200D0E, // 0056 GETMET R8 R6 K14 - 0x5828000F, // 0057 LDCONST R10 K15 - 0x7C200400, // 0058 CALL R8 2 - 0x5C1C1000, // 0059 MOVE R7 R8 - 0x5C200E00, // 005A MOVE R8 R7 - 0x74220001, // 005B JMPT R8 #005E - 0x00100918, // 005C ADD R4 R4 K24 - 0x7001FFEB, // 005D JMP #004A - 0x8820010A, // 005E GETMBR R8 R0 K10 - 0x88201119, // 005F GETMBR R8 R8 K25 - 0x8C20110E, // 0060 GETMET R8 R8 K14 - 0x5C280E00, // 0061 MOVE R10 R7 - 0x7C200400, // 0062 CALL R8 2 - 0x58240014, // 0063 LDCONST R9 K20 - 0x4C280000, // 0064 LDNIL R10 - 0x2028100A, // 0065 NE R10 R8 R10 - 0x782A0004, // 0066 JMPF R10 #006C - 0x8C28111A, // 0067 GETMET R10 R8 K26 - 0x5C301000, // 0068 MOVE R12 R8 - 0x5C340C00, // 0069 MOVE R13 R6 - 0x7C280600, // 006A CALL R10 3 - 0x5C241400, // 006B MOVE R9 R10 - 0x8C280302, // 006C GETMET R10 R1 K2 - 0x8C300510, // 006D GETMET R12 R2 K16 - 0x5838001B, // 006E LDCONST R14 K27 - 0x5C3C0800, // 006F MOVE R15 R4 - 0x5C400A00, // 0070 MOVE R16 R5 - 0x7C300800, // 0071 CALL R12 4 - 0x7C280400, // 0072 CALL R10 2 - 0x8C280302, // 0073 GETMET R10 R1 K2 - 0x8C300510, // 0074 GETMET R12 R2 K16 - 0x58380012, // 0075 LDCONST R14 K18 - 0x5C3C0800, // 0076 MOVE R15 R4 - 0x7C300600, // 0077 CALL R12 3 - 0x7C280400, // 0078 CALL R10 2 - 0x8C280113, // 0079 GETMET R10 R0 K19 - 0x8C300D0E, // 007A GETMET R12 R6 K14 - 0x5838000F, // 007B LDCONST R14 K15 - 0x583C0014, // 007C LDCONST R15 K20 - 0x7C300600, // 007D CALL R12 3 - 0x8834011C, // 007E GETMBR R13 R0 K28 - 0x7C280600, // 007F CALL R10 3 - 0x8C280302, // 0080 GETMET R10 R1 K2 - 0x8C300510, // 0081 GETMET R12 R2 K16 - 0x58380016, // 0082 LDCONST R14 K22 - 0x7C300400, // 0083 CALL R12 2 - 0x7C280400, // 0084 CALL R10 2 - 0x8C280302, // 0085 GETMET R10 R1 K2 - 0x8C300510, // 0086 GETMET R12 R2 K16 - 0x5838001D, // 0087 LDCONST R14 K29 - 0x5C3C0800, // 0088 MOVE R15 R4 - 0x8C40031E, // 0089 GETMET R16 R1 K30 - 0x5C481200, // 008A MOVE R18 R9 - 0x7C400400, // 008B CALL R16 2 - 0x7C300800, // 008C CALL R12 4 - 0x7C280400, // 008D CALL R10 2 - 0x00100918, // 008E ADD R4 R4 K24 - 0x7001FFB9, // 008F JMP #004A - 0x8C140302, // 0090 GETMET R5 R1 K2 - 0x8C1C0510, // 0091 GETMET R7 R2 K16 - 0x5824001F, // 0092 LDCONST R9 K31 - 0x5C280800, // 0093 MOVE R10 R4 - 0x7C1C0600, // 0094 CALL R7 3 - 0x7C140400, // 0095 CALL R5 2 - 0x8C140302, // 0096 GETMET R5 R1 K2 - 0x8C1C0510, // 0097 GETMET R7 R2 K16 - 0x58240012, // 0098 LDCONST R9 K18 - 0x5C280800, // 0099 MOVE R10 R4 - 0x7C1C0600, // 009A CALL R7 3 - 0x7C140400, // 009B CALL R5 2 - 0x8C140113, // 009C GETMET R5 R0 K19 - 0x581C0014, // 009D LDCONST R7 K20 - 0x8820011C, // 009E GETMBR R8 R0 K28 - 0x7C140600, // 009F CALL R5 3 - 0x8C140302, // 00A0 GETMET R5 R1 K2 - 0x8C1C0510, // 00A1 GETMET R7 R2 K16 - 0x58240016, // 00A2 LDCONST R9 K22 - 0x7C1C0400, // 00A3 CALL R7 2 - 0x7C140400, // 00A4 CALL R5 2 - 0x8C140302, // 00A5 GETMET R5 R1 K2 - 0x8C1C0510, // 00A6 GETMET R7 R2 K16 - 0x58240020, // 00A7 LDCONST R9 K32 - 0x5C280800, // 00A8 MOVE R10 R4 - 0x7C1C0600, // 00A9 CALL R7 3 - 0x7C140400, // 00AA CALL R5 2 - 0x8C140302, // 00AB GETMET R5 R1 K2 - 0x581C0021, // 00AC LDCONST R7 K33 - 0x7C140400, // 00AD CALL R5 2 - 0x8C140302, // 00AE GETMET R5 R1 K2 - 0x581C0022, // 00AF LDCONST R7 K34 - 0x7C140400, // 00B0 CALL R5 2 - 0x8C140302, // 00B1 GETMET R5 R1 K2 - 0x581C0023, // 00B2 LDCONST R7 K35 - 0x7C140400, // 00B3 CALL R5 2 - 0x80000000, // 00B4 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: page_part_mgr ********************************************************************/ @@ -312,11 +71,109 @@ be_local_closure(Matter_UI_page_part_mgr, /* name */ /******************************************************************** -** Solidified function: show_commissioning_info +** Solidified function: plugin_option ********************************************************************/ -be_local_closure(Matter_UI_show_commissioning_info, /* name */ +be_local_closure(Matter_UI_plugin_option, /* name */ be_nested_proto( - 14, /* nstack */ + 17, /* nstack */ + 3, /* argc */ + 3, /* 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_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(split), + /* K3 */ be_nested_str_weak(_X7C), + /* K4 */ be_nested_str_weak(stop_iteration), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(), + /* K7 */ be_nested_str_weak(content_send), + /* K8 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E), + /* K9 */ be_nested_str_weak(_X2Dhttp), + /* K10 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X20disabled_X3E_X2D_X2D_X2D_X20Tasmota_X20Remote_X20_X2D_X2D_X2D_X3C_X2Foption_X3E), + /* K11 */ be_nested_str_weak(device), + /* K12 */ be_nested_str_weak(get_plugin_class_displayname), + /* K13 */ be_nested_str_weak(format), + /* K14 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E), + /* K15 */ be_nested_str_weak(_X20selected), + /* K16 */ be_const_int(1), + }), + be_str_weak(plugin_option), + &be_const_str_solidified, + ( &(const binstruction[57]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0x60140012, // 0002 GETGBL R5 G18 + 0x7C140000, // 0003 CALL R5 0 + 0x60180010, // 0004 GETGBL R6 G16 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x7C180200, // 0006 CALL R6 1 + 0xA8020007, // 0007 EXBLK 0 #0010 + 0x5C1C0C00, // 0008 MOVE R7 R6 + 0x7C1C0000, // 0009 CALL R7 0 + 0x8C200902, // 000A GETMET R8 R4 K2 + 0x5C280E00, // 000B MOVE R10 R7 + 0x582C0003, // 000C LDCONST R11 K3 + 0x7C200600, // 000D CALL R8 3 + 0x00140A08, // 000E ADD R5 R5 R8 + 0x7001FFF7, // 000F JMP #0008 + 0x58180004, // 0010 LDCONST R6 K4 + 0xAC180200, // 0011 CATCH R6 1 0 + 0xB0080000, // 0012 RAISE 2 R0 R0 + 0x58180005, // 0013 LDCONST R6 K5 + 0x601C000C, // 0014 GETGBL R7 G12 + 0x5C200A00, // 0015 MOVE R8 R5 + 0x7C1C0200, // 0016 CALL R7 1 + 0x141C0C07, // 0017 LT R7 R6 R7 + 0x781E001E, // 0018 JMPF R7 #0038 + 0x941C0A06, // 0019 GETIDX R7 R5 R6 + 0x1C200F06, // 001A EQ R8 R7 K6 + 0x78220003, // 001B JMPF R8 #0020 + 0x8C200707, // 001C GETMET R8 R3 K7 + 0x58280008, // 001D LDCONST R10 K8 + 0x7C200400, // 001E CALL R8 2 + 0x70020015, // 001F JMP #0036 + 0x1C200F09, // 0020 EQ R8 R7 K9 + 0x78220003, // 0021 JMPF R8 #0026 + 0x8C200707, // 0022 GETMET R8 R3 K7 + 0x5828000A, // 0023 LDCONST R10 K10 + 0x7C200400, // 0024 CALL R8 2 + 0x7002000F, // 0025 JMP #0036 + 0x8820010B, // 0026 GETMBR R8 R0 K11 + 0x8C20110C, // 0027 GETMET R8 R8 K12 + 0x5C280E00, // 0028 MOVE R10 R7 + 0x7C200400, // 0029 CALL R8 2 + 0x8C240707, // 002A GETMET R9 R3 K7 + 0x8C2C090D, // 002B GETMET R11 R4 K13 + 0x5834000E, // 002C LDCONST R13 K14 + 0x5C380E00, // 002D MOVE R14 R7 + 0x1C3C0E01, // 002E EQ R15 R7 R1 + 0x783E0001, // 002F JMPF R15 #0032 + 0x583C000F, // 0030 LDCONST R15 K15 + 0x70020000, // 0031 JMP #0033 + 0x583C0006, // 0032 LDCONST R15 K6 + 0x5C401000, // 0033 MOVE R16 R8 + 0x7C2C0A00, // 0034 CALL R11 5 + 0x7C240400, // 0035 CALL R9 2 + 0x00180D10, // 0036 ADD R6 R6 K16 + 0x7001FFDB, // 0037 JMP #0014 + 0x80000000, // 0038 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: show_bridge_status +********************************************************************/ +be_local_closure(Matter_UI_show_bridge_status, /* name */ + be_nested_proto( + 15, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -324,97 +181,139 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[20]) { /* constants */ + ( &(const bvalue[26]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(device), - /* K3 */ be_nested_str_weak(commissioning_open), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(millis), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(content_send), - /* K8 */ be_nested_str_weak(format), - /* K9 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCommissioning_X20open_X20for_X20_X25i_X20min_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K10 */ be_nested_str_weak(compute_manual_pairing_code), - /* K11 */ be_nested_str_weak(_X3Cp_X3EManual_X20pairing_X20code_X3A_X3Cbr_X3E_X3Cb_X3E_X25s_X2D_X25s_X2D_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E_X3Chr_X3E), - /* K12 */ be_const_int(3), - /* K13 */ be_const_int(2147483647), - /* K14 */ be_nested_str_weak(_X3Cdiv_X3E_X3Ccenter_X3E), - /* K15 */ be_nested_str_weak(compute_qrcode_content), - /* K16 */ be_nested_str_weak(show_qrcode), - /* K17 */ be_nested_str_weak(_X3Cp_X3E_X20_X25s_X3C_X2Fp_X3E), - /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E), - /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(device), + /* K4 */ be_nested_str_weak(plugins), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(Plugin_Bridge_HTTP), + /* K7 */ be_nested_str_weak(http_remote), + /* K8 */ be_nested_str_weak(addr), + /* K9 */ be_nested_str_weak(contains), + /* K10 */ be_nested_str_weak(push), + /* K11 */ be_const_int(1), + /* K12 */ be_nested_str_weak(content_send), + /* K13 */ be_nested_str_weak(_X3Chr_X3E), + /* K14 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E), + /* K15 */ be_nested_str_weak(_STYLESHEET), + /* K16 */ be_nested_str_weak(keys), + /* K17 */ be_nested_str_weak(format), + /* K18 */ be_nested_str_weak(_X3Ctr_X20class_X3D_X27ztdm_X20htrm_X27_X3E_X3Ctd_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Ftd_X3E), + /* K19 */ be_nested_str_weak(html_escape), + /* K20 */ be_nested_str_weak(web_last_seen), + /* K21 */ be_nested_str_weak(_X3Ctr_X20class_X3D_X27htrm_X27_X3E_X3Ctd_X20colspan_X3D_X272_X27_X3E), + /* K22 */ be_nested_str_weak(web_values), + /* K23 */ be_nested_str_weak(_X3C_X2Ftd_X3E_X3C_X2Ftr_X3E), + /* K24 */ be_nested_str_weak(stop_iteration), + /* K25 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Chr_X3E), }), - be_str_weak(show_commissioning_info), + be_str_weak(show_bridge_status), &be_const_str_solidified, - ( &(const binstruction[66]) { /* code */ + ( &(const binstruction[102]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x880C0703, // 0003 GETMBR R3 R3 K3 - 0xB8120800, // 0004 GETNGBL R4 K4 - 0x8C100905, // 0005 GETMET R4 R4 K5 - 0x7C100200, // 0006 CALL R4 1 - 0x040C0604, // 0007 SUB R3 R3 R4 - 0x541203E7, // 0008 LDINT R4 1000 - 0x0C0C0604, // 0009 DIV R3 R3 R4 - 0x14100706, // 000A LT R4 R3 K6 - 0x78120000, // 000B JMPF R4 #000D - 0x580C0006, // 000C LDCONST R3 K6 - 0x5412001D, // 000D LDINT R4 30 - 0x00100604, // 000E ADD R4 R3 R4 - 0x5416003B, // 000F LDINT R5 60 - 0x0C100805, // 0010 DIV R4 R4 R5 - 0x8C140307, // 0011 GETMET R5 R1 K7 - 0x8C1C0508, // 0012 GETMET R7 R2 K8 - 0x58240009, // 0013 LDCONST R9 K9 - 0x5C280800, // 0014 MOVE R10 R4 - 0x7C1C0600, // 0015 CALL R7 3 - 0x7C140400, // 0016 CALL R5 2 - 0x88140102, // 0017 GETMBR R5 R0 K2 - 0x8C140B0A, // 0018 GETMET R5 R5 K10 - 0x7C140200, // 0019 CALL R5 1 - 0x8C180307, // 001A GETMET R6 R1 K7 - 0x8C200508, // 001B GETMET R8 R2 K8 - 0x5828000B, // 001C LDCONST R10 K11 - 0x402E0D0C, // 001D CONNECT R11 K6 K12 - 0x942C0A0B, // 001E GETIDX R11 R5 R11 - 0x54320003, // 001F LDINT R12 4 - 0x54360005, // 0020 LDINT R13 6 - 0x4030180D, // 0021 CONNECT R12 R12 R13 - 0x94300A0C, // 0022 GETIDX R12 R5 R12 - 0x54360006, // 0023 LDINT R13 7 - 0x40341B0D, // 0024 CONNECT R13 R13 K13 - 0x94340A0D, // 0025 GETIDX R13 R5 R13 - 0x7C200A00, // 0026 CALL R8 5 - 0x7C180400, // 0027 CALL R6 2 - 0x8C180307, // 0028 GETMET R6 R1 K7 - 0x8C200508, // 0029 GETMET R8 R2 K8 - 0x5828000E, // 002A LDCONST R10 K14 - 0x7C200400, // 002B CALL R8 2 - 0x7C180400, // 002C CALL R6 2 - 0x88180102, // 002D GETMBR R6 R0 K2 - 0x8C180D0F, // 002E GETMET R6 R6 K15 - 0x7C180200, // 002F CALL R6 1 - 0x8C1C0110, // 0030 GETMET R7 R0 K16 - 0x5C240C00, // 0031 MOVE R9 R6 - 0x7C1C0400, // 0032 CALL R7 2 - 0x8C1C0307, // 0033 GETMET R7 R1 K7 - 0x8C240508, // 0034 GETMET R9 R2 K8 - 0x582C0011, // 0035 LDCONST R11 K17 - 0x5C300C00, // 0036 MOVE R12 R6 - 0x7C240600, // 0037 CALL R9 3 - 0x7C1C0400, // 0038 CALL R7 2 - 0x8C1C0307, // 0039 GETMET R7 R1 K7 - 0x8C240508, // 003A GETMET R9 R2 K8 - 0x582C0012, // 003B LDCONST R11 K18 - 0x7C240400, // 003C CALL R9 2 - 0x7C1C0400, // 003D CALL R7 2 - 0x8C1C0307, // 003E GETMET R7 R1 K7 - 0x58240013, // 003F LDCONST R9 K19 - 0x7C1C0400, // 0040 CALL R7 2 - 0x80000000, // 0041 RET 0 + 0x4C0C0000, // 0002 LDNIL R3 + 0x58100002, // 0003 LDCONST R4 K2 + 0x6014000C, // 0004 GETGBL R5 G12 + 0x88180103, // 0005 GETMBR R6 R0 K3 + 0x88180D04, // 0006 GETMBR R6 R6 K4 + 0x7C140200, // 0007 CALL R5 1 + 0x14140805, // 0008 LT R5 R4 R5 + 0x7816001D, // 0009 JMPF R5 #0028 + 0x88140103, // 000A GETMBR R5 R0 K3 + 0x88140B04, // 000B GETMBR R5 R5 K4 + 0x94140A04, // 000C GETIDX R5 R5 R4 + 0x6018000F, // 000D GETGBL R6 G15 + 0x5C1C0A00, // 000E MOVE R7 R5 + 0xB8220A00, // 000F GETNGBL R8 K5 + 0x88201106, // 0010 GETMBR R8 R8 K6 + 0x7C180400, // 0011 CALL R6 2 + 0x781A0012, // 0012 JMPF R6 #0026 + 0x4C180000, // 0013 LDNIL R6 + 0x1C180606, // 0014 EQ R6 R3 R6 + 0x781A0002, // 0015 JMPF R6 #0019 + 0x60180013, // 0016 GETGBL R6 G19 + 0x7C180000, // 0017 CALL R6 0 + 0x5C0C0C00, // 0018 MOVE R3 R6 + 0x88180B07, // 0019 GETMBR R6 R5 K7 + 0x88180D08, // 001A GETMBR R6 R6 K8 + 0x8C1C0709, // 001B GETMET R7 R3 K9 + 0x5C240C00, // 001C MOVE R9 R6 + 0x7C1C0400, // 001D CALL R7 2 + 0x741E0002, // 001E JMPT R7 #0022 + 0x601C0012, // 001F GETGBL R7 G18 + 0x7C1C0000, // 0020 CALL R7 0 + 0x980C0C07, // 0021 SETIDX R3 R6 R7 + 0x941C0606, // 0022 GETIDX R7 R3 R6 + 0x8C1C0F0A, // 0023 GETMET R7 R7 K10 + 0x5C240A00, // 0024 MOVE R9 R5 + 0x7C1C0400, // 0025 CALL R7 2 + 0x0010090B, // 0026 ADD R4 R4 K11 + 0x7001FFDB, // 0027 JMP #0004 + 0x4C140000, // 0028 LDNIL R5 + 0x1C140605, // 0029 EQ R5 R3 R5 + 0x78160000, // 002A JMPF R5 #002C + 0x80000A00, // 002B RET 0 + 0x8C14030C, // 002C GETMET R5 R1 K12 + 0x581C000D, // 002D LDCONST R7 K13 + 0x7C140400, // 002E CALL R5 2 + 0x8C14030C, // 002F GETMET R5 R1 K12 + 0x581C000E, // 0030 LDCONST R7 K14 + 0x7C140400, // 0031 CALL R5 2 + 0x8C14030C, // 0032 GETMET R5 R1 K12 + 0xB81E0A00, // 0033 GETNGBL R7 K5 + 0x881C0F0F, // 0034 GETMBR R7 R7 K15 + 0x7C140400, // 0035 CALL R5 2 + 0x60140010, // 0036 GETGBL R5 G16 + 0x8C180710, // 0037 GETMET R6 R3 K16 + 0x7C180200, // 0038 CALL R6 1 + 0x7C140200, // 0039 CALL R5 1 + 0xA8020023, // 003A EXBLK 0 #005F + 0x5C180A00, // 003B MOVE R6 R5 + 0x7C180000, // 003C CALL R6 0 + 0x8C1C030C, // 003D GETMET R7 R1 K12 + 0x8C240511, // 003E GETMET R9 R2 K17 + 0x582C0012, // 003F LDCONST R11 K18 + 0x8C300313, // 0040 GETMET R12 R1 K19 + 0x5C380C00, // 0041 MOVE R14 R6 + 0x7C300400, // 0042 CALL R12 2 + 0x7C240600, // 0043 CALL R9 3 + 0x7C1C0400, // 0044 CALL R7 2 + 0x941C0606, // 0045 GETIDX R7 R3 R6 + 0x941C0F02, // 0046 GETIDX R7 R7 K2 + 0x881C0F07, // 0047 GETMBR R7 R7 K7 + 0x8C20030C, // 0048 GETMET R8 R1 K12 + 0x8C280F14, // 0049 GETMET R10 R7 K20 + 0x7C280200, // 004A CALL R10 1 + 0x7C200400, // 004B CALL R8 2 + 0x60200010, // 004C GETGBL R8 G16 + 0x94240606, // 004D GETIDX R9 R3 R6 + 0x7C200200, // 004E CALL R8 1 + 0xA802000A, // 004F EXBLK 0 #005B + 0x5C241000, // 0050 MOVE R9 R8 + 0x7C240000, // 0051 CALL R9 0 + 0x8C28030C, // 0052 GETMET R10 R1 K12 + 0x58300015, // 0053 LDCONST R12 K21 + 0x7C280400, // 0054 CALL R10 2 + 0x8C281316, // 0055 GETMET R10 R9 K22 + 0x7C280200, // 0056 CALL R10 1 + 0x8C28030C, // 0057 GETMET R10 R1 K12 + 0x58300017, // 0058 LDCONST R12 K23 + 0x7C280400, // 0059 CALL R10 2 + 0x7001FFF4, // 005A JMP #0050 + 0x58200018, // 005B LDCONST R8 K24 + 0xAC200200, // 005C CATCH R8 1 0 + 0xB0080000, // 005D RAISE 2 R0 R0 + 0x7001FFDB, // 005E JMP #003B + 0x58140018, // 005F LDCONST R5 K24 + 0xAC140200, // 0060 CATCH R5 1 0 + 0xB0080000, // 0061 RAISE 2 R0 R0 + 0x8C14030C, // 0062 GETMET R5 R1 K12 + 0x581C0019, // 0063 LDCONST R7 K25 + 0x7C140400, // 0064 CALL R5 2 + 0x80000000, // 0065 RET 0 }) ) ); @@ -422,88 +321,165 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */ /******************************************************************** -** Solidified function: web_add_handler +** Solidified function: show_qrcode ********************************************************************/ -be_local_closure(Matter_UI_web_add_handler, /* name */ +be_local_closure(Matter_UI_show_qrcode, /* name */ be_nested_proto( - 7, /* nstack */ - 1, /* argc */ + 18, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - 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(page_part_mgr), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0x80040000, // 0003 RET 1 R0 - }) - ), - 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(page_part_ctl), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0x80040000, // 0003 RET 1 R0 - }) - ), - }), + 0, /* has sup protos */ + NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ + ( &(const bvalue[22]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(on), - /* K2 */ be_nested_str_weak(_X2Fmatterc), - /* K3 */ be_nested_str_weak(HTTP_GET), - /* K4 */ be_nested_str_weak(HTTP_POST), + /* K1 */ be_nested_str_weak(_X20), + /* K2 */ be_nested_str_weak(_XE2_X96_X84), + /* K3 */ be_nested_str_weak(_XE2_X96_X80), + /* K4 */ be_nested_str_weak(_XE2_X96_X88), + /* K5 */ be_nested_str_weak(matter), + /* K6 */ be_nested_str_weak(QRCode), + /* K7 */ be_nested_str_weak(encode_str), + /* K8 */ be_nested_str_weak(bitmap), + /* K9 */ be_nested_str_weak(size), + /* K10 */ be_nested_str_weak(content_send), + /* K11 */ be_nested_str_weak(_X3Cstyle_X3E_X2Eqr_X7Bfont_X2Dfamily_X3Amonospace_X3B_X20margin_X3A0_X3B_X20padding_X3A0_X3B_X20white_X2Dspace_X3Apre_X3B_X20font_X2Dsize_X3A18px_X3B_X20color_X3A_X23fff_X3B_X20line_X2Dheight_X3A100_X25_X3B_X7D_X3C_X2Fstyle_X3E), + /* K12 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27transform_X3Ascale_X28_X2E8_X2C1_X29_X3B_X20display_X3Ainline_X2Dblock_X3B_X27_X3E), + /* K13 */ be_nested_str_weak(_X3Cdiv_X20class_X3D_X27qr_X27_X3E), + /* K14 */ be_nested_str_weak(), + /* K15 */ be_const_int(0), + /* K16 */ be_const_int(1), + /* K17 */ be_nested_str_weak(stop_iteration), + /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E), + /* K19 */ be_const_int(2), + /* K20 */ be_nested_str_weak(_X3Cdiv_X20class_X3D_X27qr_X27_X20style_X3D_X27background_X2Dcolor_X3A_X23000_X3B_X27_X3E), + /* K21 */ be_nested_str_weak(_X2F_X3Cdiv_X3E), }), - be_str_weak(web_add_handler), + be_str_weak(show_qrcode), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 + ( &(const binstruction[120]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x580C0001, // 0001 LDCONST R3 K1 0x58100002, // 0002 LDCONST R4 K2 - 0x84140000, // 0003 CLOSURE R5 P0 - 0x88180303, // 0004 GETMBR R6 R1 K3 - 0x7C080800, // 0005 CALL R2 4 - 0x8C080301, // 0006 GETMET R2 R1 K1 - 0x58100002, // 0007 LDCONST R4 K2 - 0x84140001, // 0008 CLOSURE R5 P1 - 0x88180304, // 0009 GETMBR R6 R1 K4 - 0x7C080800, // 000A CALL R2 4 - 0xA0000000, // 000B CLOSE R0 - 0x80000000, // 000C RET 0 + 0x58140003, // 0003 LDCONST R5 K3 + 0x58180004, // 0004 LDCONST R6 K4 + 0xB81E0A00, // 0005 GETNGBL R7 K5 + 0x881C0F06, // 0006 GETMBR R7 R7 K6 + 0x8C1C0F07, // 0007 GETMET R7 R7 K7 + 0x5C240200, // 0008 MOVE R9 R1 + 0x7C1C0400, // 0009 CALL R7 2 + 0x94200F08, // 000A GETIDX R8 R7 K8 + 0x94240F09, // 000B GETIDX R9 R7 K9 + 0x8C28050A, // 000C GETMET R10 R2 K10 + 0x5830000B, // 000D LDCONST R12 K11 + 0x7C280400, // 000E CALL R10 2 + 0x8C28050A, // 000F GETMET R10 R2 K10 + 0x5830000C, // 0010 LDCONST R12 K12 + 0x7C280400, // 0011 CALL R10 2 + 0x5828000D, // 0012 LDCONST R10 K13 + 0x8C2C050A, // 0013 GETMET R11 R2 K10 + 0x5C341400, // 0014 MOVE R13 R10 + 0x7C2C0400, // 0015 CALL R11 2 + 0x5828000E, // 0016 LDCONST R10 K14 + 0x602C0010, // 0017 GETGBL R11 G16 + 0x00301310, // 0018 ADD R12 R9 K16 + 0x40321E0C, // 0019 CONNECT R12 K15 R12 + 0x7C2C0200, // 001A CALL R11 1 + 0xA8020003, // 001B EXBLK 0 #0020 + 0x5C301600, // 001C MOVE R12 R11 + 0x7C300000, // 001D CALL R12 0 + 0x00281404, // 001E ADD R10 R10 R4 + 0x7001FFFB, // 001F JMP #001C + 0x582C0011, // 0020 LDCONST R11 K17 + 0xAC2C0200, // 0021 CATCH R11 1 0 + 0xB0080000, // 0022 RAISE 2 R0 R0 + 0x00281512, // 0023 ADD R10 R10 K18 + 0x8C2C050A, // 0024 GETMET R11 R2 K10 + 0x5C341400, // 0025 MOVE R13 R10 + 0x7C2C0400, // 0026 CALL R11 2 + 0x602C0010, // 0027 GETGBL R11 G16 + 0x00301310, // 0028 ADD R12 R9 K16 + 0x0C301913, // 0029 DIV R12 R12 K19 + 0x04301910, // 002A SUB R12 R12 K16 + 0x40321E0C, // 002B CONNECT R12 K15 R12 + 0x7C2C0200, // 002C CALL R11 1 + 0xA802002E, // 002D EXBLK 0 #005D + 0x5C301600, // 002E MOVE R12 R11 + 0x7C300000, // 002F CALL R12 0 + 0x00362806, // 0030 ADD R13 K20 R6 + 0x5C281A00, // 0031 MOVE R10 R13 + 0x60340010, // 0032 GETGBL R13 G16 + 0x04381310, // 0033 SUB R14 R9 K16 + 0x403A1E0E, // 0034 CONNECT R14 K15 R14 + 0x7C340200, // 0035 CALL R13 1 + 0xA802001C, // 0036 EXBLK 0 #0054 + 0x5C381A00, // 0037 MOVE R14 R13 + 0x7C380000, // 0038 CALL R14 0 + 0x083C1913, // 0039 MUL R15 R12 K19 + 0x943C100F, // 003A GETIDX R15 R8 R15 + 0x943C1E0E, // 003B GETIDX R15 R15 R14 + 0x1C3C1F01, // 003C EQ R15 R15 K1 + 0x08401913, // 003D MUL R16 R12 K19 + 0x00402110, // 003E ADD R16 R16 K16 + 0x14402009, // 003F LT R16 R16 R9 + 0x78420005, // 0040 JMPF R16 #0047 + 0x08401913, // 0041 MUL R16 R12 K19 + 0x00402110, // 0042 ADD R16 R16 K16 + 0x94401010, // 0043 GETIDX R16 R8 R16 + 0x9440200E, // 0044 GETIDX R16 R16 R14 + 0x1C402101, // 0045 EQ R16 R16 K1 + 0x70020000, // 0046 JMP #0048 + 0x50400200, // 0047 LDBOOL R16 1 0 + 0x783E0004, // 0048 JMPF R15 #004E + 0x78420001, // 0049 JMPF R16 #004C + 0x5C440C00, // 004A MOVE R17 R6 + 0x70020000, // 004B JMP #004D + 0x5C440A00, // 004C MOVE R17 R5 + 0x70020003, // 004D JMP #0052 + 0x78420001, // 004E JMPF R16 #0051 + 0x5C440800, // 004F MOVE R17 R4 + 0x70020000, // 0050 JMP #0052 + 0x5C440600, // 0051 MOVE R17 R3 + 0x00281411, // 0052 ADD R10 R10 R17 + 0x7001FFE2, // 0053 JMP #0037 + 0x58340011, // 0054 LDCONST R13 K17 + 0xAC340200, // 0055 CATCH R13 1 0 + 0xB0080000, // 0056 RAISE 2 R0 R0 + 0x00281406, // 0057 ADD R10 R10 R6 + 0x00281512, // 0058 ADD R10 R10 K18 + 0x8C34050A, // 0059 GETMET R13 R2 K10 + 0x5C3C1400, // 005A MOVE R15 R10 + 0x7C340400, // 005B CALL R13 2 + 0x7001FFD0, // 005C JMP #002E + 0x582C0011, // 005D LDCONST R11 K17 + 0xAC2C0200, // 005E CATCH R11 1 0 + 0xB0080000, // 005F RAISE 2 R0 R0 + 0x102C1313, // 0060 MOD R11 R9 K19 + 0x1C2C170F, // 0061 EQ R11 R11 K15 + 0x782E0010, // 0062 JMPF R11 #0074 + 0x58280014, // 0063 LDCONST R10 K20 + 0x602C0010, // 0064 GETGBL R11 G16 + 0x00301310, // 0065 ADD R12 R9 K16 + 0x40321E0C, // 0066 CONNECT R12 K15 R12 + 0x7C2C0200, // 0067 CALL R11 1 + 0xA8020003, // 0068 EXBLK 0 #006D + 0x5C301600, // 0069 MOVE R12 R11 + 0x7C300000, // 006A CALL R12 0 + 0x00281405, // 006B ADD R10 R10 R5 + 0x7001FFFB, // 006C JMP #0069 + 0x582C0011, // 006D LDCONST R11 K17 + 0xAC2C0200, // 006E CATCH R11 1 0 + 0xB0080000, // 006F RAISE 2 R0 R0 + 0x00281515, // 0070 ADD R10 R10 K21 + 0x8C2C050A, // 0071 GETMET R11 R2 K10 + 0x5C341400, // 0072 MOVE R13 R10 + 0x7C2C0400, // 0073 CALL R11 2 + 0x8C2C050A, // 0074 GETMET R11 R2 K10 + 0x58340012, // 0075 LDCONST R13 K18 + 0x7C2C0400, // 0076 CALL R11 2 + 0x80000000, // 0077 RET 0 }) ) ); @@ -511,9 +487,9 @@ be_local_closure(Matter_UI_web_add_handler, /* name */ /******************************************************************** -** Solidified function: web_get_arg +** Solidified function: web_add_config_button ********************************************************************/ -be_local_closure(Matter_UI_web_get_arg, /* name */ +be_local_closure(Matter_UI_web_add_config_button, /* name */ be_nested_proto( 5, /* nstack */ 1, /* argc */ @@ -523,124 +499,29 @@ be_local_closure(Matter_UI_web_get_arg, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ + ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(has_arg), - /* K2 */ be_nested_str_weak(mtc0), - /* K3 */ be_nested_str_weak(device), - /* K4 */ be_nested_str_weak(stop_basic_commissioning), - /* K5 */ be_nested_str_weak(mtc1), - /* K6 */ be_nested_str_weak(start_root_basic_commissioning), + /* K1 */ be_nested_str_weak(content_send), + /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(_LOGO), + /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), }), - be_str_weak(web_get_arg), + be_str_weak(web_add_config_button), &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ + ( &(const binstruction[12]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x58100002, // 0002 LDCONST R4 K2 0x7C080400, // 0003 CALL R2 2 - 0x780A0003, // 0004 JMPF R2 #0009 - 0x88080103, // 0005 GETMBR R2 R0 K3 - 0x8C080504, // 0006 GETMET R2 R2 K4 - 0x7C080200, // 0007 CALL R2 1 - 0x70020006, // 0008 JMP #0010 - 0x8C080301, // 0009 GETMET R2 R1 K1 - 0x58100005, // 000A LDCONST R4 K5 - 0x7C080400, // 000B CALL R2 2 - 0x780A0002, // 000C JMPF R2 #0010 - 0x88080103, // 000D GETMBR R2 R0 K3 - 0x8C080506, // 000E GETMET R2 R2 K6 - 0x7C080200, // 000F CALL R2 1 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: show_passcode_form -********************************************************************/ -be_local_closure(Matter_UI_show_passcode_form, /* 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[19]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20Passcode_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E), - /* K5 */ be_nested_str_weak(_X3Cp_X3EPasscode_X3A_X3C_X2Fp_X3E), - /* K6 */ be_nested_str_weak(format), - /* K7 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E), - /* K8 */ be_nested_str_weak(device), - /* K9 */ be_nested_str_weak(root_passcode), - /* K10 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E), - /* K11 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X274095_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E), - /* K12 */ be_nested_str_weak(root_discriminator), - /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E), - /* K14 */ be_nested_str_weak(ipv4only), - /* K15 */ be_nested_str_weak(_X20checked), - /* K16 */ be_nested_str_weak(), - /* K17 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), - /* K18 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - }), - be_str_weak(show_passcode_form), - &be_const_str_solidified, - ( &(const binstruction[46]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0x8C0C0302, // 0002 GETMET R3 R1 K2 - 0x58140003, // 0003 LDCONST R5 K3 - 0x7C0C0400, // 0004 CALL R3 2 - 0x8C0C0302, // 0005 GETMET R3 R1 K2 - 0x58140004, // 0006 LDCONST R5 K4 - 0x7C0C0400, // 0007 CALL R3 2 - 0x8C0C0302, // 0008 GETMET R3 R1 K2 - 0x58140005, // 0009 LDCONST R5 K5 - 0x7C0C0400, // 000A CALL R3 2 - 0x8C0C0302, // 000B GETMET R3 R1 K2 - 0x8C140506, // 000C GETMET R5 R2 K6 - 0x581C0007, // 000D LDCONST R7 K7 - 0x88200108, // 000E GETMBR R8 R0 K8 - 0x88201109, // 000F GETMBR R8 R8 K9 - 0x7C140600, // 0010 CALL R5 3 - 0x7C0C0400, // 0011 CALL R3 2 - 0x8C0C0302, // 0012 GETMET R3 R1 K2 - 0x5814000A, // 0013 LDCONST R5 K10 - 0x7C0C0400, // 0014 CALL R3 2 - 0x8C0C0302, // 0015 GETMET R3 R1 K2 - 0x8C140506, // 0016 GETMET R5 R2 K6 - 0x581C000B, // 0017 LDCONST R7 K11 - 0x88200108, // 0018 GETMBR R8 R0 K8 - 0x8820110C, // 0019 GETMBR R8 R8 K12 - 0x7C140600, // 001A CALL R5 3 - 0x7C0C0400, // 001B CALL R3 2 - 0x8C0C0302, // 001C GETMET R3 R1 K2 - 0x8C140506, // 001D GETMET R5 R2 K6 - 0x581C000D, // 001E LDCONST R7 K13 - 0x88200108, // 001F GETMBR R8 R0 K8 - 0x8820110E, // 0020 GETMBR R8 R8 K14 - 0x78220001, // 0021 JMPF R8 #0024 - 0x5820000F, // 0022 LDCONST R8 K15 - 0x70020000, // 0023 JMP #0025 - 0x58200010, // 0024 LDCONST R8 K16 - 0x7C140600, // 0025 CALL R5 3 - 0x7C0C0400, // 0026 CALL R3 2 - 0x8C0C0302, // 0027 GETMET R3 R1 K2 - 0x58140011, // 0028 LDCONST R5 K17 - 0x7C0C0400, // 0029 CALL R3 2 - 0x8C0C0302, // 002A GETMET R3 R1 K2 - 0x58140012, // 002B LDCONST R5 K18 - 0x7C0C0400, // 002C CALL R3 2 - 0x80000000, // 002D RET 0 + 0x8C080301, // 0004 GETMET R2 R1 K1 + 0xB8120600, // 0005 GETNGBL R4 K3 + 0x88100904, // 0006 GETMBR R4 R4 K4 + 0x7C080400, // 0007 CALL R2 2 + 0x8C080301, // 0008 GETMET R2 R1 K1 + 0x58100005, // 0009 LDCONST R4 K5 + 0x7C080400, // 000A CALL R2 2 + 0x80000000, // 000B RET 0 }) ) ); @@ -1096,11 +977,11 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ /******************************************************************** -** Solidified function: web_add_config_button +** Solidified function: show_passcode_form ********************************************************************/ -be_local_closure(Matter_UI_web_add_config_button, /* name */ +be_local_closure(Matter_UI_show_passcode_form, /* name */ be_nested_proto( - 5, /* nstack */ + 9, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1108,283 +989,165 @@ be_local_closure(Matter_UI_web_add_config_button, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ + ( &(const bvalue[19]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(content_send), - /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(_LOGO), - /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20Passcode_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E), + /* K5 */ be_nested_str_weak(_X3Cp_X3EPasscode_X3A_X3C_X2Fp_X3E), + /* K6 */ be_nested_str_weak(format), + /* K7 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E), + /* K8 */ be_nested_str_weak(device), + /* K9 */ be_nested_str_weak(root_passcode), + /* K10 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E), + /* K11 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X274095_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E), + /* K12 */ be_nested_str_weak(root_discriminator), + /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E), + /* K14 */ be_nested_str_weak(ipv4only), + /* K15 */ be_nested_str_weak(_X20checked), + /* K16 */ be_nested_str_weak(), + /* K17 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E), + /* K18 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), }), - be_str_weak(web_add_config_button), + be_str_weak(show_passcode_form), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ + ( &(const binstruction[46]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x58140003, // 0003 LDCONST R5 K3 + 0x7C0C0400, // 0004 CALL R3 2 + 0x8C0C0302, // 0005 GETMET R3 R1 K2 + 0x58140004, // 0006 LDCONST R5 K4 + 0x7C0C0400, // 0007 CALL R3 2 + 0x8C0C0302, // 0008 GETMET R3 R1 K2 + 0x58140005, // 0009 LDCONST R5 K5 + 0x7C0C0400, // 000A CALL R3 2 + 0x8C0C0302, // 000B GETMET R3 R1 K2 + 0x8C140506, // 000C GETMET R5 R2 K6 + 0x581C0007, // 000D LDCONST R7 K7 + 0x88200108, // 000E GETMBR R8 R0 K8 + 0x88201109, // 000F GETMBR R8 R8 K9 + 0x7C140600, // 0010 CALL R5 3 + 0x7C0C0400, // 0011 CALL R3 2 + 0x8C0C0302, // 0012 GETMET R3 R1 K2 + 0x5814000A, // 0013 LDCONST R5 K10 + 0x7C0C0400, // 0014 CALL R3 2 + 0x8C0C0302, // 0015 GETMET R3 R1 K2 + 0x8C140506, // 0016 GETMET R5 R2 K6 + 0x581C000B, // 0017 LDCONST R7 K11 + 0x88200108, // 0018 GETMBR R8 R0 K8 + 0x8820110C, // 0019 GETMBR R8 R8 K12 + 0x7C140600, // 001A CALL R5 3 + 0x7C0C0400, // 001B CALL R3 2 + 0x8C0C0302, // 001C GETMET R3 R1 K2 + 0x8C140506, // 001D GETMET R5 R2 K6 + 0x581C000D, // 001E LDCONST R7 K13 + 0x88200108, // 001F GETMBR R8 R0 K8 + 0x8820110E, // 0020 GETMBR R8 R8 K14 + 0x78220001, // 0021 JMPF R8 #0024 + 0x5820000F, // 0022 LDCONST R8 K15 + 0x70020000, // 0023 JMP #0025 + 0x58200010, // 0024 LDCONST R8 K16 + 0x7C140600, // 0025 CALL R5 3 + 0x7C0C0400, // 0026 CALL R3 2 + 0x8C0C0302, // 0027 GETMET R3 R1 K2 + 0x58140011, // 0028 LDCONST R5 K17 + 0x7C0C0400, // 0029 CALL R3 2 + 0x8C0C0302, // 002A GETMET R3 R1 K2 + 0x58140012, // 002B LDCONST R5 K18 + 0x7C0C0400, // 002C CALL R3 2 + 0x80000000, // 002D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_add_handler +********************************************************************/ +be_local_closure(Matter_UI_web_add_handler, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + 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(page_part_mgr), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x7C000200, // 0002 CALL R0 1 + 0x80040000, // 0003 RET 1 R0 + }) + ), + 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(page_part_ctl), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x68000000, // 0000 GETUPV R0 U0 + 0x8C000100, // 0001 GETMET R0 R0 K0 + 0x7C000200, // 0002 CALL R0 1 + 0x80040000, // 0003 RET 1 R0 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(on), + /* K2 */ be_nested_str_weak(_X2Fmatterc), + /* K3 */ be_nested_str_weak(HTTP_GET), + /* K4 */ be_nested_str_weak(HTTP_POST), + }), + be_str_weak(web_add_handler), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x58100002, // 0002 LDCONST R4 K2 - 0x7C080400, // 0003 CALL R2 2 - 0x8C080301, // 0004 GETMET R2 R1 K1 - 0xB8120600, // 0005 GETNGBL R4 K3 - 0x88100904, // 0006 GETMBR R4 R4 K4 - 0x7C080400, // 0007 CALL R2 2 - 0x8C080301, // 0008 GETMET R2 R1 K1 - 0x58100005, // 0009 LDCONST R4 K5 - 0x7C080400, // 000A CALL R2 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: show_qrcode -********************************************************************/ -be_local_closure(Matter_UI_show_qrcode, /* name */ - be_nested_proto( - 18, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(_X20), - /* K2 */ be_nested_str_weak(_XE2_X96_X84), - /* K3 */ be_nested_str_weak(_XE2_X96_X80), - /* K4 */ be_nested_str_weak(_XE2_X96_X88), - /* K5 */ be_nested_str_weak(matter), - /* K6 */ be_nested_str_weak(QRCode), - /* K7 */ be_nested_str_weak(encode_str), - /* K8 */ be_nested_str_weak(bitmap), - /* K9 */ be_nested_str_weak(size), - /* K10 */ be_nested_str_weak(content_send), - /* K11 */ be_nested_str_weak(_X3Cstyle_X3E_X2Eqr_X7Bfont_X2Dfamily_X3Amonospace_X3B_X20margin_X3A0_X3B_X20padding_X3A0_X3B_X20white_X2Dspace_X3Apre_X3B_X20font_X2Dsize_X3A18px_X3B_X20color_X3A_X23fff_X3B_X20line_X2Dheight_X3A100_X25_X3B_X7D_X3C_X2Fstyle_X3E), - /* K12 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27transform_X3Ascale_X28_X2E8_X2C1_X29_X3B_X20display_X3Ainline_X2Dblock_X3B_X27_X3E), - /* K13 */ be_nested_str_weak(_X3Cdiv_X20class_X3D_X27qr_X27_X3E), - /* K14 */ be_nested_str_weak(), - /* K15 */ be_const_int(0), - /* K16 */ be_const_int(1), - /* K17 */ be_nested_str_weak(stop_iteration), - /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E), - /* K19 */ be_const_int(2), - /* K20 */ be_nested_str_weak(_X3Cdiv_X20class_X3D_X27qr_X27_X20style_X3D_X27background_X2Dcolor_X3A_X23000_X3B_X27_X3E), - /* K21 */ be_nested_str_weak(_X2F_X3Cdiv_X3E), - }), - be_str_weak(show_qrcode), - &be_const_str_solidified, - ( &(const binstruction[120]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x580C0001, // 0001 LDCONST R3 K1 - 0x58100002, // 0002 LDCONST R4 K2 - 0x58140003, // 0003 LDCONST R5 K3 - 0x58180004, // 0004 LDCONST R6 K4 - 0xB81E0A00, // 0005 GETNGBL R7 K5 - 0x881C0F06, // 0006 GETMBR R7 R7 K6 - 0x8C1C0F07, // 0007 GETMET R7 R7 K7 - 0x5C240200, // 0008 MOVE R9 R1 - 0x7C1C0400, // 0009 CALL R7 2 - 0x94200F08, // 000A GETIDX R8 R7 K8 - 0x94240F09, // 000B GETIDX R9 R7 K9 - 0x8C28050A, // 000C GETMET R10 R2 K10 - 0x5830000B, // 000D LDCONST R12 K11 - 0x7C280400, // 000E CALL R10 2 - 0x8C28050A, // 000F GETMET R10 R2 K10 - 0x5830000C, // 0010 LDCONST R12 K12 - 0x7C280400, // 0011 CALL R10 2 - 0x5828000D, // 0012 LDCONST R10 K13 - 0x8C2C050A, // 0013 GETMET R11 R2 K10 - 0x5C341400, // 0014 MOVE R13 R10 - 0x7C2C0400, // 0015 CALL R11 2 - 0x5828000E, // 0016 LDCONST R10 K14 - 0x602C0010, // 0017 GETGBL R11 G16 - 0x00301310, // 0018 ADD R12 R9 K16 - 0x40321E0C, // 0019 CONNECT R12 K15 R12 - 0x7C2C0200, // 001A CALL R11 1 - 0xA8020003, // 001B EXBLK 0 #0020 - 0x5C301600, // 001C MOVE R12 R11 - 0x7C300000, // 001D CALL R12 0 - 0x00281404, // 001E ADD R10 R10 R4 - 0x7001FFFB, // 001F JMP #001C - 0x582C0011, // 0020 LDCONST R11 K17 - 0xAC2C0200, // 0021 CATCH R11 1 0 - 0xB0080000, // 0022 RAISE 2 R0 R0 - 0x00281512, // 0023 ADD R10 R10 K18 - 0x8C2C050A, // 0024 GETMET R11 R2 K10 - 0x5C341400, // 0025 MOVE R13 R10 - 0x7C2C0400, // 0026 CALL R11 2 - 0x602C0010, // 0027 GETGBL R11 G16 - 0x00301310, // 0028 ADD R12 R9 K16 - 0x0C301913, // 0029 DIV R12 R12 K19 - 0x04301910, // 002A SUB R12 R12 K16 - 0x40321E0C, // 002B CONNECT R12 K15 R12 - 0x7C2C0200, // 002C CALL R11 1 - 0xA802002E, // 002D EXBLK 0 #005D - 0x5C301600, // 002E MOVE R12 R11 - 0x7C300000, // 002F CALL R12 0 - 0x00362806, // 0030 ADD R13 K20 R6 - 0x5C281A00, // 0031 MOVE R10 R13 - 0x60340010, // 0032 GETGBL R13 G16 - 0x04381310, // 0033 SUB R14 R9 K16 - 0x403A1E0E, // 0034 CONNECT R14 K15 R14 - 0x7C340200, // 0035 CALL R13 1 - 0xA802001C, // 0036 EXBLK 0 #0054 - 0x5C381A00, // 0037 MOVE R14 R13 - 0x7C380000, // 0038 CALL R14 0 - 0x083C1913, // 0039 MUL R15 R12 K19 - 0x943C100F, // 003A GETIDX R15 R8 R15 - 0x943C1E0E, // 003B GETIDX R15 R15 R14 - 0x1C3C1F01, // 003C EQ R15 R15 K1 - 0x08401913, // 003D MUL R16 R12 K19 - 0x00402110, // 003E ADD R16 R16 K16 - 0x14402009, // 003F LT R16 R16 R9 - 0x78420005, // 0040 JMPF R16 #0047 - 0x08401913, // 0041 MUL R16 R12 K19 - 0x00402110, // 0042 ADD R16 R16 K16 - 0x94401010, // 0043 GETIDX R16 R8 R16 - 0x9440200E, // 0044 GETIDX R16 R16 R14 - 0x1C402101, // 0045 EQ R16 R16 K1 - 0x70020000, // 0046 JMP #0048 - 0x50400200, // 0047 LDBOOL R16 1 0 - 0x783E0004, // 0048 JMPF R15 #004E - 0x78420001, // 0049 JMPF R16 #004C - 0x5C440C00, // 004A MOVE R17 R6 - 0x70020000, // 004B JMP #004D - 0x5C440A00, // 004C MOVE R17 R5 - 0x70020003, // 004D JMP #0052 - 0x78420001, // 004E JMPF R16 #0051 - 0x5C440800, // 004F MOVE R17 R4 - 0x70020000, // 0050 JMP #0052 - 0x5C440600, // 0051 MOVE R17 R3 - 0x00281411, // 0052 ADD R10 R10 R17 - 0x7001FFE2, // 0053 JMP #0037 - 0x58340011, // 0054 LDCONST R13 K17 - 0xAC340200, // 0055 CATCH R13 1 0 - 0xB0080000, // 0056 RAISE 2 R0 R0 - 0x00281406, // 0057 ADD R10 R10 R6 - 0x00281512, // 0058 ADD R10 R10 K18 - 0x8C34050A, // 0059 GETMET R13 R2 K10 - 0x5C3C1400, // 005A MOVE R15 R10 - 0x7C340400, // 005B CALL R13 2 - 0x7001FFD0, // 005C JMP #002E - 0x582C0011, // 005D LDCONST R11 K17 - 0xAC2C0200, // 005E CATCH R11 1 0 - 0xB0080000, // 005F RAISE 2 R0 R0 - 0x102C1313, // 0060 MOD R11 R9 K19 - 0x1C2C170F, // 0061 EQ R11 R11 K15 - 0x782E0010, // 0062 JMPF R11 #0074 - 0x58280014, // 0063 LDCONST R10 K20 - 0x602C0010, // 0064 GETGBL R11 G16 - 0x00301310, // 0065 ADD R12 R9 K16 - 0x40321E0C, // 0066 CONNECT R12 K15 R12 - 0x7C2C0200, // 0067 CALL R11 1 - 0xA8020003, // 0068 EXBLK 0 #006D - 0x5C301600, // 0069 MOVE R12 R11 - 0x7C300000, // 006A CALL R12 0 - 0x00281405, // 006B ADD R10 R10 R5 - 0x7001FFFB, // 006C JMP #0069 - 0x582C0011, // 006D LDCONST R11 K17 - 0xAC2C0200, // 006E CATCH R11 1 0 - 0xB0080000, // 006F RAISE 2 R0 R0 - 0x00281515, // 0070 ADD R10 R10 K21 - 0x8C2C050A, // 0071 GETMET R11 R2 K10 - 0x5C341400, // 0072 MOVE R13 R10 - 0x7C2C0400, // 0073 CALL R11 2 - 0x8C2C050A, // 0074 GETMET R11 R2 K10 - 0x58340012, // 0075 LDCONST R13 K18 - 0x7C2C0400, // 0076 CALL R11 2 - 0x80000000, // 0077 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: plugin_option -********************************************************************/ -be_local_closure(Matter_UI_plugin_option, /* 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[16]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(split), - /* K3 */ be_nested_str_weak(_X7C), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(), - /* K6 */ be_nested_str_weak(content_send), - /* K7 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E), - /* K8 */ be_nested_str_weak(_X2Dhttp), - /* K9 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X20disabled_X3E_X2D_X2D_X2D_X20Tasmota_X20Remote_X20_X2D_X2D_X2D_X3C_X2Foption_X3E), - /* K10 */ be_nested_str_weak(device), - /* K11 */ be_nested_str_weak(get_plugin_class_displayname), - /* K12 */ be_nested_str_weak(format), - /* K13 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E), - /* K14 */ be_nested_str_weak(_X20selected), - /* K15 */ be_const_int(1), - }), - be_str_weak(plugin_option), - &be_const_str_solidified, - ( &(const binstruction[48]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xA4120200, // 0001 IMPORT R4 K1 - 0x780A0004, // 0002 JMPF R2 #0008 - 0x8C140902, // 0003 GETMET R5 R4 K2 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x58200003, // 0005 LDCONST R8 K3 - 0x7C140600, // 0006 CALL R5 3 - 0x70020001, // 0007 JMP #000A - 0x60140012, // 0008 GETGBL R5 G18 - 0x7C140000, // 0009 CALL R5 0 - 0x58180004, // 000A LDCONST R6 K4 - 0x601C000C, // 000B GETGBL R7 G12 - 0x5C200A00, // 000C MOVE R8 R5 - 0x7C1C0200, // 000D CALL R7 1 - 0x141C0C07, // 000E LT R7 R6 R7 - 0x781E001E, // 000F JMPF R7 #002F - 0x941C0A06, // 0010 GETIDX R7 R5 R6 - 0x1C200F05, // 0011 EQ R8 R7 K5 - 0x78220003, // 0012 JMPF R8 #0017 - 0x8C200706, // 0013 GETMET R8 R3 K6 - 0x58280007, // 0014 LDCONST R10 K7 - 0x7C200400, // 0015 CALL R8 2 - 0x70020015, // 0016 JMP #002D - 0x1C200F08, // 0017 EQ R8 R7 K8 - 0x78220003, // 0018 JMPF R8 #001D - 0x8C200706, // 0019 GETMET R8 R3 K6 - 0x58280009, // 001A LDCONST R10 K9 - 0x7C200400, // 001B CALL R8 2 - 0x7002000F, // 001C JMP #002D - 0x8820010A, // 001D GETMBR R8 R0 K10 - 0x8C20110B, // 001E GETMET R8 R8 K11 - 0x5C280E00, // 001F MOVE R10 R7 - 0x7C200400, // 0020 CALL R8 2 - 0x8C240706, // 0021 GETMET R9 R3 K6 - 0x8C2C090C, // 0022 GETMET R11 R4 K12 - 0x5834000D, // 0023 LDCONST R13 K13 - 0x5C380E00, // 0024 MOVE R14 R7 - 0x1C3C0E01, // 0025 EQ R15 R7 R1 - 0x783E0001, // 0026 JMPF R15 #0029 - 0x583C000E, // 0027 LDCONST R15 K14 - 0x70020000, // 0028 JMP #002A - 0x583C0005, // 0029 LDCONST R15 K5 - 0x5C401000, // 002A MOVE R16 R8 - 0x7C2C0A00, // 002B CALL R11 5 - 0x7C240400, // 002C CALL R9 2 - 0x00180D0F, // 002D ADD R6 R6 K15 - 0x7001FFDB, // 002E JMP #000B - 0x80000000, // 002F RET 0 + 0x84140000, // 0003 CLOSURE R5 P0 + 0x88180303, // 0004 GETMBR R6 R1 K3 + 0x7C080800, // 0005 CALL R2 4 + 0x8C080301, // 0006 GETMET R2 R1 K1 + 0x58100002, // 0007 LDCONST R4 K2 + 0x84140001, // 0008 CLOSURE R5 P1 + 0x88180304, // 0009 GETMBR R6 R1 K4 + 0x7C080800, // 000A CALL R2 4 + 0xA0000000, // 000B CLOSE R0 + 0x80000000, // 000C RET 0 }) ) ); @@ -1480,11 +1243,11 @@ be_local_closure(Matter_UI_show_enable, /* name */ /******************************************************************** -** Solidified function: web_sensor +** Solidified function: web_get_arg ********************************************************************/ -be_local_closure(Matter_UI_web_sensor, /* name */ +be_local_closure(Matter_UI_web_get_arg, /* name */ be_nested_proto( - 13, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1492,108 +1255,35 @@ be_local_closure(Matter_UI_web_sensor, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[25]) { /* constants */ + ( &(const bvalue[ 7]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(get_option), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(MATTER_OPTION), - /* K6 */ be_nested_str_weak(device), - /* K7 */ be_nested_str_weak(is_root_commissioning_open), - /* K8 */ be_nested_str_weak(show_commissioning_info), - /* K9 */ be_nested_str_weak(sessions), - /* K10 */ be_nested_str_weak(count_active_fabrics), - /* K11 */ be_const_int(0), - /* K12 */ be_nested_str_weak(content_send), - /* K13 */ be_nested_str_weak(format), - /* K14 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27text_X2Dalign_X3Aright_X3Bfont_X2Dsize_X3A11px_X3Bcolor_X3A_X23aaa_X3B_X27_X3E_X25s_X3C_X2Fdiv_X3E), - /* K15 */ be_nested_str_weak(No_X20active_X20association), - /* K16 */ be_const_int(1), - /* K17 */ be_nested_str_weak(_X20active_X20association), - /* K18 */ be_nested_str_weak(s), - /* K19 */ be_nested_str_weak(), - /* K20 */ be_nested_str_weak(_X3Cbutton_X20onclick_X3D_X27la_X28_X22_X26mtc_X25i_X3D1_X22_X29_X3B_X27_X3E), - /* K21 */ be_nested_str_weak(commissioning_open), - /* K22 */ be_nested_str_weak(_LOGO), - /* K23 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E), - /* K24 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E), + /* K1 */ be_nested_str_weak(has_arg), + /* K2 */ be_nested_str_weak(mtc0), + /* K3 */ be_nested_str_weak(device), + /* K4 */ be_nested_str_weak(stop_basic_commissioning), + /* K5 */ be_nested_str_weak(mtc1), + /* K6 */ be_nested_str_weak(start_root_basic_commissioning), }), - be_str_weak(web_sensor), + be_str_weak(web_get_arg), &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ + ( &(const binstruction[17]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 - 0xA40A0200, // 0001 IMPORT R2 K1 - 0xB80E0400, // 0002 GETNGBL R3 K2 - 0x8C0C0703, // 0003 GETMET R3 R3 K3 - 0xB8160800, // 0004 GETNGBL R5 K4 - 0x88140B05, // 0005 GETMBR R5 R5 K5 - 0x7C0C0400, // 0006 CALL R3 2 - 0x780E003E, // 0007 JMPF R3 #0047 - 0x88100106, // 0008 GETMBR R4 R0 K6 - 0x8C100907, // 0009 GETMET R4 R4 K7 - 0x7C100200, // 000A CALL R4 1 - 0x78120001, // 000B JMPF R4 #000E - 0x8C100108, // 000C GETMET R4 R0 K8 - 0x7C100200, // 000D CALL R4 1 - 0x88100106, // 000E GETMBR R4 R0 K6 - 0x88100909, // 000F GETMBR R4 R4 K9 - 0x8C10090A, // 0010 GETMET R4 R4 K10 - 0x7C100200, // 0011 CALL R4 1 - 0x1C14090B, // 0012 EQ R5 R4 K11 - 0x78160006, // 0013 JMPF R5 #001B - 0x8C14030C, // 0014 GETMET R5 R1 K12 - 0x8C1C050D, // 0015 GETMET R7 R2 K13 - 0x5824000E, // 0016 LDCONST R9 K14 - 0x5828000F, // 0017 LDCONST R10 K15 - 0x7C1C0600, // 0018 CALL R7 3 - 0x7C140400, // 0019 CALL R5 2 - 0x7002000E, // 001A JMP #002A - 0x24140910, // 001B GT R5 R4 K16 - 0x8C18030C, // 001C GETMET R6 R1 K12 - 0x8C20050D, // 001D GETMET R8 R2 K13 - 0x5828000E, // 001E LDCONST R10 K14 - 0x602C0008, // 001F GETGBL R11 G8 - 0x5C300800, // 0020 MOVE R12 R4 - 0x7C2C0200, // 0021 CALL R11 1 - 0x002C1711, // 0022 ADD R11 R11 K17 - 0x78160001, // 0023 JMPF R5 #0026 - 0x58300012, // 0024 LDCONST R12 K18 - 0x70020000, // 0025 JMP #0027 - 0x58300013, // 0026 LDCONST R12 K19 - 0x002C160C, // 0027 ADD R11 R11 R12 - 0x7C200600, // 0028 CALL R8 3 - 0x7C180400, // 0029 CALL R6 2 - 0x8C14030C, // 002A GETMET R5 R1 K12 - 0x8C1C050D, // 002B GETMET R7 R2 K13 - 0x58240014, // 002C LDCONST R9 K20 - 0x88280106, // 002D GETMBR R10 R0 K6 - 0x88281515, // 002E GETMBR R10 R10 K21 - 0x4C2C0000, // 002F LDNIL R11 - 0x1C28140B, // 0030 EQ R10 R10 R11 - 0x782A0001, // 0031 JMPF R10 #0034 - 0x58280010, // 0032 LDCONST R10 K16 - 0x70020000, // 0033 JMP #0035 - 0x5828000B, // 0034 LDCONST R10 K11 - 0x7C1C0600, // 0035 CALL R7 3 - 0x7C140400, // 0036 CALL R5 2 - 0x8C14030C, // 0037 GETMET R5 R1 K12 - 0xB81E0800, // 0038 GETNGBL R7 K4 - 0x881C0F16, // 0039 GETMBR R7 R7 K22 - 0x7C140400, // 003A CALL R5 2 - 0x88140106, // 003B GETMBR R5 R0 K6 - 0x88140B15, // 003C GETMBR R5 R5 K21 - 0x4C180000, // 003D LDNIL R6 - 0x1C140A06, // 003E EQ R5 R5 R6 - 0x78160003, // 003F JMPF R5 #0044 - 0x8C14030C, // 0040 GETMET R5 R1 K12 - 0x581C0017, // 0041 LDCONST R7 K23 - 0x7C140400, // 0042 CALL R5 2 - 0x70020002, // 0043 JMP #0047 - 0x8C14030C, // 0044 GETMET R5 R1 K12 - 0x581C0018, // 0045 LDCONST R7 K24 - 0x7C140400, // 0046 CALL R5 2 - 0x80000000, // 0047 RET 0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x58100002, // 0002 LDCONST R4 K2 + 0x7C080400, // 0003 CALL R2 2 + 0x780A0003, // 0004 JMPF R2 #0009 + 0x88080103, // 0005 GETMBR R2 R0 K3 + 0x8C080504, // 0006 GETMET R2 R2 K4 + 0x7C080200, // 0007 CALL R2 1 + 0x70020006, // 0008 JMP #0010 + 0x8C080301, // 0009 GETMET R2 R1 K1 + 0x58100005, // 000A LDCONST R4 K5 + 0x7C080400, // 000B CALL R2 2 + 0x780A0002, // 000C JMPF R2 #0010 + 0x88080103, // 000D GETMBR R2 R0 K3 + 0x8C080506, // 000E GETMET R2 R2 K6 + 0x7C080200, // 000F CALL R2 1 + 0x80000000, // 0010 RET 0 }) ) ); @@ -1633,6 +1323,488 @@ be_local_closure(Matter_UI_init, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_sensor +********************************************************************/ +be_local_closure(Matter_UI_web_sensor, /* name */ + be_nested_proto( + 13, /* 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(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(get_option), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(MATTER_OPTION), + /* K6 */ be_nested_str_weak(device), + /* K7 */ be_nested_str_weak(sessions), + /* K8 */ be_nested_str_weak(count_active_fabrics), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(content_send), + /* K11 */ be_nested_str_weak(format), + /* K12 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27text_X2Dalign_X3Aright_X3Bfont_X2Dsize_X3A11px_X3Bcolor_X3A_X23aaa_X3Bpadding_X3A0px_X3B_X27_X3E_X25s_X3C_X2Fdiv_X3E), + /* K13 */ be_nested_str_weak(Matter_X3A_X20No_X20active_X20association), + /* K14 */ be_const_int(1), + /* K15 */ be_nested_str_weak(Matter_X3A_X20), + /* K16 */ be_nested_str_weak(_X20active_X20association), + /* K17 */ be_nested_str_weak(s), + /* K18 */ be_nested_str_weak(), + /* K19 */ be_nested_str_weak(show_bridge_status), + /* K20 */ be_nested_str_weak(is_root_commissioning_open), + /* K21 */ be_nested_str_weak(show_commissioning_info), + /* K22 */ be_nested_str_weak(_X3Cbutton_X20onclick_X3D_X27la_X28_X22_X26mtc_X25i_X3D1_X22_X29_X3B_X27_X3E), + /* K23 */ be_nested_str_weak(commissioning_open), + /* K24 */ be_nested_str_weak(_LOGO), + /* K25 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E), + /* K26 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E), + }), + be_str_weak(web_sensor), + &be_const_str_solidified, + ( &(const binstruction[77]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0xB80E0400, // 0002 GETNGBL R3 K2 + 0x8C0C0703, // 0003 GETMET R3 R3 K3 + 0xB8160800, // 0004 GETNGBL R5 K4 + 0x88140B05, // 0005 GETMBR R5 R5 K5 + 0x7C0C0400, // 0006 CALL R3 2 + 0x780E0043, // 0007 JMPF R3 #004C + 0x88100106, // 0008 GETMBR R4 R0 K6 + 0x88100907, // 0009 GETMBR R4 R4 K7 + 0x8C100908, // 000A GETMET R4 R4 K8 + 0x7C100200, // 000B CALL R4 1 + 0x1C140909, // 000C EQ R5 R4 K9 + 0x78160006, // 000D JMPF R5 #0015 + 0x8C14030A, // 000E GETMET R5 R1 K10 + 0x8C1C050B, // 000F GETMET R7 R2 K11 + 0x5824000C, // 0010 LDCONST R9 K12 + 0x5828000D, // 0011 LDCONST R10 K13 + 0x7C1C0600, // 0012 CALL R7 3 + 0x7C140400, // 0013 CALL R5 2 + 0x7002000F, // 0014 JMP #0025 + 0x2414090E, // 0015 GT R5 R4 K14 + 0x8C18030A, // 0016 GETMET R6 R1 K10 + 0x8C20050B, // 0017 GETMET R8 R2 K11 + 0x5828000C, // 0018 LDCONST R10 K12 + 0x602C0008, // 0019 GETGBL R11 G8 + 0x5C300800, // 001A MOVE R12 R4 + 0x7C2C0200, // 001B CALL R11 1 + 0x002E1E0B, // 001C ADD R11 K15 R11 + 0x002C1710, // 001D ADD R11 R11 K16 + 0x78160001, // 001E JMPF R5 #0021 + 0x58300011, // 001F LDCONST R12 K17 + 0x70020000, // 0020 JMP #0022 + 0x58300012, // 0021 LDCONST R12 K18 + 0x002C160C, // 0022 ADD R11 R11 R12 + 0x7C200600, // 0023 CALL R8 3 + 0x7C180400, // 0024 CALL R6 2 + 0x8C140113, // 0025 GETMET R5 R0 K19 + 0x7C140200, // 0026 CALL R5 1 + 0x88140106, // 0027 GETMBR R5 R0 K6 + 0x8C140B14, // 0028 GETMET R5 R5 K20 + 0x7C140200, // 0029 CALL R5 1 + 0x78160001, // 002A JMPF R5 #002D + 0x8C140115, // 002B GETMET R5 R0 K21 + 0x7C140200, // 002C CALL R5 1 + 0x1C140909, // 002D EQ R5 R4 K9 + 0x7816001C, // 002E JMPF R5 #004C + 0x8C14030A, // 002F GETMET R5 R1 K10 + 0x8C1C050B, // 0030 GETMET R7 R2 K11 + 0x58240016, // 0031 LDCONST R9 K22 + 0x88280106, // 0032 GETMBR R10 R0 K6 + 0x88281517, // 0033 GETMBR R10 R10 K23 + 0x4C2C0000, // 0034 LDNIL R11 + 0x1C28140B, // 0035 EQ R10 R10 R11 + 0x782A0001, // 0036 JMPF R10 #0039 + 0x5828000E, // 0037 LDCONST R10 K14 + 0x70020000, // 0038 JMP #003A + 0x58280009, // 0039 LDCONST R10 K9 + 0x7C1C0600, // 003A CALL R7 3 + 0x7C140400, // 003B CALL R5 2 + 0x8C14030A, // 003C GETMET R5 R1 K10 + 0xB81E0800, // 003D GETNGBL R7 K4 + 0x881C0F18, // 003E GETMBR R7 R7 K24 + 0x7C140400, // 003F CALL R5 2 + 0x88140106, // 0040 GETMBR R5 R0 K6 + 0x88140B17, // 0041 GETMBR R5 R5 K23 + 0x4C180000, // 0042 LDNIL R6 + 0x1C140A06, // 0043 EQ R5 R5 R6 + 0x78160003, // 0044 JMPF R5 #0049 + 0x8C14030A, // 0045 GETMET R5 R1 K10 + 0x581C0019, // 0046 LDCONST R7 K25 + 0x7C140400, // 0047 CALL R5 2 + 0x70020002, // 0048 JMP #004C + 0x8C14030A, // 0049 GETMET R5 R1 K10 + 0x581C001A, // 004A LDCONST R7 K26 + 0x7C140400, // 004B CALL R5 2 + 0x80000000, // 004C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: show_plugins_configuration +********************************************************************/ +be_local_closure(Matter_UI_show_plugins_configuration, /* name */ + be_nested_proto( + 19, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[37]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCurrent_X20Configuration_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27), + /* K5 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20RESET_X20the_X20configuration_X20to_X20the_X20default_X2E_X20You_X20will_X20need_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E), + /* K6 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27auto_X27_X20class_X3D_X27button_X20bred_X27_X3EReset_X20to_X20default_X3C_X2Fbutton_X3E_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Fform_X3E), + /* K7 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22Changing_X20the_X20configuration_X20requires_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E), + /* K8 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E), + /* K9 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X20width_X3D_X2735_X27_X3E_X3Cb_X3EEp_X2E_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EType_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EParam_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3C_X2Ftr_X3E), + /* K10 */ be_nested_str_weak(device), + /* K11 */ be_nested_str_weak(k2l_num), + /* K12 */ be_nested_str_weak(plugins_config), + /* K13 */ be_const_int(0), + /* K14 */ be_nested_str_weak(find), + /* K15 */ be_nested_str_weak(type), + /* K16 */ be_nested_str_weak(format), + /* K17 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20value_X3D_X270_X27_X20readonly_X3E_X3C_X2Ftd_X3E), + /* K18 */ be_nested_str_weak(_X3Ctd_X3E_X3Cselect_X20name_X3D_X27pi_X2503i_X27_X3E), + /* K19 */ be_nested_str_weak(plugin_option), + /* K20 */ be_nested_str_weak(), + /* K21 */ be_nested_str_weak(_ROOT_TYPES), + /* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E), + /* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X26nbsp_X3B_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), + /* K24 */ be_const_int(1), + /* K25 */ be_nested_str_weak(plugins_classes), + /* K26 */ be_nested_str_weak(ui_conf_to_string), + /* K27 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E), + /* K28 */ be_nested_str_weak(_CLASSES_TYPES), + /* K29 */ be_nested_str_weak(_CLASSES_TYPES2), + /* K30 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), + /* K31 */ be_nested_str_weak(html_escape), + /* K32 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E), + /* K33 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), + /* K34 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K35 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E), + /* K36 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + }), + be_str_weak(show_plugins_configuration), + &be_const_str_solidified, + ( &(const binstruction[183]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x8C0C0302, // 0002 GETMET R3 R1 K2 + 0x58140003, // 0003 LDCONST R5 K3 + 0x7C0C0400, // 0004 CALL R3 2 + 0x8C0C0302, // 0005 GETMET R3 R1 K2 + 0x58140004, // 0006 LDCONST R5 K4 + 0x7C0C0400, // 0007 CALL R3 2 + 0x8C0C0302, // 0008 GETMET R3 R1 K2 + 0x58140005, // 0009 LDCONST R5 K5 + 0x7C0C0400, // 000A CALL R3 2 + 0x8C0C0302, // 000B GETMET R3 R1 K2 + 0x58140006, // 000C LDCONST R5 K6 + 0x7C0C0400, // 000D CALL R3 2 + 0x8C0C0302, // 000E GETMET R3 R1 K2 + 0x58140004, // 000F LDCONST R5 K4 + 0x7C0C0400, // 0010 CALL R3 2 + 0x8C0C0302, // 0011 GETMET R3 R1 K2 + 0x58140007, // 0012 LDCONST R5 K7 + 0x7C0C0400, // 0013 CALL R3 2 + 0x8C0C0302, // 0014 GETMET R3 R1 K2 + 0x58140008, // 0015 LDCONST R5 K8 + 0x7C0C0400, // 0016 CALL R3 2 + 0x8C0C0302, // 0017 GETMET R3 R1 K2 + 0x58140009, // 0018 LDCONST R5 K9 + 0x7C0C0400, // 0019 CALL R3 2 + 0x880C010A, // 001A GETMBR R3 R0 K10 + 0x8C0C070B, // 001B GETMET R3 R3 K11 + 0x8814010A, // 001C GETMBR R5 R0 K10 + 0x88140B0C, // 001D GETMBR R5 R5 K12 + 0x7C0C0400, // 001E CALL R3 2 + 0x5810000D, // 001F LDCONST R4 K13 + 0x9414070D, // 0020 GETIDX R5 R3 K13 + 0x1C140B0D, // 0021 EQ R5 R5 K13 + 0x78160026, // 0022 JMPF R5 #004A + 0x94140604, // 0023 GETIDX R5 R3 R4 + 0x8818010A, // 0024 GETMBR R6 R0 K10 + 0x601C0008, // 0025 GETGBL R7 G8 + 0x5C200A00, // 0026 MOVE R8 R5 + 0x7C1C0200, // 0027 CALL R7 1 + 0x88180D0C, // 0028 GETMBR R6 R6 K12 + 0x94180C07, // 0029 GETIDX R6 R6 R7 + 0x8C200D0E, // 002A GETMET R8 R6 K14 + 0x5828000F, // 002B LDCONST R10 K15 + 0x7C200400, // 002C CALL R8 2 + 0x5C1C1000, // 002D MOVE R7 R8 + 0x8C200302, // 002E GETMET R8 R1 K2 + 0x8C280510, // 002F GETMET R10 R2 K16 + 0x58300011, // 0030 LDCONST R12 K17 + 0x5C340800, // 0031 MOVE R13 R4 + 0x7C280600, // 0032 CALL R10 3 + 0x7C200400, // 0033 CALL R8 2 + 0x8C200302, // 0034 GETMET R8 R1 K2 + 0x8C280510, // 0035 GETMET R10 R2 K16 + 0x58300012, // 0036 LDCONST R12 K18 + 0x5C340800, // 0037 MOVE R13 R4 + 0x7C280600, // 0038 CALL R10 3 + 0x7C200400, // 0039 CALL R8 2 + 0x8C200113, // 003A GETMET R8 R0 K19 + 0x8C280D0E, // 003B GETMET R10 R6 K14 + 0x5830000F, // 003C LDCONST R12 K15 + 0x58340014, // 003D LDCONST R13 K20 + 0x7C280600, // 003E CALL R10 3 + 0x882C0115, // 003F GETMBR R11 R0 K21 + 0x7C200600, // 0040 CALL R8 3 + 0x8C200302, // 0041 GETMET R8 R1 K2 + 0x8C280510, // 0042 GETMET R10 R2 K16 + 0x58300016, // 0043 LDCONST R12 K22 + 0x7C280400, // 0044 CALL R10 2 + 0x7C200400, // 0045 CALL R8 2 + 0x8C200302, // 0046 GETMET R8 R1 K2 + 0x58280017, // 0047 LDCONST R10 K23 + 0x7C200400, // 0048 CALL R8 2 + 0x00100918, // 0049 ADD R4 R4 K24 + 0x6014000C, // 004A GETGBL R5 G12 + 0x5C180600, // 004B MOVE R6 R3 + 0x7C140200, // 004C CALL R5 1 + 0x14140805, // 004D LT R5 R4 R5 + 0x78160041, // 004E JMPF R5 #0091 + 0x94140604, // 004F GETIDX R5 R3 R4 + 0x8818010A, // 0050 GETMBR R6 R0 K10 + 0x601C0008, // 0051 GETGBL R7 G8 + 0x5C200A00, // 0052 MOVE R8 R5 + 0x7C1C0200, // 0053 CALL R7 1 + 0x88180D0C, // 0054 GETMBR R6 R6 K12 + 0x94180C07, // 0055 GETIDX R6 R6 R7 + 0x8C200D0E, // 0056 GETMET R8 R6 K14 + 0x5828000F, // 0057 LDCONST R10 K15 + 0x7C200400, // 0058 CALL R8 2 + 0x5C1C1000, // 0059 MOVE R7 R8 + 0x5C200E00, // 005A MOVE R8 R7 + 0x74220001, // 005B JMPT R8 #005E + 0x00100918, // 005C ADD R4 R4 K24 + 0x7001FFEB, // 005D JMP #004A + 0x8820010A, // 005E GETMBR R8 R0 K10 + 0x88201119, // 005F GETMBR R8 R8 K25 + 0x8C20110E, // 0060 GETMET R8 R8 K14 + 0x5C280E00, // 0061 MOVE R10 R7 + 0x7C200400, // 0062 CALL R8 2 + 0x58240014, // 0063 LDCONST R9 K20 + 0x4C280000, // 0064 LDNIL R10 + 0x2028100A, // 0065 NE R10 R8 R10 + 0x782A0004, // 0066 JMPF R10 #006C + 0x8C28111A, // 0067 GETMET R10 R8 K26 + 0x5C301000, // 0068 MOVE R12 R8 + 0x5C340C00, // 0069 MOVE R13 R6 + 0x7C280600, // 006A CALL R10 3 + 0x5C241400, // 006B MOVE R9 R10 + 0x8C280302, // 006C GETMET R10 R1 K2 + 0x8C300510, // 006D GETMET R12 R2 K16 + 0x5838001B, // 006E LDCONST R14 K27 + 0x5C3C0800, // 006F MOVE R15 R4 + 0x5C400A00, // 0070 MOVE R16 R5 + 0x7C300800, // 0071 CALL R12 4 + 0x7C280400, // 0072 CALL R10 2 + 0x8C280302, // 0073 GETMET R10 R1 K2 + 0x8C300510, // 0074 GETMET R12 R2 K16 + 0x58380012, // 0075 LDCONST R14 K18 + 0x5C3C0800, // 0076 MOVE R15 R4 + 0x7C300600, // 0077 CALL R12 3 + 0x7C280400, // 0078 CALL R10 2 + 0x8C280113, // 0079 GETMET R10 R0 K19 + 0x8C300D0E, // 007A GETMET R12 R6 K14 + 0x5838000F, // 007B LDCONST R14 K15 + 0x583C0014, // 007C LDCONST R15 K20 + 0x7C300600, // 007D CALL R12 3 + 0x8834011C, // 007E GETMBR R13 R0 K28 + 0x8838011D, // 007F GETMBR R14 R0 K29 + 0x7C280800, // 0080 CALL R10 4 + 0x8C280302, // 0081 GETMET R10 R1 K2 + 0x8C300510, // 0082 GETMET R12 R2 K16 + 0x58380016, // 0083 LDCONST R14 K22 + 0x7C300400, // 0084 CALL R12 2 + 0x7C280400, // 0085 CALL R10 2 + 0x8C280302, // 0086 GETMET R10 R1 K2 + 0x8C300510, // 0087 GETMET R12 R2 K16 + 0x5838001E, // 0088 LDCONST R14 K30 + 0x5C3C0800, // 0089 MOVE R15 R4 + 0x8C40031F, // 008A GETMET R16 R1 K31 + 0x5C481200, // 008B MOVE R18 R9 + 0x7C400400, // 008C CALL R16 2 + 0x7C300800, // 008D CALL R12 4 + 0x7C280400, // 008E CALL R10 2 + 0x00100918, // 008F ADD R4 R4 K24 + 0x7001FFB8, // 0090 JMP #004A + 0x8C140302, // 0091 GETMET R5 R1 K2 + 0x8C1C0510, // 0092 GETMET R7 R2 K16 + 0x58240020, // 0093 LDCONST R9 K32 + 0x5C280800, // 0094 MOVE R10 R4 + 0x7C1C0600, // 0095 CALL R7 3 + 0x7C140400, // 0096 CALL R5 2 + 0x8C140302, // 0097 GETMET R5 R1 K2 + 0x8C1C0510, // 0098 GETMET R7 R2 K16 + 0x58240012, // 0099 LDCONST R9 K18 + 0x5C280800, // 009A MOVE R10 R4 + 0x7C1C0600, // 009B CALL R7 3 + 0x7C140400, // 009C CALL R5 2 + 0x8C140113, // 009D GETMET R5 R0 K19 + 0x581C0014, // 009E LDCONST R7 K20 + 0x8820011C, // 009F GETMBR R8 R0 K28 + 0x8824011D, // 00A0 GETMBR R9 R0 K29 + 0x7C140800, // 00A1 CALL R5 4 + 0x8C140302, // 00A2 GETMET R5 R1 K2 + 0x8C1C0510, // 00A3 GETMET R7 R2 K16 + 0x58240016, // 00A4 LDCONST R9 K22 + 0x7C1C0400, // 00A5 CALL R7 2 + 0x7C140400, // 00A6 CALL R5 2 + 0x8C140302, // 00A7 GETMET R5 R1 K2 + 0x8C1C0510, // 00A8 GETMET R7 R2 K16 + 0x58240021, // 00A9 LDCONST R9 K33 + 0x5C280800, // 00AA MOVE R10 R4 + 0x7C1C0600, // 00AB CALL R7 3 + 0x7C140400, // 00AC CALL R5 2 + 0x8C140302, // 00AD GETMET R5 R1 K2 + 0x581C0022, // 00AE LDCONST R7 K34 + 0x7C140400, // 00AF CALL R5 2 + 0x8C140302, // 00B0 GETMET R5 R1 K2 + 0x581C0023, // 00B1 LDCONST R7 K35 + 0x7C140400, // 00B2 CALL R5 2 + 0x8C140302, // 00B3 GETMET R5 R1 K2 + 0x581C0024, // 00B4 LDCONST R7 K36 + 0x7C140400, // 00B5 CALL R5 2 + 0x80000000, // 00B6 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: show_commissioning_info +********************************************************************/ +be_local_closure(Matter_UI_show_commissioning_info, /* name */ + be_nested_proto( + 14, /* nstack */ + 1, /* 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(webserver), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(device), + /* K3 */ be_nested_str_weak(commissioning_open), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(millis), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(content_send), + /* K8 */ be_nested_str_weak(format), + /* K9 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCommissioning_X20open_X20for_X20_X25i_X20min_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K10 */ be_nested_str_weak(compute_manual_pairing_code), + /* K11 */ be_nested_str_weak(_X3Cp_X3EManual_X20pairing_X20code_X3A_X3Cbr_X3E_X3Cb_X3E_X25s_X2D_X25s_X2D_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E_X3Chr_X3E), + /* K12 */ be_const_int(3), + /* K13 */ be_const_int(2147483647), + /* K14 */ be_nested_str_weak(_X3Cdiv_X3E_X3Ccenter_X3E), + /* K15 */ be_nested_str_weak(compute_qrcode_content), + /* K16 */ be_nested_str_weak(show_qrcode), + /* K17 */ be_nested_str_weak(_X3Cp_X3E_X20_X25s_X3C_X2Fp_X3E), + /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E), + /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + }), + be_str_weak(show_commissioning_info), + &be_const_str_solidified, + ( &(const binstruction[66]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xA40A0200, // 0001 IMPORT R2 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x880C0703, // 0003 GETMBR R3 R3 K3 + 0xB8120800, // 0004 GETNGBL R4 K4 + 0x8C100905, // 0005 GETMET R4 R4 K5 + 0x7C100200, // 0006 CALL R4 1 + 0x040C0604, // 0007 SUB R3 R3 R4 + 0x541203E7, // 0008 LDINT R4 1000 + 0x0C0C0604, // 0009 DIV R3 R3 R4 + 0x14100706, // 000A LT R4 R3 K6 + 0x78120000, // 000B JMPF R4 #000D + 0x580C0006, // 000C LDCONST R3 K6 + 0x5412001D, // 000D LDINT R4 30 + 0x00100604, // 000E ADD R4 R3 R4 + 0x5416003B, // 000F LDINT R5 60 + 0x0C100805, // 0010 DIV R4 R4 R5 + 0x8C140307, // 0011 GETMET R5 R1 K7 + 0x8C1C0508, // 0012 GETMET R7 R2 K8 + 0x58240009, // 0013 LDCONST R9 K9 + 0x5C280800, // 0014 MOVE R10 R4 + 0x7C1C0600, // 0015 CALL R7 3 + 0x7C140400, // 0016 CALL R5 2 + 0x88140102, // 0017 GETMBR R5 R0 K2 + 0x8C140B0A, // 0018 GETMET R5 R5 K10 + 0x7C140200, // 0019 CALL R5 1 + 0x8C180307, // 001A GETMET R6 R1 K7 + 0x8C200508, // 001B GETMET R8 R2 K8 + 0x5828000B, // 001C LDCONST R10 K11 + 0x402E0D0C, // 001D CONNECT R11 K6 K12 + 0x942C0A0B, // 001E GETIDX R11 R5 R11 + 0x54320003, // 001F LDINT R12 4 + 0x54360005, // 0020 LDINT R13 6 + 0x4030180D, // 0021 CONNECT R12 R12 R13 + 0x94300A0C, // 0022 GETIDX R12 R5 R12 + 0x54360006, // 0023 LDINT R13 7 + 0x40341B0D, // 0024 CONNECT R13 R13 K13 + 0x94340A0D, // 0025 GETIDX R13 R5 R13 + 0x7C200A00, // 0026 CALL R8 5 + 0x7C180400, // 0027 CALL R6 2 + 0x8C180307, // 0028 GETMET R6 R1 K7 + 0x8C200508, // 0029 GETMET R8 R2 K8 + 0x5828000E, // 002A LDCONST R10 K14 + 0x7C200400, // 002B CALL R8 2 + 0x7C180400, // 002C CALL R6 2 + 0x88180102, // 002D GETMBR R6 R0 K2 + 0x8C180D0F, // 002E GETMET R6 R6 K15 + 0x7C180200, // 002F CALL R6 1 + 0x8C1C0110, // 0030 GETMET R7 R0 K16 + 0x5C240C00, // 0031 MOVE R9 R6 + 0x7C1C0400, // 0032 CALL R7 2 + 0x8C1C0307, // 0033 GETMET R7 R1 K7 + 0x8C240508, // 0034 GETMET R9 R2 K8 + 0x582C0011, // 0035 LDCONST R11 K17 + 0x5C300C00, // 0036 MOVE R12 R6 + 0x7C240600, // 0037 CALL R9 3 + 0x7C1C0400, // 0038 CALL R7 2 + 0x8C1C0307, // 0039 GETMET R7 R1 K7 + 0x8C240508, // 003A GETMET R9 R2 K8 + 0x582C0012, // 003B LDCONST R11 K18 + 0x7C240400, // 003C CALL R9 2 + 0x7C1C0400, // 003D CALL R7 2 + 0x8C1C0307, // 003E GETMET R7 R1 K7 + 0x58240013, // 003F LDCONST R9 K19 + 0x7C1C0400, // 0040 CALL R7 2 + 0x80000000, // 0041 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: show_fabric_info ********************************************************************/ @@ -1795,25 +1967,27 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */ be_local_class(Matter_UI, 1, NULL, - be_nested_map(17, + be_nested_map(19, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(show_plugins_configuration, -1), be_const_closure(Matter_UI_show_plugins_configuration_closure) }, - { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7C_X2Dhttp_X7Chttp_relay) }, - { be_const_key_weak(show_fabric_info, 7), be_const_closure(Matter_UI_show_fabric_info_closure) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) }, - { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) }, - { be_const_key_weak(_ROOT_TYPES, 11), be_nested_str_weak(root) }, - { be_const_key_weak(show_commissioning_info, 16), be_const_closure(Matter_UI_show_commissioning_info_closure) }, + { be_const_key_weak(_CLASSES_TYPES, -1), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) }, { be_const_key_weak(device, -1), be_const_var(0) }, - { be_const_key_weak(web_add_config_button, -1), be_const_closure(Matter_UI_web_add_config_button_closure) }, - { be_const_key_weak(page_part_ctl, 5), be_const_closure(Matter_UI_page_part_ctl_closure) }, - { be_const_key_weak(web_get_arg, 13), be_const_closure(Matter_UI_web_get_arg_closure) }, - { be_const_key_weak(web_sensor, 12), be_const_closure(Matter_UI_web_sensor_closure) }, - { be_const_key_weak(show_enable, 14), be_const_closure(Matter_UI_show_enable_closure) }, + { be_const_key_weak(show_enable, -1), be_const_closure(Matter_UI_show_enable_closure) }, { be_const_key_weak(plugin_option, -1), be_const_closure(Matter_UI_plugin_option_closure) }, + { be_const_key_weak(show_bridge_status, -1), be_const_closure(Matter_UI_show_bridge_status_closure) }, { be_const_key_weak(show_qrcode, -1), be_const_closure(Matter_UI_show_qrcode_closure) }, - { be_const_key_weak(page_part_mgr, 3), be_const_closure(Matter_UI_page_part_mgr_closure) }, - { be_const_key_weak(show_passcode_form, -1), be_const_closure(Matter_UI_show_passcode_form_closure) }, + { be_const_key_weak(web_get_arg, -1), be_const_closure(Matter_UI_web_get_arg_closure) }, + { be_const_key_weak(show_plugins_configuration, 1), be_const_closure(Matter_UI_show_plugins_configuration_closure) }, + { be_const_key_weak(web_sensor, -1), be_const_closure(Matter_UI_web_sensor_closure) }, + { be_const_key_weak(show_passcode_form, 2), be_const_closure(Matter_UI_show_passcode_form_closure) }, + { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) }, + { be_const_key_weak(_ROOT_TYPES, 6), be_nested_str_weak(root) }, + { be_const_key_weak(page_part_ctl, 11), be_const_closure(Matter_UI_page_part_ctl_closure) }, + { be_const_key_weak(web_add_config_button, 8), be_const_closure(Matter_UI_web_add_config_button_closure) }, + { be_const_key_weak(page_part_mgr, 7), be_const_closure(Matter_UI_page_part_mgr_closure) }, + { be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) }, + { be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X2Dhttp_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity) }, + { be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) }, })), be_str_weak(Matter_UI) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_inspect.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_inspect.h index 3c038fc3a..ffd15d643 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_inspect.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_inspect.h @@ -60,6 +60,51 @@ be_local_closure(matter_sort, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: jitter +********************************************************************/ +be_local_closure(matter_jitter, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 0, /* 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_weak(crypto), + /* K1 */ be_nested_str_weak(random), + /* K2 */ be_nested_str_weak(get), + /* K3 */ be_const_int(0), + /* K4 */ be_const_int(2147483647), + /* K5 */ be_nested_str_weak(tasmota), + /* K6 */ be_nested_str_weak(millis), + }), + be_str_weak(jitter), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x54120003, // 0002 LDINT R4 4 + 0x7C080400, // 0003 CALL R2 2 + 0x8C080502, // 0004 GETMET R2 R2 K2 + 0x58100003, // 0005 LDCONST R4 K3 + 0x54160003, // 0006 LDINT R5 4 + 0x7C080600, // 0007 CALL R2 3 + 0x2C080504, // 0008 AND R2 R2 K4 + 0xB80E0A00, // 0009 GETNGBL R3 K5 + 0x8C0C0706, // 000A GETMET R3 R3 K6 + 0x10140400, // 000B MOD R5 R2 R0 + 0x7C0C0400, // 000C CALL R3 2 + 0x80040600, // 000D RET 1 R3 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: inspect ********************************************************************/ diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino new file mode 100644 index 000000000..4503500e8 --- /dev/null +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_matter.ino @@ -0,0 +1,79 @@ +/* + xdrv_52_3_berry_matter.ino - Berry support for Matter UI + + Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +// Mappgin from internal light and a generic `light_state` Berry class + +#ifdef USE_BERRY + +// Convert seconds to a string representing days, hours or minutes present in the n-value. +// The string will contain the most coarse time only, rounded down (61m == 01h, 01h37m == 01h). +// Inputs: +// - seconds: uint32_t representing some number of seconds +// Outputs: +// - char for unit (d for day, h for hour, m for minute) +// - the hex color to be used to display the text +// +extern "C" uint32_t matter_convert_seconds_to_dhm(uint32_t seconds, char *unit, uint32_t *color, bbool days) { + *color = WebColor(COL_TEXT); + static const uint32_t conversions[3] = {24 * 3600, 3600, 60}; + static const char units[3] = { 'd', 'h', 'm'}; // day, hour, minute + static const uint32_t color_threshold_hours[2] = {24 * 3600, 3600}; // 0 - 1 hour - 1 day + static const uint32_t color_threshold_days[2] = {7 * 24 * 3600, 2 * 24 * 3600}; // 0 - 2 days - 7 days + + uint32_t color_text_8 = WebColor(COL_TEXT); // color of text on 8 bits + uint8_t color_text_8_r = (color_text_8 & 0xFF0000) >> 16; + uint8_t color_text_8_g = (color_text_8 & 0x00FF00) >> 8; + uint8_t color_text_8_b = (color_text_8 & 0x0000FF); + + uint32_t color_back_8 = WebColor(COL_BACKGROUND); // color of background on 8 bits + uint8_t color_back_8_r = (color_back_8 & 0xFF0000) >> 16; + uint8_t color_back_8_g = (color_back_8 & 0x00FF00) >> 8; + uint8_t color_back_8_b = (color_back_8 & 0x0000FF); + + int32_t colors[3] = { + ((changeUIntScale( 6, 0, 16, color_back_8_r, color_text_8_r) & 0xFF) << 16U) | // 6/16 of text + ((changeUIntScale( 6, 0, 16, color_back_8_g, color_text_8_g) & 0xFF) << 8U) | // 6/16 of text + ( changeUIntScale( 6, 0, 16, color_back_8_b, color_text_8_r) & 0xFF), // 6/16 of text + + ((changeUIntScale(10, 0, 16, color_back_8_r, color_text_8_r) & 0xFF) << 16U) | // 10/16 of text + ((changeUIntScale(10, 0, 16, color_back_8_g, color_text_8_g) & 0xFF) << 8U) | // 10/16 of text + ( changeUIntScale(10, 0, 16, color_back_8_b, color_text_8_r) & 0xFF), // 10/16 of text + + (color_text_8_r << 16U) | + (color_text_8_g << 8U) | + (color_text_8_b) + }; + + *color = (uint32_t)colors[2]; + for (uint32_t i = 0; i < 2; i++) { + if (seconds > (days ? color_threshold_days[i] : color_threshold_hours[i])) { + *color = (uint32_t)colors[i]; + break; + } + } + for(uint32_t i = 0; i < 3; ++i) { + *unit = units[i]; + if (seconds > conversions[i]) { // always pass even if 00m + return seconds / conversions[i]; + } + } + return 0; +} + +#endif // USE_BERRY