diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index 89e61825c..4ae8c181e 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -151,6 +151,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_Root.h" #include "solidify/solidified_Matter_Plugin_Device.h" #include "solidify/solidified_Matter_Plugin_OnOff.h" +#include "solidify/solidified_Matter_Plugin_Light0.h" #include "solidify/solidified_Matter_Plugin_Light1.h" #include "solidify/solidified_Matter_Plugin_Light2.h" #include "solidify/solidified_Matter_Plugin_Light3.h" @@ -322,6 +323,7 @@ module matter (scope: global, strings: weak) { Plugin_Root, class(be_class_Matter_Plugin_Root) // Generic behavior common to all devices Plugin_Device, class(be_class_Matter_Plugin_Device) // Generic device (abstract) Plugin_OnOff, class(be_class_Matter_Plugin_OnOff) // Relay/Light behavior (OnOff) + Plugin_Light0, class(be_class_Matter_Plugin_Light0) // OnOff Light Plugin_Light1, class(be_class_Matter_Plugin_Light1) // Dimmable Light Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be index 85d7ac29a..361f0cd46 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be @@ -59,6 +59,16 @@ class Matter_Commisioning_Context self.y = crypto.random(32) end + ############################################################# + def add_session(local_session_id, initiator_session_id, i2r, r2i, ac, created) + import string + # create session object + tasmota.log(string.format("MTR: add_session local_session_id=%i initiator_session_id=%i", local_session_id, initiator_session_id), 3) + + var session = self.device.sessions.create_session(local_session_id, initiator_session_id) + session.set_keys(i2r, r2i, ac, created) + end + def process_incoming(msg) # if !self.device.is_commissioning_open() && msg.opcode >= 0x20 && msg.opcode <= 0x24 @@ -275,7 +285,7 @@ class Matter_Commisioning_Context # StatusReport(GeneralCode: SUCCESS, ProtocolId: SECURE_CHANNEL, ProtocolCode: SESSION_ESTABLISHMENT_SUCCESS) var raw = self.send_status_report(msg, 0x00, 0x0000, 0x0000, false) - self.responder.add_session(self.future_local_session_id, self.future_initiator_session_id, self.I2RKey, self.R2IKey, self.AttestationChallenge, self.created) + self.add_session(self.future_local_session_id, self.future_initiator_session_id, self.I2RKey, self.R2IKey, self.AttestationChallenge, self.created) end def find_fabric_by_destination_id(destinationId, initiatorRandom) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be index ba5029b53..3c03d6f4c 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be @@ -382,22 +382,22 @@ class Matter_Frame n.resize(13) # add zeros end - tasmota.log("MTR: ******************************", 4) - tasmota.log("MTR: i2r =" + i2r.tohex(), 4) - tasmota.log("MTR: p =" + p.tohex(), 4) - tasmota.log("MTR: a =" + a.tohex(), 4) - tasmota.log("MTR: n =" + n.tohex(), 4) - tasmota.log("MTR: mic =" + mic.tohex(), 4) + # tasmota.log("MTR: ******************************", 4) + # tasmota.log("MTR: i2r =" + i2r.tohex(), 4) + # tasmota.log("MTR: p =" + p.tohex(), 4) + # tasmota.log("MTR: a =" + a.tohex(), 4) + # tasmota.log("MTR: n =" + n.tohex(), 4) + # tasmota.log("MTR: mic =" + mic.tohex(), 4) # decrypt var aes = crypto.AES_CCM(i2r, n, a, size(p), 16) var cleartext = aes.decrypt(p) var tag = aes.tag() - tasmota.log("MTR: ******************************", 4) - tasmota.log("MTR: cleartext =" + cleartext.tohex(), 4) - tasmota.log("MTR: tag =" + tag.tohex(), 4) - tasmota.log("MTR: ******************************", 4) + # tasmota.log("MTR: ******************************", 4) + # tasmota.log("MTR: cleartext =" + cleartext.tohex(), 4) + # tasmota.log("MTR: tag =" + tag.tohex(), 4) + # tasmota.log("MTR: ******************************", 4) if tag != mic tasmota.log("MTR: rejected packet due to invalid MIC", 3) @@ -431,23 +431,23 @@ class Matter_Frame end n.resize(13) # add zeros - tasmota.log("MTR: cleartext: " + self.raw.tohex(), 4) + # tasmota.log("MTR: cleartext: " + self.raw.tohex(), 4) - tasmota.log("MTR: ******************************", 4) - tasmota.log("MTR: r2i =" + r2i.tohex(), 4) - tasmota.log("MTR: p =" + p.tohex(), 4) - tasmota.log("MTR: a =" + a.tohex(), 4) - tasmota.log("MTR: n =" + n.tohex(), 4) + # tasmota.log("MTR: ******************************", 4) + # tasmota.log("MTR: r2i =" + r2i.tohex(), 4) + # tasmota.log("MTR: p =" + p.tohex(), 4) + # tasmota.log("MTR: a =" + a.tohex(), 4) + # tasmota.log("MTR: n =" + n.tohex(), 4) # decrypt var aes = crypto.AES_CCM(r2i, n, a, size(p), 16) var ciphertext = aes.encrypt(p) var tag = aes.tag() - tasmota.log("MTR: ******************************", 4) - tasmota.log("MTR: ciphertext =" + ciphertext.tohex(), 4) - tasmota.log("MTR: tag =" + tag.tohex(), 4) - tasmota.log("MTR: ******************************", 4) + # tasmota.log("MTR: ******************************", 4) + # tasmota.log("MTR: ciphertext =" + ciphertext.tohex(), 4) + # tasmota.log("MTR: tag =" + tag.tohex(), 4) + # tasmota.log("MTR: ******************************", 4) # packet is good, put back content in raw self.raw.resize(self.payload_idx) # remove cleartext payload @@ -463,7 +463,7 @@ class Matter_Frame var r = matter.Frame(self.message_handler, raw) r.decode_header() r.decode_payload() - tasmota.log("MTR: sending decode: " + matter.inspect(r), 3) + tasmota.log("MTR: sending decode: " + matter.inspect(r), 4) end end matter.Frame = Matter_Frame diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be index ad2a57d8f..13f782214 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be @@ -26,8 +26,8 @@ class Matter_MessageHandler var device # `tansport.msg_send(raw:bytes() [,...]) -> bool` true if succeeded # handlers - var commissioning - var im # handler for Interaction Model + var commissioning # Commissioning Context instance, handling the PASE/CASE phases + var im # Instance of `matter.IM` handling Interaction Model ############################################################# def init(device) @@ -175,16 +175,6 @@ class Matter_MessageHandler self.device.msg_send(raw, addr, port, id, session_id) end - ############################################################# - def add_session(local_session_id, initiator_session_id, i2r, r2i, ac, created) - import string - # create session object - tasmota.log(string.format("MTR: add_session local_session_id=%i initiator_session_id=%i", local_session_id, initiator_session_id), 3) - - var session = self.device.sessions.create_session(local_session_id, initiator_session_id) - session.set_keys(i2r, r2i, ac, created) - end - ############################################################# # placeholder, nothing to run for now def every_second() diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be index 223155c61..60cfe112b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be @@ -45,6 +45,11 @@ class Matter_Plugin self.clusters = self.consolidate_clusters() end + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + def update_shadow() + end + ############################################################# # signal that an attribute has been changed # @@ -208,6 +213,7 @@ class Matter_Plugin ############################################################# # every_second def every_second() + self.update_shadow() # force reading value and sending subscriptions end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be new file mode 100644 index 000000000..37d9dff38 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be @@ -0,0 +1,166 @@ +# +# Matter_Plugin_Light0.be - implements the behavior for a generic Lighting (OnOff only) +# +# 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 end + +#@ solidify:Matter_Plugin_Light0,weak + +class Matter_Plugin_Light0 : Matter_Plugin + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + 0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16 + 0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21 + 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable + 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 + } + static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff + + var shadow_onoff + + ############################################################# + # Constructor + def init(device, endpoint) + super(self).init(device, endpoint) + self.shadow_onoff = false + end + + ############################################################# + # Update shadow + # + 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(nil, 0x0006, 0x0000) self.shadow_onoff = pow 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 == 0x0003 # ========== Identify 1.2 p.16 ========== + if attribute == 0x0000 # ---------- IdentifyTime / u2 ---------- + return TLV.create_TLV(TLV.U2, 0) # no identification in progress + elif attribute == 0x0001 # ---------- IdentifyType / enum8 ---------- + return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) # no features + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation" + end + + # ==================================================================================================== + elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== + if attribute == 0x0000 # ---------- ---------- + return nil # TODO + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0)# + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation" + end + + # ==================================================================================================== + elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ========== + if 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 + + # ==================================================================================================== + elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== + 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) + import light + var TLV = matter.TLV + var cluster = ctx.cluster + var command = ctx.command + + # ==================================================================================================== + if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== + + if command == 0x0000 # ---------- Identify ---------- + # ignore + return true + elif command == 0x0001 # ---------- IdentifyQuery ---------- + # create IdentifyQueryResponse + # ID=1 + # 0=Certificate (octstr) + var iqr = TLV.Matter_TLV_struct() + iqr.add_TLV(0, TLV.U2, 0) # Timeout + ctx.command = 0x00 # IdentifyQueryResponse + return iqr + elif command == 0x0040 # ---------- TriggerEffect ---------- + # ignore + return true + end + # ==================================================================================================== + elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== + # TODO + return true + # ==================================================================================================== + elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ========== + # TODO + return true + # ==================================================================================================== + elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== + if command == 0x0000 # ---------- Off ---------- + light.set({'power':false}) + self.update_shadow() + return true + elif command == 0x0001 # ---------- On ---------- + light.set({'power':true}) + self.update_shadow() + return true + elif command == 0x0002 # ---------- Toggle ---------- + light.set({'power':!self.shadow_onoff}) + self.update_shadow() + return true + end + end + end + +end +matter.Plugin_Light0 = Matter_Plugin_Light0 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 b79f29bd3..b917efb01 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be @@ -20,30 +20,29 @@ # Matter plug-in for core behavior # dummy declaration for solidification -class Matter_Plugin end +class Matter_Plugin_Light0 end #@ solidify:Matter_Plugin_Light1,weak -class Matter_Plugin_Light1 : Matter_Plugin +class Matter_Plugin_Light1 : Matter_Plugin_Light0 static var CLUSTERS = { - # 0x001D: inherited # Descriptor Cluster 9.5 p.453 - 0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16 - 0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21 - 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable - 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 + # 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 } # Dimmable Light var shadow_bri - var shadow_onoff + # var shadow_onoff # inherited ############################################################# # Constructor def init(device, endpoint) super(self).init(device, endpoint) self.shadow_bri = 0 - self.shadow_onoff = false end ############################################################# @@ -53,10 +52,9 @@ class Matter_Plugin_Light1 : Matter_Plugin import light var light_status = light.get() var bri = light_status.find('bri', nil) - var pow = light_status.find('power', nil) if bri != nil bri = tasmota.scale_uint(bri, 0, 255, 0, 254) else bri = self.shadow_bri end - if pow != self.shadow_onoff self.attribute_updated(nil, 0x0006, 0x0000) self.shadow_onoff = pow end if bri != self.shadow_bri self.attribute_updated(nil, 0x0008, 0x0000) self.shadow_bri = bri end + super(self).update_shadow() # superclass manages 'power' end ############################################################# @@ -69,47 +67,7 @@ class Matter_Plugin_Light1 : Matter_Plugin var attribute = ctx.attribute # ==================================================================================================== - if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== - if attribute == 0x0000 # ---------- IdentifyTime / u2 ---------- - return TLV.create_TLV(TLV.U2, 0) # no identification in progress - elif attribute == 0x0001 # ---------- IdentifyType / enum8 ---------- - return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0) # no features - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation" - end - - # ==================================================================================================== - elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== - if attribute == 0x0000 # ---------- ---------- - return nil # TODO - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0)# - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation" - end - - # ==================================================================================================== - elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ========== - if 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 - - # ==================================================================================================== - elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - 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 - - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== + if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== if attribute == 0x0000 # ---------- CurrentLevel / u1 ---------- return TLV.create_TLV(TLV.U1, self.shadow_bri) elif attribute == 0x0002 # ---------- MinLevel / u1 ---------- @@ -143,48 +101,7 @@ class Matter_Plugin_Light1 : Matter_Plugin var command = ctx.command # ==================================================================================================== - if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== - - if command == 0x0000 # ---------- Identify ---------- - # ignore - return true - elif command == 0x0001 # ---------- IdentifyQuery ---------- - # create IdentifyQueryResponse - # ID=1 - # 0=Certificate (octstr) - var iqr = TLV.Matter_TLV_struct() - iqr.add_TLV(0, TLV.U2, 0) # Timeout - ctx.command = 0x00 # IdentifyQueryResponse - return iqr - elif command == 0x0040 # ---------- TriggerEffect ---------- - # ignore - return true - end - # ==================================================================================================== - elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== - # TODO - return true - # ==================================================================================================== - elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ========== - # TODO - return true - # ==================================================================================================== - elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - if command == 0x0000 # ---------- Off ---------- - light.set({'power':false}) - self.update_shadow() - return true - elif command == 0x0001 # ---------- On ---------- - light.set({'power':true}) - self.update_shadow() - return true - elif command == 0x0002 # ---------- Toggle ---------- - light.set({'power':!self.shadow_onoff}) - self.update_shadow() - return true - end - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== + if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== if command == 0x0000 # ---------- MoveToLevel ---------- var bri_in = val.findsubval(0) # Hue 0..254 var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255) @@ -219,13 +136,11 @@ class Matter_Plugin_Light1 : Matter_Plugin # TODO, we don't really support it return true end + + else + return super(self).invoke_request(session, val, ctx) end end - ############################################################# - # every_second - def every_second() - self.update_shadow() # force reading value and sending subscriptions - end end matter.Plugin_Light1 = Matter_Plugin_Light1 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 818b35652..aa2f38207 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be @@ -20,32 +20,30 @@ # Matter plug-in for core behavior # dummy declaration for solidification -class Matter_Plugin end +class Matter_Plugin_Light1 end #@ solidify:Matter_Plugin_Light2,weak -class Matter_Plugin_Light2 : Matter_Plugin +class Matter_Plugin_Light2 : Matter_Plugin_Light1 static var CLUSTERS = { - # 0x001D: inherited # Descriptor Cluster 9.5 p.453 - 0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16 - 0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21 - 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable - 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 - 0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57 + # 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 } # Color Temperature Light - var shadow_bri, shadow_ct + var shadow_ct var ct_min, ct_max - var shadow_onoff ############################################################# # Constructor def init(device, endpoint) super(self).init(device, endpoint) - self.shadow_bri = 0 self.shadow_ct = 325 - self.shadow_onoff = false self.update_ct_minmax() end @@ -55,14 +53,10 @@ class Matter_Plugin_Light2 : Matter_Plugin def update_shadow() import light self.update_ct_minmax() + super(self).update_shadow() var light_status = light.get() - var pow = light_status.find('power', nil) - var bri = light_status.find('bri', nil) var ct = light_status.find('ct', nil) - if bri != nil bri = tasmota.scale_uint(bri, 0, 255, 0, 254) else bri = self.shadow_bri end if ct == nil ct = self.shadow_ct end - if pow != self.shadow_onoff self.attribute_updated(nil, 0x0006, 0x0000) self.shadow_onoff = pow end - if bri != self.shadow_bri self.attribute_updated(nil, 0x0008, 0x0000) self.shadow_bri = bri end if ct != self.shadow_ct self.attribute_updated(nil, 0x0300, 0x0007) self.shadow_ct = ct end end @@ -83,67 +77,9 @@ class Matter_Plugin_Light2 : Matter_Plugin var TLV = matter.TLV var cluster = ctx.cluster var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== - if attribute == 0x0000 # ---------- IdentifyTime / u2 ---------- - return TLV.create_TLV(TLV.U2, 0) # no identification in progress - elif attribute == 0x0001 # ---------- IdentifyType / enum8 ---------- - return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0) # no features - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation" - end - - # ==================================================================================================== - elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== - if attribute == 0x0000 # ---------- ---------- - return nil # TODO - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0)# - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation" - end - - # ==================================================================================================== - elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ========== - if 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 - - # ==================================================================================================== - elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - 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 - - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== - if attribute == 0x0000 # ---------- CurrentLevel / u1 ---------- - return TLV.create_TLV(TLV.U1, self.shadow_bri) - 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 ---------- - return TLV.create_TLV(TLV.U1, self.shadow_bri) - 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 # ==================================================================================================== - elif cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ---------- return TLV.create_TLV(TLV.U1, self.shadow_ct) elif attribute == 0x0008 # ---------- ColorMode / u1 ---------- @@ -178,85 +114,7 @@ class Matter_Plugin_Light2 : Matter_Plugin var command = ctx.command # ==================================================================================================== - if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== - - if command == 0x0000 # ---------- Identify ---------- - # ignore - return true - elif command == 0x0001 # ---------- IdentifyQuery ---------- - # create IdentifyQueryResponse - # ID=1 - # 0=Certificate (octstr) - var iqr = TLV.Matter_TLV_struct() - iqr.add_TLV(0, TLV.U2, 0) # Timeout - ctx.command = 0x00 # IdentifyQueryResponse - return iqr - elif command == 0x0040 # ---------- TriggerEffect ---------- - # ignore - return true - end - # ==================================================================================================== - elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== - # TODO - return true - # ==================================================================================================== - elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ========== - # TODO - return true - # ==================================================================================================== - elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - if command == 0x0000 # ---------- Off ---------- - light.set({'power':false}) - self.update_shadow() - return true - elif command == 0x0001 # ---------- On ---------- - light.set({'power':true}) - self.update_shadow() - return true - elif command == 0x0002 # ---------- Toggle ---------- - light.set({'power':!self.shadow_onoff}) - self.update_shadow() - return true - end - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== - if command == 0x0000 # ---------- MoveToLevel ---------- - var bri_in = val.findsubval(0) # Hue 0..254 - var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255) - light.set({'bri': bri}) - self.update_shadow() - 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 - var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255) - var onoff = bri > 0 - light.set({'bri': bri, 'power': onoff}) - self.update_shadow() - 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 - - # ==================================================================================================== - elif cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== if command == 0x000A # ---------- MoveToColorTemperature ---------- var ct_in = val.findsubval(0) # CT if ct_in < self.ct_min ct_in = self.ct_min end @@ -275,14 +133,12 @@ class Matter_Plugin_Light2 : Matter_Plugin # TODO, we don't really support it return true end + + else + return super(self).invoke_request(session, val, ctx) end end - ############################################################# - # every_second - def every_second() - self.update_shadow() # force reading value and sending subscriptions - end end matter.Plugin_Light2 = Matter_Plugin_Light2 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 7794a11ae..7d797b29a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be @@ -20,33 +20,30 @@ # Matter plug-in for core behavior # dummy declaration for solidification -class Matter_Plugin end +class Matter_Plugin_Light1 end #@ solidify:Matter_Plugin_Light3,weak -class Matter_Plugin_Light3 : Matter_Plugin +class Matter_Plugin_Light3 : Matter_Plugin_Light1 static var CLUSTERS = { - # 0x001D: inherited # Descriptor Cluster 9.5 p.453 - 0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16 - 0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21 - 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable - 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 - 0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57 + # 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 } # Extended Color Light - var shadow_hue, shadow_bri, shadow_sat - var shadow_onoff + var shadow_hue, shadow_sat ############################################################# # Constructor def init(device, endpoint) super(self).init(device, endpoint) self.shadow_hue = 0 - self.shadow_bri = 0 self.shadow_sat = 0 - self.shadow_onoff = false end ############################################################# @@ -54,16 +51,12 @@ class Matter_Plugin_Light3 : Matter_Plugin # def update_shadow() import light + super(self).update_shadow() var light_status = light.get() - var bri = light_status.find('bri', nil) var hue = light_status.find('hue', nil) var sat = light_status.find('sat', nil) - var pow = light_status.find('power', nil) - if bri != nil bri = tasmota.scale_uint(bri, 0, 255, 0, 254) else bri = self.shadow_bri end - if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else bri = self.shadow_hue end - if sat != nil sat = tasmota.scale_uint(sat, 0, 255, 0, 254) else bri = self.shadow_sat end - if pow != self.shadow_onoff self.attribute_updated(nil, 0x0006, 0x0000) self.shadow_onoff = pow end - if bri != self.shadow_bri self.attribute_updated(nil, 0x0008, 0x0000) self.shadow_bri = bri end + 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(nil, 0x0300, 0x0000) self.shadow_hue = hue end if sat != self.shadow_sat self.attribute_updated(nil, 0x0300, 0x0001) self.shadow_sat = sat end end @@ -76,67 +69,9 @@ class Matter_Plugin_Light3 : Matter_Plugin var TLV = matter.TLV var cluster = ctx.cluster var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== - if attribute == 0x0000 # ---------- IdentifyTime / u2 ---------- - return TLV.create_TLV(TLV.U2, 0) # no identification in progress - elif attribute == 0x0001 # ---------- IdentifyType / enum8 ---------- - return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0) # no features - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation" - end - - # ==================================================================================================== - elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== - if attribute == 0x0000 # ---------- ---------- - return nil # TODO - elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- - return TLV.create_TLV(TLV.U4, 0)# - elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- - return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation" - end - - # ==================================================================================================== - elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ========== - if 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 - - # ==================================================================================================== - elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - 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 - - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== - if attribute == 0x0000 # ---------- CurrentLevel / u1 ---------- - return TLV.create_TLV(TLV.U1, self.shadow_bri) - 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 ---------- - return TLV.create_TLV(TLV.U1, self.shadow_bri) - 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 # ==================================================================================================== - elif cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== if attribute == 0x0000 # ---------- CurrentHue / u1 ---------- return TLV.create_TLV(TLV.U1, self.shadow_hue) elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ---------- @@ -179,84 +114,7 @@ class Matter_Plugin_Light3 : Matter_Plugin var command = ctx.command # ==================================================================================================== - if cluster == 0x0003 # ========== Identify 1.2 p.16 ========== - - if command == 0x0000 # ---------- Identify ---------- - # ignore - return true - elif command == 0x0001 # ---------- IdentifyQuery ---------- - # create IdentifyQueryResponse - # ID=1 - # 0=Certificate (octstr) - var iqr = TLV.Matter_TLV_struct() - iqr.add_TLV(0, TLV.U2, 0) # Timeout - ctx.command = 0x00 # IdentifyQueryResponse - return iqr - elif command == 0x0040 # ---------- TriggerEffect ---------- - # ignore - return true - end - # ==================================================================================================== - elif cluster == 0x0004 # ========== Groups 1.3 p.21 ========== - # TODO - return true - # ==================================================================================================== - elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ========== - # TODO - return true - # ==================================================================================================== - elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - if command == 0x0000 # ---------- Off ---------- - light.set({'power':false}) - self.update_shadow() - return true - elif command == 0x0001 # ---------- On ---------- - light.set({'power':true}) - self.update_shadow() - return true - elif command == 0x0002 # ---------- Toggle ---------- - light.set({'power':!self.shadow_onoff}) - self.update_shadow() - return true - end - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== - if command == 0x0000 # ---------- MoveToLevel ---------- - var bri_in = val.findsubval(0) # Hue 0..254 - var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255) - light.set({'bri': bri}) - self.update_shadow() - 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 - var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255) - var onoff = bri > 0 - light.set({'bri': bri, 'power': onoff}) - self.update_shadow() - 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 - # ==================================================================================================== - elif cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== + if cluster == 0x0300 # ========== Color Control 3.2 p.111 ========== if command == 0x0000 # ---------- MoveToHue ---------- var hue_in = val.findsubval(0) # Hue 0..254 var hue = tasmota.scale_uint(hue_in, 0, 254, 0, 360) @@ -296,14 +154,12 @@ class Matter_Plugin_Light3 : Matter_Plugin # TODO, we don't really support it return true end + + else + return super(self).invoke_request(session, val, ctx) end end - ############################################################# - # every_second - def every_second() - self.update_shadow() # force reading value and sending subscriptions - end end matter.Plugin_Light3 = Matter_Plugin_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index 300a669c4..3794e6c41 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -278,13 +278,13 @@ class Matter_UI while idx < size(fabrics) var fabric_hex = fabrics[idx].get_fabric_id().copy().reverse().tohex() if fabric_hex == del_fabric - fabrics.remove(idx) + self.device.remove_fabric(fabrics[idx]) dirty = true + break else idx += 1 end end - if dirty self.device.sessions.save_fabrics() end #- and force restart -# webserver.redirect("/?rst=") 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 4323bcd7d..83996bc91 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h @@ -6,6 +6,412 @@ extern const bclass be_class_Matter_Commisioning_Context; +/******************************************************************** +** Solidified function: parse_PBKDFParamRequest +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* 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[52]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(opcode), + /* K3 */ be_nested_str_weak(local_session_id), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(protocol_id), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(log), + /* K8 */ be_nested_str_weak(MTR_X3A_X20invalid_X20PBKDFParamRequest_X20message), + /* K9 */ be_const_int(2), + /* K10 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28General_X20Code_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20INVALID_PARAMETER_X29), + /* K11 */ be_nested_str_weak(send_status_report), + /* K12 */ be_const_int(1), + /* K13 */ be_nested_str_weak(matter), + /* K14 */ be_nested_str_weak(PBKDFParamRequest), + /* K15 */ be_nested_str_weak(parse), + /* K16 */ be_nested_str_weak(raw), + /* K17 */ be_nested_str_weak(app_payload_idx), + /* K18 */ be_nested_str_weak(session), + /* K19 */ be_nested_str_weak(set_mode_PASE), + /* K20 */ be_const_int(2147483647), + /* K21 */ be_nested_str_weak(passcodeId), + /* K22 */ be_nested_str_weak(MTR_X3A_X20non_X2Dzero_X20passcode_X20id), + /* K23 */ be_nested_str_weak(future_initiator_session_id), + /* K24 */ be_nested_str_weak(initiator_session_id), + /* K25 */ be_nested_str_weak(future_local_session_id), + /* K26 */ be_nested_str_weak(device), + /* K27 */ be_nested_str_weak(sessions), + /* K28 */ be_nested_str_weak(gen_local_session_id), + /* K29 */ be_nested_str_weak(format), + /* K30 */ be_nested_str_weak(MTR_X3A_X20_X2BSession_X20_X20_X20_X28_X256i_X29_X20from_X20_X27_X5B_X25s_X5D_X3A_X25i_X27), + /* K31 */ be_nested_str_weak(remote_ip), + /* K32 */ be_nested_str_weak(remote_port), + /* K33 */ be_nested_str_weak(PBKDFParamResponse), + /* K34 */ be_nested_str_weak(initiatorRandom), + /* K35 */ be_nested_str_weak(responderRandom), + /* K36 */ be_nested_str_weak(random), + /* K37 */ be_nested_str_weak(responderSessionId), + /* K38 */ be_nested_str_weak(pbkdf_parameters_salt), + /* K39 */ be_nested_str_weak(commissioning_salt), + /* K40 */ be_nested_str_weak(pbkdf_parameters_iterations), + /* K41 */ be_nested_str_weak(commissioning_iterations), + /* K42 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_X3A_X20), + /* K43 */ be_nested_str_weak(inspect), + /* K44 */ be_nested_str_weak(tlv2raw), + /* K45 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_raw_X3A_X20), + /* K46 */ be_nested_str_weak(tohex), + /* K47 */ be_nested_str_weak(build_response), + /* K48 */ be_nested_str_weak(encode_frame), + /* K49 */ be_nested_str_weak(responder), + /* K50 */ be_nested_str_weak(send_response), + /* K51 */ be_nested_str_weak(message_counter), + }), + be_str_weak(parse_PBKDFParamRequest), + &be_const_str_solidified, + ( &(const binstruction[140]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0x88100302, // 0002 GETMBR R4 R1 K2 + 0x5416001F, // 0003 LDINT R5 32 + 0x20100805, // 0004 NE R4 R4 R5 + 0x74120005, // 0005 JMPT R4 #000C + 0x88100303, // 0006 GETMBR R4 R1 K3 + 0x20100904, // 0007 NE R4 R4 K4 + 0x74120002, // 0008 JMPT R4 #000C + 0x88100305, // 0009 GETMBR R4 R1 K5 + 0x20100904, // 000A NE R4 R4 K4 + 0x78120012, // 000B JMPF R4 #001F + 0xB8120C00, // 000C GETNGBL R4 K6 + 0x8C100907, // 000D GETMET R4 R4 K7 + 0x58180008, // 000E LDCONST R6 K8 + 0x581C0009, // 000F LDCONST R7 K9 + 0x7C100600, // 0010 CALL R4 3 + 0xB8120C00, // 0011 GETNGBL R4 K6 + 0x8C100907, // 0012 GETMET R4 R4 K7 + 0x5818000A, // 0013 LDCONST R6 K10 + 0x581C0009, // 0014 LDCONST R7 K9 + 0x7C100600, // 0015 CALL R4 3 + 0x8C10010B, // 0016 GETMET R4 R0 K11 + 0x5C180200, // 0017 MOVE R6 R1 + 0x581C000C, // 0018 LDCONST R7 K12 + 0x58200004, // 0019 LDCONST R8 K4 + 0x58240009, // 001A LDCONST R9 K9 + 0x50280000, // 001B LDBOOL R10 0 0 + 0x7C100C00, // 001C CALL R4 6 + 0x50140000, // 001D LDBOOL R5 0 0 + 0x80040A00, // 001E RET 1 R5 + 0xB8121A00, // 001F GETNGBL R4 K13 + 0x8C10090E, // 0020 GETMET R4 R4 K14 + 0x7C100200, // 0021 CALL R4 1 + 0x8C10090F, // 0022 GETMET R4 R4 K15 + 0x88180310, // 0023 GETMBR R6 R1 K16 + 0x881C0311, // 0024 GETMBR R7 R1 K17 + 0x7C100600, // 0025 CALL R4 3 + 0x88140312, // 0026 GETMBR R5 R1 K18 + 0x8C140B13, // 0027 GETMET R5 R5 K19 + 0x7C140200, // 0028 CALL R5 1 + 0x88140311, // 0029 GETMBR R5 R1 K17 + 0x40140B14, // 002A CONNECT R5 R5 K20 + 0x88180310, // 002B GETMBR R6 R1 K16 + 0x94140C05, // 002C GETIDX R5 R6 R5 + 0x90021C05, // 002D SETMBR R0 K14 R5 + 0x88140915, // 002E GETMBR R5 R4 K21 + 0x20140B04, // 002F NE R5 R5 K4 + 0x78160012, // 0030 JMPF R5 #0044 + 0xB8160C00, // 0031 GETNGBL R5 K6 + 0x8C140B07, // 0032 GETMET R5 R5 K7 + 0x581C0016, // 0033 LDCONST R7 K22 + 0x58200009, // 0034 LDCONST R8 K9 + 0x7C140600, // 0035 CALL R5 3 + 0xB8160C00, // 0036 GETNGBL R5 K6 + 0x8C140B07, // 0037 GETMET R5 R5 K7 + 0x581C000A, // 0038 LDCONST R7 K10 + 0x58200009, // 0039 LDCONST R8 K9 + 0x7C140600, // 003A CALL R5 3 + 0x8C14010B, // 003B GETMET R5 R0 K11 + 0x5C1C0200, // 003C MOVE R7 R1 + 0x5820000C, // 003D LDCONST R8 K12 + 0x58240004, // 003E LDCONST R9 K4 + 0x58280009, // 003F LDCONST R10 K9 + 0x502C0000, // 0040 LDBOOL R11 0 0 + 0x7C140C00, // 0041 CALL R5 6 + 0x50180000, // 0042 LDBOOL R6 0 0 + 0x80040C00, // 0043 RET 1 R6 + 0x88140918, // 0044 GETMBR R5 R4 K24 + 0x90022E05, // 0045 SETMBR R0 K23 R5 + 0x8814011A, // 0046 GETMBR R5 R0 K26 + 0x88140B1B, // 0047 GETMBR R5 R5 K27 + 0x8C140B1C, // 0048 GETMET R5 R5 K28 + 0x7C140200, // 0049 CALL R5 1 + 0x90023205, // 004A SETMBR R0 K25 R5 + 0xB8160C00, // 004B GETNGBL R5 K6 + 0x8C140B07, // 004C GETMET R5 R5 K7 + 0x8C1C071D, // 004D GETMET R7 R3 K29 + 0x5824001E, // 004E LDCONST R9 K30 + 0x88280119, // 004F GETMBR R10 R0 K25 + 0x882C031F, // 0050 GETMBR R11 R1 K31 + 0x88300320, // 0051 GETMBR R12 R1 K32 + 0x7C1C0A00, // 0052 CALL R7 5 + 0x58200009, // 0053 LDCONST R8 K9 + 0x7C140600, // 0054 CALL R5 3 + 0xB8161A00, // 0055 GETNGBL R5 K13 + 0x8C140B21, // 0056 GETMET R5 R5 K33 + 0x7C140200, // 0057 CALL R5 1 + 0x88180922, // 0058 GETMBR R6 R4 K34 + 0x90164406, // 0059 SETMBR R5 K34 R6 + 0x8C180524, // 005A GETMET R6 R2 K36 + 0x5422001F, // 005B LDINT R8 32 + 0x7C180400, // 005C CALL R6 2 + 0x90164606, // 005D SETMBR R5 K35 R6 + 0x88180119, // 005E GETMBR R6 R0 K25 + 0x90164A06, // 005F SETMBR R5 K37 R6 + 0x8818011A, // 0060 GETMBR R6 R0 K26 + 0x88180D27, // 0061 GETMBR R6 R6 K39 + 0x90164C06, // 0062 SETMBR R5 K38 R6 + 0x8818011A, // 0063 GETMBR R6 R0 K26 + 0x88180D29, // 0064 GETMBR R6 R6 K41 + 0x90165006, // 0065 SETMBR R5 K40 R6 + 0xB81A0C00, // 0066 GETNGBL R6 K6 + 0x8C180D07, // 0067 GETMET R6 R6 K7 + 0x60200008, // 0068 GETGBL R8 G8 + 0xB8261A00, // 0069 GETNGBL R9 K13 + 0x8C24132B, // 006A GETMET R9 R9 K43 + 0x5C2C0A00, // 006B MOVE R11 R5 + 0x7C240400, // 006C CALL R9 2 + 0x7C200200, // 006D CALL R8 1 + 0x00225408, // 006E ADD R8 K42 R8 + 0x54260003, // 006F LDINT R9 4 + 0x7C180600, // 0070 CALL R6 3 + 0x8C180B2C, // 0071 GETMET R6 R5 K44 + 0x7C180200, // 0072 CALL R6 1 + 0xB81E0C00, // 0073 GETNGBL R7 K6 + 0x8C1C0F07, // 0074 GETMET R7 R7 K7 + 0x8C240D2E, // 0075 GETMET R9 R6 K46 + 0x7C240200, // 0076 CALL R9 1 + 0x00265A09, // 0077 ADD R9 K45 R9 + 0x542A0003, // 0078 LDINT R10 4 + 0x7C1C0600, // 0079 CALL R7 3 + 0x90024206, // 007A SETMBR R0 K33 R6 + 0x8C1C032F, // 007B GETMET R7 R1 K47 + 0x54260020, // 007C LDINT R9 33 + 0x50280200, // 007D LDBOOL R10 1 0 + 0x7C1C0600, // 007E CALL R7 3 + 0x8C200F30, // 007F GETMET R8 R7 K48 + 0x5C280C00, // 0080 MOVE R10 R6 + 0x7C200400, // 0081 CALL R8 2 + 0x88240131, // 0082 GETMBR R9 R0 K49 + 0x8C241332, // 0083 GETMET R9 R9 K50 + 0x5C2C1000, // 0084 MOVE R11 R8 + 0x8830031F, // 0085 GETMBR R12 R1 K31 + 0x88340320, // 0086 GETMBR R13 R1 K32 + 0x88380F33, // 0087 GETMBR R14 R7 K51 + 0x883C0312, // 0088 GETMBR R15 R1 K18 + 0x883C1F03, // 0089 GETMBR R15 R15 K3 + 0x7C240C00, // 008A CALL R9 6 + 0x80000000, // 008B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_Pake1 +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ + be_nested_proto( + 17, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[48]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(opcode), + /* K2 */ be_nested_str_weak(local_session_id), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(protocol_id), + /* K5 */ be_nested_str_weak(tasmota), + /* K6 */ be_nested_str_weak(log), + /* K7 */ be_nested_str_weak(MTR_X3A_X20invalid_X20Pake1_X20message), + /* K8 */ be_const_int(2), + /* K9 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28General_X20Code_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20INVALID_PARAMETER_X29), + /* K10 */ be_nested_str_weak(send_status_report), + /* K11 */ be_const_int(1), + /* K12 */ be_nested_str_weak(matter), + /* K13 */ be_nested_str_weak(Pake1), + /* K14 */ be_nested_str_weak(parse), + /* K15 */ be_nested_str_weak(raw), + /* K16 */ be_nested_str_weak(app_payload_idx), + /* K17 */ be_nested_str_weak(pA), + /* K18 */ be_nested_str_weak(spake), + /* K19 */ be_nested_str_weak(SPAKE2P_Matter), + /* K20 */ be_nested_str_weak(device), + /* K21 */ be_nested_str_weak(commissioning_w0), + /* K22 */ be_nested_str_weak(commissioning_L), + /* K23 */ be_nested_str_weak(compute_pB), + /* K24 */ be_nested_str_weak(y), + /* K25 */ be_nested_str_weak(pB), + /* K26 */ be_nested_str_weak(compute_ZV_verifier), + /* K27 */ be_nested_str_weak(SHA256), + /* K28 */ be_nested_str_weak(update), + /* K29 */ be_nested_str_weak(fromstring), + /* K30 */ be_nested_str_weak(Matter_Context_Prefix), + /* K31 */ be_nested_str_weak(PBKDFParamRequest), + /* K32 */ be_nested_str_weak(PBKDFParamResponse), + /* K33 */ be_nested_str_weak(out), + /* K34 */ be_nested_str_weak(set_context), + /* K35 */ be_nested_str_weak(compute_TT_hash), + /* K36 */ be_nested_str_weak(cB), + /* K37 */ be_nested_str_weak(Ke), + /* K38 */ be_nested_str_weak(Pake2), + /* K39 */ be_nested_str_weak(tlv2raw), + /* K40 */ be_nested_str_weak(build_response), + /* K41 */ be_nested_str_weak(encode_frame), + /* K42 */ be_nested_str_weak(responder), + /* K43 */ be_nested_str_weak(send_response), + /* K44 */ be_nested_str_weak(remote_ip), + /* K45 */ be_nested_str_weak(remote_port), + /* K46 */ be_nested_str_weak(message_counter), + /* K47 */ be_nested_str_weak(session), + }), + be_str_weak(parse_Pake1), + &be_const_str_solidified, + ( &(const binstruction[118]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x880C0301, // 0001 GETMBR R3 R1 K1 + 0x54120021, // 0002 LDINT R4 34 + 0x200C0604, // 0003 NE R3 R3 R4 + 0x740E0005, // 0004 JMPT R3 #000B + 0x880C0302, // 0005 GETMBR R3 R1 K2 + 0x200C0703, // 0006 NE R3 R3 K3 + 0x740E0002, // 0007 JMPT R3 #000B + 0x880C0304, // 0008 GETMBR R3 R1 K4 + 0x200C0703, // 0009 NE R3 R3 K3 + 0x780E0012, // 000A JMPF R3 #001E + 0xB80E0A00, // 000B GETNGBL R3 K5 + 0x8C0C0706, // 000C GETMET R3 R3 K6 + 0x58140007, // 000D LDCONST R5 K7 + 0x58180008, // 000E LDCONST R6 K8 + 0x7C0C0600, // 000F CALL R3 3 + 0xB80E0A00, // 0010 GETNGBL R3 K5 + 0x8C0C0706, // 0011 GETMET R3 R3 K6 + 0x58140009, // 0012 LDCONST R5 K9 + 0x58180008, // 0013 LDCONST R6 K8 + 0x7C0C0600, // 0014 CALL R3 3 + 0x8C0C010A, // 0015 GETMET R3 R0 K10 + 0x5C140200, // 0016 MOVE R5 R1 + 0x5818000B, // 0017 LDCONST R6 K11 + 0x581C0003, // 0018 LDCONST R7 K3 + 0x58200008, // 0019 LDCONST R8 K8 + 0x50240000, // 001A LDBOOL R9 0 0 + 0x7C0C0C00, // 001B CALL R3 6 + 0x50100000, // 001C LDBOOL R4 0 0 + 0x80040800, // 001D RET 1 R4 + 0xB80E1800, // 001E GETNGBL R3 K12 + 0x8C0C070D, // 001F GETMET R3 R3 K13 + 0x7C0C0200, // 0020 CALL R3 1 + 0x8C0C070E, // 0021 GETMET R3 R3 K14 + 0x8814030F, // 0022 GETMBR R5 R1 K15 + 0x88180310, // 0023 GETMBR R6 R1 K16 + 0x7C0C0600, // 0024 CALL R3 3 + 0x88100711, // 0025 GETMBR R4 R3 K17 + 0x90022204, // 0026 SETMBR R0 K17 R4 + 0x8C100513, // 0027 GETMET R4 R2 K19 + 0x88180114, // 0028 GETMBR R6 R0 K20 + 0x88180D15, // 0029 GETMBR R6 R6 K21 + 0x4C1C0000, // 002A LDNIL R7 + 0x88200114, // 002B GETMBR R8 R0 K20 + 0x88201116, // 002C GETMBR R8 R8 K22 + 0x7C100800, // 002D CALL R4 4 + 0x90022404, // 002E SETMBR R0 K18 R4 + 0x88100112, // 002F GETMBR R4 R0 K18 + 0x8C100917, // 0030 GETMET R4 R4 K23 + 0x88180118, // 0031 GETMBR R6 R0 K24 + 0x7C100400, // 0032 CALL R4 2 + 0x88100112, // 0033 GETMBR R4 R0 K18 + 0x88100919, // 0034 GETMBR R4 R4 K25 + 0x90023204, // 0035 SETMBR R0 K25 R4 + 0x88100112, // 0036 GETMBR R4 R0 K18 + 0x8C10091A, // 0037 GETMET R4 R4 K26 + 0x88180111, // 0038 GETMBR R6 R0 K17 + 0x7C100400, // 0039 CALL R4 2 + 0x8C10051B, // 003A GETMET R4 R2 K27 + 0x7C100200, // 003B CALL R4 1 + 0x8C14091C, // 003C GETMET R5 R4 K28 + 0x601C0015, // 003D GETGBL R7 G21 + 0x7C1C0000, // 003E CALL R7 0 + 0x8C1C0F1D, // 003F GETMET R7 R7 K29 + 0x8824011E, // 0040 GETMBR R9 R0 K30 + 0x7C1C0400, // 0041 CALL R7 2 + 0x7C140400, // 0042 CALL R5 2 + 0x8C14091C, // 0043 GETMET R5 R4 K28 + 0x881C011F, // 0044 GETMBR R7 R0 K31 + 0x7C140400, // 0045 CALL R5 2 + 0x8C14091C, // 0046 GETMET R5 R4 K28 + 0x881C0120, // 0047 GETMBR R7 R0 K32 + 0x7C140400, // 0048 CALL R5 2 + 0x8C140921, // 0049 GETMET R5 R4 K33 + 0x7C140200, // 004A CALL R5 1 + 0x88180112, // 004B GETMBR R6 R0 K18 + 0x881C0111, // 004C GETMBR R7 R0 K17 + 0x901A2207, // 004D SETMBR R6 K17 R7 + 0x88180112, // 004E GETMBR R6 R0 K18 + 0x8C180D22, // 004F GETMET R6 R6 K34 + 0x5C200A00, // 0050 MOVE R8 R5 + 0x7C180400, // 0051 CALL R6 2 + 0x88180112, // 0052 GETMBR R6 R0 K18 + 0x8C180D23, // 0053 GETMET R6 R6 K35 + 0x50200200, // 0054 LDBOOL R8 1 0 + 0x7C180400, // 0055 CALL R6 2 + 0x88180112, // 0056 GETMBR R6 R0 K18 + 0x88180D24, // 0057 GETMBR R6 R6 K36 + 0x90024806, // 0058 SETMBR R0 K36 R6 + 0x88180112, // 0059 GETMBR R6 R0 K18 + 0x88180D25, // 005A GETMBR R6 R6 K37 + 0x90024A06, // 005B SETMBR R0 K37 R6 + 0xB81A1800, // 005C GETNGBL R6 K12 + 0x8C180D26, // 005D GETMET R6 R6 K38 + 0x7C180200, // 005E CALL R6 1 + 0x881C0119, // 005F GETMBR R7 R0 K25 + 0x901A3207, // 0060 SETMBR R6 K25 R7 + 0x881C0124, // 0061 GETMBR R7 R0 K36 + 0x901A4807, // 0062 SETMBR R6 K36 R7 + 0x8C1C0D27, // 0063 GETMET R7 R6 K39 + 0x7C1C0200, // 0064 CALL R7 1 + 0x8C200328, // 0065 GETMET R8 R1 K40 + 0x542A0022, // 0066 LDINT R10 35 + 0x502C0200, // 0067 LDBOOL R11 1 0 + 0x7C200600, // 0068 CALL R8 3 + 0x8C241129, // 0069 GETMET R9 R8 K41 + 0x5C2C0E00, // 006A MOVE R11 R7 + 0x7C240400, // 006B CALL R9 2 + 0x8828012A, // 006C GETMBR R10 R0 K42 + 0x8C28152B, // 006D GETMET R10 R10 K43 + 0x5C301200, // 006E MOVE R12 R9 + 0x8834032C, // 006F GETMBR R13 R1 K44 + 0x8838032D, // 0070 GETMBR R14 R1 K45 + 0x883C112E, // 0071 GETMBR R15 R8 K46 + 0x8840032F, // 0072 GETMBR R16 R1 K47 + 0x88402102, // 0073 GETMBR R16 R16 K2 + 0x7C280C00, // 0074 CALL R10 6 + 0x80000000, // 0075 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: init ********************************************************************/ @@ -44,6 +450,276 @@ be_local_closure(Matter_Commisioning_Context_init, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: find_fabric_by_destination_id +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /* name */ + be_nested_proto( + 14, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20SEARCHING_X3A_X20destinationId_X3D), + /* K4 */ be_nested_str_weak(tohex), + /* K5 */ be_const_int(3), + /* K6 */ be_nested_str_weak(device), + /* K7 */ be_nested_str_weak(sessions), + /* K8 */ be_nested_str_weak(fabrics), + /* K9 */ be_nested_str_weak(noc), + /* K10 */ be_nested_str_weak(fabric_id), + /* K11 */ be_nested_str_weak(device_id), + /* K12 */ be_nested_str_weak(get_ca_pub), + /* K13 */ be_nested_str_weak(get_ipk_group_key), + /* K14 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20destinationMessage_X3D), + /* K15 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20key_ipk_X3D), + /* K16 */ be_nested_str_weak(HMAC_SHA256), + /* K17 */ be_nested_str_weak(update), + /* K18 */ be_nested_str_weak(out), + /* K19 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D), + /* K20 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(find_fabric_by_destination_id), + &be_const_str_solidified, + ( &(const binstruction[77]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x8C100902, // 0002 GETMET R4 R4 K2 + 0x8C180304, // 0003 GETMET R6 R1 K4 + 0x7C180200, // 0004 CALL R6 1 + 0x001A0606, // 0005 ADD R6 K3 R6 + 0x581C0005, // 0006 LDCONST R7 K5 + 0x7C100600, // 0007 CALL R4 3 + 0x60100010, // 0008 GETGBL R4 G16 + 0x88140106, // 0009 GETMBR R5 R0 K6 + 0x88140B07, // 000A GETMBR R5 R5 K7 + 0x88140B08, // 000B GETMBR R5 R5 K8 + 0x7C100200, // 000C CALL R4 1 + 0xA8020039, // 000D EXBLK 0 #0048 + 0x5C140800, // 000E MOVE R5 R4 + 0x7C140000, // 000F CALL R5 0 + 0x88180B09, // 0010 GETMBR R6 R5 K9 + 0x4C1C0000, // 0011 LDNIL R7 + 0x1C180C07, // 0012 EQ R6 R6 R7 + 0x741A0007, // 0013 JMPT R6 #001C + 0x88180B0A, // 0014 GETMBR R6 R5 K10 + 0x4C1C0000, // 0015 LDNIL R7 + 0x1C180C07, // 0016 EQ R6 R6 R7 + 0x741A0003, // 0017 JMPT R6 #001C + 0x88180B0B, // 0018 GETMBR R6 R5 K11 + 0x4C1C0000, // 0019 LDNIL R7 + 0x1C180C07, // 001A EQ R6 R6 R7 + 0x781A0000, // 001B JMPF R6 #001D + 0x7001FFF0, // 001C JMP #000E + 0x8C180B0C, // 001D GETMET R6 R5 K12 + 0x7C180200, // 001E CALL R6 1 + 0x00180406, // 001F ADD R6 R2 R6 + 0x881C0B0A, // 0020 GETMBR R7 R5 K10 + 0x00180C07, // 0021 ADD R6 R6 R7 + 0x881C0B0B, // 0022 GETMBR R7 R5 K11 + 0x00180C07, // 0023 ADD R6 R6 R7 + 0x8C1C0B0D, // 0024 GETMET R7 R5 K13 + 0x7C1C0200, // 0025 CALL R7 1 + 0xB8220200, // 0026 GETNGBL R8 K1 + 0x8C201102, // 0027 GETMET R8 R8 K2 + 0x8C280D04, // 0028 GETMET R10 R6 K4 + 0x7C280200, // 0029 CALL R10 1 + 0x002A1C0A, // 002A ADD R10 K14 R10 + 0x582C0005, // 002B LDCONST R11 K5 + 0x7C200600, // 002C CALL R8 3 + 0xB8220200, // 002D GETNGBL R8 K1 + 0x8C201102, // 002E GETMET R8 R8 K2 + 0x8C280F04, // 002F GETMET R10 R7 K4 + 0x7C280200, // 0030 CALL R10 1 + 0x002A1E0A, // 0031 ADD R10 K15 R10 + 0x542E0003, // 0032 LDINT R11 4 + 0x7C200600, // 0033 CALL R8 3 + 0x8C200710, // 0034 GETMET R8 R3 K16 + 0x5C280E00, // 0035 MOVE R10 R7 + 0x7C200400, // 0036 CALL R8 2 + 0x8C241111, // 0037 GETMET R9 R8 K17 + 0x5C2C0C00, // 0038 MOVE R11 R6 + 0x7C240400, // 0039 CALL R9 2 + 0x8C241112, // 003A GETMET R9 R8 K18 + 0x7C240200, // 003B CALL R9 1 + 0xB82A0200, // 003C GETNGBL R10 K1 + 0x8C281502, // 003D GETMET R10 R10 K2 + 0x8C301304, // 003E GETMET R12 R9 K4 + 0x7C300200, // 003F CALL R12 1 + 0x0032260C, // 0040 ADD R12 K19 R12 + 0x58340005, // 0041 LDCONST R13 K5 + 0x7C280600, // 0042 CALL R10 3 + 0x1C281201, // 0043 EQ R10 R9 R1 + 0x782A0001, // 0044 JMPF R10 #0047 + 0xA8040001, // 0045 EXBLK 1 1 + 0x80040A00, // 0046 RET 1 R5 + 0x7001FFC5, // 0047 JMP #000E + 0x58100014, // 0048 LDCONST R4 K20 + 0xAC100200, // 0049 CATCH R4 1 0 + 0xB0080000, // 004A RAISE 2 R0 R0 + 0x4C100000, // 004B LDNIL R4 + 0x80040800, // 004C RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_incoming +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_process_incoming, /* 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[17]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(is_commissioning_open), + /* K2 */ be_nested_str_weak(opcode), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(log), + /* K5 */ be_nested_str_weak(MTR_X3A_X20commissioning_X20not_X20open), + /* K6 */ be_const_int(2), + /* 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), + }), + be_str_weak(process_incoming), + &be_const_str_solidified, + ( &(const binstruction[83]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x740A000E, // 0003 JMPT R2 #0013 + 0x88080302, // 0004 GETMBR R2 R1 K2 + 0x540E001F, // 0005 LDINT R3 32 + 0x28080403, // 0006 GE R2 R2 R3 + 0x780A000A, // 0007 JMPF R2 #0013 + 0x88080302, // 0008 GETMBR R2 R1 K2 + 0x540E0023, // 0009 LDINT R3 36 + 0x18080403, // 000A LE R2 R2 R3 + 0x780A0006, // 000B JMPF R2 #0013 + 0xB80A0600, // 000C GETNGBL R2 K3 + 0x8C080504, // 000D GETMET R2 R2 K4 + 0x58100005, // 000E LDCONST R4 K5 + 0x58140006, // 000F LDCONST R5 K6 + 0x7C080600, // 0010 CALL R2 3 + 0x50080000, // 0011 LDBOOL R2 0 0 + 0x80040400, // 0012 RET 1 R2 + 0xB80A0600, // 0013 GETNGBL R2 K3 + 0x8C080504, // 0014 GETMET R2 R2 K4 + 0xB8121000, // 0015 GETNGBL R4 K8 + 0x8C100909, // 0016 GETMET R4 R4 K9 + 0x5C180200, // 0017 MOVE R6 R1 + 0x7C100400, // 0018 CALL R4 2 + 0x00120E04, // 0019 ADD R4 K7 R4 + 0x5814000A, // 001A LDCONST R5 K10 + 0x7C080600, // 001B CALL R2 3 + 0x88080302, // 001C GETMBR R2 R1 K2 + 0x540E001F, // 001D LDINT R3 32 + 0x1C080403, // 001E EQ R2 R2 R3 + 0x780A0004, // 001F JMPF R2 #0025 + 0x8C08010B, // 0020 GETMET R2 R0 K11 + 0x5C100200, // 0021 MOVE R4 R1 + 0x7C080400, // 0022 CALL R2 2 + 0x80040400, // 0023 RET 1 R2 + 0x7002002B, // 0024 JMP #0051 + 0x88080302, // 0025 GETMBR R2 R1 K2 + 0x540E0021, // 0026 LDINT R3 34 + 0x1C080403, // 0027 EQ R2 R2 R3 + 0x780A0004, // 0028 JMPF R2 #002E + 0x8C08010C, // 0029 GETMET R2 R0 K12 + 0x5C100200, // 002A MOVE R4 R1 + 0x7C080400, // 002B CALL R2 2 + 0x80040400, // 002C RET 1 R2 + 0x70020022, // 002D JMP #0051 + 0x88080302, // 002E GETMBR R2 R1 K2 + 0x540E0023, // 002F LDINT R3 36 + 0x1C080403, // 0030 EQ R2 R2 R3 + 0x780A0004, // 0031 JMPF R2 #0037 + 0x8C08010D, // 0032 GETMET R2 R0 K13 + 0x5C100200, // 0033 MOVE R4 R1 + 0x7C080400, // 0034 CALL R2 2 + 0x80040400, // 0035 RET 1 R2 + 0x70020019, // 0036 JMP #0051 + 0x88080302, // 0037 GETMBR R2 R1 K2 + 0x540E002F, // 0038 LDINT R3 48 + 0x1C080403, // 0039 EQ R2 R2 R3 + 0x780A0004, // 003A JMPF R2 #0040 + 0x8C08010E, // 003B GETMET R2 R0 K14 + 0x5C100200, // 003C MOVE R4 R1 + 0x7C080400, // 003D CALL R2 2 + 0x80040400, // 003E RET 1 R2 + 0x70020010, // 003F JMP #0051 + 0x88080302, // 0040 GETMBR R2 R1 K2 + 0x540E0031, // 0041 LDINT R3 50 + 0x1C080403, // 0042 EQ R2 R2 R3 + 0x780A0004, // 0043 JMPF R2 #0049 + 0x8C08010F, // 0044 GETMET R2 R0 K15 + 0x5C100200, // 0045 MOVE R4 R1 + 0x7C080400, // 0046 CALL R2 2 + 0x80040400, // 0047 RET 1 R2 + 0x70020007, // 0048 JMP #0051 + 0x88080302, // 0049 GETMBR R2 R1 K2 + 0x540E003F, // 004A LDINT R3 64 + 0x1C080403, // 004B EQ R2 R2 R3 + 0x780A0003, // 004C JMPF R2 #0051 + 0x8C080110, // 004D GETMET R2 R0 K16 + 0x5C100200, // 004E MOVE R4 R1 + 0x7C080400, // 004F CALL R2 2 + 0x80040400, // 0050 RET 1 R2 + 0x50080000, // 0051 LDBOOL R2 0 0 + 0x80040400, // 0052 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_Commisioning_Context_every_second, /* 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(every_second), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: parse_Sigma3 ********************************************************************/ @@ -425,245 +1101,56 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */ /******************************************************************** -** Solidified function: find_fabric_by_destination_id +** Solidified function: add_session ********************************************************************/ -be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /* name */ +be_local_closure(Matter_Commisioning_Context_add_session, /* name */ be_nested_proto( - 14, /* nstack */ - 3, /* argc */ + 15, /* nstack */ + 7, /* 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(crypto), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20SEARCHING_X3A_X20destinationId_X3D), - /* K4 */ be_nested_str_weak(tohex), + /* K3 */ be_nested_str_weak(format), + /* K4 */ be_nested_str_weak(MTR_X3A_X20add_session_X20local_session_id_X3D_X25i_X20initiator_session_id_X3D_X25i), /* K5 */ be_const_int(3), /* K6 */ be_nested_str_weak(device), /* K7 */ be_nested_str_weak(sessions), - /* K8 */ be_nested_str_weak(fabrics), - /* K9 */ be_nested_str_weak(noc), - /* K10 */ be_nested_str_weak(fabric_id), - /* K11 */ be_nested_str_weak(device_id), - /* K12 */ be_nested_str_weak(get_ca_pub), - /* K13 */ be_nested_str_weak(get_ipk_group_key), - /* K14 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20destinationMessage_X3D), - /* K15 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20key_ipk_X3D), - /* K16 */ be_nested_str_weak(HMAC_SHA256), - /* K17 */ be_nested_str_weak(update), - /* K18 */ be_nested_str_weak(out), - /* K19 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D), - /* K20 */ be_nested_str_weak(stop_iteration), + /* K8 */ be_nested_str_weak(create_session), + /* K9 */ be_nested_str_weak(set_keys), }), - be_str_weak(find_fabric_by_destination_id), + be_str_weak(add_session), &be_const_str_solidified, - ( &(const binstruction[77]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x8C100902, // 0002 GETMET R4 R4 K2 - 0x8C180304, // 0003 GETMET R6 R1 K4 - 0x7C180200, // 0004 CALL R6 1 - 0x001A0606, // 0005 ADD R6 K3 R6 - 0x581C0005, // 0006 LDCONST R7 K5 - 0x7C100600, // 0007 CALL R4 3 - 0x60100010, // 0008 GETGBL R4 G16 - 0x88140106, // 0009 GETMBR R5 R0 K6 - 0x88140B07, // 000A GETMBR R5 R5 K7 - 0x88140B08, // 000B GETMBR R5 R5 K8 - 0x7C100200, // 000C CALL R4 1 - 0xA8020039, // 000D EXBLK 0 #0048 - 0x5C140800, // 000E MOVE R5 R4 - 0x7C140000, // 000F CALL R5 0 - 0x88180B09, // 0010 GETMBR R6 R5 K9 - 0x4C1C0000, // 0011 LDNIL R7 - 0x1C180C07, // 0012 EQ R6 R6 R7 - 0x741A0007, // 0013 JMPT R6 #001C - 0x88180B0A, // 0014 GETMBR R6 R5 K10 - 0x4C1C0000, // 0015 LDNIL R7 - 0x1C180C07, // 0016 EQ R6 R6 R7 - 0x741A0003, // 0017 JMPT R6 #001C - 0x88180B0B, // 0018 GETMBR R6 R5 K11 - 0x4C1C0000, // 0019 LDNIL R7 - 0x1C180C07, // 001A EQ R6 R6 R7 - 0x781A0000, // 001B JMPF R6 #001D - 0x7001FFF0, // 001C JMP #000E - 0x8C180B0C, // 001D GETMET R6 R5 K12 - 0x7C180200, // 001E CALL R6 1 - 0x00180406, // 001F ADD R6 R2 R6 - 0x881C0B0A, // 0020 GETMBR R7 R5 K10 - 0x00180C07, // 0021 ADD R6 R6 R7 - 0x881C0B0B, // 0022 GETMBR R7 R5 K11 - 0x00180C07, // 0023 ADD R6 R6 R7 - 0x8C1C0B0D, // 0024 GETMET R7 R5 K13 - 0x7C1C0200, // 0025 CALL R7 1 - 0xB8220200, // 0026 GETNGBL R8 K1 - 0x8C201102, // 0027 GETMET R8 R8 K2 - 0x8C280D04, // 0028 GETMET R10 R6 K4 - 0x7C280200, // 0029 CALL R10 1 - 0x002A1C0A, // 002A ADD R10 K14 R10 - 0x582C0005, // 002B LDCONST R11 K5 - 0x7C200600, // 002C CALL R8 3 - 0xB8220200, // 002D GETNGBL R8 K1 - 0x8C201102, // 002E GETMET R8 R8 K2 - 0x8C280F04, // 002F GETMET R10 R7 K4 - 0x7C280200, // 0030 CALL R10 1 - 0x002A1E0A, // 0031 ADD R10 K15 R10 - 0x542E0003, // 0032 LDINT R11 4 - 0x7C200600, // 0033 CALL R8 3 - 0x8C200710, // 0034 GETMET R8 R3 K16 - 0x5C280E00, // 0035 MOVE R10 R7 - 0x7C200400, // 0036 CALL R8 2 - 0x8C241111, // 0037 GETMET R9 R8 K17 - 0x5C2C0C00, // 0038 MOVE R11 R6 - 0x7C240400, // 0039 CALL R9 2 - 0x8C241112, // 003A GETMET R9 R8 K18 - 0x7C240200, // 003B CALL R9 1 - 0xB82A0200, // 003C GETNGBL R10 K1 - 0x8C281502, // 003D GETMET R10 R10 K2 - 0x8C301304, // 003E GETMET R12 R9 K4 - 0x7C300200, // 003F CALL R12 1 - 0x0032260C, // 0040 ADD R12 K19 R12 - 0x58340005, // 0041 LDCONST R13 K5 - 0x7C280600, // 0042 CALL R10 3 - 0x1C281201, // 0043 EQ R10 R9 R1 - 0x782A0001, // 0044 JMPF R10 #0047 - 0xA8040001, // 0045 EXBLK 1 1 - 0x80040A00, // 0046 RET 1 R5 - 0x7001FFC5, // 0047 JMP #000E - 0x58100014, // 0048 LDCONST R4 K20 - 0xAC100200, // 0049 CATCH R4 1 0 - 0xB0080000, // 004A RAISE 2 R0 R0 - 0x4C100000, // 004B LDNIL R4 - 0x80040800, // 004C RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_incoming -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_process_incoming, /* 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[17]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(is_commissioning_open), - /* K2 */ be_nested_str_weak(opcode), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(log), - /* K5 */ be_nested_str_weak(MTR_X3A_X20commissioning_X20not_X20open), - /* K6 */ be_const_int(2), - /* 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), - }), - be_str_weak(process_incoming), - &be_const_str_solidified, - ( &(const binstruction[83]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x740A000E, // 0003 JMPT R2 #0013 - 0x88080302, // 0004 GETMBR R2 R1 K2 - 0x540E001F, // 0005 LDINT R3 32 - 0x28080403, // 0006 GE R2 R2 R3 - 0x780A000A, // 0007 JMPF R2 #0013 - 0x88080302, // 0008 GETMBR R2 R1 K2 - 0x540E0023, // 0009 LDINT R3 36 - 0x18080403, // 000A LE R2 R2 R3 - 0x780A0006, // 000B JMPF R2 #0013 - 0xB80A0600, // 000C GETNGBL R2 K3 - 0x8C080504, // 000D GETMET R2 R2 K4 - 0x58100005, // 000E LDCONST R4 K5 - 0x58140006, // 000F LDCONST R5 K6 - 0x7C080600, // 0010 CALL R2 3 - 0x50080000, // 0011 LDBOOL R2 0 0 - 0x80040400, // 0012 RET 1 R2 - 0xB80A0600, // 0013 GETNGBL R2 K3 - 0x8C080504, // 0014 GETMET R2 R2 K4 - 0xB8121000, // 0015 GETNGBL R4 K8 - 0x8C100909, // 0016 GETMET R4 R4 K9 - 0x5C180200, // 0017 MOVE R6 R1 - 0x7C100400, // 0018 CALL R4 2 - 0x00120E04, // 0019 ADD R4 K7 R4 - 0x5814000A, // 001A LDCONST R5 K10 - 0x7C080600, // 001B CALL R2 3 - 0x88080302, // 001C GETMBR R2 R1 K2 - 0x540E001F, // 001D LDINT R3 32 - 0x1C080403, // 001E EQ R2 R2 R3 - 0x780A0004, // 001F JMPF R2 #0025 - 0x8C08010B, // 0020 GETMET R2 R0 K11 - 0x5C100200, // 0021 MOVE R4 R1 - 0x7C080400, // 0022 CALL R2 2 - 0x80040400, // 0023 RET 1 R2 - 0x7002002B, // 0024 JMP #0051 - 0x88080302, // 0025 GETMBR R2 R1 K2 - 0x540E0021, // 0026 LDINT R3 34 - 0x1C080403, // 0027 EQ R2 R2 R3 - 0x780A0004, // 0028 JMPF R2 #002E - 0x8C08010C, // 0029 GETMET R2 R0 K12 - 0x5C100200, // 002A MOVE R4 R1 - 0x7C080400, // 002B CALL R2 2 - 0x80040400, // 002C RET 1 R2 - 0x70020022, // 002D JMP #0051 - 0x88080302, // 002E GETMBR R2 R1 K2 - 0x540E0023, // 002F LDINT R3 36 - 0x1C080403, // 0030 EQ R2 R2 R3 - 0x780A0004, // 0031 JMPF R2 #0037 - 0x8C08010D, // 0032 GETMET R2 R0 K13 - 0x5C100200, // 0033 MOVE R4 R1 - 0x7C080400, // 0034 CALL R2 2 - 0x80040400, // 0035 RET 1 R2 - 0x70020019, // 0036 JMP #0051 - 0x88080302, // 0037 GETMBR R2 R1 K2 - 0x540E002F, // 0038 LDINT R3 48 - 0x1C080403, // 0039 EQ R2 R2 R3 - 0x780A0004, // 003A JMPF R2 #0040 - 0x8C08010E, // 003B GETMET R2 R0 K14 - 0x5C100200, // 003C MOVE R4 R1 - 0x7C080400, // 003D CALL R2 2 - 0x80040400, // 003E RET 1 R2 - 0x70020010, // 003F JMP #0051 - 0x88080302, // 0040 GETMBR R2 R1 K2 - 0x540E0031, // 0041 LDINT R3 50 - 0x1C080403, // 0042 EQ R2 R2 R3 - 0x780A0004, // 0043 JMPF R2 #0049 - 0x8C08010F, // 0044 GETMET R2 R0 K15 - 0x5C100200, // 0045 MOVE R4 R1 - 0x7C080400, // 0046 CALL R2 2 - 0x80040400, // 0047 RET 1 R2 - 0x70020007, // 0048 JMP #0051 - 0x88080302, // 0049 GETMBR R2 R1 K2 - 0x540E003F, // 004A LDINT R3 64 - 0x1C080403, // 004B EQ R2 R2 R3 - 0x780A0003, // 004C JMPF R2 #0051 - 0x8C080110, // 004D GETMET R2 R0 K16 - 0x5C100200, // 004E MOVE R4 R1 - 0x7C080400, // 004F CALL R2 2 - 0x80040400, // 0050 RET 1 R2 - 0x50080000, // 0051 LDBOOL R2 0 0 - 0x80040400, // 0052 RET 1 R2 + ( &(const binstruction[23]) { /* code */ + 0xA41E0000, // 0000 IMPORT R7 K0 + 0xB8220200, // 0001 GETNGBL R8 K1 + 0x8C201102, // 0002 GETMET R8 R8 K2 + 0x8C280F03, // 0003 GETMET R10 R7 K3 + 0x58300004, // 0004 LDCONST R12 K4 + 0x5C340200, // 0005 MOVE R13 R1 + 0x5C380400, // 0006 MOVE R14 R2 + 0x7C280800, // 0007 CALL R10 4 + 0x582C0005, // 0008 LDCONST R11 K5 + 0x7C200600, // 0009 CALL R8 3 + 0x88200106, // 000A GETMBR R8 R0 K6 + 0x88201107, // 000B GETMBR R8 R8 K7 + 0x8C201108, // 000C GETMET R8 R8 K8 + 0x5C280200, // 000D MOVE R10 R1 + 0x5C2C0400, // 000E MOVE R11 R2 + 0x7C200600, // 000F CALL R8 3 + 0x8C241109, // 0010 GETMET R9 R8 K9 + 0x5C2C0600, // 0011 MOVE R11 R3 + 0x5C300800, // 0012 MOVE R12 R4 + 0x5C340A00, // 0013 MOVE R13 R5 + 0x5C380C00, // 0014 MOVE R14 R6 + 0x7C240A00, // 0015 CALL R9 5 + 0x80000000, // 0016 RET 0 }) ) ); @@ -683,7 +1170,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[35]) { /* constants */ + ( &(const bvalue[34]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(opcode), /* K2 */ be_nested_str_weak(local_session_id), @@ -715,14 +1202,13 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ /* K28 */ be_nested_str_weak(I2RKey), /* K29 */ be_nested_str_weak(R2IKey), /* K30 */ be_nested_str_weak(AttestationChallenge), - /* K31 */ be_nested_str_weak(responder), - /* K32 */ be_nested_str_weak(add_session), - /* K33 */ be_nested_str_weak(future_local_session_id), - /* K34 */ be_nested_str_weak(future_initiator_session_id), + /* K31 */ be_nested_str_weak(add_session), + /* K32 */ be_nested_str_weak(future_local_session_id), + /* K33 */ be_nested_str_weak(future_initiator_session_id), }), be_str_weak(parse_Pake3), &be_const_str_solidified, - ( &(const binstruction[112]) { /* code */ + ( &(const binstruction[111]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x880C0301, // 0001 GETMBR R3 R1 K1 0x54120023, // 0002 LDINT R4 36 @@ -825,16 +1311,15 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ 0x58280003, // 0063 LDCONST R10 K3 0x502C0000, // 0064 LDBOOL R11 0 0 0x7C140C00, // 0065 CALL R5 6 - 0x8818011F, // 0066 GETMBR R6 R0 K31 - 0x8C180D20, // 0067 GETMET R6 R6 K32 - 0x88200121, // 0068 GETMBR R8 R0 K33 - 0x88240122, // 0069 GETMBR R9 R0 K34 - 0x8828011C, // 006A GETMBR R10 R0 K28 - 0x882C011D, // 006B GETMBR R11 R0 K29 - 0x8830011E, // 006C GETMBR R12 R0 K30 - 0x88340114, // 006D GETMBR R13 R0 K20 - 0x7C180E00, // 006E CALL R6 7 - 0x80000000, // 006F RET 0 + 0x8C18011F, // 0066 GETMET R6 R0 K31 + 0x88200120, // 0067 GETMBR R8 R0 K32 + 0x88240121, // 0068 GETMBR R9 R0 K33 + 0x8828011C, // 0069 GETMBR R10 R0 K28 + 0x882C011D, // 006A GETMBR R11 R0 K29 + 0x8830011E, // 006B GETMBR R12 R0 K30 + 0x88340114, // 006C GETMBR R13 R0 K20 + 0x7C180E00, // 006D CALL R6 7 + 0x80000000, // 006E RET 0 }) ) ); @@ -842,11 +1327,11 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake3, /* name */ /******************************************************************** -** Solidified function: parse_PBKDFParamRequest +** Solidified function: parse_StatusReport ********************************************************************/ -be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name */ +be_local_closure(Matter_Commisioning_Context_parse_StatusReport, /* name */ be_nested_proto( - 16, /* nstack */ + 7, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -854,227 +1339,34 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[52]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(opcode), - /* K3 */ be_nested_str_weak(local_session_id), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(protocol_id), - /* K6 */ be_nested_str_weak(tasmota), - /* K7 */ be_nested_str_weak(log), - /* K8 */ be_nested_str_weak(MTR_X3A_X20invalid_X20PBKDFParamRequest_X20message), - /* K9 */ be_const_int(2), - /* K10 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28General_X20Code_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20INVALID_PARAMETER_X29), - /* K11 */ be_nested_str_weak(send_status_report), - /* K12 */ be_const_int(1), - /* K13 */ be_nested_str_weak(matter), - /* K14 */ be_nested_str_weak(PBKDFParamRequest), - /* K15 */ be_nested_str_weak(parse), - /* K16 */ be_nested_str_weak(raw), - /* K17 */ be_nested_str_weak(app_payload_idx), - /* K18 */ be_nested_str_weak(session), - /* K19 */ be_nested_str_weak(set_mode_PASE), - /* K20 */ be_const_int(2147483647), - /* K21 */ be_nested_str_weak(passcodeId), - /* K22 */ be_nested_str_weak(MTR_X3A_X20non_X2Dzero_X20passcode_X20id), - /* K23 */ be_nested_str_weak(future_initiator_session_id), - /* K24 */ be_nested_str_weak(initiator_session_id), - /* K25 */ be_nested_str_weak(future_local_session_id), - /* K26 */ be_nested_str_weak(device), - /* K27 */ be_nested_str_weak(sessions), - /* K28 */ be_nested_str_weak(gen_local_session_id), - /* K29 */ be_nested_str_weak(format), - /* K30 */ be_nested_str_weak(MTR_X3A_X20_X2BSession_X20_X20_X20_X28_X256i_X29_X20from_X20_X27_X5B_X25s_X5D_X3A_X25i_X27), - /* K31 */ be_nested_str_weak(remote_ip), - /* K32 */ be_nested_str_weak(remote_port), - /* K33 */ be_nested_str_weak(PBKDFParamResponse), - /* K34 */ be_nested_str_weak(initiatorRandom), - /* K35 */ be_nested_str_weak(responderRandom), - /* K36 */ be_nested_str_weak(random), - /* K37 */ be_nested_str_weak(responderSessionId), - /* K38 */ be_nested_str_weak(pbkdf_parameters_salt), - /* K39 */ be_nested_str_weak(commissioning_salt), - /* K40 */ be_nested_str_weak(pbkdf_parameters_iterations), - /* K41 */ be_nested_str_weak(commissioning_iterations), - /* K42 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_X3A_X20), - /* K43 */ be_nested_str_weak(inspect), - /* K44 */ be_nested_str_weak(tlv2raw), - /* K45 */ be_nested_str_weak(MTR_X3A_X20pbkdfparamresp_raw_X3A_X20), - /* K46 */ be_nested_str_weak(tohex), - /* K47 */ be_nested_str_weak(build_response), - /* K48 */ be_nested_str_weak(encode_frame), - /* K49 */ be_nested_str_weak(responder), - /* K50 */ be_nested_str_weak(send_response), - /* K51 */ be_nested_str_weak(message_counter), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(session), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X20_X3D_X20), + /* K4 */ be_nested_str_weak(raw), + /* K5 */ be_nested_str_weak(app_payload_idx), + /* K6 */ be_const_int(2147483647), + /* K7 */ be_nested_str_weak(tohex), + /* K8 */ be_const_int(2), }), - be_str_weak(parse_PBKDFParamRequest), + be_str_weak(parse_StatusReport), &be_const_str_solidified, - ( &(const binstruction[140]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0x88100302, // 0002 GETMBR R4 R1 K2 - 0x5416001F, // 0003 LDINT R5 32 - 0x20100805, // 0004 NE R4 R4 R5 - 0x74120005, // 0005 JMPT R4 #000C - 0x88100303, // 0006 GETMBR R4 R1 K3 - 0x20100904, // 0007 NE R4 R4 K4 - 0x74120002, // 0008 JMPT R4 #000C - 0x88100305, // 0009 GETMBR R4 R1 K5 - 0x20100904, // 000A NE R4 R4 K4 - 0x78120012, // 000B JMPF R4 #001F - 0xB8120C00, // 000C GETNGBL R4 K6 - 0x8C100907, // 000D GETMET R4 R4 K7 - 0x58180008, // 000E LDCONST R6 K8 - 0x581C0009, // 000F LDCONST R7 K9 - 0x7C100600, // 0010 CALL R4 3 - 0xB8120C00, // 0011 GETNGBL R4 K6 - 0x8C100907, // 0012 GETMET R4 R4 K7 - 0x5818000A, // 0013 LDCONST R6 K10 - 0x581C0009, // 0014 LDCONST R7 K9 - 0x7C100600, // 0015 CALL R4 3 - 0x8C10010B, // 0016 GETMET R4 R0 K11 - 0x5C180200, // 0017 MOVE R6 R1 - 0x581C000C, // 0018 LDCONST R7 K12 - 0x58200004, // 0019 LDCONST R8 K4 - 0x58240009, // 001A LDCONST R9 K9 - 0x50280000, // 001B LDBOOL R10 0 0 - 0x7C100C00, // 001C CALL R4 6 - 0x50140000, // 001D LDBOOL R5 0 0 - 0x80040A00, // 001E RET 1 R5 - 0xB8121A00, // 001F GETNGBL R4 K13 - 0x8C10090E, // 0020 GETMET R4 R4 K14 - 0x7C100200, // 0021 CALL R4 1 - 0x8C10090F, // 0022 GETMET R4 R4 K15 - 0x88180310, // 0023 GETMBR R6 R1 K16 - 0x881C0311, // 0024 GETMBR R7 R1 K17 - 0x7C100600, // 0025 CALL R4 3 - 0x88140312, // 0026 GETMBR R5 R1 K18 - 0x8C140B13, // 0027 GETMET R5 R5 K19 - 0x7C140200, // 0028 CALL R5 1 - 0x88140311, // 0029 GETMBR R5 R1 K17 - 0x40140B14, // 002A CONNECT R5 R5 K20 - 0x88180310, // 002B GETMBR R6 R1 K16 - 0x94140C05, // 002C GETIDX R5 R6 R5 - 0x90021C05, // 002D SETMBR R0 K14 R5 - 0x88140915, // 002E GETMBR R5 R4 K21 - 0x20140B04, // 002F NE R5 R5 K4 - 0x78160012, // 0030 JMPF R5 #0044 - 0xB8160C00, // 0031 GETNGBL R5 K6 - 0x8C140B07, // 0032 GETMET R5 R5 K7 - 0x581C0016, // 0033 LDCONST R7 K22 - 0x58200009, // 0034 LDCONST R8 K9 - 0x7C140600, // 0035 CALL R5 3 - 0xB8160C00, // 0036 GETNGBL R5 K6 - 0x8C140B07, // 0037 GETMET R5 R5 K7 - 0x581C000A, // 0038 LDCONST R7 K10 - 0x58200009, // 0039 LDCONST R8 K9 - 0x7C140600, // 003A CALL R5 3 - 0x8C14010B, // 003B GETMET R5 R0 K11 - 0x5C1C0200, // 003C MOVE R7 R1 - 0x5820000C, // 003D LDCONST R8 K12 - 0x58240004, // 003E LDCONST R9 K4 - 0x58280009, // 003F LDCONST R10 K9 - 0x502C0000, // 0040 LDBOOL R11 0 0 - 0x7C140C00, // 0041 CALL R5 6 - 0x50180000, // 0042 LDBOOL R6 0 0 - 0x80040C00, // 0043 RET 1 R6 - 0x88140918, // 0044 GETMBR R5 R4 K24 - 0x90022E05, // 0045 SETMBR R0 K23 R5 - 0x8814011A, // 0046 GETMBR R5 R0 K26 - 0x88140B1B, // 0047 GETMBR R5 R5 K27 - 0x8C140B1C, // 0048 GETMET R5 R5 K28 - 0x7C140200, // 0049 CALL R5 1 - 0x90023205, // 004A SETMBR R0 K25 R5 - 0xB8160C00, // 004B GETNGBL R5 K6 - 0x8C140B07, // 004C GETMET R5 R5 K7 - 0x8C1C071D, // 004D GETMET R7 R3 K29 - 0x5824001E, // 004E LDCONST R9 K30 - 0x88280119, // 004F GETMBR R10 R0 K25 - 0x882C031F, // 0050 GETMBR R11 R1 K31 - 0x88300320, // 0051 GETMBR R12 R1 K32 - 0x7C1C0A00, // 0052 CALL R7 5 - 0x58200009, // 0053 LDCONST R8 K9 - 0x7C140600, // 0054 CALL R5 3 - 0xB8161A00, // 0055 GETNGBL R5 K13 - 0x8C140B21, // 0056 GETMET R5 R5 K33 - 0x7C140200, // 0057 CALL R5 1 - 0x88180922, // 0058 GETMBR R6 R4 K34 - 0x90164406, // 0059 SETMBR R5 K34 R6 - 0x8C180524, // 005A GETMET R6 R2 K36 - 0x5422001F, // 005B LDINT R8 32 - 0x7C180400, // 005C CALL R6 2 - 0x90164606, // 005D SETMBR R5 K35 R6 - 0x88180119, // 005E GETMBR R6 R0 K25 - 0x90164A06, // 005F SETMBR R5 K37 R6 - 0x8818011A, // 0060 GETMBR R6 R0 K26 - 0x88180D27, // 0061 GETMBR R6 R6 K39 - 0x90164C06, // 0062 SETMBR R5 K38 R6 - 0x8818011A, // 0063 GETMBR R6 R0 K26 - 0x88180D29, // 0064 GETMBR R6 R6 K41 - 0x90165006, // 0065 SETMBR R5 K40 R6 - 0xB81A0C00, // 0066 GETNGBL R6 K6 - 0x8C180D07, // 0067 GETMET R6 R6 K7 - 0x60200008, // 0068 GETGBL R8 G8 - 0xB8261A00, // 0069 GETNGBL R9 K13 - 0x8C24132B, // 006A GETMET R9 R9 K43 - 0x5C2C0A00, // 006B MOVE R11 R5 - 0x7C240400, // 006C CALL R9 2 - 0x7C200200, // 006D CALL R8 1 - 0x00225408, // 006E ADD R8 K42 R8 - 0x54260003, // 006F LDINT R9 4 - 0x7C180600, // 0070 CALL R6 3 - 0x8C180B2C, // 0071 GETMET R6 R5 K44 - 0x7C180200, // 0072 CALL R6 1 - 0xB81E0C00, // 0073 GETNGBL R7 K6 - 0x8C1C0F07, // 0074 GETMET R7 R7 K7 - 0x8C240D2E, // 0075 GETMET R9 R6 K46 - 0x7C240200, // 0076 CALL R9 1 - 0x00265A09, // 0077 ADD R9 K45 R9 - 0x542A0003, // 0078 LDINT R10 4 - 0x7C1C0600, // 0079 CALL R7 3 - 0x90024206, // 007A SETMBR R0 K33 R6 - 0x8C1C032F, // 007B GETMET R7 R1 K47 - 0x54260020, // 007C LDINT R9 33 - 0x50280200, // 007D LDBOOL R10 1 0 - 0x7C1C0600, // 007E CALL R7 3 - 0x8C200F30, // 007F GETMET R8 R7 K48 - 0x5C280C00, // 0080 MOVE R10 R6 - 0x7C200400, // 0081 CALL R8 2 - 0x88240131, // 0082 GETMBR R9 R0 K49 - 0x8C241332, // 0083 GETMET R9 R9 K50 - 0x5C2C1000, // 0084 MOVE R11 R8 - 0x8830031F, // 0085 GETMBR R12 R1 K31 - 0x88340320, // 0086 GETMBR R13 R1 K32 - 0x88380F33, // 0087 GETMBR R14 R7 K51 - 0x883C0312, // 0088 GETMBR R15 R1 K18 - 0x883C1F03, // 0089 GETMBR R15 R15 K3 - 0x7C240C00, // 008A CALL R9 6 - 0x80000000, // 008B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_every_second, /* 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(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + ( &(const binstruction[14]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0xB80E0200, // 0001 GETNGBL R3 K1 + 0x8C0C0702, // 0002 GETMET R3 R3 K2 + 0x88140305, // 0003 GETMBR R5 R1 K5 + 0x40140B06, // 0004 CONNECT R5 R5 K6 + 0x88180304, // 0005 GETMBR R6 R1 K4 + 0x94140C05, // 0006 GETIDX R5 R6 R5 + 0x8C140B07, // 0007 GETMET R5 R5 K7 + 0x7C140200, // 0008 CALL R5 1 + 0x00160605, // 0009 ADD R5 K3 R5 + 0x58180008, // 000A LDCONST R6 K8 + 0x7C0C0600, // 000B CALL R3 3 + 0x500C0200, // 000C LDBOOL R3 1 0 + 0x80040600, // 000D RET 1 R3 }) ) ); @@ -1665,243 +1957,6 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_StatusReport -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_parse_StatusReport, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(session), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X20_X3D_X20), - /* K4 */ be_nested_str_weak(raw), - /* K5 */ be_nested_str_weak(app_payload_idx), - /* K6 */ be_const_int(2147483647), - /* K7 */ be_nested_str_weak(tohex), - /* K8 */ be_const_int(2), - }), - be_str_weak(parse_StatusReport), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x88080300, // 0000 GETMBR R2 R1 K0 - 0xB80E0200, // 0001 GETNGBL R3 K1 - 0x8C0C0702, // 0002 GETMET R3 R3 K2 - 0x88140305, // 0003 GETMBR R5 R1 K5 - 0x40140B06, // 0004 CONNECT R5 R5 K6 - 0x88180304, // 0005 GETMBR R6 R1 K4 - 0x94140C05, // 0006 GETIDX R5 R6 R5 - 0x8C140B07, // 0007 GETMET R5 R5 K7 - 0x7C140200, // 0008 CALL R5 1 - 0x00160605, // 0009 ADD R5 K3 R5 - 0x58180008, // 000A LDCONST R6 K8 - 0x7C0C0600, // 000B CALL R3 3 - 0x500C0200, // 000C LDBOOL R3 1 0 - 0x80040600, // 000D RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_Pake1 -********************************************************************/ -be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ - be_nested_proto( - 17, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[48]) { /* constants */ - /* K0 */ be_nested_str_weak(crypto), - /* K1 */ be_nested_str_weak(opcode), - /* K2 */ be_nested_str_weak(local_session_id), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(protocol_id), - /* K5 */ be_nested_str_weak(tasmota), - /* K6 */ be_nested_str_weak(log), - /* K7 */ be_nested_str_weak(MTR_X3A_X20invalid_X20Pake1_X20message), - /* K8 */ be_const_int(2), - /* K9 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28General_X20Code_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20INVALID_PARAMETER_X29), - /* K10 */ be_nested_str_weak(send_status_report), - /* K11 */ be_const_int(1), - /* K12 */ be_nested_str_weak(matter), - /* K13 */ be_nested_str_weak(Pake1), - /* K14 */ be_nested_str_weak(parse), - /* K15 */ be_nested_str_weak(raw), - /* K16 */ be_nested_str_weak(app_payload_idx), - /* K17 */ be_nested_str_weak(pA), - /* K18 */ be_nested_str_weak(spake), - /* K19 */ be_nested_str_weak(SPAKE2P_Matter), - /* K20 */ be_nested_str_weak(device), - /* K21 */ be_nested_str_weak(commissioning_w0), - /* K22 */ be_nested_str_weak(commissioning_L), - /* K23 */ be_nested_str_weak(compute_pB), - /* K24 */ be_nested_str_weak(y), - /* K25 */ be_nested_str_weak(pB), - /* K26 */ be_nested_str_weak(compute_ZV_verifier), - /* K27 */ be_nested_str_weak(SHA256), - /* K28 */ be_nested_str_weak(update), - /* K29 */ be_nested_str_weak(fromstring), - /* K30 */ be_nested_str_weak(Matter_Context_Prefix), - /* K31 */ be_nested_str_weak(PBKDFParamRequest), - /* K32 */ be_nested_str_weak(PBKDFParamResponse), - /* K33 */ be_nested_str_weak(out), - /* K34 */ be_nested_str_weak(set_context), - /* K35 */ be_nested_str_weak(compute_TT_hash), - /* K36 */ be_nested_str_weak(cB), - /* K37 */ be_nested_str_weak(Ke), - /* K38 */ be_nested_str_weak(Pake2), - /* K39 */ be_nested_str_weak(tlv2raw), - /* K40 */ be_nested_str_weak(build_response), - /* K41 */ be_nested_str_weak(encode_frame), - /* K42 */ be_nested_str_weak(responder), - /* K43 */ be_nested_str_weak(send_response), - /* K44 */ be_nested_str_weak(remote_ip), - /* K45 */ be_nested_str_weak(remote_port), - /* K46 */ be_nested_str_weak(message_counter), - /* K47 */ be_nested_str_weak(session), - }), - be_str_weak(parse_Pake1), - &be_const_str_solidified, - ( &(const binstruction[118]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x880C0301, // 0001 GETMBR R3 R1 K1 - 0x54120021, // 0002 LDINT R4 34 - 0x200C0604, // 0003 NE R3 R3 R4 - 0x740E0005, // 0004 JMPT R3 #000B - 0x880C0302, // 0005 GETMBR R3 R1 K2 - 0x200C0703, // 0006 NE R3 R3 K3 - 0x740E0002, // 0007 JMPT R3 #000B - 0x880C0304, // 0008 GETMBR R3 R1 K4 - 0x200C0703, // 0009 NE R3 R3 K3 - 0x780E0012, // 000A JMPF R3 #001E - 0xB80E0A00, // 000B GETNGBL R3 K5 - 0x8C0C0706, // 000C GETMET R3 R3 K6 - 0x58140007, // 000D LDCONST R5 K7 - 0x58180008, // 000E LDCONST R6 K8 - 0x7C0C0600, // 000F CALL R3 3 - 0xB80E0A00, // 0010 GETNGBL R3 K5 - 0x8C0C0706, // 0011 GETMET R3 R3 K6 - 0x58140009, // 0012 LDCONST R5 K9 - 0x58180008, // 0013 LDCONST R6 K8 - 0x7C0C0600, // 0014 CALL R3 3 - 0x8C0C010A, // 0015 GETMET R3 R0 K10 - 0x5C140200, // 0016 MOVE R5 R1 - 0x5818000B, // 0017 LDCONST R6 K11 - 0x581C0003, // 0018 LDCONST R7 K3 - 0x58200008, // 0019 LDCONST R8 K8 - 0x50240000, // 001A LDBOOL R9 0 0 - 0x7C0C0C00, // 001B CALL R3 6 - 0x50100000, // 001C LDBOOL R4 0 0 - 0x80040800, // 001D RET 1 R4 - 0xB80E1800, // 001E GETNGBL R3 K12 - 0x8C0C070D, // 001F GETMET R3 R3 K13 - 0x7C0C0200, // 0020 CALL R3 1 - 0x8C0C070E, // 0021 GETMET R3 R3 K14 - 0x8814030F, // 0022 GETMBR R5 R1 K15 - 0x88180310, // 0023 GETMBR R6 R1 K16 - 0x7C0C0600, // 0024 CALL R3 3 - 0x88100711, // 0025 GETMBR R4 R3 K17 - 0x90022204, // 0026 SETMBR R0 K17 R4 - 0x8C100513, // 0027 GETMET R4 R2 K19 - 0x88180114, // 0028 GETMBR R6 R0 K20 - 0x88180D15, // 0029 GETMBR R6 R6 K21 - 0x4C1C0000, // 002A LDNIL R7 - 0x88200114, // 002B GETMBR R8 R0 K20 - 0x88201116, // 002C GETMBR R8 R8 K22 - 0x7C100800, // 002D CALL R4 4 - 0x90022404, // 002E SETMBR R0 K18 R4 - 0x88100112, // 002F GETMBR R4 R0 K18 - 0x8C100917, // 0030 GETMET R4 R4 K23 - 0x88180118, // 0031 GETMBR R6 R0 K24 - 0x7C100400, // 0032 CALL R4 2 - 0x88100112, // 0033 GETMBR R4 R0 K18 - 0x88100919, // 0034 GETMBR R4 R4 K25 - 0x90023204, // 0035 SETMBR R0 K25 R4 - 0x88100112, // 0036 GETMBR R4 R0 K18 - 0x8C10091A, // 0037 GETMET R4 R4 K26 - 0x88180111, // 0038 GETMBR R6 R0 K17 - 0x7C100400, // 0039 CALL R4 2 - 0x8C10051B, // 003A GETMET R4 R2 K27 - 0x7C100200, // 003B CALL R4 1 - 0x8C14091C, // 003C GETMET R5 R4 K28 - 0x601C0015, // 003D GETGBL R7 G21 - 0x7C1C0000, // 003E CALL R7 0 - 0x8C1C0F1D, // 003F GETMET R7 R7 K29 - 0x8824011E, // 0040 GETMBR R9 R0 K30 - 0x7C1C0400, // 0041 CALL R7 2 - 0x7C140400, // 0042 CALL R5 2 - 0x8C14091C, // 0043 GETMET R5 R4 K28 - 0x881C011F, // 0044 GETMBR R7 R0 K31 - 0x7C140400, // 0045 CALL R5 2 - 0x8C14091C, // 0046 GETMET R5 R4 K28 - 0x881C0120, // 0047 GETMBR R7 R0 K32 - 0x7C140400, // 0048 CALL R5 2 - 0x8C140921, // 0049 GETMET R5 R4 K33 - 0x7C140200, // 004A CALL R5 1 - 0x88180112, // 004B GETMBR R6 R0 K18 - 0x881C0111, // 004C GETMBR R7 R0 K17 - 0x901A2207, // 004D SETMBR R6 K17 R7 - 0x88180112, // 004E GETMBR R6 R0 K18 - 0x8C180D22, // 004F GETMET R6 R6 K34 - 0x5C200A00, // 0050 MOVE R8 R5 - 0x7C180400, // 0051 CALL R6 2 - 0x88180112, // 0052 GETMBR R6 R0 K18 - 0x8C180D23, // 0053 GETMET R6 R6 K35 - 0x50200200, // 0054 LDBOOL R8 1 0 - 0x7C180400, // 0055 CALL R6 2 - 0x88180112, // 0056 GETMBR R6 R0 K18 - 0x88180D24, // 0057 GETMBR R6 R6 K36 - 0x90024806, // 0058 SETMBR R0 K36 R6 - 0x88180112, // 0059 GETMBR R6 R0 K18 - 0x88180D25, // 005A GETMBR R6 R6 K37 - 0x90024A06, // 005B SETMBR R0 K37 R6 - 0xB81A1800, // 005C GETNGBL R6 K12 - 0x8C180D26, // 005D GETMET R6 R6 K38 - 0x7C180200, // 005E CALL R6 1 - 0x881C0119, // 005F GETMBR R7 R0 K25 - 0x901A3207, // 0060 SETMBR R6 K25 R7 - 0x881C0124, // 0061 GETMBR R7 R0 K36 - 0x901A4807, // 0062 SETMBR R6 K36 R7 - 0x8C1C0D27, // 0063 GETMET R7 R6 K39 - 0x7C1C0200, // 0064 CALL R7 1 - 0x8C200328, // 0065 GETMET R8 R1 K40 - 0x542A0022, // 0066 LDINT R10 35 - 0x502C0200, // 0067 LDBOOL R11 1 0 - 0x7C200600, // 0068 CALL R8 3 - 0x8C241129, // 0069 GETMET R9 R8 K41 - 0x5C2C0E00, // 006A MOVE R11 R7 - 0x7C240400, // 006B CALL R9 2 - 0x8828012A, // 006C GETMBR R10 R0 K42 - 0x8C28152B, // 006D GETMET R10 R10 K43 - 0x5C301200, // 006E MOVE R12 R9 - 0x8834032C, // 006F GETMBR R13 R1 K44 - 0x8838032D, // 0070 GETMBR R14 R1 K45 - 0x883C112E, // 0071 GETMBR R15 R8 K46 - 0x8840032F, // 0072 GETMBR R16 R1 K47 - 0x88402102, // 0073 GETMBR R16 R16 K2 - 0x7C280C00, // 0074 CALL R10 6 - 0x80000000, // 0075 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: send_status_report ********************************************************************/ @@ -1977,45 +2032,46 @@ be_local_closure(Matter_Commisioning_Context_send_status_report, /* name */ be_local_class(Matter_Commisioning_Context, 20, NULL, - be_nested_map(37, + be_nested_map(38, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(Matter_Commisioning_Context_init_closure) }, - { be_const_key_weak(S2K_Info, 5), be_nested_str_weak(Sigma2) }, - { be_const_key_weak(cB, 1), be_const_var(11) }, - { be_const_key_weak(parse_Sigma3, 23), be_const_closure(Matter_Commisioning_Context_parse_Sigma3_closure) }, - { be_const_key_weak(future_local_session_id, -1), be_const_var(4) }, - { be_const_key_weak(SEKeys_Info, -1), be_nested_str_weak(SessionKeys) }, - { be_const_key_weak(ResponderEph_priv, -1), be_const_var(13) }, - { be_const_key_weak(Ke, 18), be_const_var(12) }, - { be_const_key_weak(PBKDFParamResponse, 25), be_const_var(6) }, - { be_const_key_weak(process_incoming, 36), be_const_closure(Matter_Commisioning_Context_process_incoming_closure) }, - { be_const_key_weak(future_initiator_session_id, -1), be_const_var(3) }, - { be_const_key_weak(y, -1), be_const_var(7) }, - { be_const_key_weak(I2RKey, -1), be_const_var(17) }, - { be_const_key_weak(responder, 34), be_const_var(0) }, - { be_const_key_weak(pA, 33), be_const_var(8) }, - { be_const_key_weak(TBEData2_Nonce, -1), be_nested_str_weak(NCASE_Sigma2N) }, - { be_const_key_weak(find_fabric_by_destination_id, -1), be_const_closure(Matter_Commisioning_Context_find_fabric_by_destination_id_closure) }, - { be_const_key_weak(device, -1), be_const_var(1) }, - { be_const_key_weak(parse_Pake1, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake1_closure) }, - { be_const_key_weak(parse_Pake3, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake3_closure) }, - { be_const_key_weak(cA, 29), be_const_var(10) }, - { be_const_key_weak(ResponderEph_pub, 9), be_const_var(14) }, - { be_const_key_weak(parse_PBKDFParamRequest, 6), be_const_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest_closure) }, - { be_const_key_weak(parse_StatusReport, -1), be_const_closure(Matter_Commisioning_Context_parse_StatusReport_closure) }, - { be_const_key_weak(Matter_Context_Prefix, -1), be_nested_str_weak(CHIP_X20PAKE_X20V1_X20Commissioning) }, - { be_const_key_weak(pB, 21), be_const_var(9) }, - { be_const_key_weak(TBEData3_Nonce, -1), be_nested_str_weak(NCASE_Sigma3N) }, - { be_const_key_weak(S3K_Info, 26), be_nested_str_weak(Sigma3) }, - { be_const_key_weak(parse_Sigma1, -1), be_const_closure(Matter_Commisioning_Context_parse_Sigma1_closure) }, - { be_const_key_weak(created, -1), be_const_var(16) }, - { be_const_key_weak(PBKDFParamRequest, -1), be_const_var(5) }, - { be_const_key_weak(every_second, 7), be_const_closure(Matter_Commisioning_Context_every_second_closure) }, { be_const_key_weak(send_status_report, -1), be_const_closure(Matter_Commisioning_Context_send_status_report_closure) }, - { be_const_key_weak(AttestationChallenge, -1), be_const_var(19) }, - { be_const_key_weak(R2IKey, 35), be_const_var(18) }, - { be_const_key_weak(initiatorEph_pub, -1), be_const_var(15) }, - { be_const_key_weak(spake, -1), be_const_var(2) }, + { be_const_key_weak(cB, -1), be_const_var(11) }, + { be_const_key_weak(TBEData3_Nonce, 37), be_nested_str_weak(NCASE_Sigma3N) }, + { be_const_key_weak(find_fabric_by_destination_id, -1), be_const_closure(Matter_Commisioning_Context_find_fabric_by_destination_id_closure) }, + { be_const_key_weak(parse_Sigma1, 3), be_const_closure(Matter_Commisioning_Context_parse_Sigma1_closure) }, + { be_const_key_weak(responder, -1), be_const_var(0) }, + { be_const_key_weak(parse_PBKDFParamRequest, -1), be_const_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest_closure) }, + { be_const_key_weak(parse_Pake1, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake1_closure) }, + { be_const_key_weak(process_incoming, -1), be_const_closure(Matter_Commisioning_Context_process_incoming_closure) }, + { be_const_key_weak(future_initiator_session_id, 2), be_const_var(3) }, + { be_const_key_weak(cA, -1), be_const_var(10) }, + { be_const_key_weak(parse_Sigma3, -1), be_const_closure(Matter_Commisioning_Context_parse_Sigma3_closure) }, + { be_const_key_weak(ResponderEph_priv, -1), be_const_var(13) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Commisioning_Context_init_closure) }, + { be_const_key_weak(parse_StatusReport, -1), be_const_closure(Matter_Commisioning_Context_parse_StatusReport_closure) }, + { be_const_key_weak(device, 8), be_const_var(1) }, + { be_const_key_weak(PBKDFParamResponse, -1), be_const_var(6) }, + { be_const_key_weak(future_local_session_id, 18), be_const_var(4) }, + { be_const_key_weak(pB, 11), be_const_var(9) }, + { be_const_key_weak(add_session, -1), be_const_closure(Matter_Commisioning_Context_add_session_closure) }, + { be_const_key_weak(Ke, -1), be_const_var(12) }, + { be_const_key_weak(SEKeys_Info, -1), be_nested_str_weak(SessionKeys) }, + { be_const_key_weak(S2K_Info, -1), be_nested_str_weak(Sigma2) }, + { be_const_key_weak(created, 26), be_const_var(16) }, + { be_const_key_weak(AttestationChallenge, 21), be_const_var(19) }, + { be_const_key_weak(R2IKey, 20), be_const_var(18) }, + { be_const_key_weak(parse_Pake3, -1), be_const_closure(Matter_Commisioning_Context_parse_Pake3_closure) }, + { be_const_key_weak(S3K_Info, -1), be_nested_str_weak(Sigma3) }, + { be_const_key_weak(pA, 16), be_const_var(8) }, + { be_const_key_weak(Matter_Context_Prefix, 14), be_nested_str_weak(CHIP_X20PAKE_X20V1_X20Commissioning) }, + { be_const_key_weak(PBKDFParamRequest, -1), be_const_var(5) }, + { be_const_key_weak(every_second, 10), be_const_closure(Matter_Commisioning_Context_every_second_closure) }, + { be_const_key_weak(TBEData2_Nonce, -1), be_nested_str_weak(NCASE_Sigma2N) }, + { be_const_key_weak(initiatorEph_pub, 4), be_const_var(15) }, + { be_const_key_weak(y, -1), be_const_var(7) }, + { be_const_key_weak(spake, 0), be_const_var(2) }, + { be_const_key_weak(ResponderEph_pub, 1), be_const_var(14) }, + { be_const_key_weak(I2RKey, -1), be_const_var(17) }, })), be_str_weak(Matter_Commisioning_Context) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h index a26d995dc..7003773cb 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h @@ -219,7 +219,7 @@ be_local_closure(Matter_Frame_encrypt, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[28]) { /* constants */ + ( &(const bvalue[17]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(raw), /* K2 */ be_nested_str_weak(session), @@ -234,24 +234,13 @@ be_local_closure(Matter_Frame_encrypt, /* name */ /* K11 */ be_nested_str_weak(is_CASE), /* K12 */ be_nested_str_weak(get_device_id), /* K13 */ be_nested_str_weak(resize), - /* K14 */ be_nested_str_weak(tasmota), - /* K15 */ be_nested_str_weak(log), - /* K16 */ be_nested_str_weak(MTR_X3A_X20cleartext_X3A_X20), - /* K17 */ be_nested_str_weak(tohex), - /* K18 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K19 */ be_nested_str_weak(MTR_X3A_X20r2i_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K20 */ be_nested_str_weak(MTR_X3A_X20p_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K21 */ be_nested_str_weak(MTR_X3A_X20a_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K22 */ be_nested_str_weak(MTR_X3A_X20n_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K23 */ be_nested_str_weak(AES_CCM), - /* K24 */ be_nested_str_weak(encrypt), - /* K25 */ be_nested_str_weak(tag), - /* K26 */ be_nested_str_weak(MTR_X3A_X20ciphertext_X20_X20_X3D), - /* K27 */ be_nested_str_weak(MTR_X3A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K14 */ be_nested_str_weak(AES_CCM), + /* K15 */ be_nested_str_weak(encrypt), + /* K16 */ be_nested_str_weak(tag), }), be_str_weak(encrypt), &be_const_str_solidified, - ( &(const binstruction[122]) { /* code */ + ( &(const binstruction[57]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x88080101, // 0001 GETMBR R2 R0 K1 0x880C0102, // 0002 GETMBR R3 R0 K2 @@ -286,94 +275,29 @@ be_local_closure(Matter_Frame_encrypt, /* name */ 0x8C200F0D, // 001F GETMET R8 R7 K13 0x542A000C, // 0020 LDINT R10 13 0x7C200400, // 0021 CALL R8 2 - 0xB8221C00, // 0022 GETNGBL R8 K14 - 0x8C20110F, // 0023 GETMET R8 R8 K15 - 0x88280101, // 0024 GETMBR R10 R0 K1 - 0x8C281511, // 0025 GETMET R10 R10 K17 - 0x7C280200, // 0026 CALL R10 1 - 0x002A200A, // 0027 ADD R10 K16 R10 - 0x542E0003, // 0028 LDINT R11 4 - 0x7C200600, // 0029 CALL R8 3 - 0xB8221C00, // 002A GETNGBL R8 K14 - 0x8C20110F, // 002B GETMET R8 R8 K15 - 0x58280012, // 002C LDCONST R10 K18 - 0x542E0003, // 002D LDINT R11 4 - 0x7C200600, // 002E CALL R8 3 - 0xB8221C00, // 002F GETNGBL R8 K14 - 0x8C20110F, // 0030 GETMET R8 R8 K15 - 0x8C280911, // 0031 GETMET R10 R4 K17 - 0x7C280200, // 0032 CALL R10 1 - 0x002A260A, // 0033 ADD R10 K19 R10 - 0x542E0003, // 0034 LDINT R11 4 - 0x7C200600, // 0035 CALL R8 3 - 0xB8221C00, // 0036 GETNGBL R8 K14 - 0x8C20110F, // 0037 GETMET R8 R8 K15 - 0x8C280D11, // 0038 GETMET R10 R6 K17 - 0x7C280200, // 0039 CALL R10 1 - 0x002A280A, // 003A ADD R10 K20 R10 - 0x542E0003, // 003B LDINT R11 4 - 0x7C200600, // 003C CALL R8 3 - 0xB8221C00, // 003D GETNGBL R8 K14 - 0x8C20110F, // 003E GETMET R8 R8 K15 - 0x8C280B11, // 003F GETMET R10 R5 K17 - 0x7C280200, // 0040 CALL R10 1 - 0x002A2A0A, // 0041 ADD R10 K21 R10 - 0x542E0003, // 0042 LDINT R11 4 - 0x7C200600, // 0043 CALL R8 3 - 0xB8221C00, // 0044 GETNGBL R8 K14 - 0x8C20110F, // 0045 GETMET R8 R8 K15 - 0x8C280F11, // 0046 GETMET R10 R7 K17 - 0x7C280200, // 0047 CALL R10 1 - 0x002A2C0A, // 0048 ADD R10 K22 R10 - 0x542E0003, // 0049 LDINT R11 4 - 0x7C200600, // 004A CALL R8 3 - 0x8C200317, // 004B GETMET R8 R1 K23 - 0x5C280800, // 004C MOVE R10 R4 - 0x5C2C0E00, // 004D MOVE R11 R7 - 0x5C300A00, // 004E MOVE R12 R5 - 0x6034000C, // 004F GETGBL R13 G12 - 0x5C380C00, // 0050 MOVE R14 R6 - 0x7C340200, // 0051 CALL R13 1 - 0x543A000F, // 0052 LDINT R14 16 - 0x7C200C00, // 0053 CALL R8 6 - 0x8C241118, // 0054 GETMET R9 R8 K24 - 0x5C2C0C00, // 0055 MOVE R11 R6 - 0x7C240400, // 0056 CALL R9 2 - 0x8C281119, // 0057 GETMET R10 R8 K25 - 0x7C280200, // 0058 CALL R10 1 - 0xB82E1C00, // 0059 GETNGBL R11 K14 - 0x8C2C170F, // 005A GETMET R11 R11 K15 - 0x58340012, // 005B LDCONST R13 K18 - 0x543A0003, // 005C LDINT R14 4 - 0x7C2C0600, // 005D CALL R11 3 - 0xB82E1C00, // 005E GETNGBL R11 K14 - 0x8C2C170F, // 005F GETMET R11 R11 K15 - 0x8C341311, // 0060 GETMET R13 R9 K17 - 0x7C340200, // 0061 CALL R13 1 - 0x0036340D, // 0062 ADD R13 K26 R13 - 0x543A0003, // 0063 LDINT R14 4 - 0x7C2C0600, // 0064 CALL R11 3 - 0xB82E1C00, // 0065 GETNGBL R11 K14 - 0x8C2C170F, // 0066 GETMET R11 R11 K15 - 0x8C341511, // 0067 GETMET R13 R10 K17 - 0x7C340200, // 0068 CALL R13 1 - 0x0036360D, // 0069 ADD R13 K27 R13 - 0x543A0003, // 006A LDINT R14 4 - 0x7C2C0600, // 006B CALL R11 3 - 0xB82E1C00, // 006C GETNGBL R11 K14 - 0x8C2C170F, // 006D GETMET R11 R11 K15 - 0x58340012, // 006E LDCONST R13 K18 - 0x543A0003, // 006F LDINT R14 4 - 0x7C2C0600, // 0070 CALL R11 3 - 0x882C0101, // 0071 GETMBR R11 R0 K1 - 0x8C2C170D, // 0072 GETMET R11 R11 K13 - 0x88340105, // 0073 GETMBR R13 R0 K5 - 0x7C2C0400, // 0074 CALL R11 2 - 0x882C0101, // 0075 GETMBR R11 R0 K1 - 0x402C1609, // 0076 CONNECT R11 R11 R9 - 0x882C0101, // 0077 GETMBR R11 R0 K1 - 0x402C160A, // 0078 CONNECT R11 R11 R10 - 0x80000000, // 0079 RET 0 + 0x8C20030E, // 0022 GETMET R8 R1 K14 + 0x5C280800, // 0023 MOVE R10 R4 + 0x5C2C0E00, // 0024 MOVE R11 R7 + 0x5C300A00, // 0025 MOVE R12 R5 + 0x6034000C, // 0026 GETGBL R13 G12 + 0x5C380C00, // 0027 MOVE R14 R6 + 0x7C340200, // 0028 CALL R13 1 + 0x543A000F, // 0029 LDINT R14 16 + 0x7C200C00, // 002A CALL R8 6 + 0x8C24110F, // 002B GETMET R9 R8 K15 + 0x5C2C0C00, // 002C MOVE R11 R6 + 0x7C240400, // 002D CALL R9 2 + 0x8C281110, // 002E GETMET R10 R8 K16 + 0x7C280200, // 002F CALL R10 1 + 0x882C0101, // 0030 GETMBR R11 R0 K1 + 0x8C2C170D, // 0031 GETMET R11 R11 K13 + 0x88340105, // 0032 GETMBR R13 R0 K5 + 0x7C2C0400, // 0033 CALL R11 2 + 0x882C0101, // 0034 GETMBR R11 R0 K1 + 0x402C1609, // 0035 CONNECT R11 R11 R9 + 0x882C0101, // 0036 GETMBR R11 R0 K1 + 0x402C160A, // 0037 CONNECT R11 R11 R10 + 0x80000000, // 0038 RET 0 }) ) ); @@ -393,7 +317,7 @@ be_local_closure(Matter_Frame_debug, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ + ( &(const bvalue[ 9]) { /* constants */ /* K0 */ be_nested_str_weak(matter), /* K1 */ be_nested_str_weak(Frame), /* K2 */ be_nested_str_weak(message_handler), @@ -403,7 +327,6 @@ be_local_closure(Matter_Frame_debug, /* name */ /* K6 */ be_nested_str_weak(log), /* K7 */ be_nested_str_weak(MTR_X3A_X20sending_X20decode_X3A_X20), /* K8 */ be_nested_str_weak(inspect), - /* K9 */ be_const_int(3), }), be_str_weak(debug), &be_const_str_solidified, @@ -424,7 +347,7 @@ be_local_closure(Matter_Frame_debug, /* name */ 0x5C1C0400, // 000D MOVE R7 R2 0x7C140400, // 000E CALL R5 2 0x00160E05, // 000F ADD R5 K7 R5 - 0x58180009, // 0010 LDCONST R6 K9 + 0x541A0003, // 0010 LDINT R6 4 0x7C0C0600, // 0011 CALL R3 3 0x80000000, // 0012 RET 0 }) @@ -1116,7 +1039,7 @@ be_local_closure(Matter_Frame_decrypt, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[36]) { /* constants */ + ( &(const bvalue[27]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(session), /* K2 */ be_nested_str_weak(raw), @@ -1139,24 +1062,15 @@ be_local_closure(Matter_Frame_decrypt, /* name */ /* K19 */ be_nested_str_weak(source_node_id), /* K20 */ be_nested_str_weak(peer_node_id), /* K21 */ be_nested_str_weak(resize), - /* K22 */ be_nested_str_weak(tasmota), - /* K23 */ be_nested_str_weak(log), - /* K24 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A), - /* K25 */ be_nested_str_weak(MTR_X3A_X20i2r_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K26 */ be_nested_str_weak(tohex), - /* K27 */ be_nested_str_weak(MTR_X3A_X20p_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K28 */ be_nested_str_weak(MTR_X3A_X20a_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K29 */ be_nested_str_weak(MTR_X3A_X20n_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K30 */ be_nested_str_weak(MTR_X3A_X20mic_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K31 */ be_nested_str_weak(AES_CCM), - /* K32 */ be_nested_str_weak(tag), - /* K33 */ be_nested_str_weak(MTR_X3A_X20cleartext_X20_X20_X20_X3D), - /* K34 */ be_nested_str_weak(MTR_X3A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K35 */ be_nested_str_weak(MTR_X3A_X20rejected_X20packet_X20due_X20to_X20invalid_X20MIC), + /* K22 */ be_nested_str_weak(AES_CCM), + /* K23 */ be_nested_str_weak(tag), + /* K24 */ be_nested_str_weak(tasmota), + /* K25 */ be_nested_str_weak(log), + /* K26 */ be_nested_str_weak(MTR_X3A_X20rejected_X20packet_X20due_X20to_X20invalid_X20MIC), }), be_str_weak(decrypt), &be_const_str_solidified, - ( &(const binstruction[165]) { /* code */ + ( &(const binstruction[101]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x88080101, // 0001 GETMBR R2 R0 K1 0x880C0102, // 0002 GETMBR R3 R0 K2 @@ -1234,94 +1148,30 @@ be_local_closure(Matter_Frame_decrypt, /* name */ 0x8C241115, // 004A GETMET R9 R8 K21 0x542E000C, // 004B LDINT R11 13 0x7C240400, // 004C CALL R9 2 - 0xB8262C00, // 004D GETNGBL R9 K22 - 0x8C241317, // 004E GETMET R9 R9 K23 - 0x582C0018, // 004F LDCONST R11 K24 - 0x54320003, // 0050 LDINT R12 4 - 0x7C240600, // 0051 CALL R9 3 - 0xB8262C00, // 0052 GETNGBL R9 K22 - 0x8C241317, // 0053 GETMET R9 R9 K23 - 0x8C2C0B1A, // 0054 GETMET R11 R5 K26 - 0x7C2C0200, // 0055 CALL R11 1 - 0x002E320B, // 0056 ADD R11 K25 R11 - 0x54320003, // 0057 LDINT R12 4 - 0x7C240600, // 0058 CALL R9 3 - 0xB8262C00, // 0059 GETNGBL R9 K22 - 0x8C241317, // 005A GETMET R9 R9 K23 - 0x8C2C0F1A, // 005B GETMET R11 R7 K26 - 0x7C2C0200, // 005C CALL R11 1 - 0x002E360B, // 005D ADD R11 K27 R11 - 0x54320003, // 005E LDINT R12 4 - 0x7C240600, // 005F CALL R9 3 - 0xB8262C00, // 0060 GETNGBL R9 K22 - 0x8C241317, // 0061 GETMET R9 R9 K23 - 0x8C2C0D1A, // 0062 GETMET R11 R6 K26 - 0x7C2C0200, // 0063 CALL R11 1 - 0x002E380B, // 0064 ADD R11 K28 R11 - 0x54320003, // 0065 LDINT R12 4 - 0x7C240600, // 0066 CALL R9 3 - 0xB8262C00, // 0067 GETNGBL R9 K22 - 0x8C241317, // 0068 GETMET R9 R9 K23 - 0x8C2C111A, // 0069 GETMET R11 R8 K26 - 0x7C2C0200, // 006A CALL R11 1 - 0x002E3A0B, // 006B ADD R11 K29 R11 - 0x54320003, // 006C LDINT R12 4 - 0x7C240600, // 006D CALL R9 3 - 0xB8262C00, // 006E GETNGBL R9 K22 - 0x8C241317, // 006F GETMET R9 R9 K23 - 0x8C2C091A, // 0070 GETMET R11 R4 K26 - 0x7C2C0200, // 0071 CALL R11 1 - 0x002E3C0B, // 0072 ADD R11 K30 R11 - 0x54320003, // 0073 LDINT R12 4 - 0x7C240600, // 0074 CALL R9 3 - 0x8C24031F, // 0075 GETMET R9 R1 K31 - 0x5C2C0A00, // 0076 MOVE R11 R5 - 0x5C301000, // 0077 MOVE R12 R8 - 0x5C340C00, // 0078 MOVE R13 R6 - 0x6038000C, // 0079 GETGBL R14 G12 - 0x5C3C0E00, // 007A MOVE R15 R7 - 0x7C380200, // 007B CALL R14 1 - 0x543E000F, // 007C LDINT R15 16 - 0x7C240C00, // 007D CALL R9 6 - 0x8C28130C, // 007E GETMET R10 R9 K12 - 0x5C300E00, // 007F MOVE R12 R7 - 0x7C280400, // 0080 CALL R10 2 - 0x8C2C1320, // 0081 GETMET R11 R9 K32 - 0x7C2C0200, // 0082 CALL R11 1 - 0xB8322C00, // 0083 GETNGBL R12 K22 - 0x8C301917, // 0084 GETMET R12 R12 K23 - 0x58380018, // 0085 LDCONST R14 K24 - 0x543E0003, // 0086 LDINT R15 4 - 0x7C300600, // 0087 CALL R12 3 - 0xB8322C00, // 0088 GETNGBL R12 K22 - 0x8C301917, // 0089 GETMET R12 R12 K23 - 0x8C38151A, // 008A GETMET R14 R10 K26 - 0x7C380200, // 008B CALL R14 1 - 0x003A420E, // 008C ADD R14 K33 R14 - 0x543E0003, // 008D LDINT R15 4 - 0x7C300600, // 008E CALL R12 3 - 0xB8322C00, // 008F GETNGBL R12 K22 - 0x8C301917, // 0090 GETMET R12 R12 K23 - 0x8C38171A, // 0091 GETMET R14 R11 K26 - 0x7C380200, // 0092 CALL R14 1 - 0x003A440E, // 0093 ADD R14 K34 R14 - 0x543E0003, // 0094 LDINT R15 4 - 0x7C300600, // 0095 CALL R12 3 - 0xB8322C00, // 0096 GETNGBL R12 K22 - 0x8C301917, // 0097 GETMET R12 R12 K23 - 0x58380018, // 0098 LDCONST R14 K24 - 0x543E0003, // 0099 LDINT R15 4 - 0x7C300600, // 009A CALL R12 3 - 0x20301604, // 009B NE R12 R11 R4 - 0x78320006, // 009C JMPF R12 #00A4 - 0xB8322C00, // 009D GETNGBL R12 K22 - 0x8C301917, // 009E GETMET R12 R12 K23 - 0x58380023, // 009F LDCONST R14 K35 - 0x583C000F, // 00A0 LDCONST R15 K15 - 0x7C300600, // 00A1 CALL R12 3 - 0x4C300000, // 00A2 LDNIL R12 - 0x80041800, // 00A3 RET 1 R12 - 0x80041400, // 00A4 RET 1 R10 + 0x8C240316, // 004D GETMET R9 R1 K22 + 0x5C2C0A00, // 004E MOVE R11 R5 + 0x5C301000, // 004F MOVE R12 R8 + 0x5C340C00, // 0050 MOVE R13 R6 + 0x6038000C, // 0051 GETGBL R14 G12 + 0x5C3C0E00, // 0052 MOVE R15 R7 + 0x7C380200, // 0053 CALL R14 1 + 0x543E000F, // 0054 LDINT R15 16 + 0x7C240C00, // 0055 CALL R9 6 + 0x8C28130C, // 0056 GETMET R10 R9 K12 + 0x5C300E00, // 0057 MOVE R12 R7 + 0x7C280400, // 0058 CALL R10 2 + 0x8C2C1317, // 0059 GETMET R11 R9 K23 + 0x7C2C0200, // 005A CALL R11 1 + 0x20301604, // 005B NE R12 R11 R4 + 0x78320006, // 005C JMPF R12 #0064 + 0xB8323000, // 005D GETNGBL R12 K24 + 0x8C301919, // 005E GETMET R12 R12 K25 + 0x5838001A, // 005F LDCONST R14 K26 + 0x583C000F, // 0060 LDCONST R15 K15 + 0x7C300600, // 0061 CALL R12 3 + 0x4C300000, // 0062 LDNIL R12 + 0x80041800, // 0063 RET 1 R12 + 0x80041400, // 0064 RET 1 R10 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h index 69c227180..768802837 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h @@ -6,6 +6,112 @@ extern const bclass be_class_Matter_MessageHandler; +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_MessageHandler_every_second, /* 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(commissioning), + /* K1 */ be_nested_str_weak(every_second), + /* K2 */ be_nested_str_weak(im), + }), + be_str_weak(every_second), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* 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 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +be_local_closure(Matter_MessageHandler_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(im), + /* K1 */ be_nested_str_weak(every_250ms), + }), + 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: init +********************************************************************/ +be_local_closure(Matter_MessageHandler_init, /* 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[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(commissioning), + /* K2 */ be_nested_str_weak(matter), + /* K3 */ be_nested_str_weak(Commisioning_Context), + /* K4 */ be_nested_str_weak(im), + /* K5 */ be_nested_str_weak(IM), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0xB80A0400, // 0001 GETNGBL R2 K2 + 0x8C080503, // 0002 GETMET R2 R2 K3 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C080400, // 0004 CALL R2 2 + 0x90020202, // 0005 SETMBR R0 K1 R2 + 0xB80A0400, // 0006 GETNGBL R2 K2 + 0x8C080505, // 0007 GETMET R2 R2 K5 + 0x5C100200, // 0008 MOVE R4 R1 + 0x7C080400, // 0009 CALL R2 2 + 0x90020802, // 000A SETMBR R0 K4 R2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: msg_received ********************************************************************/ @@ -483,169 +589,6 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: every_250ms -********************************************************************/ -be_local_closure(Matter_MessageHandler_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(im), - /* K1 */ be_nested_str_weak(every_250ms), - }), - 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: every_second -********************************************************************/ -be_local_closure(Matter_MessageHandler_every_second, /* 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(commissioning), - /* K1 */ be_nested_str_weak(every_second), - /* K2 */ be_nested_str_weak(im), - }), - be_str_weak(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* 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 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_MessageHandler_init, /* 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[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(commissioning), - /* K2 */ be_nested_str_weak(matter), - /* K3 */ be_nested_str_weak(Commisioning_Context), - /* K4 */ be_nested_str_weak(im), - /* K5 */ be_nested_str_weak(IM), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0xB80A0400, // 0001 GETNGBL R2 K2 - 0x8C080503, // 0002 GETMET R2 R2 K3 - 0x5C100000, // 0003 MOVE R4 R0 - 0x7C080400, // 0004 CALL R2 2 - 0x90020202, // 0005 SETMBR R0 K1 R2 - 0xB80A0400, // 0006 GETNGBL R2 K2 - 0x8C080505, // 0007 GETMET R2 R2 K5 - 0x5C100200, // 0008 MOVE R4 R1 - 0x7C080400, // 0009 CALL R2 2 - 0x90020802, // 000A SETMBR R0 K4 R2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_session -********************************************************************/ -be_local_closure(Matter_MessageHandler_add_session, /* name */ - be_nested_proto( - 15, /* nstack */ - 7, /* 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(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_X20add_session_X20local_session_id_X3D_X25i_X20initiator_session_id_X3D_X25i), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(device), - /* K7 */ be_nested_str_weak(sessions), - /* K8 */ be_nested_str_weak(create_session), - /* K9 */ be_nested_str_weak(set_keys), - }), - be_str_weak(add_session), - &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0xA41E0000, // 0000 IMPORT R7 K0 - 0xB8220200, // 0001 GETNGBL R8 K1 - 0x8C201102, // 0002 GETMET R8 R8 K2 - 0x8C280F03, // 0003 GETMET R10 R7 K3 - 0x58300004, // 0004 LDCONST R12 K4 - 0x5C340200, // 0005 MOVE R13 R1 - 0x5C380400, // 0006 MOVE R14 R2 - 0x7C280800, // 0007 CALL R10 4 - 0x582C0005, // 0008 LDCONST R11 K5 - 0x7C200600, // 0009 CALL R8 3 - 0x88200106, // 000A GETMBR R8 R0 K6 - 0x88201107, // 000B GETMBR R8 R8 K7 - 0x8C201108, // 000C GETMET R8 R8 K8 - 0x5C280200, // 000D MOVE R10 R1 - 0x5C2C0400, // 000E MOVE R11 R2 - 0x7C200600, // 000F CALL R8 3 - 0x8C241109, // 0010 GETMET R9 R8 K9 - 0x5C2C0600, // 0011 MOVE R11 R3 - 0x5C300800, // 0012 MOVE R12 R4 - 0x5C340A00, // 0013 MOVE R13 R5 - 0x5C380C00, // 0014 MOVE R14 R6 - 0x7C240A00, // 0015 CALL R9 5 - 0x80000000, // 0016 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: send_response ********************************************************************/ @@ -687,17 +630,16 @@ be_local_closure(Matter_MessageHandler_send_response, /* name */ be_local_class(Matter_MessageHandler, 3, NULL, - be_nested_map(9, + be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(send_response, 5), be_const_closure(Matter_MessageHandler_send_response_closure) }, - { be_const_key_weak(msg_received, -1), be_const_closure(Matter_MessageHandler_msg_received_closure) }, - { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_MessageHandler_every_250ms_closure) }, - { be_const_key_weak(commissioning, 8), be_const_var(1) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_MessageHandler_init_closure) }, - { be_const_key_weak(device, 4), be_const_var(0) }, - { be_const_key_weak(im, 0), be_const_var(2) }, - { be_const_key_weak(add_session, -1), be_const_closure(Matter_MessageHandler_add_session_closure) }, + { be_const_key_weak(commissioning, 5), be_const_var(1) }, { be_const_key_weak(every_second, -1), be_const_closure(Matter_MessageHandler_every_second_closure) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_MessageHandler_every_250ms_closure) }, + { be_const_key_weak(device, 4), be_const_var(0) }, + { be_const_key_weak(im, 6), be_const_var(2) }, + { be_const_key_weak(msg_received, 2), be_const_closure(Matter_MessageHandler_msg_received_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_MessageHandler_init_closure) }, + { be_const_key_weak(send_response, -1), be_const_closure(Matter_MessageHandler_send_response_closure) }, })), be_str_weak(Matter_MessageHandler) ); 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 02c9c2805..dac3fc7df 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h @@ -6,143 +6,6 @@ extern const bclass be_class_Matter_Plugin; -/******************************************************************** -** Solidified function: consolidate_clusters -********************************************************************/ -be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - 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(real_super), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ), - }), - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(CLUSTERS), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(contains), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(consolidate_clusters), - &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ - 0x84040000, // 0000 CLOSURE R1 P0 - 0x60080013, // 0001 GETGBL R2 G19 - 0x7C080000, // 0002 CALL R2 0 - 0x5C0C0000, // 0003 MOVE R3 R0 - 0x4C100000, // 0004 LDNIL R4 - 0x20100604, // 0005 NE R4 R3 R4 - 0x7812002C, // 0006 JMPF R4 #0034 - 0x88100700, // 0007 GETMBR R4 R3 K0 - 0x60140010, // 0008 GETGBL R5 G16 - 0x8C180901, // 0009 GETMET R6 R4 K1 - 0x7C180200, // 000A CALL R6 1 - 0x7C140200, // 000B CALL R5 1 - 0xA802001E, // 000C EXBLK 0 #002C - 0x5C180A00, // 000D MOVE R6 R5 - 0x7C180000, // 000E CALL R6 0 - 0x8C1C0502, // 000F GETMET R7 R2 K2 - 0x5C240C00, // 0010 MOVE R9 R6 - 0x7C1C0400, // 0011 CALL R7 2 - 0x741E0002, // 0012 JMPT R7 #0016 - 0x601C0012, // 0013 GETGBL R7 G18 - 0x7C1C0000, // 0014 CALL R7 0 - 0x98080C07, // 0015 SETIDX R2 R6 R7 - 0x601C0010, // 0016 GETGBL R7 G16 - 0x94200806, // 0017 GETIDX R8 R4 R6 - 0x7C1C0200, // 0018 CALL R7 1 - 0xA802000D, // 0019 EXBLK 0 #0028 - 0x5C200E00, // 001A MOVE R8 R7 - 0x7C200000, // 001B CALL R8 0 - 0x94240406, // 001C GETIDX R9 R2 R6 - 0x8C241303, // 001D GETMET R9 R9 K3 - 0x5C2C1000, // 001E MOVE R11 R8 - 0x7C240400, // 001F CALL R9 2 - 0x4C280000, // 0020 LDNIL R10 - 0x1C24120A, // 0021 EQ R9 R9 R10 - 0x78260003, // 0022 JMPF R9 #0027 - 0x94240406, // 0023 GETIDX R9 R2 R6 - 0x8C241304, // 0024 GETMET R9 R9 K4 - 0x5C2C1000, // 0025 MOVE R11 R8 - 0x7C240400, // 0026 CALL R9 2 - 0x7001FFF1, // 0027 JMP #001A - 0x581C0005, // 0028 LDCONST R7 K5 - 0xAC1C0200, // 0029 CATCH R7 1 0 - 0xB0080000, // 002A RAISE 2 R0 R0 - 0x7001FFE0, // 002B JMP #000D - 0x58140005, // 002C LDCONST R5 K5 - 0xAC140200, // 002D CATCH R5 1 0 - 0xB0080000, // 002E RAISE 2 R0 R0 - 0x5C140200, // 002F MOVE R5 R1 - 0x5C180600, // 0030 MOVE R6 R3 - 0x7C140200, // 0031 CALL R5 1 - 0x5C0C0A00, // 0032 MOVE R3 R5 - 0x7001FFCF, // 0033 JMP #0004 - 0x80040400, // 0034 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_init, /* name */ - be_nested_proto( - 5, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(endpoint), - /* K2 */ be_nested_str_weak(clusters), - /* K3 */ be_nested_str_weak(consolidate_clusters), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 6]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x8C0C0103, // 0002 GETMET R3 R0 K3 - 0x7C0C0200, // 0003 CALL R3 1 - 0x90020403, // 0004 SETMBR R0 K2 R3 - 0x80000000, // 0005 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -321,6 +184,137 @@ be_local_closure(Matter_Plugin_has, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: consolidate_clusters +********************************************************************/ +be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ + be_nested_proto( + 12, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + 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(real_super), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ), + }), + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(CLUSTERS), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(contains), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(consolidate_clusters), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* code */ + 0x84040000, // 0000 CLOSURE R1 P0 + 0x60080013, // 0001 GETGBL R2 G19 + 0x7C080000, // 0002 CALL R2 0 + 0x5C0C0000, // 0003 MOVE R3 R0 + 0x4C100000, // 0004 LDNIL R4 + 0x20100604, // 0005 NE R4 R3 R4 + 0x7812002C, // 0006 JMPF R4 #0034 + 0x88100700, // 0007 GETMBR R4 R3 K0 + 0x60140010, // 0008 GETGBL R5 G16 + 0x8C180901, // 0009 GETMET R6 R4 K1 + 0x7C180200, // 000A CALL R6 1 + 0x7C140200, // 000B CALL R5 1 + 0xA802001E, // 000C EXBLK 0 #002C + 0x5C180A00, // 000D MOVE R6 R5 + 0x7C180000, // 000E CALL R6 0 + 0x8C1C0502, // 000F GETMET R7 R2 K2 + 0x5C240C00, // 0010 MOVE R9 R6 + 0x7C1C0400, // 0011 CALL R7 2 + 0x741E0002, // 0012 JMPT R7 #0016 + 0x601C0012, // 0013 GETGBL R7 G18 + 0x7C1C0000, // 0014 CALL R7 0 + 0x98080C07, // 0015 SETIDX R2 R6 R7 + 0x601C0010, // 0016 GETGBL R7 G16 + 0x94200806, // 0017 GETIDX R8 R4 R6 + 0x7C1C0200, // 0018 CALL R7 1 + 0xA802000D, // 0019 EXBLK 0 #0028 + 0x5C200E00, // 001A MOVE R8 R7 + 0x7C200000, // 001B CALL R8 0 + 0x94240406, // 001C GETIDX R9 R2 R6 + 0x8C241303, // 001D GETMET R9 R9 K3 + 0x5C2C1000, // 001E MOVE R11 R8 + 0x7C240400, // 001F CALL R9 2 + 0x4C280000, // 0020 LDNIL R10 + 0x1C24120A, // 0021 EQ R9 R9 R10 + 0x78260003, // 0022 JMPF R9 #0027 + 0x94240406, // 0023 GETIDX R9 R2 R6 + 0x8C241304, // 0024 GETMET R9 R9 K4 + 0x5C2C1000, // 0025 MOVE R11 R8 + 0x7C240400, // 0026 CALL R9 2 + 0x7001FFF1, // 0027 JMP #001A + 0x581C0005, // 0028 LDCONST R7 K5 + 0xAC1C0200, // 0029 CATCH R7 1 0 + 0xB0080000, // 002A RAISE 2 R0 R0 + 0x7001FFE0, // 002B JMP #000D + 0x58140005, // 002C LDCONST R5 K5 + 0xAC140200, // 002D CATCH R5 1 0 + 0xB0080000, // 002E RAISE 2 R0 R0 + 0x5C140200, // 002F MOVE R5 R1 + 0x5C180600, // 0030 MOVE R6 R3 + 0x7C140200, // 0031 CALL R5 1 + 0x5C0C0A00, // 0032 MOVE R3 R5 + 0x7001FFCF, // 0033 JMP #0004 + 0x80040400, // 0034 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_Plugin_every_second, /* 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(every_second), + &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: subscribe_attribute ********************************************************************/ @@ -347,9 +341,34 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */ /******************************************************************** -** Solidified function: every_second +** Solidified function: subscribe_event ********************************************************************/ -be_local_closure(Matter_Plugin_every_second, /* name */ +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: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_update_shadow, /* name */ be_nested_proto( 1, /* nstack */ 1, /* argc */ @@ -360,7 +379,7 @@ be_local_closure(Matter_Plugin_every_second, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(every_second), + be_str_weak(update_shadow), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ 0x80000000, // 0000 RET 0 @@ -370,6 +389,117 @@ be_local_closure(Matter_Plugin_every_second, /* 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: 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: write_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_write_attribute, /* 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(write_attribute), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(endpoint), + /* K2 */ be_nested_str_weak(clusters), + /* K3 */ be_nested_str_weak(consolidate_clusters), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 6]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x8C0C0103, // 0002 GETMET R3 R0 K3 + 0x7C0C0200, // 0003 CALL R3 1 + 0x90020403, // 0004 SETMBR R0 K2 R3 + 0x80000000, // 0005 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: timed_request ********************************************************************/ @@ -395,6 +525,39 @@ be_local_closure(Matter_Plugin_timed_request, /* name */ /*******************************************************************/ +/******************************************************************** +** 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: get_cluster_list ********************************************************************/ @@ -442,45 +605,12 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */ /******************************************************************** -** Solidified function: get_attribute_list +** Solidified function: parse_sensors ********************************************************************/ -be_local_closure(Matter_Plugin_get_attribute_list, /* name */ +be_local_closure(Matter_Plugin_parse_sensors, /* 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: read_event -********************************************************************/ -be_local_closure(Matter_Plugin_read_event, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -488,11 +618,10 @@ be_local_closure(Matter_Plugin_read_event, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(read_event), + be_str_weak(parse_sensors), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -500,34 +629,9 @@ be_local_closure(Matter_Plugin_read_event, /* name */ /******************************************************************** -** Solidified function: subscribe_event +** Solidified function: invoke_request ********************************************************************/ -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: write_attribute -********************************************************************/ -be_local_closure(Matter_Plugin_write_attribute, /* name */ +be_local_closure(Matter_Plugin_invoke_request, /* name */ be_nested_proto( 5, /* nstack */ 4, /* argc */ @@ -538,7 +642,7 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(write_attribute), + be_str_weak(invoke_request), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C100000, // 0000 LDNIL R4 @@ -588,105 +692,32 @@ be_local_closure(Matter_Plugin_attribute_updated, /* name */ /*******************************************************************/ -/******************************************************************** -** 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: 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: 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 class: Matter_Plugin ********************************************************************/ be_local_class(Matter_Plugin, 3, NULL, - be_nested_map(20, + be_nested_map(21, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(clusters, -1), be_const_var(2) }, { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) }, - { be_const_key_weak(timed_request, 1), be_const_closure(Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(get_cluster_list, 3), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, - { be_const_key_weak(endpoint, -1), be_const_var(1) }, - { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) }, - { be_const_key_weak(device, -1), be_const_var(0) }, - { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) }, { be_const_key_weak(attribute_updated, 18), be_const_closure(Matter_Plugin_attribute_updated_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) }, + { be_const_key_weak(subscribe_attribute, 1), 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(device, -1), be_const_var(0) }, + { be_const_key_weak(update_shadow, 17), be_const_closure(Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) }, + { be_const_key_weak(has, 8), be_const_closure(Matter_Plugin_has_closure) }, + { be_const_key_weak(parse_sensors, 13), be_const_closure(Matter_Plugin_parse_sensors_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) }, + { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) }, + { be_const_key_weak(timed_request, 9), be_const_closure(Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(read_event, 11), be_const_closure(Matter_Plugin_read_event_closure) }, + { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, + { be_const_key_weak(CLUSTERS, 20), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -700,11 +731,9 @@ be_local_class(Matter_Plugin, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(init, 13), be_const_closure(Matter_Plugin_init_closure) }, - { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(write_attribute, 19), 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(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) }, + { be_const_key_weak(clusters, -1), be_const_var(2) }, + { be_const_key_weak(endpoint, -1), be_const_var(1) }, })), be_str_weak(Matter_Plugin) ); 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 new file mode 100644 index 000000000..40809e95f --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h @@ -0,0 +1,453 @@ +/* Solidification of Matter_Plugin_Light0.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Light0; + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_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[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(3), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(U2), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(U1), + /* K11 */ be_nested_str_weak(U4), + /* K12 */ be_nested_str_weak(BOOL), + /* K13 */ be_nested_str_weak(shadow_onoff), + /* K14 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[126]) { /* 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 + 0x1C1C0B05, // 0005 EQ R7 R5 K5 + 0x781E0021, // 0006 JMPF R7 #0029 + 0x1C1C0D06, // 0007 EQ R7 R6 K6 + 0x781E0005, // 0008 JMPF R7 #000F + 0x8C1C0907, // 0009 GETMET R7 R4 K7 + 0x88240908, // 000A GETMBR R9 R4 K8 + 0x58280006, // 000B LDCONST R10 K6 + 0x7C1C0600, // 000C CALL R7 3 + 0x80040E00, // 000D RET 1 R7 + 0x70020018, // 000E JMP #0028 + 0x1C1C0D09, // 000F EQ R7 R6 K9 + 0x781E0005, // 0010 JMPF R7 #0017 + 0x8C1C0907, // 0011 GETMET R7 R4 K7 + 0x8824090A, // 0012 GETMBR R9 R4 K10 + 0x58280006, // 0013 LDCONST R10 K6 + 0x7C1C0600, // 0014 CALL R7 3 + 0x80040E00, // 0015 RET 1 R7 + 0x70020010, // 0016 JMP #0028 + 0x541EFFFB, // 0017 LDINT R7 65532 + 0x1C1C0C07, // 0018 EQ R7 R6 R7 + 0x781E0005, // 0019 JMPF R7 #0020 + 0x8C1C0907, // 001A GETMET R7 R4 K7 + 0x8824090B, // 001B GETMBR R9 R4 K11 + 0x58280006, // 001C LDCONST R10 K6 + 0x7C1C0600, // 001D CALL R7 3 + 0x80040E00, // 001E RET 1 R7 + 0x70020007, // 001F JMP #0028 + 0x541EFFFC, // 0020 LDINT R7 65533 + 0x1C1C0C07, // 0021 EQ R7 R6 R7 + 0x781E0004, // 0022 JMPF R7 #0028 + 0x8C1C0907, // 0023 GETMET R7 R4 K7 + 0x8824090B, // 0024 GETMBR R9 R4 K11 + 0x542A0003, // 0025 LDINT R10 4 + 0x7C1C0600, // 0026 CALL R7 3 + 0x80040E00, // 0027 RET 1 R7 + 0x70020053, // 0028 JMP #007D + 0x541E0003, // 0029 LDINT R7 4 + 0x1C1C0A07, // 002A EQ R7 R5 R7 + 0x781E0016, // 002B JMPF R7 #0043 + 0x1C1C0D06, // 002C EQ R7 R6 K6 + 0x781E0002, // 002D JMPF R7 #0031 + 0x4C1C0000, // 002E LDNIL R7 + 0x80040E00, // 002F RET 1 R7 + 0x70020010, // 0030 JMP #0042 + 0x541EFFFB, // 0031 LDINT R7 65532 + 0x1C1C0C07, // 0032 EQ R7 R6 R7 + 0x781E0005, // 0033 JMPF R7 #003A + 0x8C1C0907, // 0034 GETMET R7 R4 K7 + 0x8824090B, // 0035 GETMBR R9 R4 K11 + 0x58280006, // 0036 LDCONST R10 K6 + 0x7C1C0600, // 0037 CALL R7 3 + 0x80040E00, // 0038 RET 1 R7 + 0x70020007, // 0039 JMP #0042 + 0x541EFFFC, // 003A LDINT R7 65533 + 0x1C1C0C07, // 003B EQ R7 R6 R7 + 0x781E0004, // 003C JMPF R7 #0042 + 0x8C1C0907, // 003D GETMET R7 R4 K7 + 0x8824090B, // 003E GETMBR R9 R4 K11 + 0x542A0003, // 003F LDINT R10 4 + 0x7C1C0600, // 0040 CALL R7 3 + 0x80040E00, // 0041 RET 1 R7 + 0x70020039, // 0042 JMP #007D + 0x541E0004, // 0043 LDINT R7 5 + 0x1C1C0A07, // 0044 EQ R7 R5 R7 + 0x781E0011, // 0045 JMPF R7 #0058 + 0x541EFFFB, // 0046 LDINT R7 65532 + 0x1C1C0C07, // 0047 EQ R7 R6 R7 + 0x781E0005, // 0048 JMPF R7 #004F + 0x8C1C0907, // 0049 GETMET R7 R4 K7 + 0x8824090B, // 004A GETMBR R9 R4 K11 + 0x58280006, // 004B LDCONST R10 K6 + 0x7C1C0600, // 004C CALL R7 3 + 0x80040E00, // 004D RET 1 R7 + 0x70020007, // 004E JMP #0057 + 0x541EFFFC, // 004F LDINT R7 65533 + 0x1C1C0C07, // 0050 EQ R7 R6 R7 + 0x781E0004, // 0051 JMPF R7 #0057 + 0x8C1C0907, // 0052 GETMET R7 R4 K7 + 0x8824090B, // 0053 GETMBR R9 R4 K11 + 0x542A0003, // 0054 LDINT R10 4 + 0x7C1C0600, // 0055 CALL R7 3 + 0x80040E00, // 0056 RET 1 R7 + 0x70020024, // 0057 JMP #007D + 0x541E0005, // 0058 LDINT R7 6 + 0x1C1C0A07, // 0059 EQ R7 R5 R7 + 0x781E0019, // 005A JMPF R7 #0075 + 0x1C1C0D06, // 005B EQ R7 R6 K6 + 0x781E0005, // 005C JMPF R7 #0063 + 0x8C1C0907, // 005D GETMET R7 R4 K7 + 0x8824090C, // 005E GETMBR R9 R4 K12 + 0x8828010D, // 005F GETMBR R10 R0 K13 + 0x7C1C0600, // 0060 CALL R7 3 + 0x80040E00, // 0061 RET 1 R7 + 0x70020010, // 0062 JMP #0074 + 0x541EFFFB, // 0063 LDINT R7 65532 + 0x1C1C0C07, // 0064 EQ R7 R6 R7 + 0x781E0005, // 0065 JMPF R7 #006C + 0x8C1C0907, // 0066 GETMET R7 R4 K7 + 0x8824090B, // 0067 GETMBR R9 R4 K11 + 0x58280006, // 0068 LDCONST R10 K6 + 0x7C1C0600, // 0069 CALL R7 3 + 0x80040E00, // 006A RET 1 R7 + 0x70020007, // 006B JMP #0074 + 0x541EFFFC, // 006C LDINT R7 65533 + 0x1C1C0C07, // 006D EQ R7 R6 R7 + 0x781E0004, // 006E JMPF R7 #0074 + 0x8C1C0907, // 006F GETMET R7 R4 K7 + 0x8824090B, // 0070 GETMBR R9 R4 K11 + 0x542A0003, // 0071 LDINT R10 4 + 0x7C1C0600, // 0072 CALL R7 3 + 0x80040E00, // 0073 RET 1 R7 + 0x70020007, // 0074 JMP #007D + 0x601C0003, // 0075 GETGBL R7 G3 + 0x5C200000, // 0076 MOVE R8 R0 + 0x7C1C0200, // 0077 CALL R7 1 + 0x8C1C0F0E, // 0078 GETMET R7 R7 K14 + 0x5C240200, // 0079 MOVE R9 R1 + 0x5C280400, // 007A MOVE R10 R2 + 0x7C1C0600, // 007B CALL R7 3 + 0x80040E00, // 007C RET 1 R7 + 0x80000000, // 007D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(get), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(power), + /* K4 */ be_nested_str_weak(shadow_onoff), + /* K5 */ be_nested_str_weak(attribute_updated), + /* K6 */ be_const_int(0), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* 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 + 0x78120005, // 0009 JMPF R4 #0010 + 0x8C100105, // 000A GETMET R4 R0 K5 + 0x4C180000, // 000B LDNIL R6 + 0x541E0005, // 000C LDINT R7 6 + 0x58200006, // 000D LDCONST R8 K6 + 0x7C100800, // 000E CALL R4 4 + 0x90020803, // 000F SETMBR R0 K4 R3 + 0x80000000, // 0010 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_invoke_request, /* 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[16]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(command), + /* K5 */ be_const_int(3), + /* K6 */ be_const_int(0), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(Matter_TLV_struct), + /* K9 */ be_nested_str_weak(add_TLV), + /* K10 */ be_nested_str_weak(U2), + /* K11 */ be_nested_str_weak(set), + /* K12 */ be_nested_str_weak(power), + /* K13 */ be_nested_str_weak(update_shadow), + /* K14 */ be_const_int(2), + /* K15 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[87]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0xB8160200, // 0001 GETNGBL R5 K1 + 0x88140B02, // 0002 GETMBR R5 R5 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x881C0704, // 0004 GETMBR R7 R3 K4 + 0x1C200D05, // 0005 EQ R8 R6 K5 + 0x78220016, // 0006 JMPF R8 #001E + 0x1C200F06, // 0007 EQ R8 R7 K6 + 0x78220002, // 0008 JMPF R8 #000C + 0x50200200, // 0009 LDBOOL R8 1 0 + 0x80041000, // 000A RET 1 R8 + 0x70020010, // 000B JMP #001D + 0x1C200F07, // 000C EQ R8 R7 K7 + 0x78220009, // 000D JMPF R8 #0018 + 0x8C200B08, // 000E GETMET R8 R5 K8 + 0x7C200200, // 000F CALL R8 1 + 0x8C241109, // 0010 GETMET R9 R8 K9 + 0x582C0006, // 0011 LDCONST R11 K6 + 0x88300B0A, // 0012 GETMBR R12 R5 K10 + 0x58340006, // 0013 LDCONST R13 K6 + 0x7C240800, // 0014 CALL R9 4 + 0x900E0906, // 0015 SETMBR R3 K4 K6 + 0x80041000, // 0016 RET 1 R8 + 0x70020004, // 0017 JMP #001D + 0x5422003F, // 0018 LDINT R8 64 + 0x1C200E08, // 0019 EQ R8 R7 R8 + 0x78220001, // 001A JMPF R8 #001D + 0x50200200, // 001B LDBOOL R8 1 0 + 0x80041000, // 001C RET 1 R8 + 0x70020037, // 001D JMP #0056 + 0x54220003, // 001E LDINT R8 4 + 0x1C200C08, // 001F EQ R8 R6 R8 + 0x78220002, // 0020 JMPF R8 #0024 + 0x50200200, // 0021 LDBOOL R8 1 0 + 0x80041000, // 0022 RET 1 R8 + 0x70020031, // 0023 JMP #0056 + 0x54220004, // 0024 LDINT R8 5 + 0x1C200C08, // 0025 EQ R8 R6 R8 + 0x78220002, // 0026 JMPF R8 #002A + 0x50200200, // 0027 LDBOOL R8 1 0 + 0x80041000, // 0028 RET 1 R8 + 0x7002002B, // 0029 JMP #0056 + 0x54220005, // 002A LDINT R8 6 + 0x1C200C08, // 002B EQ R8 R6 R8 + 0x78220028, // 002C JMPF R8 #0056 + 0x1C200F06, // 002D EQ R8 R7 K6 + 0x7822000A, // 002E JMPF R8 #003A + 0x8C20090B, // 002F GETMET R8 R4 K11 + 0x60280013, // 0030 GETGBL R10 G19 + 0x7C280000, // 0031 CALL R10 0 + 0x502C0000, // 0032 LDBOOL R11 0 0 + 0x982A180B, // 0033 SETIDX R10 K12 R11 + 0x7C200400, // 0034 CALL R8 2 + 0x8C20010D, // 0035 GETMET R8 R0 K13 + 0x7C200200, // 0036 CALL R8 1 + 0x50200200, // 0037 LDBOOL R8 1 0 + 0x80041000, // 0038 RET 1 R8 + 0x7002001B, // 0039 JMP #0056 + 0x1C200F07, // 003A EQ R8 R7 K7 + 0x7822000A, // 003B JMPF R8 #0047 + 0x8C20090B, // 003C GETMET R8 R4 K11 + 0x60280013, // 003D GETGBL R10 G19 + 0x7C280000, // 003E CALL R10 0 + 0x502C0200, // 003F LDBOOL R11 1 0 + 0x982A180B, // 0040 SETIDX R10 K12 R11 + 0x7C200400, // 0041 CALL R8 2 + 0x8C20010D, // 0042 GETMET R8 R0 K13 + 0x7C200200, // 0043 CALL R8 1 + 0x50200200, // 0044 LDBOOL R8 1 0 + 0x80041000, // 0045 RET 1 R8 + 0x7002000E, // 0046 JMP #0056 + 0x1C200F0E, // 0047 EQ R8 R7 K14 + 0x7822000C, // 0048 JMPF R8 #0056 + 0x8C20090B, // 0049 GETMET R8 R4 K11 + 0x60280013, // 004A GETGBL R10 G19 + 0x7C280000, // 004B CALL R10 0 + 0x882C010F, // 004C GETMBR R11 R0 K15 + 0x782E0000, // 004D JMPF R11 #004F + 0x502C0001, // 004E LDBOOL R11 0 1 + 0x502C0200, // 004F LDBOOL R11 1 0 + 0x982A180B, // 0050 SETIDX R10 K12 R11 + 0x7C200400, // 0051 CALL R8 2 + 0x8C20010D, // 0052 GETMET R8 R0 K13 + 0x7C200200, // 0053 CALL R8 1 + 0x50200200, // 0054 LDBOOL R8 1 0 + 0x80041000, // 0055 RET 1 R8 + 0x80000000, // 0056 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_init, /* 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(init), + /* K1 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* 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 + 0x500C0000, // 0007 LDBOOL R3 0 0 + 0x90020203, // 0008 SETMBR R0 K1 R3 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Light0 +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_class(Matter_Plugin_Light0, + 1, + &be_class_Matter_Plugin, + be_nested_map(7, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) }, + { be_const_key_weak(CLUSTERS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(4, -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(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(8, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(4), + be_const_int(5), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { 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(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(4, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + 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(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(256, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(invoke_request, 2), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(0) }, + })), + be_str_weak(Matter_Plugin_Light0) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Light0_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Light0); + be_setglobal(vm, "Matter_Plugin_Light0"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ 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 781216746..b19758c0f 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 @@ -6,113 +6,6 @@ extern const bclass be_class_Matter_Plugin_Light1; -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(get), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(bri), - /* K4 */ be_nested_str_weak(power), - /* K5 */ be_nested_str_weak(tasmota), - /* K6 */ be_nested_str_weak(scale_uint), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(shadow_bri), - /* K9 */ be_nested_str_weak(shadow_onoff), - /* K10 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[44]) { /* 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 - 0x8C100502, // 0007 GETMET R4 R2 K2 - 0x58180004, // 0008 LDCONST R6 K4 - 0x4C1C0000, // 0009 LDNIL R7 - 0x7C100600, // 000A CALL R4 3 - 0x4C140000, // 000B LDNIL R5 - 0x20140605, // 000C NE R5 R3 R5 - 0x78160009, // 000D JMPF R5 #0018 - 0xB8160A00, // 000E GETNGBL R5 K5 - 0x8C140B06, // 000F GETMET R5 R5 K6 - 0x5C1C0600, // 0010 MOVE R7 R3 - 0x58200007, // 0011 LDCONST R8 K7 - 0x542600FE, // 0012 LDINT R9 255 - 0x58280007, // 0013 LDCONST R10 K7 - 0x542E00FD, // 0014 LDINT R11 254 - 0x7C140C00, // 0015 CALL R5 6 - 0x5C0C0A00, // 0016 MOVE R3 R5 - 0x70020000, // 0017 JMP #0019 - 0x880C0108, // 0018 GETMBR R3 R0 K8 - 0x88140109, // 0019 GETMBR R5 R0 K9 - 0x20140805, // 001A NE R5 R4 R5 - 0x78160005, // 001B JMPF R5 #0022 - 0x8C14010A, // 001C GETMET R5 R0 K10 - 0x4C1C0000, // 001D LDNIL R7 - 0x54220005, // 001E LDINT R8 6 - 0x58240007, // 001F LDCONST R9 K7 - 0x7C140800, // 0020 CALL R5 4 - 0x90021204, // 0021 SETMBR R0 K9 R4 - 0x88140108, // 0022 GETMBR R5 R0 K8 - 0x20140605, // 0023 NE R5 R3 R5 - 0x78160005, // 0024 JMPF R5 #002B - 0x8C14010A, // 0025 GETMET R5 R0 K10 - 0x4C1C0000, // 0026 LDNIL R7 - 0x54220007, // 0027 LDINT R8 8 - 0x58240007, // 0028 LDCONST R9 K7 - 0x7C140800, // 0029 CALL R5 4 - 0x90021003, // 002A SETMBR R0 K8 R3 - 0x80000000, // 002B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Plugin_Light1_every_second, /* 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(every_second), - &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: invoke_request ********************************************************************/ @@ -126,215 +19,140 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[22]) { /* constants */ + ( &(const bvalue[19]) { /* constants */ /* K0 */ be_nested_str_weak(light), /* K1 */ be_nested_str_weak(matter), /* K2 */ be_nested_str_weak(TLV), /* K3 */ be_nested_str_weak(cluster), /* K4 */ be_nested_str_weak(command), - /* K5 */ be_const_int(3), - /* K6 */ be_const_int(0), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(Matter_TLV_struct), - /* K9 */ be_nested_str_weak(add_TLV), - /* K10 */ be_nested_str_weak(U2), - /* K11 */ be_nested_str_weak(set), - /* K12 */ be_nested_str_weak(power), - /* K13 */ be_nested_str_weak(update_shadow), - /* K14 */ be_const_int(2), - /* K15 */ be_nested_str_weak(shadow_onoff), - /* K16 */ be_nested_str_weak(findsubval), - /* K17 */ be_nested_str_weak(tasmota), - /* K18 */ be_nested_str_weak(scale_uint), - /* K19 */ be_nested_str_weak(bri), - /* K20 */ be_nested_str_weak(log), - /* K21 */ be_nested_str_weak(bri_X3A), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(findsubval), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(scale_uint), + /* K9 */ be_nested_str_weak(set), + /* K10 */ be_nested_str_weak(bri), + /* K11 */ be_nested_str_weak(update_shadow), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(bri_X3A), + /* K14 */ be_const_int(1), + /* K15 */ be_const_int(2), + /* K16 */ be_const_int(3), + /* K17 */ be_nested_str_weak(power), + /* K18 */ be_nested_str_weak(invoke_request), }), be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[182]) { /* code */ + ( &(const binstruction[110]) { /* code */ 0xA4120000, // 0000 IMPORT R4 K0 0xB8160200, // 0001 GETNGBL R5 K1 0x88140B02, // 0002 GETMBR R5 R5 K2 0x88180703, // 0003 GETMBR R6 R3 K3 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x1C200D05, // 0005 EQ R8 R6 K5 - 0x78220016, // 0006 JMPF R8 #001E - 0x1C200F06, // 0007 EQ R8 R7 K6 - 0x78220002, // 0008 JMPF R8 #000C - 0x50200200, // 0009 LDBOOL R8 1 0 - 0x80041000, // 000A RET 1 R8 - 0x70020010, // 000B JMP #001D - 0x1C200F07, // 000C EQ R8 R7 K7 - 0x78220009, // 000D JMPF R8 #0018 - 0x8C200B08, // 000E GETMET R8 R5 K8 - 0x7C200200, // 000F CALL R8 1 - 0x8C241109, // 0010 GETMET R9 R8 K9 - 0x582C0006, // 0011 LDCONST R11 K6 - 0x88300B0A, // 0012 GETMBR R12 R5 K10 - 0x58340006, // 0013 LDCONST R13 K6 - 0x7C240800, // 0014 CALL R9 4 - 0x900E0906, // 0015 SETMBR R3 K4 K6 - 0x80041000, // 0016 RET 1 R8 - 0x70020004, // 0017 JMP #001D - 0x5422003F, // 0018 LDINT R8 64 - 0x1C200E08, // 0019 EQ R8 R7 R8 - 0x78220001, // 001A JMPF R8 #001D - 0x50200200, // 001B LDBOOL R8 1 0 - 0x80041000, // 001C RET 1 R8 - 0x70020096, // 001D JMP #00B5 - 0x54220003, // 001E LDINT R8 4 - 0x1C200C08, // 001F EQ R8 R6 R8 - 0x78220002, // 0020 JMPF R8 #0024 - 0x50200200, // 0021 LDBOOL R8 1 0 - 0x80041000, // 0022 RET 1 R8 - 0x70020090, // 0023 JMP #00B5 - 0x54220004, // 0024 LDINT R8 5 - 0x1C200C08, // 0025 EQ R8 R6 R8 - 0x78220002, // 0026 JMPF R8 #002A - 0x50200200, // 0027 LDBOOL R8 1 0 - 0x80041000, // 0028 RET 1 R8 - 0x7002008A, // 0029 JMP #00B5 - 0x54220005, // 002A LDINT R8 6 - 0x1C200C08, // 002B EQ R8 R6 R8 - 0x78220029, // 002C JMPF R8 #0057 - 0x1C200F06, // 002D EQ R8 R7 K6 - 0x7822000A, // 002E JMPF R8 #003A - 0x8C20090B, // 002F GETMET R8 R4 K11 - 0x60280013, // 0030 GETGBL R10 G19 - 0x7C280000, // 0031 CALL R10 0 - 0x502C0000, // 0032 LDBOOL R11 0 0 - 0x982A180B, // 0033 SETIDX R10 K12 R11 - 0x7C200400, // 0034 CALL R8 2 - 0x8C20010D, // 0035 GETMET R8 R0 K13 - 0x7C200200, // 0036 CALL R8 1 - 0x50200200, // 0037 LDBOOL R8 1 0 - 0x80041000, // 0038 RET 1 R8 - 0x7002001B, // 0039 JMP #0056 - 0x1C200F07, // 003A EQ R8 R7 K7 - 0x7822000A, // 003B JMPF R8 #0047 - 0x8C20090B, // 003C GETMET R8 R4 K11 - 0x60280013, // 003D GETGBL R10 G19 - 0x7C280000, // 003E CALL R10 0 - 0x502C0200, // 003F LDBOOL R11 1 0 - 0x982A180B, // 0040 SETIDX R10 K12 R11 - 0x7C200400, // 0041 CALL R8 2 - 0x8C20010D, // 0042 GETMET R8 R0 K13 - 0x7C200200, // 0043 CALL R8 1 - 0x50200200, // 0044 LDBOOL R8 1 0 - 0x80041000, // 0045 RET 1 R8 - 0x7002000E, // 0046 JMP #0056 - 0x1C200F0E, // 0047 EQ R8 R7 K14 - 0x7822000C, // 0048 JMPF R8 #0056 - 0x8C20090B, // 0049 GETMET R8 R4 K11 - 0x60280013, // 004A GETGBL R10 G19 - 0x7C280000, // 004B CALL R10 0 - 0x882C010F, // 004C GETMBR R11 R0 K15 - 0x782E0000, // 004D JMPF R11 #004F - 0x502C0001, // 004E LDBOOL R11 0 1 + 0x54220007, // 0005 LDINT R8 8 + 0x1C200C08, // 0006 EQ R8 R6 R8 + 0x7822005B, // 0007 JMPF R8 #0064 + 0x1C200F05, // 0008 EQ R8 R7 K5 + 0x78220019, // 0009 JMPF R8 #0024 + 0x8C200506, // 000A GETMET R8 R2 K6 + 0x58280005, // 000B LDCONST R10 K5 + 0x7C200400, // 000C CALL R8 2 + 0xB8260E00, // 000D GETNGBL R9 K7 + 0x8C241308, // 000E GETMET R9 R9 K8 + 0x5C2C1000, // 000F MOVE R11 R8 + 0x58300005, // 0010 LDCONST R12 K5 + 0x543600FD, // 0011 LDINT R13 254 + 0x58380005, // 0012 LDCONST R14 K5 + 0x543E00FE, // 0013 LDINT R15 255 + 0x7C240C00, // 0014 CALL R9 6 + 0x8C280909, // 0015 GETMET R10 R4 K9 + 0x60300013, // 0016 GETGBL R12 G19 + 0x7C300000, // 0017 CALL R12 0 + 0x98321409, // 0018 SETIDX R12 K10 R9 + 0x7C280400, // 0019 CALL R10 2 + 0x8C28010B, // 001A GETMET R10 R0 K11 + 0x7C280200, // 001B CALL R10 1 + 0x60280008, // 001C GETGBL R10 G8 + 0x5C2C1000, // 001D MOVE R11 R8 + 0x7C280200, // 001E CALL R10 1 + 0x002A1A0A, // 001F ADD R10 K13 R10 + 0x900E180A, // 0020 SETMBR R3 K12 R10 + 0x50280200, // 0021 LDBOOL R10 1 0 + 0x80041400, // 0022 RET 1 R10 + 0x7002003E, // 0023 JMP #0063 + 0x1C200F0E, // 0024 EQ R8 R7 K14 + 0x78220002, // 0025 JMPF R8 #0029 + 0x50200200, // 0026 LDBOOL R8 1 0 + 0x80041000, // 0027 RET 1 R8 + 0x70020039, // 0028 JMP #0063 + 0x1C200F0F, // 0029 EQ R8 R7 K15 + 0x78220002, // 002A JMPF R8 #002E + 0x50200200, // 002B LDBOOL R8 1 0 + 0x80041000, // 002C RET 1 R8 + 0x70020034, // 002D JMP #0063 + 0x1C200F10, // 002E EQ R8 R7 K16 + 0x78220002, // 002F JMPF R8 #0033 + 0x50200200, // 0030 LDBOOL R8 1 0 + 0x80041000, // 0031 RET 1 R8 + 0x7002002F, // 0032 JMP #0063 + 0x54220003, // 0033 LDINT R8 4 + 0x1C200E08, // 0034 EQ R8 R7 R8 + 0x7822001B, // 0035 JMPF R8 #0052 + 0x8C200506, // 0036 GETMET R8 R2 K6 + 0x58280005, // 0037 LDCONST R10 K5 + 0x7C200400, // 0038 CALL R8 2 + 0xB8260E00, // 0039 GETNGBL R9 K7 + 0x8C241308, // 003A GETMET R9 R9 K8 + 0x5C2C1000, // 003B MOVE R11 R8 + 0x58300005, // 003C LDCONST R12 K5 + 0x543600FD, // 003D LDINT R13 254 + 0x58380005, // 003E LDCONST R14 K5 + 0x543E00FE, // 003F LDINT R15 255 + 0x7C240C00, // 0040 CALL R9 6 + 0x24281305, // 0041 GT R10 R9 K5 + 0x8C2C0909, // 0042 GETMET R11 R4 K9 + 0x60340013, // 0043 GETGBL R13 G19 + 0x7C340000, // 0044 CALL R13 0 + 0x98361409, // 0045 SETIDX R13 K10 R9 + 0x9836220A, // 0046 SETIDX R13 K17 R10 + 0x7C2C0400, // 0047 CALL R11 2 + 0x8C2C010B, // 0048 GETMET R11 R0 K11 + 0x7C2C0200, // 0049 CALL R11 1 + 0x602C0008, // 004A GETGBL R11 G8 + 0x5C301000, // 004B MOVE R12 R8 + 0x7C2C0200, // 004C CALL R11 1 + 0x002E1A0B, // 004D ADD R11 K13 R11 + 0x900E180B, // 004E SETMBR R3 K12 R11 0x502C0200, // 004F LDBOOL R11 1 0 - 0x982A180B, // 0050 SETIDX R10 K12 R11 - 0x7C200400, // 0051 CALL R8 2 - 0x8C20010D, // 0052 GETMET R8 R0 K13 - 0x7C200200, // 0053 CALL R8 1 - 0x50200200, // 0054 LDBOOL R8 1 0 - 0x80041000, // 0055 RET 1 R8 - 0x7002005D, // 0056 JMP #00B5 - 0x54220007, // 0057 LDINT R8 8 - 0x1C200C08, // 0058 EQ R8 R6 R8 - 0x7822005A, // 0059 JMPF R8 #00B5 - 0x1C200F06, // 005A EQ R8 R7 K6 - 0x78220019, // 005B JMPF R8 #0076 - 0x8C200510, // 005C GETMET R8 R2 K16 - 0x58280006, // 005D LDCONST R10 K6 - 0x7C200400, // 005E CALL R8 2 - 0xB8262200, // 005F GETNGBL R9 K17 - 0x8C241312, // 0060 GETMET R9 R9 K18 - 0x5C2C1000, // 0061 MOVE R11 R8 - 0x58300006, // 0062 LDCONST R12 K6 - 0x543600FD, // 0063 LDINT R13 254 - 0x58380006, // 0064 LDCONST R14 K6 - 0x543E00FE, // 0065 LDINT R15 255 - 0x7C240C00, // 0066 CALL R9 6 - 0x8C28090B, // 0067 GETMET R10 R4 K11 - 0x60300013, // 0068 GETGBL R12 G19 - 0x7C300000, // 0069 CALL R12 0 - 0x98322609, // 006A SETIDX R12 K19 R9 - 0x7C280400, // 006B CALL R10 2 - 0x8C28010D, // 006C GETMET R10 R0 K13 - 0x7C280200, // 006D CALL R10 1 - 0x60280008, // 006E GETGBL R10 G8 - 0x5C2C1000, // 006F MOVE R11 R8 - 0x7C280200, // 0070 CALL R10 1 - 0x002A2A0A, // 0071 ADD R10 K21 R10 - 0x900E280A, // 0072 SETMBR R3 K20 R10 - 0x50280200, // 0073 LDBOOL R10 1 0 - 0x80041400, // 0074 RET 1 R10 - 0x7002003E, // 0075 JMP #00B5 - 0x1C200F07, // 0076 EQ R8 R7 K7 - 0x78220002, // 0077 JMPF R8 #007B - 0x50200200, // 0078 LDBOOL R8 1 0 - 0x80041000, // 0079 RET 1 R8 - 0x70020039, // 007A JMP #00B5 - 0x1C200F0E, // 007B EQ R8 R7 K14 - 0x78220002, // 007C JMPF R8 #0080 - 0x50200200, // 007D LDBOOL R8 1 0 - 0x80041000, // 007E RET 1 R8 - 0x70020034, // 007F JMP #00B5 - 0x1C200F05, // 0080 EQ R8 R7 K5 - 0x78220002, // 0081 JMPF R8 #0085 - 0x50200200, // 0082 LDBOOL R8 1 0 - 0x80041000, // 0083 RET 1 R8 - 0x7002002F, // 0084 JMP #00B5 - 0x54220003, // 0085 LDINT R8 4 - 0x1C200E08, // 0086 EQ R8 R7 R8 - 0x7822001B, // 0087 JMPF R8 #00A4 - 0x8C200510, // 0088 GETMET R8 R2 K16 - 0x58280006, // 0089 LDCONST R10 K6 - 0x7C200400, // 008A CALL R8 2 - 0xB8262200, // 008B GETNGBL R9 K17 - 0x8C241312, // 008C GETMET R9 R9 K18 - 0x5C2C1000, // 008D MOVE R11 R8 - 0x58300006, // 008E LDCONST R12 K6 - 0x543600FD, // 008F LDINT R13 254 - 0x58380006, // 0090 LDCONST R14 K6 - 0x543E00FE, // 0091 LDINT R15 255 - 0x7C240C00, // 0092 CALL R9 6 - 0x24281306, // 0093 GT R10 R9 K6 - 0x8C2C090B, // 0094 GETMET R11 R4 K11 - 0x60340013, // 0095 GETGBL R13 G19 - 0x7C340000, // 0096 CALL R13 0 - 0x98362609, // 0097 SETIDX R13 K19 R9 - 0x9836180A, // 0098 SETIDX R13 K12 R10 - 0x7C2C0400, // 0099 CALL R11 2 - 0x8C2C010D, // 009A GETMET R11 R0 K13 - 0x7C2C0200, // 009B CALL R11 1 - 0x602C0008, // 009C GETGBL R11 G8 - 0x5C301000, // 009D MOVE R12 R8 - 0x7C2C0200, // 009E CALL R11 1 - 0x002E2A0B, // 009F ADD R11 K21 R11 - 0x900E280B, // 00A0 SETMBR R3 K20 R11 - 0x502C0200, // 00A1 LDBOOL R11 1 0 - 0x80041600, // 00A2 RET 1 R11 - 0x70020010, // 00A3 JMP #00B5 - 0x54220004, // 00A4 LDINT R8 5 - 0x1C200E08, // 00A5 EQ R8 R7 R8 - 0x78220002, // 00A6 JMPF R8 #00AA - 0x50200200, // 00A7 LDBOOL R8 1 0 - 0x80041000, // 00A8 RET 1 R8 - 0x7002000A, // 00A9 JMP #00B5 - 0x54220005, // 00AA LDINT R8 6 - 0x1C200E08, // 00AB EQ R8 R7 R8 - 0x78220002, // 00AC JMPF R8 #00B0 - 0x50200200, // 00AD LDBOOL R8 1 0 - 0x80041000, // 00AE RET 1 R8 - 0x70020004, // 00AF JMP #00B5 - 0x54220006, // 00B0 LDINT R8 7 - 0x1C200E08, // 00B1 EQ R8 R7 R8 - 0x78220001, // 00B2 JMPF R8 #00B5 - 0x50200200, // 00B3 LDBOOL R8 1 0 - 0x80041000, // 00B4 RET 1 R8 - 0x80000000, // 00B5 RET 0 + 0x80041600, // 0050 RET 1 R11 + 0x70020010, // 0051 JMP #0063 + 0x54220004, // 0052 LDINT R8 5 + 0x1C200E08, // 0053 EQ R8 R7 R8 + 0x78220002, // 0054 JMPF R8 #0058 + 0x50200200, // 0055 LDBOOL R8 1 0 + 0x80041000, // 0056 RET 1 R8 + 0x7002000A, // 0057 JMP #0063 + 0x54220005, // 0058 LDINT R8 6 + 0x1C200E08, // 0059 EQ R8 R7 R8 + 0x78220002, // 005A JMPF R8 #005E + 0x50200200, // 005B LDBOOL R8 1 0 + 0x80041000, // 005C RET 1 R8 + 0x70020004, // 005D JMP #0063 + 0x54220006, // 005E LDINT R8 7 + 0x1C200E08, // 005F EQ R8 R7 R8 + 0x78220001, // 0060 JMPF R8 #0063 + 0x50200200, // 0061 LDBOOL R8 1 0 + 0x80041000, // 0062 RET 1 R8 + 0x70020008, // 0063 JMP #006D + 0x60200003, // 0064 GETGBL R8 G3 + 0x5C240000, // 0065 MOVE R9 R0 + 0x7C200200, // 0066 CALL R8 1 + 0x8C201112, // 0067 GETMET R8 R8 K18 + 0x5C280200, // 0068 MOVE R10 R1 + 0x5C2C0400, // 0069 MOVE R11 R2 + 0x5C300600, // 006A MOVE R12 R3 + 0x7C200800, // 006B CALL R8 4 + 0x80041000, // 006C RET 1 R8 + 0x80000000, // 006D RET 0 }) ) ); @@ -342,229 +160,69 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */ /******************************************************************** -** Solidified function: read_attribute +** Solidified function: update_shadow ********************************************************************/ -be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */ +be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */ be_nested_proto( 11, /* nstack */ - 3, /* argc */ + 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(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(attribute), - /* K5 */ be_const_int(3), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(get), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(bri), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(scale_uint), /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(create_TLV), - /* K8 */ be_nested_str_weak(U2), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(U1), - /* K11 */ be_nested_str_weak(U4), - /* K12 */ be_nested_str_weak(BOOL), - /* K13 */ be_nested_str_weak(shadow_onoff), - /* K14 */ be_nested_str_weak(shadow_bri), - /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_weak(read_attribute), + /* K7 */ be_nested_str_weak(shadow_bri), + /* K8 */ be_nested_str_weak(attribute_updated), + /* K9 */ be_nested_str_weak(update_shadow), }), - be_str_weak(read_attribute), + be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[189]) { /* 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 - 0x1C1C0B05, // 0005 EQ R7 R5 K5 - 0x781E0021, // 0006 JMPF R7 #0029 - 0x1C1C0D06, // 0007 EQ R7 R6 K6 - 0x781E0005, // 0008 JMPF R7 #000F - 0x8C1C0907, // 0009 GETMET R7 R4 K7 - 0x88240908, // 000A GETMBR R9 R4 K8 - 0x58280006, // 000B LDCONST R10 K6 - 0x7C1C0600, // 000C CALL R7 3 - 0x80040E00, // 000D RET 1 R7 - 0x70020018, // 000E JMP #0028 - 0x1C1C0D09, // 000F EQ R7 R6 K9 - 0x781E0005, // 0010 JMPF R7 #0017 - 0x8C1C0907, // 0011 GETMET R7 R4 K7 - 0x8824090A, // 0012 GETMBR R9 R4 K10 - 0x58280006, // 0013 LDCONST R10 K6 - 0x7C1C0600, // 0014 CALL R7 3 - 0x80040E00, // 0015 RET 1 R7 - 0x70020010, // 0016 JMP #0028 - 0x541EFFFB, // 0017 LDINT R7 65532 - 0x1C1C0C07, // 0018 EQ R7 R6 R7 - 0x781E0005, // 0019 JMPF R7 #0020 - 0x8C1C0907, // 001A GETMET R7 R4 K7 - 0x8824090B, // 001B GETMBR R9 R4 K11 - 0x58280006, // 001C LDCONST R10 K6 - 0x7C1C0600, // 001D CALL R7 3 - 0x80040E00, // 001E RET 1 R7 - 0x70020007, // 001F JMP #0028 - 0x541EFFFC, // 0020 LDINT R7 65533 - 0x1C1C0C07, // 0021 EQ R7 R6 R7 - 0x781E0004, // 0022 JMPF R7 #0028 - 0x8C1C0907, // 0023 GETMET R7 R4 K7 - 0x8824090B, // 0024 GETMBR R9 R4 K11 - 0x542A0003, // 0025 LDINT R10 4 - 0x7C1C0600, // 0026 CALL R7 3 - 0x80040E00, // 0027 RET 1 R7 - 0x70020092, // 0028 JMP #00BC - 0x541E0003, // 0029 LDINT R7 4 - 0x1C1C0A07, // 002A EQ R7 R5 R7 - 0x781E0016, // 002B JMPF R7 #0043 - 0x1C1C0D06, // 002C EQ R7 R6 K6 - 0x781E0002, // 002D JMPF R7 #0031 - 0x4C1C0000, // 002E LDNIL R7 - 0x80040E00, // 002F RET 1 R7 - 0x70020010, // 0030 JMP #0042 - 0x541EFFFB, // 0031 LDINT R7 65532 - 0x1C1C0C07, // 0032 EQ R7 R6 R7 - 0x781E0005, // 0033 JMPF R7 #003A - 0x8C1C0907, // 0034 GETMET R7 R4 K7 - 0x8824090B, // 0035 GETMBR R9 R4 K11 - 0x58280006, // 0036 LDCONST R10 K6 - 0x7C1C0600, // 0037 CALL R7 3 - 0x80040E00, // 0038 RET 1 R7 - 0x70020007, // 0039 JMP #0042 - 0x541EFFFC, // 003A LDINT R7 65533 - 0x1C1C0C07, // 003B EQ R7 R6 R7 - 0x781E0004, // 003C JMPF R7 #0042 - 0x8C1C0907, // 003D GETMET R7 R4 K7 - 0x8824090B, // 003E GETMBR R9 R4 K11 - 0x542A0003, // 003F LDINT R10 4 - 0x7C1C0600, // 0040 CALL R7 3 - 0x80040E00, // 0041 RET 1 R7 - 0x70020078, // 0042 JMP #00BC - 0x541E0004, // 0043 LDINT R7 5 - 0x1C1C0A07, // 0044 EQ R7 R5 R7 - 0x781E0011, // 0045 JMPF R7 #0058 - 0x541EFFFB, // 0046 LDINT R7 65532 - 0x1C1C0C07, // 0047 EQ R7 R6 R7 - 0x781E0005, // 0048 JMPF R7 #004F - 0x8C1C0907, // 0049 GETMET R7 R4 K7 - 0x8824090B, // 004A GETMBR R9 R4 K11 - 0x58280006, // 004B LDCONST R10 K6 - 0x7C1C0600, // 004C CALL R7 3 - 0x80040E00, // 004D RET 1 R7 - 0x70020007, // 004E JMP #0057 - 0x541EFFFC, // 004F LDINT R7 65533 - 0x1C1C0C07, // 0050 EQ R7 R6 R7 - 0x781E0004, // 0051 JMPF R7 #0057 - 0x8C1C0907, // 0052 GETMET R7 R4 K7 - 0x8824090B, // 0053 GETMBR R9 R4 K11 - 0x542A0003, // 0054 LDINT R10 4 - 0x7C1C0600, // 0055 CALL R7 3 - 0x80040E00, // 0056 RET 1 R7 - 0x70020063, // 0057 JMP #00BC - 0x541E0005, // 0058 LDINT R7 6 - 0x1C1C0A07, // 0059 EQ R7 R5 R7 - 0x781E0019, // 005A JMPF R7 #0075 - 0x1C1C0D06, // 005B EQ R7 R6 K6 - 0x781E0005, // 005C JMPF R7 #0063 - 0x8C1C0907, // 005D GETMET R7 R4 K7 - 0x8824090C, // 005E GETMBR R9 R4 K12 - 0x8828010D, // 005F GETMBR R10 R0 K13 - 0x7C1C0600, // 0060 CALL R7 3 - 0x80040E00, // 0061 RET 1 R7 - 0x70020010, // 0062 JMP #0074 - 0x541EFFFB, // 0063 LDINT R7 65532 - 0x1C1C0C07, // 0064 EQ R7 R6 R7 - 0x781E0005, // 0065 JMPF R7 #006C - 0x8C1C0907, // 0066 GETMET R7 R4 K7 - 0x8824090B, // 0067 GETMBR R9 R4 K11 - 0x58280006, // 0068 LDCONST R10 K6 - 0x7C1C0600, // 0069 CALL R7 3 - 0x80040E00, // 006A RET 1 R7 - 0x70020007, // 006B JMP #0074 - 0x541EFFFC, // 006C LDINT R7 65533 - 0x1C1C0C07, // 006D EQ R7 R6 R7 - 0x781E0004, // 006E JMPF R7 #0074 - 0x8C1C0907, // 006F GETMET R7 R4 K7 - 0x8824090B, // 0070 GETMBR R9 R4 K11 - 0x542A0003, // 0071 LDINT R10 4 - 0x7C1C0600, // 0072 CALL R7 3 - 0x80040E00, // 0073 RET 1 R7 - 0x70020046, // 0074 JMP #00BC - 0x541E0007, // 0075 LDINT R7 8 - 0x1C1C0A07, // 0076 EQ R7 R5 R7 - 0x781E003B, // 0077 JMPF R7 #00B4 - 0x1C1C0D06, // 0078 EQ R7 R6 K6 - 0x781E0005, // 0079 JMPF R7 #0080 - 0x8C1C0907, // 007A GETMET R7 R4 K7 - 0x8824090A, // 007B GETMBR R9 R4 K10 - 0x8828010E, // 007C GETMBR R10 R0 K14 - 0x7C1C0600, // 007D CALL R7 3 - 0x80040E00, // 007E RET 1 R7 - 0x70020032, // 007F JMP #00B3 - 0x1C1C0D0F, // 0080 EQ R7 R6 K15 - 0x781E0005, // 0081 JMPF R7 #0088 - 0x8C1C0907, // 0082 GETMET R7 R4 K7 - 0x8824090A, // 0083 GETMBR R9 R4 K10 - 0x58280006, // 0084 LDCONST R10 K6 - 0x7C1C0600, // 0085 CALL R7 3 - 0x80040E00, // 0086 RET 1 R7 - 0x7002002A, // 0087 JMP #00B3 - 0x1C1C0D05, // 0088 EQ R7 R6 K5 - 0x781E0005, // 0089 JMPF R7 #0090 - 0x8C1C0907, // 008A GETMET R7 R4 K7 - 0x8824090A, // 008B GETMBR R9 R4 K10 - 0x542A00FD, // 008C LDINT R10 254 - 0x7C1C0600, // 008D CALL R7 3 - 0x80040E00, // 008E RET 1 R7 - 0x70020022, // 008F JMP #00B3 - 0x541E000E, // 0090 LDINT R7 15 - 0x1C1C0C07, // 0091 EQ R7 R6 R7 - 0x781E0005, // 0092 JMPF R7 #0099 - 0x8C1C0907, // 0093 GETMET R7 R4 K7 - 0x8824090A, // 0094 GETMBR R9 R4 K10 - 0x58280006, // 0095 LDCONST R10 K6 - 0x7C1C0600, // 0096 CALL R7 3 - 0x80040E00, // 0097 RET 1 R7 - 0x70020019, // 0098 JMP #00B3 - 0x541E0010, // 0099 LDINT R7 17 - 0x1C1C0C07, // 009A EQ R7 R6 R7 - 0x781E0005, // 009B JMPF R7 #00A2 - 0x8C1C0907, // 009C GETMET R7 R4 K7 - 0x8824090A, // 009D GETMBR R9 R4 K10 - 0x8828010E, // 009E GETMBR R10 R0 K14 - 0x7C1C0600, // 009F CALL R7 3 - 0x80040E00, // 00A0 RET 1 R7 - 0x70020010, // 00A1 JMP #00B3 - 0x541EFFFB, // 00A2 LDINT R7 65532 - 0x1C1C0C07, // 00A3 EQ R7 R6 R7 - 0x781E0005, // 00A4 JMPF R7 #00AB - 0x8C1C0907, // 00A5 GETMET R7 R4 K7 - 0x8824090B, // 00A6 GETMBR R9 R4 K11 - 0x58280009, // 00A7 LDCONST R10 K9 - 0x7C1C0600, // 00A8 CALL R7 3 - 0x80040E00, // 00A9 RET 1 R7 - 0x70020007, // 00AA JMP #00B3 - 0x541EFFFC, // 00AB LDINT R7 65533 - 0x1C1C0C07, // 00AC EQ R7 R6 R7 - 0x781E0004, // 00AD JMPF R7 #00B3 - 0x8C1C0907, // 00AE GETMET R7 R4 K7 - 0x8824090B, // 00AF GETMBR R9 R4 K11 - 0x542A0004, // 00B0 LDINT R10 5 - 0x7C1C0600, // 00B1 CALL R7 3 - 0x80040E00, // 00B2 RET 1 R7 - 0x70020007, // 00B3 JMP #00BC - 0x601C0003, // 00B4 GETGBL R7 G3 - 0x5C200000, // 00B5 MOVE R8 R0 - 0x7C1C0200, // 00B6 CALL R7 1 - 0x8C1C0F10, // 00B7 GETMET R7 R7 K16 - 0x5C240200, // 00B8 MOVE R9 R1 - 0x5C280400, // 00B9 MOVE R10 R2 - 0x7C1C0600, // 00BA CALL R7 3 - 0x80040E00, // 00BB RET 1 R7 - 0x80000000, // 00BC RET 0 + ( &(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 + 0x78120009, // 0009 JMPF R4 #0014 + 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 + 0x70020000, // 0013 JMP #0015 + 0x880C0107, // 0014 GETMBR R3 R0 K7 + 0x88100107, // 0015 GETMBR R4 R0 K7 + 0x20100604, // 0016 NE R4 R3 R4 + 0x78120005, // 0017 JMPF R4 #001E + 0x8C100108, // 0018 GETMET R4 R0 K8 + 0x4C180000, // 0019 LDNIL R6 + 0x541E0007, // 001A LDINT R7 8 + 0x58200006, // 001B LDCONST R8 K6 + 0x7C100800, // 001C CALL R4 4 + 0x90020E03, // 001D SETMBR R0 K7 R3 + 0x60100003, // 001E GETGBL R4 G3 + 0x5C140000, // 001F MOVE R5 R0 + 0x7C100200, // 0020 CALL R4 1 + 0x8C100909, // 0021 GETMET R4 R4 K9 + 0x7C100200, // 0022 CALL R4 1 + 0x80000000, // 0023 RET 0 }) ) ); @@ -584,15 +242,14 @@ be_local_closure(Matter_Plugin_Light1_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 3]) { /* constants */ /* K0 */ be_nested_str_weak(init), /* K1 */ be_nested_str_weak(shadow_bri), /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(shadow_onoff), }), be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ + ( &(const binstruction[ 9]) { /* code */ 0x600C0003, // 0000 GETGBL R3 G3 0x5C100000, // 0001 MOVE R4 R0 0x7C0C0200, // 0002 CALL R3 1 @@ -601,9 +258,122 @@ be_local_closure(Matter_Plugin_Light1_init, /* name */ 0x5C180400, // 0005 MOVE R6 R2 0x7C0C0600, // 0006 CALL R3 3 0x90020302, // 0007 SETMBR R0 K1 K2 - 0x500C0000, // 0008 LDBOOL R3 0 0 - 0x90020603, // 0009 SETMBR R0 K3 R3 - 0x80000000, // 000A RET 0 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_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[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(create_TLV), + /* K7 */ be_nested_str_weak(U1), + /* K8 */ be_nested_str_weak(shadow_bri), + /* K9 */ be_const_int(2), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(U4), + /* K12 */ be_const_int(1), + /* K13 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[77]) { /* 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 + 0x781E003B, // 0007 JMPF R7 #0044 + 0x1C1C0D05, // 0008 EQ R7 R6 K5 + 0x781E0005, // 0009 JMPF R7 #0010 + 0x8C1C0906, // 000A GETMET R7 R4 K6 + 0x88240907, // 000B GETMBR R9 R4 K7 + 0x88280108, // 000C GETMBR R10 R0 K8 + 0x7C1C0600, // 000D CALL R7 3 + 0x80040E00, // 000E RET 1 R7 + 0x70020032, // 000F JMP #0043 + 0x1C1C0D09, // 0010 EQ R7 R6 K9 + 0x781E0005, // 0011 JMPF R7 #0018 + 0x8C1C0906, // 0012 GETMET R7 R4 K6 + 0x88240907, // 0013 GETMBR R9 R4 K7 + 0x58280005, // 0014 LDCONST R10 K5 + 0x7C1C0600, // 0015 CALL R7 3 + 0x80040E00, // 0016 RET 1 R7 + 0x7002002A, // 0017 JMP #0043 + 0x1C1C0D0A, // 0018 EQ R7 R6 K10 + 0x781E0005, // 0019 JMPF R7 #0020 + 0x8C1C0906, // 001A GETMET R7 R4 K6 + 0x88240907, // 001B GETMBR R9 R4 K7 + 0x542A00FD, // 001C LDINT R10 254 + 0x7C1C0600, // 001D CALL R7 3 + 0x80040E00, // 001E RET 1 R7 + 0x70020022, // 001F JMP #0043 + 0x541E000E, // 0020 LDINT R7 15 + 0x1C1C0C07, // 0021 EQ R7 R6 R7 + 0x781E0005, // 0022 JMPF R7 #0029 + 0x8C1C0906, // 0023 GETMET R7 R4 K6 + 0x88240907, // 0024 GETMBR R9 R4 K7 + 0x58280005, // 0025 LDCONST R10 K5 + 0x7C1C0600, // 0026 CALL R7 3 + 0x80040E00, // 0027 RET 1 R7 + 0x70020019, // 0028 JMP #0043 + 0x541E0010, // 0029 LDINT R7 17 + 0x1C1C0C07, // 002A EQ R7 R6 R7 + 0x781E0005, // 002B JMPF R7 #0032 + 0x8C1C0906, // 002C GETMET R7 R4 K6 + 0x88240907, // 002D GETMBR R9 R4 K7 + 0x88280108, // 002E GETMBR R10 R0 K8 + 0x7C1C0600, // 002F CALL R7 3 + 0x80040E00, // 0030 RET 1 R7 + 0x70020010, // 0031 JMP #0043 + 0x541EFFFB, // 0032 LDINT R7 65532 + 0x1C1C0C07, // 0033 EQ R7 R6 R7 + 0x781E0005, // 0034 JMPF R7 #003B + 0x8C1C0906, // 0035 GETMET R7 R4 K6 + 0x8824090B, // 0036 GETMBR R9 R4 K11 + 0x5828000C, // 0037 LDCONST R10 K12 + 0x7C1C0600, // 0038 CALL R7 3 + 0x80040E00, // 0039 RET 1 R7 + 0x70020007, // 003A JMP #0043 + 0x541EFFFC, // 003B LDINT R7 65533 + 0x1C1C0C07, // 003C EQ R7 R6 R7 + 0x781E0004, // 003D JMPF R7 #0043 + 0x8C1C0906, // 003E GETMET R7 R4 K6 + 0x8824090B, // 003F GETMBR R9 R4 K11 + 0x542A0004, // 0040 LDINT R10 5 + 0x7C1C0600, // 0041 CALL R7 3 + 0x80040E00, // 0042 RET 1 R7 + 0x70020007, // 0043 JMP #004C + 0x601C0003, // 0044 GETGBL R7 G3 + 0x5C200000, // 0045 MOVE R8 R0 + 0x7C1C0200, // 0046 CALL R7 1 + 0x8C1C0F0D, // 0047 GETMET R7 R7 K13 + 0x5C240200, // 0048 MOVE R9 R1 + 0x5C280400, // 0049 MOVE R10 R2 + 0x7C1C0600, // 004A CALL R7 3 + 0x80040E00, // 004B RET 1 R7 + 0x80000000, // 004C RET 0 }) ) ); @@ -613,51 +383,26 @@ be_local_closure(Matter_Plugin_Light1_init, /* name */ /******************************************************************** ** Solidified class: Matter_Plugin_Light1 ********************************************************************/ -extern const bclass be_class_Matter_Plugin; +extern const bclass be_class_Matter_Plugin_Light0; be_local_class(Matter_Plugin_Light1, - 2, - &be_class_Matter_Plugin, - be_nested_map(9, + 1, + &be_class_Matter_Plugin_Light0, + be_nested_map(7, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, + { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) }, + { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) }, + { be_const_key_weak(shadow_bri, -1), be_const_var(0) }, { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(257, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_Light1_every_second_closure) }, + { be_const_key_weak(update_shadow, 6), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(5, + be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { 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(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(4, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(8, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { 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), @@ -668,18 +413,7 @@ be_local_class(Matter_Plugin_Light1, be_const_int(65532), be_const_int(65533), })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(3, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65532), - be_const_int(65533), })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) }, - { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) }, - { be_const_key_weak(update_shadow, 8), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) }, - { be_const_key_weak(shadow_bri, -1), be_const_var(0) }, })), be_str_weak(Matter_Plugin_Light1) ); 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 ef1493fb8..d572d80e2 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 @@ -6,6 +6,163 @@ extern const bclass be_class_Matter_Plugin_Light2; +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_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[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_nested_str_weak(create_TLV), + /* K6 */ be_nested_str_weak(U1), + /* K7 */ be_nested_str_weak(shadow_ct), + /* K8 */ be_const_int(2), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(ct_min), + /* K11 */ be_nested_str_weak(ct_max), + /* K12 */ be_nested_str_weak(U4), + /* K13 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[80]) { /* 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 + 0x781E003E, // 0007 JMPF R7 #0047 + 0x541E0006, // 0008 LDINT R7 7 + 0x1C1C0C07, // 0009 EQ R7 R6 R7 + 0x781E0005, // 000A JMPF R7 #0011 + 0x8C1C0905, // 000B GETMET R7 R4 K5 + 0x88240906, // 000C GETMBR R9 R4 K6 + 0x88280107, // 000D GETMBR R10 R0 K7 + 0x7C1C0600, // 000E CALL R7 3 + 0x80040E00, // 000F RET 1 R7 + 0x70020034, // 0010 JMP #0046 + 0x541E0007, // 0011 LDINT R7 8 + 0x1C1C0C07, // 0012 EQ R7 R6 R7 + 0x781E0005, // 0013 JMPF R7 #001A + 0x8C1C0905, // 0014 GETMET R7 R4 K5 + 0x88240906, // 0015 GETMBR R9 R4 K6 + 0x58280008, // 0016 LDCONST R10 K8 + 0x7C1C0600, // 0017 CALL R7 3 + 0x80040E00, // 0018 RET 1 R7 + 0x7002002B, // 0019 JMP #0046 + 0x541E000E, // 001A LDINT R7 15 + 0x1C1C0C07, // 001B EQ R7 R6 R7 + 0x781E0005, // 001C JMPF R7 #0023 + 0x8C1C0905, // 001D GETMET R7 R4 K5 + 0x88240906, // 001E GETMBR R9 R4 K6 + 0x58280009, // 001F LDCONST R10 K9 + 0x7C1C0600, // 0020 CALL R7 3 + 0x80040E00, // 0021 RET 1 R7 + 0x70020022, // 0022 JMP #0046 + 0x541E400A, // 0023 LDINT R7 16395 + 0x1C1C0C07, // 0024 EQ R7 R6 R7 + 0x781E0005, // 0025 JMPF R7 #002C + 0x8C1C0905, // 0026 GETMET R7 R4 K5 + 0x88240906, // 0027 GETMBR R9 R4 K6 + 0x8828010A, // 0028 GETMBR R10 R0 K10 + 0x7C1C0600, // 0029 CALL R7 3 + 0x80040E00, // 002A RET 1 R7 + 0x70020019, // 002B JMP #0046 + 0x541E400B, // 002C LDINT R7 16396 + 0x1C1C0C07, // 002D EQ R7 R6 R7 + 0x781E0005, // 002E JMPF R7 #0035 + 0x8C1C0905, // 002F GETMET R7 R4 K5 + 0x88240906, // 0030 GETMBR R9 R4 K6 + 0x8828010B, // 0031 GETMBR R10 R0 K11 + 0x7C1C0600, // 0032 CALL R7 3 + 0x80040E00, // 0033 RET 1 R7 + 0x70020010, // 0034 JMP #0046 + 0x541EFFFB, // 0035 LDINT R7 65532 + 0x1C1C0C07, // 0036 EQ R7 R6 R7 + 0x781E0005, // 0037 JMPF R7 #003E + 0x8C1C0905, // 0038 GETMET R7 R4 K5 + 0x8824090C, // 0039 GETMBR R9 R4 K12 + 0x542A000F, // 003A LDINT R10 16 + 0x7C1C0600, // 003B CALL R7 3 + 0x80040E00, // 003C RET 1 R7 + 0x70020007, // 003D JMP #0046 + 0x541EFFFC, // 003E LDINT R7 65533 + 0x1C1C0C07, // 003F EQ R7 R6 R7 + 0x781E0004, // 0040 JMPF R7 #0046 + 0x8C1C0905, // 0041 GETMET R7 R4 K5 + 0x8824090C, // 0042 GETMBR R9 R4 K12 + 0x542A0004, // 0043 LDINT R10 5 + 0x7C1C0600, // 0044 CALL R7 3 + 0x80040E00, // 0045 RET 1 R7 + 0x70020007, // 0046 JMP #004F + 0x601C0003, // 0047 GETGBL R7 G3 + 0x5C200000, // 0048 MOVE R8 R0 + 0x7C1C0200, // 0049 CALL R7 1 + 0x8C1C0F0D, // 004A GETMET R7 R7 K13 + 0x5C240200, // 004B MOVE R9 R1 + 0x5C280400, // 004C MOVE R10 R2 + 0x7C1C0600, // 004D CALL R7 3 + 0x80040E00, // 004E RET 1 R7 + 0x80000000, // 004F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Light2_init, /* 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[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_ct), + /* K2 */ be_nested_str_weak(update_ct_minmax), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* 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 + 0x540E0144, // 0007 LDINT R3 325 + 0x90020203, // 0008 SETMBR R0 K1 R3 + 0x8C0C0102, // 0009 GETMET R3 R0 K2 + 0x7C0C0200, // 000A CALL R3 1 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_ct_minmax ********************************************************************/ @@ -49,57 +206,12 @@ be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_Light2_init, /* 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[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_bri), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(shadow_ct), - /* K4 */ be_nested_str_weak(shadow_onoff), - /* K5 */ be_nested_str_weak(update_ct_minmax), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* 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 - 0x90020302, // 0007 SETMBR R0 K1 K2 - 0x540E0144, // 0008 LDINT R3 325 - 0x90020603, // 0009 SETMBR R0 K3 R3 - 0x500C0000, // 000A LDBOOL R3 0 0 - 0x90020803, // 000B SETMBR R0 K4 R3 - 0x8C0C0105, // 000C GETMET R3 R0 K5 - 0x7C0C0200, // 000D CALL R3 1 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: invoke_request ********************************************************************/ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */ be_nested_proto( - 16, /* nstack */ + 13, /* nstack */ 4, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -107,269 +219,91 @@ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[26]) { /* constants */ + ( &(const bvalue[15]) { /* constants */ /* K0 */ be_nested_str_weak(light), /* K1 */ be_nested_str_weak(matter), /* K2 */ be_nested_str_weak(TLV), /* K3 */ be_nested_str_weak(cluster), /* K4 */ be_nested_str_weak(command), - /* K5 */ be_const_int(3), + /* K5 */ be_nested_str_weak(findsubval), /* K6 */ be_const_int(0), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(Matter_TLV_struct), - /* K9 */ be_nested_str_weak(add_TLV), - /* K10 */ be_nested_str_weak(U2), - /* K11 */ be_nested_str_weak(set), - /* K12 */ be_nested_str_weak(power), - /* K13 */ be_nested_str_weak(update_shadow), - /* K14 */ be_const_int(2), - /* K15 */ be_nested_str_weak(shadow_onoff), - /* K16 */ be_nested_str_weak(findsubval), - /* K17 */ be_nested_str_weak(tasmota), - /* K18 */ be_nested_str_weak(scale_uint), - /* K19 */ be_nested_str_weak(bri), - /* K20 */ be_nested_str_weak(log), - /* K21 */ be_nested_str_weak(bri_X3A), - /* K22 */ be_nested_str_weak(ct_min), - /* K23 */ be_nested_str_weak(ct_max), - /* K24 */ be_nested_str_weak(ct), - /* K25 */ be_nested_str_weak(ct_X3A), + /* K7 */ be_nested_str_weak(ct_min), + /* K8 */ be_nested_str_weak(ct_max), + /* K9 */ be_nested_str_weak(set), + /* K10 */ be_nested_str_weak(ct), + /* K11 */ be_nested_str_weak(update_shadow), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(ct_X3A), + /* K14 */ be_nested_str_weak(invoke_request), }), be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[232]) { /* code */ + ( &(const binstruction[65]) { /* code */ 0xA4120000, // 0000 IMPORT R4 K0 0xB8160200, // 0001 GETNGBL R5 K1 0x88140B02, // 0002 GETMBR R5 R5 K2 0x88180703, // 0003 GETMBR R6 R3 K3 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x1C200D05, // 0005 EQ R8 R6 K5 - 0x78220016, // 0006 JMPF R8 #001E - 0x1C200F06, // 0007 EQ R8 R7 K6 - 0x78220002, // 0008 JMPF R8 #000C - 0x50200200, // 0009 LDBOOL R8 1 0 - 0x80041000, // 000A RET 1 R8 - 0x70020010, // 000B JMP #001D - 0x1C200F07, // 000C EQ R8 R7 K7 - 0x78220009, // 000D JMPF R8 #0018 - 0x8C200B08, // 000E GETMET R8 R5 K8 - 0x7C200200, // 000F CALL R8 1 - 0x8C241109, // 0010 GETMET R9 R8 K9 - 0x582C0006, // 0011 LDCONST R11 K6 - 0x88300B0A, // 0012 GETMBR R12 R5 K10 - 0x58340006, // 0013 LDCONST R13 K6 - 0x7C240800, // 0014 CALL R9 4 - 0x900E0906, // 0015 SETMBR R3 K4 K6 - 0x80041000, // 0016 RET 1 R8 - 0x70020004, // 0017 JMP #001D - 0x5422003F, // 0018 LDINT R8 64 - 0x1C200E08, // 0019 EQ R8 R7 R8 - 0x78220001, // 001A JMPF R8 #001D - 0x50200200, // 001B LDBOOL R8 1 0 - 0x80041000, // 001C RET 1 R8 - 0x700200C8, // 001D JMP #00E7 - 0x54220003, // 001E LDINT R8 4 - 0x1C200C08, // 001F EQ R8 R6 R8 - 0x78220002, // 0020 JMPF R8 #0024 - 0x50200200, // 0021 LDBOOL R8 1 0 - 0x80041000, // 0022 RET 1 R8 - 0x700200C2, // 0023 JMP #00E7 - 0x54220004, // 0024 LDINT R8 5 - 0x1C200C08, // 0025 EQ R8 R6 R8 - 0x78220002, // 0026 JMPF R8 #002A - 0x50200200, // 0027 LDBOOL R8 1 0 - 0x80041000, // 0028 RET 1 R8 - 0x700200BC, // 0029 JMP #00E7 - 0x54220005, // 002A LDINT R8 6 - 0x1C200C08, // 002B EQ R8 R6 R8 - 0x78220029, // 002C JMPF R8 #0057 - 0x1C200F06, // 002D EQ R8 R7 K6 - 0x7822000A, // 002E JMPF R8 #003A - 0x8C20090B, // 002F GETMET R8 R4 K11 - 0x60280013, // 0030 GETGBL R10 G19 - 0x7C280000, // 0031 CALL R10 0 - 0x502C0000, // 0032 LDBOOL R11 0 0 - 0x982A180B, // 0033 SETIDX R10 K12 R11 - 0x7C200400, // 0034 CALL R8 2 - 0x8C20010D, // 0035 GETMET R8 R0 K13 - 0x7C200200, // 0036 CALL R8 1 - 0x50200200, // 0037 LDBOOL R8 1 0 - 0x80041000, // 0038 RET 1 R8 - 0x7002001B, // 0039 JMP #0056 - 0x1C200F07, // 003A EQ R8 R7 K7 - 0x7822000A, // 003B JMPF R8 #0047 - 0x8C20090B, // 003C GETMET R8 R4 K11 - 0x60280013, // 003D GETGBL R10 G19 - 0x7C280000, // 003E CALL R10 0 - 0x502C0200, // 003F LDBOOL R11 1 0 - 0x982A180B, // 0040 SETIDX R10 K12 R11 - 0x7C200400, // 0041 CALL R8 2 - 0x8C20010D, // 0042 GETMET R8 R0 K13 - 0x7C200200, // 0043 CALL R8 1 - 0x50200200, // 0044 LDBOOL R8 1 0 - 0x80041000, // 0045 RET 1 R8 - 0x7002000E, // 0046 JMP #0056 - 0x1C200F0E, // 0047 EQ R8 R7 K14 - 0x7822000C, // 0048 JMPF R8 #0056 - 0x8C20090B, // 0049 GETMET R8 R4 K11 - 0x60280013, // 004A GETGBL R10 G19 - 0x7C280000, // 004B CALL R10 0 - 0x882C010F, // 004C GETMBR R11 R0 K15 - 0x782E0000, // 004D JMPF R11 #004F - 0x502C0001, // 004E LDBOOL R11 0 1 - 0x502C0200, // 004F LDBOOL R11 1 0 - 0x982A180B, // 0050 SETIDX R10 K12 R11 - 0x7C200400, // 0051 CALL R8 2 - 0x8C20010D, // 0052 GETMET R8 R0 K13 - 0x7C200200, // 0053 CALL R8 1 - 0x50200200, // 0054 LDBOOL R8 1 0 - 0x80041000, // 0055 RET 1 R8 - 0x7002008F, // 0056 JMP #00E7 - 0x54220007, // 0057 LDINT R8 8 - 0x1C200C08, // 0058 EQ R8 R6 R8 - 0x7822005B, // 0059 JMPF R8 #00B6 - 0x1C200F06, // 005A EQ R8 R7 K6 - 0x78220019, // 005B JMPF R8 #0076 - 0x8C200510, // 005C GETMET R8 R2 K16 - 0x58280006, // 005D LDCONST R10 K6 - 0x7C200400, // 005E CALL R8 2 - 0xB8262200, // 005F GETNGBL R9 K17 - 0x8C241312, // 0060 GETMET R9 R9 K18 - 0x5C2C1000, // 0061 MOVE R11 R8 - 0x58300006, // 0062 LDCONST R12 K6 - 0x543600FD, // 0063 LDINT R13 254 - 0x58380006, // 0064 LDCONST R14 K6 - 0x543E00FE, // 0065 LDINT R15 255 - 0x7C240C00, // 0066 CALL R9 6 - 0x8C28090B, // 0067 GETMET R10 R4 K11 - 0x60300013, // 0068 GETGBL R12 G19 - 0x7C300000, // 0069 CALL R12 0 - 0x98322609, // 006A SETIDX R12 K19 R9 - 0x7C280400, // 006B CALL R10 2 - 0x8C28010D, // 006C GETMET R10 R0 K13 - 0x7C280200, // 006D CALL R10 1 - 0x60280008, // 006E GETGBL R10 G8 - 0x5C2C1000, // 006F MOVE R11 R8 - 0x7C280200, // 0070 CALL R10 1 - 0x002A2A0A, // 0071 ADD R10 K21 R10 - 0x900E280A, // 0072 SETMBR R3 K20 R10 - 0x50280200, // 0073 LDBOOL R10 1 0 - 0x80041400, // 0074 RET 1 R10 - 0x7002003E, // 0075 JMP #00B5 - 0x1C200F07, // 0076 EQ R8 R7 K7 - 0x78220002, // 0077 JMPF R8 #007B - 0x50200200, // 0078 LDBOOL R8 1 0 - 0x80041000, // 0079 RET 1 R8 - 0x70020039, // 007A JMP #00B5 - 0x1C200F0E, // 007B EQ R8 R7 K14 - 0x78220002, // 007C JMPF R8 #0080 - 0x50200200, // 007D LDBOOL R8 1 0 - 0x80041000, // 007E RET 1 R8 - 0x70020034, // 007F JMP #00B5 - 0x1C200F05, // 0080 EQ R8 R7 K5 - 0x78220002, // 0081 JMPF R8 #0085 - 0x50200200, // 0082 LDBOOL R8 1 0 - 0x80041000, // 0083 RET 1 R8 - 0x7002002F, // 0084 JMP #00B5 - 0x54220003, // 0085 LDINT R8 4 - 0x1C200E08, // 0086 EQ R8 R7 R8 - 0x7822001B, // 0087 JMPF R8 #00A4 - 0x8C200510, // 0088 GETMET R8 R2 K16 - 0x58280006, // 0089 LDCONST R10 K6 - 0x7C200400, // 008A CALL R8 2 - 0xB8262200, // 008B GETNGBL R9 K17 - 0x8C241312, // 008C GETMET R9 R9 K18 - 0x5C2C1000, // 008D MOVE R11 R8 - 0x58300006, // 008E LDCONST R12 K6 - 0x543600FD, // 008F LDINT R13 254 - 0x58380006, // 0090 LDCONST R14 K6 - 0x543E00FE, // 0091 LDINT R15 255 - 0x7C240C00, // 0092 CALL R9 6 - 0x24281306, // 0093 GT R10 R9 K6 - 0x8C2C090B, // 0094 GETMET R11 R4 K11 - 0x60340013, // 0095 GETGBL R13 G19 - 0x7C340000, // 0096 CALL R13 0 - 0x98362609, // 0097 SETIDX R13 K19 R9 - 0x9836180A, // 0098 SETIDX R13 K12 R10 - 0x7C2C0400, // 0099 CALL R11 2 - 0x8C2C010D, // 009A GETMET R11 R0 K13 - 0x7C2C0200, // 009B CALL R11 1 - 0x602C0008, // 009C GETGBL R11 G8 - 0x5C301000, // 009D MOVE R12 R8 - 0x7C2C0200, // 009E CALL R11 1 - 0x002E2A0B, // 009F ADD R11 K21 R11 - 0x900E280B, // 00A0 SETMBR R3 K20 R11 - 0x502C0200, // 00A1 LDBOOL R11 1 0 - 0x80041600, // 00A2 RET 1 R11 - 0x70020010, // 00A3 JMP #00B5 - 0x54220004, // 00A4 LDINT R8 5 - 0x1C200E08, // 00A5 EQ R8 R7 R8 - 0x78220002, // 00A6 JMPF R8 #00AA - 0x50200200, // 00A7 LDBOOL R8 1 0 - 0x80041000, // 00A8 RET 1 R8 - 0x7002000A, // 00A9 JMP #00B5 - 0x54220005, // 00AA LDINT R8 6 - 0x1C200E08, // 00AB EQ R8 R7 R8 - 0x78220002, // 00AC JMPF R8 #00B0 - 0x50200200, // 00AD LDBOOL R8 1 0 - 0x80041000, // 00AE RET 1 R8 - 0x70020004, // 00AF JMP #00B5 - 0x54220006, // 00B0 LDINT R8 7 - 0x1C200E08, // 00B1 EQ R8 R7 R8 - 0x78220001, // 00B2 JMPF R8 #00B5 - 0x50200200, // 00B3 LDBOOL R8 1 0 - 0x80041000, // 00B4 RET 1 R8 - 0x70020030, // 00B5 JMP #00E7 - 0x542202FF, // 00B6 LDINT R8 768 - 0x1C200C08, // 00B7 EQ R8 R6 R8 - 0x7822002D, // 00B8 JMPF R8 #00E7 - 0x54220009, // 00B9 LDINT R8 10 - 0x1C200E08, // 00BA EQ R8 R7 R8 - 0x78220019, // 00BB JMPF R8 #00D6 - 0x8C200510, // 00BC GETMET R8 R2 K16 - 0x58280006, // 00BD LDCONST R10 K6 - 0x7C200400, // 00BE CALL R8 2 - 0x88240116, // 00BF GETMBR R9 R0 K22 - 0x14241009, // 00C0 LT R9 R8 R9 - 0x78260000, // 00C1 JMPF R9 #00C3 - 0x88200116, // 00C2 GETMBR R8 R0 K22 - 0x88240117, // 00C3 GETMBR R9 R0 K23 - 0x24241009, // 00C4 GT R9 R8 R9 - 0x78260000, // 00C5 JMPF R9 #00C7 - 0x88200117, // 00C6 GETMBR R8 R0 K23 - 0x8C24090B, // 00C7 GETMET R9 R4 K11 - 0x602C0013, // 00C8 GETGBL R11 G19 - 0x7C2C0000, // 00C9 CALL R11 0 - 0x982E3008, // 00CA SETIDX R11 K24 R8 - 0x7C240400, // 00CB CALL R9 2 - 0x8C24010D, // 00CC GETMET R9 R0 K13 - 0x7C240200, // 00CD CALL R9 1 - 0x60240008, // 00CE GETGBL R9 G8 - 0x5C281000, // 00CF MOVE R10 R8 - 0x7C240200, // 00D0 CALL R9 1 - 0x00263209, // 00D1 ADD R9 K25 R9 - 0x900E2809, // 00D2 SETMBR R3 K20 R9 - 0x50240200, // 00D3 LDBOOL R9 1 0 - 0x80041200, // 00D4 RET 1 R9 - 0x70020010, // 00D5 JMP #00E7 - 0x54220046, // 00D6 LDINT R8 71 - 0x1C200E08, // 00D7 EQ R8 R7 R8 - 0x78220002, // 00D8 JMPF R8 #00DC - 0x50200200, // 00D9 LDBOOL R8 1 0 - 0x80041000, // 00DA RET 1 R8 - 0x7002000A, // 00DB JMP #00E7 - 0x5422004A, // 00DC LDINT R8 75 - 0x1C200E08, // 00DD EQ R8 R7 R8 - 0x78220002, // 00DE JMPF R8 #00E2 - 0x50200200, // 00DF LDBOOL R8 1 0 - 0x80041000, // 00E0 RET 1 R8 - 0x70020004, // 00E1 JMP #00E7 - 0x5422004B, // 00E2 LDINT R8 76 - 0x1C200E08, // 00E3 EQ R8 R7 R8 - 0x78220001, // 00E4 JMPF R8 #00E7 - 0x50200200, // 00E5 LDBOOL R8 1 0 - 0x80041000, // 00E6 RET 1 R8 - 0x80000000, // 00E7 RET 0 + 0x542202FF, // 0005 LDINT R8 768 + 0x1C200C08, // 0006 EQ R8 R6 R8 + 0x7822002E, // 0007 JMPF R8 #0037 + 0x54220009, // 0008 LDINT R8 10 + 0x1C200E08, // 0009 EQ R8 R7 R8 + 0x78220019, // 000A JMPF R8 #0025 + 0x8C200505, // 000B GETMET R8 R2 K5 + 0x58280006, // 000C LDCONST R10 K6 + 0x7C200400, // 000D CALL R8 2 + 0x88240107, // 000E GETMBR R9 R0 K7 + 0x14241009, // 000F LT R9 R8 R9 + 0x78260000, // 0010 JMPF R9 #0012 + 0x88200107, // 0011 GETMBR R8 R0 K7 + 0x88240108, // 0012 GETMBR R9 R0 K8 + 0x24241009, // 0013 GT R9 R8 R9 + 0x78260000, // 0014 JMPF R9 #0016 + 0x88200108, // 0015 GETMBR R8 R0 K8 + 0x8C240909, // 0016 GETMET R9 R4 K9 + 0x602C0013, // 0017 GETGBL R11 G19 + 0x7C2C0000, // 0018 CALL R11 0 + 0x982E1408, // 0019 SETIDX R11 K10 R8 + 0x7C240400, // 001A CALL R9 2 + 0x8C24010B, // 001B GETMET R9 R0 K11 + 0x7C240200, // 001C CALL R9 1 + 0x60240008, // 001D GETGBL R9 G8 + 0x5C281000, // 001E MOVE R10 R8 + 0x7C240200, // 001F CALL R9 1 + 0x00261A09, // 0020 ADD R9 K13 R9 + 0x900E1809, // 0021 SETMBR R3 K12 R9 + 0x50240200, // 0022 LDBOOL R9 1 0 + 0x80041200, // 0023 RET 1 R9 + 0x70020010, // 0024 JMP #0036 + 0x54220046, // 0025 LDINT R8 71 + 0x1C200E08, // 0026 EQ R8 R7 R8 + 0x78220002, // 0027 JMPF R8 #002B + 0x50200200, // 0028 LDBOOL R8 1 0 + 0x80041000, // 0029 RET 1 R8 + 0x7002000A, // 002A JMP #0036 + 0x5422004A, // 002B LDINT R8 75 + 0x1C200E08, // 002C EQ R8 R7 R8 + 0x78220002, // 002D JMPF R8 #0031 + 0x50200200, // 002E LDBOOL R8 1 0 + 0x80041000, // 002F RET 1 R8 + 0x70020004, // 0030 JMP #0036 + 0x5422004B, // 0031 LDINT R8 76 + 0x1C200E08, // 0032 EQ R8 R7 R8 + 0x78220001, // 0033 JMPF R8 #0036 + 0x50200200, // 0034 LDBOOL R8 1 0 + 0x80041000, // 0035 RET 1 R8 + 0x70020008, // 0036 JMP #0040 + 0x60200003, // 0037 GETGBL R8 G3 + 0x5C240000, // 0038 MOVE R9 R0 + 0x7C200200, // 0039 CALL R8 1 + 0x8C20110E, // 003A GETMET R8 R8 K14 + 0x5C280200, // 003B MOVE R10 R1 + 0x5C2C0400, // 003C MOVE R11 R2 + 0x5C300600, // 003D MOVE R12 R3 + 0x7C200800, // 003E CALL R8 4 + 0x80041000, // 003F RET 1 R8 + 0x80000000, // 0040 RET 0 }) ) ); @@ -381,7 +315,7 @@ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */ ********************************************************************/ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */ be_nested_proto( - 13, /* nstack */ + 9, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -389,415 +323,47 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ + ( &(const bvalue[ 8]) { /* constants */ /* K0 */ be_nested_str_weak(light), /* K1 */ be_nested_str_weak(update_ct_minmax), - /* K2 */ be_nested_str_weak(get), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(power), - /* K5 */ be_nested_str_weak(bri), - /* K6 */ be_nested_str_weak(ct), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(scale_uint), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(shadow_bri), - /* K11 */ be_nested_str_weak(shadow_ct), - /* K12 */ be_nested_str_weak(shadow_onoff), - /* K13 */ be_nested_str_weak(attribute_updated), + /* K2 */ be_nested_str_weak(update_shadow), + /* K3 */ be_nested_str_weak(get), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(ct), + /* K6 */ be_nested_str_weak(shadow_ct), + /* K7 */ be_nested_str_weak(attribute_updated), }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[63]) { /* code */ + ( &(const binstruction[28]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080101, // 0001 GETMET R2 R0 K1 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x8C0C0503, // 0005 GETMET R3 R2 K3 - 0x58140004, // 0006 LDCONST R5 K4 - 0x4C180000, // 0007 LDNIL R6 - 0x7C0C0600, // 0008 CALL R3 3 - 0x8C100503, // 0009 GETMET R4 R2 K3 - 0x58180005, // 000A LDCONST R6 K5 - 0x4C1C0000, // 000B LDNIL R7 - 0x7C100600, // 000C CALL R4 3 - 0x8C140503, // 000D GETMET R5 R2 K3 - 0x581C0006, // 000E LDCONST R7 K6 - 0x4C200000, // 000F LDNIL R8 - 0x7C140600, // 0010 CALL R5 3 - 0x4C180000, // 0011 LDNIL R6 - 0x20180806, // 0012 NE R6 R4 R6 - 0x781A0009, // 0013 JMPF R6 #001E - 0xB81A0E00, // 0014 GETNGBL R6 K7 - 0x8C180D08, // 0015 GETMET R6 R6 K8 - 0x5C200800, // 0016 MOVE R8 R4 - 0x58240009, // 0017 LDCONST R9 K9 - 0x542A00FE, // 0018 LDINT R10 255 - 0x582C0009, // 0019 LDCONST R11 K9 - 0x543200FD, // 001A LDINT R12 254 - 0x7C180C00, // 001B CALL R6 6 - 0x5C100C00, // 001C MOVE R4 R6 - 0x70020000, // 001D JMP #001F - 0x8810010A, // 001E GETMBR R4 R0 K10 - 0x4C180000, // 001F LDNIL R6 - 0x1C180A06, // 0020 EQ R6 R5 R6 - 0x781A0000, // 0021 JMPF R6 #0023 - 0x8814010B, // 0022 GETMBR R5 R0 K11 - 0x8818010C, // 0023 GETMBR R6 R0 K12 - 0x20180606, // 0024 NE R6 R3 R6 - 0x781A0005, // 0025 JMPF R6 #002C - 0x8C18010D, // 0026 GETMET R6 R0 K13 - 0x4C200000, // 0027 LDNIL R8 - 0x54260005, // 0028 LDINT R9 6 - 0x58280009, // 0029 LDCONST R10 K9 - 0x7C180800, // 002A CALL R6 4 - 0x90021803, // 002B SETMBR R0 K12 R3 - 0x8818010A, // 002C GETMBR R6 R0 K10 - 0x20180806, // 002D NE R6 R4 R6 - 0x781A0005, // 002E JMPF R6 #0035 - 0x8C18010D, // 002F GETMET R6 R0 K13 - 0x4C200000, // 0030 LDNIL R8 - 0x54260007, // 0031 LDINT R9 8 - 0x58280009, // 0032 LDCONST R10 K9 - 0x7C180800, // 0033 CALL R6 4 - 0x90021404, // 0034 SETMBR R0 K10 R4 - 0x8818010B, // 0035 GETMBR R6 R0 K11 - 0x20180A06, // 0036 NE R6 R5 R6 - 0x781A0005, // 0037 JMPF R6 #003E - 0x8C18010D, // 0038 GETMET R6 R0 K13 - 0x4C200000, // 0039 LDNIL R8 - 0x542602FF, // 003A LDINT R9 768 - 0x542A0006, // 003B LDINT R10 7 - 0x7C180800, // 003C CALL R6 4 - 0x90021605, // 003D SETMBR R0 K11 R5 - 0x80000000, // 003E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Plugin_Light2_every_second, /* 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(every_second), - &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_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[20]) { /* 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(3), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(create_TLV), - /* K8 */ be_nested_str_weak(U2), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(U1), - /* K11 */ be_nested_str_weak(U4), - /* K12 */ be_nested_str_weak(BOOL), - /* K13 */ be_nested_str_weak(shadow_onoff), - /* K14 */ be_nested_str_weak(shadow_bri), - /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_weak(shadow_ct), - /* K17 */ be_nested_str_weak(ct_min), - /* K18 */ be_nested_str_weak(ct_max), - /* K19 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[255]) { /* 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 - 0x1C1C0B05, // 0005 EQ R7 R5 K5 - 0x781E0021, // 0006 JMPF R7 #0029 - 0x1C1C0D06, // 0007 EQ R7 R6 K6 - 0x781E0005, // 0008 JMPF R7 #000F - 0x8C1C0907, // 0009 GETMET R7 R4 K7 - 0x88240908, // 000A GETMBR R9 R4 K8 - 0x58280006, // 000B LDCONST R10 K6 - 0x7C1C0600, // 000C CALL R7 3 - 0x80040E00, // 000D RET 1 R7 - 0x70020018, // 000E JMP #0028 - 0x1C1C0D09, // 000F EQ R7 R6 K9 - 0x781E0005, // 0010 JMPF R7 #0017 - 0x8C1C0907, // 0011 GETMET R7 R4 K7 - 0x8824090A, // 0012 GETMBR R9 R4 K10 - 0x58280006, // 0013 LDCONST R10 K6 - 0x7C1C0600, // 0014 CALL R7 3 - 0x80040E00, // 0015 RET 1 R7 - 0x70020010, // 0016 JMP #0028 - 0x541EFFFB, // 0017 LDINT R7 65532 - 0x1C1C0C07, // 0018 EQ R7 R6 R7 - 0x781E0005, // 0019 JMPF R7 #0020 - 0x8C1C0907, // 001A GETMET R7 R4 K7 - 0x8824090B, // 001B GETMBR R9 R4 K11 - 0x58280006, // 001C LDCONST R10 K6 - 0x7C1C0600, // 001D CALL R7 3 - 0x80040E00, // 001E RET 1 R7 - 0x70020007, // 001F JMP #0028 - 0x541EFFFC, // 0020 LDINT R7 65533 - 0x1C1C0C07, // 0021 EQ R7 R6 R7 - 0x781E0004, // 0022 JMPF R7 #0028 - 0x8C1C0907, // 0023 GETMET R7 R4 K7 - 0x8824090B, // 0024 GETMBR R9 R4 K11 - 0x542A0003, // 0025 LDINT R10 4 - 0x7C1C0600, // 0026 CALL R7 3 - 0x80040E00, // 0027 RET 1 R7 - 0x700200D4, // 0028 JMP #00FE - 0x541E0003, // 0029 LDINT R7 4 - 0x1C1C0A07, // 002A EQ R7 R5 R7 - 0x781E0016, // 002B JMPF R7 #0043 - 0x1C1C0D06, // 002C EQ R7 R6 K6 - 0x781E0002, // 002D JMPF R7 #0031 - 0x4C1C0000, // 002E LDNIL R7 - 0x80040E00, // 002F RET 1 R7 - 0x70020010, // 0030 JMP #0042 - 0x541EFFFB, // 0031 LDINT R7 65532 - 0x1C1C0C07, // 0032 EQ R7 R6 R7 - 0x781E0005, // 0033 JMPF R7 #003A - 0x8C1C0907, // 0034 GETMET R7 R4 K7 - 0x8824090B, // 0035 GETMBR R9 R4 K11 - 0x58280006, // 0036 LDCONST R10 K6 - 0x7C1C0600, // 0037 CALL R7 3 - 0x80040E00, // 0038 RET 1 R7 - 0x70020007, // 0039 JMP #0042 - 0x541EFFFC, // 003A LDINT R7 65533 - 0x1C1C0C07, // 003B EQ R7 R6 R7 - 0x781E0004, // 003C JMPF R7 #0042 - 0x8C1C0907, // 003D GETMET R7 R4 K7 - 0x8824090B, // 003E GETMBR R9 R4 K11 - 0x542A0003, // 003F LDINT R10 4 - 0x7C1C0600, // 0040 CALL R7 3 - 0x80040E00, // 0041 RET 1 R7 - 0x700200BA, // 0042 JMP #00FE - 0x541E0004, // 0043 LDINT R7 5 - 0x1C1C0A07, // 0044 EQ R7 R5 R7 - 0x781E0011, // 0045 JMPF R7 #0058 - 0x541EFFFB, // 0046 LDINT R7 65532 - 0x1C1C0C07, // 0047 EQ R7 R6 R7 - 0x781E0005, // 0048 JMPF R7 #004F - 0x8C1C0907, // 0049 GETMET R7 R4 K7 - 0x8824090B, // 004A GETMBR R9 R4 K11 - 0x58280006, // 004B LDCONST R10 K6 - 0x7C1C0600, // 004C CALL R7 3 - 0x80040E00, // 004D RET 1 R7 - 0x70020007, // 004E JMP #0057 - 0x541EFFFC, // 004F LDINT R7 65533 - 0x1C1C0C07, // 0050 EQ R7 R6 R7 - 0x781E0004, // 0051 JMPF R7 #0057 - 0x8C1C0907, // 0052 GETMET R7 R4 K7 - 0x8824090B, // 0053 GETMBR R9 R4 K11 - 0x542A0003, // 0054 LDINT R10 4 - 0x7C1C0600, // 0055 CALL R7 3 - 0x80040E00, // 0056 RET 1 R7 - 0x700200A5, // 0057 JMP #00FE - 0x541E0005, // 0058 LDINT R7 6 - 0x1C1C0A07, // 0059 EQ R7 R5 R7 - 0x781E0019, // 005A JMPF R7 #0075 - 0x1C1C0D06, // 005B EQ R7 R6 K6 - 0x781E0005, // 005C JMPF R7 #0063 - 0x8C1C0907, // 005D GETMET R7 R4 K7 - 0x8824090C, // 005E GETMBR R9 R4 K12 - 0x8828010D, // 005F GETMBR R10 R0 K13 - 0x7C1C0600, // 0060 CALL R7 3 - 0x80040E00, // 0061 RET 1 R7 - 0x70020010, // 0062 JMP #0074 - 0x541EFFFB, // 0063 LDINT R7 65532 - 0x1C1C0C07, // 0064 EQ R7 R6 R7 - 0x781E0005, // 0065 JMPF R7 #006C - 0x8C1C0907, // 0066 GETMET R7 R4 K7 - 0x8824090B, // 0067 GETMBR R9 R4 K11 - 0x58280006, // 0068 LDCONST R10 K6 - 0x7C1C0600, // 0069 CALL R7 3 - 0x80040E00, // 006A RET 1 R7 - 0x70020007, // 006B JMP #0074 - 0x541EFFFC, // 006C LDINT R7 65533 - 0x1C1C0C07, // 006D EQ R7 R6 R7 - 0x781E0004, // 006E JMPF R7 #0074 - 0x8C1C0907, // 006F GETMET R7 R4 K7 - 0x8824090B, // 0070 GETMBR R9 R4 K11 - 0x542A0003, // 0071 LDINT R10 4 - 0x7C1C0600, // 0072 CALL R7 3 - 0x80040E00, // 0073 RET 1 R7 - 0x70020088, // 0074 JMP #00FE - 0x541E0007, // 0075 LDINT R7 8 - 0x1C1C0A07, // 0076 EQ R7 R5 R7 - 0x781E003B, // 0077 JMPF R7 #00B4 - 0x1C1C0D06, // 0078 EQ R7 R6 K6 - 0x781E0005, // 0079 JMPF R7 #0080 - 0x8C1C0907, // 007A GETMET R7 R4 K7 - 0x8824090A, // 007B GETMBR R9 R4 K10 - 0x8828010E, // 007C GETMBR R10 R0 K14 - 0x7C1C0600, // 007D CALL R7 3 - 0x80040E00, // 007E RET 1 R7 - 0x70020032, // 007F JMP #00B3 - 0x1C1C0D0F, // 0080 EQ R7 R6 K15 - 0x781E0005, // 0081 JMPF R7 #0088 - 0x8C1C0907, // 0082 GETMET R7 R4 K7 - 0x8824090A, // 0083 GETMBR R9 R4 K10 - 0x58280006, // 0084 LDCONST R10 K6 - 0x7C1C0600, // 0085 CALL R7 3 - 0x80040E00, // 0086 RET 1 R7 - 0x7002002A, // 0087 JMP #00B3 - 0x1C1C0D05, // 0088 EQ R7 R6 K5 - 0x781E0005, // 0089 JMPF R7 #0090 - 0x8C1C0907, // 008A GETMET R7 R4 K7 - 0x8824090A, // 008B GETMBR R9 R4 K10 - 0x542A00FD, // 008C LDINT R10 254 - 0x7C1C0600, // 008D CALL R7 3 - 0x80040E00, // 008E RET 1 R7 - 0x70020022, // 008F JMP #00B3 - 0x541E000E, // 0090 LDINT R7 15 - 0x1C1C0C07, // 0091 EQ R7 R6 R7 - 0x781E0005, // 0092 JMPF R7 #0099 - 0x8C1C0907, // 0093 GETMET R7 R4 K7 - 0x8824090A, // 0094 GETMBR R9 R4 K10 - 0x58280006, // 0095 LDCONST R10 K6 - 0x7C1C0600, // 0096 CALL R7 3 - 0x80040E00, // 0097 RET 1 R7 - 0x70020019, // 0098 JMP #00B3 - 0x541E0010, // 0099 LDINT R7 17 - 0x1C1C0C07, // 009A EQ R7 R6 R7 - 0x781E0005, // 009B JMPF R7 #00A2 - 0x8C1C0907, // 009C GETMET R7 R4 K7 - 0x8824090A, // 009D GETMBR R9 R4 K10 - 0x8828010E, // 009E GETMBR R10 R0 K14 - 0x7C1C0600, // 009F CALL R7 3 - 0x80040E00, // 00A0 RET 1 R7 - 0x70020010, // 00A1 JMP #00B3 - 0x541EFFFB, // 00A2 LDINT R7 65532 - 0x1C1C0C07, // 00A3 EQ R7 R6 R7 - 0x781E0005, // 00A4 JMPF R7 #00AB - 0x8C1C0907, // 00A5 GETMET R7 R4 K7 - 0x8824090B, // 00A6 GETMBR R9 R4 K11 - 0x58280009, // 00A7 LDCONST R10 K9 - 0x7C1C0600, // 00A8 CALL R7 3 - 0x80040E00, // 00A9 RET 1 R7 - 0x70020007, // 00AA JMP #00B3 - 0x541EFFFC, // 00AB LDINT R7 65533 - 0x1C1C0C07, // 00AC EQ R7 R6 R7 - 0x781E0004, // 00AD JMPF R7 #00B3 - 0x8C1C0907, // 00AE GETMET R7 R4 K7 - 0x8824090B, // 00AF GETMBR R9 R4 K11 - 0x542A0004, // 00B0 LDINT R10 5 - 0x7C1C0600, // 00B1 CALL R7 3 - 0x80040E00, // 00B2 RET 1 R7 - 0x70020049, // 00B3 JMP #00FE - 0x541E02FF, // 00B4 LDINT R7 768 - 0x1C1C0A07, // 00B5 EQ R7 R5 R7 - 0x781E003E, // 00B6 JMPF R7 #00F6 - 0x541E0006, // 00B7 LDINT R7 7 - 0x1C1C0C07, // 00B8 EQ R7 R6 R7 - 0x781E0005, // 00B9 JMPF R7 #00C0 - 0x8C1C0907, // 00BA GETMET R7 R4 K7 - 0x8824090A, // 00BB GETMBR R9 R4 K10 - 0x88280110, // 00BC GETMBR R10 R0 K16 - 0x7C1C0600, // 00BD CALL R7 3 - 0x80040E00, // 00BE RET 1 R7 - 0x70020034, // 00BF JMP #00F5 - 0x541E0007, // 00C0 LDINT R7 8 - 0x1C1C0C07, // 00C1 EQ R7 R6 R7 - 0x781E0005, // 00C2 JMPF R7 #00C9 - 0x8C1C0907, // 00C3 GETMET R7 R4 K7 - 0x8824090A, // 00C4 GETMBR R9 R4 K10 - 0x5828000F, // 00C5 LDCONST R10 K15 - 0x7C1C0600, // 00C6 CALL R7 3 - 0x80040E00, // 00C7 RET 1 R7 - 0x7002002B, // 00C8 JMP #00F5 - 0x541E000E, // 00C9 LDINT R7 15 - 0x1C1C0C07, // 00CA EQ R7 R6 R7 - 0x781E0005, // 00CB JMPF R7 #00D2 - 0x8C1C0907, // 00CC GETMET R7 R4 K7 - 0x8824090A, // 00CD GETMBR R9 R4 K10 - 0x58280006, // 00CE LDCONST R10 K6 - 0x7C1C0600, // 00CF CALL R7 3 - 0x80040E00, // 00D0 RET 1 R7 - 0x70020022, // 00D1 JMP #00F5 - 0x541E400A, // 00D2 LDINT R7 16395 - 0x1C1C0C07, // 00D3 EQ R7 R6 R7 - 0x781E0005, // 00D4 JMPF R7 #00DB - 0x8C1C0907, // 00D5 GETMET R7 R4 K7 - 0x8824090A, // 00D6 GETMBR R9 R4 K10 - 0x88280111, // 00D7 GETMBR R10 R0 K17 - 0x7C1C0600, // 00D8 CALL R7 3 - 0x80040E00, // 00D9 RET 1 R7 - 0x70020019, // 00DA JMP #00F5 - 0x541E400B, // 00DB LDINT R7 16396 - 0x1C1C0C07, // 00DC EQ R7 R6 R7 - 0x781E0005, // 00DD JMPF R7 #00E4 - 0x8C1C0907, // 00DE GETMET R7 R4 K7 - 0x8824090A, // 00DF GETMBR R9 R4 K10 - 0x88280112, // 00E0 GETMBR R10 R0 K18 - 0x7C1C0600, // 00E1 CALL R7 3 - 0x80040E00, // 00E2 RET 1 R7 - 0x70020010, // 00E3 JMP #00F5 - 0x541EFFFB, // 00E4 LDINT R7 65532 - 0x1C1C0C07, // 00E5 EQ R7 R6 R7 - 0x781E0005, // 00E6 JMPF R7 #00ED - 0x8C1C0907, // 00E7 GETMET R7 R4 K7 - 0x8824090B, // 00E8 GETMBR R9 R4 K11 - 0x542A000F, // 00E9 LDINT R10 16 - 0x7C1C0600, // 00EA CALL R7 3 - 0x80040E00, // 00EB RET 1 R7 - 0x70020007, // 00EC JMP #00F5 - 0x541EFFFC, // 00ED LDINT R7 65533 - 0x1C1C0C07, // 00EE EQ R7 R6 R7 - 0x781E0004, // 00EF JMPF R7 #00F5 - 0x8C1C0907, // 00F0 GETMET R7 R4 K7 - 0x8824090B, // 00F1 GETMBR R9 R4 K11 - 0x542A0004, // 00F2 LDINT R10 5 - 0x7C1C0600, // 00F3 CALL R7 3 - 0x80040E00, // 00F4 RET 1 R7 - 0x70020007, // 00F5 JMP #00FE - 0x601C0003, // 00F6 GETGBL R7 G3 - 0x5C200000, // 00F7 MOVE R8 R0 - 0x7C1C0200, // 00F8 CALL R7 1 - 0x8C1C0F13, // 00F9 GETMET R7 R7 K19 - 0x5C240200, // 00FA MOVE R9 R1 - 0x5C280400, // 00FB MOVE R10 R2 - 0x7C1C0600, // 00FC CALL R7 3 - 0x80040E00, // 00FD RET 1 R7 - 0x80000000, // 00FE RET 0 + 0x60080003, // 0003 GETGBL R2 G3 + 0x5C0C0000, // 0004 MOVE R3 R0 + 0x7C080200, // 0005 CALL R2 1 + 0x8C080502, // 0006 GETMET R2 R2 K2 + 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 + 0x78120005, // 0014 JMPF R4 #001B + 0x8C100107, // 0015 GETMET R4 R0 K7 + 0x4C180000, // 0016 LDNIL R6 + 0x541E02FF, // 0017 LDINT R7 768 + 0x54220006, // 0018 LDINT R8 7 + 0x7C100800, // 0019 CALL R4 4 + 0x90020C03, // 001A SETMBR R0 K6 R3 + 0x80000000, // 001B RET 0 }) ) ); @@ -807,77 +373,40 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */ /******************************************************************** ** Solidified class: Matter_Plugin_Light2 ********************************************************************/ -extern const bclass be_class_Matter_Plugin; +extern const bclass be_class_Matter_Plugin_Light1; be_local_class(Matter_Plugin_Light2, - 5, - &be_class_Matter_Plugin, - be_nested_map(13, + 3, + &be_class_Matter_Plugin_Light1, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(shadow_onoff, 1), be_const_var(4) }, - { be_const_key_weak(ct_min, -1), be_const_var(2) }, - { be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) }, - { be_const_key_weak(invoke_request, 2), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) }, - { be_const_key_weak(shadow_ct, -1), be_const_var(1) }, - { be_const_key_weak(ct_max, 3), be_const_var(3) }, - { be_const_key_weak(init, 4), be_const_closure(Matter_Plugin_Light2_init_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) }, - { be_const_key_weak(shadow_bri, -1), be_const_var(0) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_Light2_every_second_closure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(5, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { 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(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(4, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(8, 2), 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_int(4, -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_Light2_read_attribute_closure) }, { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(268, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(shadow_ct, -1), be_const_var(0) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) }, + { be_const_key_weak(ct_min, 8), 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(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(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) }, + { be_const_key_weak(update_ct_minmax, 6), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) }, + { be_const_key_weak(ct_max, -1), be_const_var(2) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) }, })), be_str_weak(Matter_Plugin_Light2) ); 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 1778b26f1..2c86c864a 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 @@ -7,365 +7,37 @@ extern const bclass be_class_Matter_Plugin_Light3; /******************************************************************** -** Solidified function: invoke_request +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */ +be_local_closure(Matter_Plugin_Light3_init, /* name */ be_nested_proto( - 18, /* nstack */ - 4, /* 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[27]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(command), - /* K5 */ be_const_int(3), - /* K6 */ be_const_int(0), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(Matter_TLV_struct), - /* K9 */ be_nested_str_weak(add_TLV), - /* K10 */ be_nested_str_weak(U2), - /* K11 */ be_nested_str_weak(set), - /* K12 */ be_nested_str_weak(power), - /* K13 */ be_nested_str_weak(update_shadow), - /* K14 */ be_const_int(2), - /* K15 */ be_nested_str_weak(shadow_onoff), - /* K16 */ be_nested_str_weak(findsubval), - /* K17 */ be_nested_str_weak(tasmota), - /* K18 */ be_nested_str_weak(scale_uint), - /* K19 */ be_nested_str_weak(bri), - /* K20 */ be_nested_str_weak(log), - /* K21 */ be_nested_str_weak(bri_X3A), - /* K22 */ be_nested_str_weak(hue), - /* K23 */ be_nested_str_weak(hue_X3A), - /* K24 */ be_nested_str_weak(sat), - /* K25 */ be_nested_str_weak(sat_X3A), - /* K26 */ be_nested_str_weak(_X20sat_X3A), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_hue), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(shadow_sat), }), - be_str_weak(invoke_request), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[315]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0xB8160200, // 0001 GETNGBL R5 K1 - 0x88140B02, // 0002 GETMBR R5 R5 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x1C200D05, // 0005 EQ R8 R6 K5 - 0x78220016, // 0006 JMPF R8 #001E - 0x1C200F06, // 0007 EQ R8 R7 K6 - 0x78220002, // 0008 JMPF R8 #000C - 0x50200200, // 0009 LDBOOL R8 1 0 - 0x80041000, // 000A RET 1 R8 - 0x70020010, // 000B JMP #001D - 0x1C200F07, // 000C EQ R8 R7 K7 - 0x78220009, // 000D JMPF R8 #0018 - 0x8C200B08, // 000E GETMET R8 R5 K8 - 0x7C200200, // 000F CALL R8 1 - 0x8C241109, // 0010 GETMET R9 R8 K9 - 0x582C0006, // 0011 LDCONST R11 K6 - 0x88300B0A, // 0012 GETMBR R12 R5 K10 - 0x58340006, // 0013 LDCONST R13 K6 - 0x7C240800, // 0014 CALL R9 4 - 0x900E0906, // 0015 SETMBR R3 K4 K6 - 0x80041000, // 0016 RET 1 R8 - 0x70020004, // 0017 JMP #001D - 0x5422003F, // 0018 LDINT R8 64 - 0x1C200E08, // 0019 EQ R8 R7 R8 - 0x78220001, // 001A JMPF R8 #001D - 0x50200200, // 001B LDBOOL R8 1 0 - 0x80041000, // 001C RET 1 R8 - 0x7002011B, // 001D JMP #013A - 0x54220003, // 001E LDINT R8 4 - 0x1C200C08, // 001F EQ R8 R6 R8 - 0x78220002, // 0020 JMPF R8 #0024 - 0x50200200, // 0021 LDBOOL R8 1 0 - 0x80041000, // 0022 RET 1 R8 - 0x70020115, // 0023 JMP #013A - 0x54220004, // 0024 LDINT R8 5 - 0x1C200C08, // 0025 EQ R8 R6 R8 - 0x78220002, // 0026 JMPF R8 #002A - 0x50200200, // 0027 LDBOOL R8 1 0 - 0x80041000, // 0028 RET 1 R8 - 0x7002010F, // 0029 JMP #013A - 0x54220005, // 002A LDINT R8 6 - 0x1C200C08, // 002B EQ R8 R6 R8 - 0x78220029, // 002C JMPF R8 #0057 - 0x1C200F06, // 002D EQ R8 R7 K6 - 0x7822000A, // 002E JMPF R8 #003A - 0x8C20090B, // 002F GETMET R8 R4 K11 - 0x60280013, // 0030 GETGBL R10 G19 - 0x7C280000, // 0031 CALL R10 0 - 0x502C0000, // 0032 LDBOOL R11 0 0 - 0x982A180B, // 0033 SETIDX R10 K12 R11 - 0x7C200400, // 0034 CALL R8 2 - 0x8C20010D, // 0035 GETMET R8 R0 K13 - 0x7C200200, // 0036 CALL R8 1 - 0x50200200, // 0037 LDBOOL R8 1 0 - 0x80041000, // 0038 RET 1 R8 - 0x7002001B, // 0039 JMP #0056 - 0x1C200F07, // 003A EQ R8 R7 K7 - 0x7822000A, // 003B JMPF R8 #0047 - 0x8C20090B, // 003C GETMET R8 R4 K11 - 0x60280013, // 003D GETGBL R10 G19 - 0x7C280000, // 003E CALL R10 0 - 0x502C0200, // 003F LDBOOL R11 1 0 - 0x982A180B, // 0040 SETIDX R10 K12 R11 - 0x7C200400, // 0041 CALL R8 2 - 0x8C20010D, // 0042 GETMET R8 R0 K13 - 0x7C200200, // 0043 CALL R8 1 - 0x50200200, // 0044 LDBOOL R8 1 0 - 0x80041000, // 0045 RET 1 R8 - 0x7002000E, // 0046 JMP #0056 - 0x1C200F0E, // 0047 EQ R8 R7 K14 - 0x7822000C, // 0048 JMPF R8 #0056 - 0x8C20090B, // 0049 GETMET R8 R4 K11 - 0x60280013, // 004A GETGBL R10 G19 - 0x7C280000, // 004B CALL R10 0 - 0x882C010F, // 004C GETMBR R11 R0 K15 - 0x782E0000, // 004D JMPF R11 #004F - 0x502C0001, // 004E LDBOOL R11 0 1 - 0x502C0200, // 004F LDBOOL R11 1 0 - 0x982A180B, // 0050 SETIDX R10 K12 R11 - 0x7C200400, // 0051 CALL R8 2 - 0x8C20010D, // 0052 GETMET R8 R0 K13 - 0x7C200200, // 0053 CALL R8 1 - 0x50200200, // 0054 LDBOOL R8 1 0 - 0x80041000, // 0055 RET 1 R8 - 0x700200E2, // 0056 JMP #013A - 0x54220007, // 0057 LDINT R8 8 - 0x1C200C08, // 0058 EQ R8 R6 R8 - 0x7822005B, // 0059 JMPF R8 #00B6 - 0x1C200F06, // 005A EQ R8 R7 K6 - 0x78220019, // 005B JMPF R8 #0076 - 0x8C200510, // 005C GETMET R8 R2 K16 - 0x58280006, // 005D LDCONST R10 K6 - 0x7C200400, // 005E CALL R8 2 - 0xB8262200, // 005F GETNGBL R9 K17 - 0x8C241312, // 0060 GETMET R9 R9 K18 - 0x5C2C1000, // 0061 MOVE R11 R8 - 0x58300006, // 0062 LDCONST R12 K6 - 0x543600FD, // 0063 LDINT R13 254 - 0x58380006, // 0064 LDCONST R14 K6 - 0x543E00FE, // 0065 LDINT R15 255 - 0x7C240C00, // 0066 CALL R9 6 - 0x8C28090B, // 0067 GETMET R10 R4 K11 - 0x60300013, // 0068 GETGBL R12 G19 - 0x7C300000, // 0069 CALL R12 0 - 0x98322609, // 006A SETIDX R12 K19 R9 - 0x7C280400, // 006B CALL R10 2 - 0x8C28010D, // 006C GETMET R10 R0 K13 - 0x7C280200, // 006D CALL R10 1 - 0x60280008, // 006E GETGBL R10 G8 - 0x5C2C1000, // 006F MOVE R11 R8 - 0x7C280200, // 0070 CALL R10 1 - 0x002A2A0A, // 0071 ADD R10 K21 R10 - 0x900E280A, // 0072 SETMBR R3 K20 R10 - 0x50280200, // 0073 LDBOOL R10 1 0 - 0x80041400, // 0074 RET 1 R10 - 0x7002003E, // 0075 JMP #00B5 - 0x1C200F07, // 0076 EQ R8 R7 K7 - 0x78220002, // 0077 JMPF R8 #007B - 0x50200200, // 0078 LDBOOL R8 1 0 - 0x80041000, // 0079 RET 1 R8 - 0x70020039, // 007A JMP #00B5 - 0x1C200F0E, // 007B EQ R8 R7 K14 - 0x78220002, // 007C JMPF R8 #0080 - 0x50200200, // 007D LDBOOL R8 1 0 - 0x80041000, // 007E RET 1 R8 - 0x70020034, // 007F JMP #00B5 - 0x1C200F05, // 0080 EQ R8 R7 K5 - 0x78220002, // 0081 JMPF R8 #0085 - 0x50200200, // 0082 LDBOOL R8 1 0 - 0x80041000, // 0083 RET 1 R8 - 0x7002002F, // 0084 JMP #00B5 - 0x54220003, // 0085 LDINT R8 4 - 0x1C200E08, // 0086 EQ R8 R7 R8 - 0x7822001B, // 0087 JMPF R8 #00A4 - 0x8C200510, // 0088 GETMET R8 R2 K16 - 0x58280006, // 0089 LDCONST R10 K6 - 0x7C200400, // 008A CALL R8 2 - 0xB8262200, // 008B GETNGBL R9 K17 - 0x8C241312, // 008C GETMET R9 R9 K18 - 0x5C2C1000, // 008D MOVE R11 R8 - 0x58300006, // 008E LDCONST R12 K6 - 0x543600FD, // 008F LDINT R13 254 - 0x58380006, // 0090 LDCONST R14 K6 - 0x543E00FE, // 0091 LDINT R15 255 - 0x7C240C00, // 0092 CALL R9 6 - 0x24281306, // 0093 GT R10 R9 K6 - 0x8C2C090B, // 0094 GETMET R11 R4 K11 - 0x60340013, // 0095 GETGBL R13 G19 - 0x7C340000, // 0096 CALL R13 0 - 0x98362609, // 0097 SETIDX R13 K19 R9 - 0x9836180A, // 0098 SETIDX R13 K12 R10 - 0x7C2C0400, // 0099 CALL R11 2 - 0x8C2C010D, // 009A GETMET R11 R0 K13 - 0x7C2C0200, // 009B CALL R11 1 - 0x602C0008, // 009C GETGBL R11 G8 - 0x5C301000, // 009D MOVE R12 R8 - 0x7C2C0200, // 009E CALL R11 1 - 0x002E2A0B, // 009F ADD R11 K21 R11 - 0x900E280B, // 00A0 SETMBR R3 K20 R11 - 0x502C0200, // 00A1 LDBOOL R11 1 0 - 0x80041600, // 00A2 RET 1 R11 - 0x70020010, // 00A3 JMP #00B5 - 0x54220004, // 00A4 LDINT R8 5 - 0x1C200E08, // 00A5 EQ R8 R7 R8 - 0x78220002, // 00A6 JMPF R8 #00AA - 0x50200200, // 00A7 LDBOOL R8 1 0 - 0x80041000, // 00A8 RET 1 R8 - 0x7002000A, // 00A9 JMP #00B5 - 0x54220005, // 00AA LDINT R8 6 - 0x1C200E08, // 00AB EQ R8 R7 R8 - 0x78220002, // 00AC JMPF R8 #00B0 - 0x50200200, // 00AD LDBOOL R8 1 0 - 0x80041000, // 00AE RET 1 R8 - 0x70020004, // 00AF JMP #00B5 - 0x54220006, // 00B0 LDINT R8 7 - 0x1C200E08, // 00B1 EQ R8 R7 R8 - 0x78220001, // 00B2 JMPF R8 #00B5 - 0x50200200, // 00B3 LDBOOL R8 1 0 - 0x80041000, // 00B4 RET 1 R8 - 0x70020083, // 00B5 JMP #013A - 0x542202FF, // 00B6 LDINT R8 768 - 0x1C200C08, // 00B7 EQ R8 R6 R8 - 0x78220080, // 00B8 JMPF R8 #013A - 0x1C200F06, // 00B9 EQ R8 R7 K6 - 0x78220019, // 00BA JMPF R8 #00D5 - 0x8C200510, // 00BB GETMET R8 R2 K16 - 0x58280006, // 00BC LDCONST R10 K6 - 0x7C200400, // 00BD CALL R8 2 - 0xB8262200, // 00BE GETNGBL R9 K17 - 0x8C241312, // 00BF GETMET R9 R9 K18 - 0x5C2C1000, // 00C0 MOVE R11 R8 - 0x58300006, // 00C1 LDCONST R12 K6 - 0x543600FD, // 00C2 LDINT R13 254 - 0x58380006, // 00C3 LDCONST R14 K6 - 0x543E0167, // 00C4 LDINT R15 360 - 0x7C240C00, // 00C5 CALL R9 6 - 0x8C28090B, // 00C6 GETMET R10 R4 K11 - 0x60300013, // 00C7 GETGBL R12 G19 - 0x7C300000, // 00C8 CALL R12 0 - 0x98322C09, // 00C9 SETIDX R12 K22 R9 - 0x7C280400, // 00CA CALL R10 2 - 0x8C28010D, // 00CB GETMET R10 R0 K13 - 0x7C280200, // 00CC CALL R10 1 - 0x60280008, // 00CD GETGBL R10 G8 - 0x5C2C1000, // 00CE MOVE R11 R8 - 0x7C280200, // 00CF CALL R10 1 - 0x002A2E0A, // 00D0 ADD R10 K23 R10 - 0x900E280A, // 00D1 SETMBR R3 K20 R10 - 0x50280200, // 00D2 LDBOOL R10 1 0 - 0x80041400, // 00D3 RET 1 R10 - 0x70020064, // 00D4 JMP #013A - 0x1C200F07, // 00D5 EQ R8 R7 K7 - 0x78220002, // 00D6 JMPF R8 #00DA - 0x50200200, // 00D7 LDBOOL R8 1 0 - 0x80041000, // 00D8 RET 1 R8 - 0x7002005F, // 00D9 JMP #013A - 0x1C200F0E, // 00DA EQ R8 R7 K14 - 0x78220002, // 00DB JMPF R8 #00DF - 0x50200200, // 00DC LDBOOL R8 1 0 - 0x80041000, // 00DD RET 1 R8 - 0x7002005A, // 00DE JMP #013A - 0x1C200F05, // 00DF EQ R8 R7 K5 - 0x78220019, // 00E0 JMPF R8 #00FB - 0x8C200510, // 00E1 GETMET R8 R2 K16 - 0x58280006, // 00E2 LDCONST R10 K6 - 0x7C200400, // 00E3 CALL R8 2 - 0xB8262200, // 00E4 GETNGBL R9 K17 - 0x8C241312, // 00E5 GETMET R9 R9 K18 - 0x5C2C1000, // 00E6 MOVE R11 R8 - 0x58300006, // 00E7 LDCONST R12 K6 - 0x543600FD, // 00E8 LDINT R13 254 - 0x58380006, // 00E9 LDCONST R14 K6 - 0x543E00FE, // 00EA LDINT R15 255 - 0x7C240C00, // 00EB CALL R9 6 - 0x8C28090B, // 00EC GETMET R10 R4 K11 - 0x60300013, // 00ED GETGBL R12 G19 - 0x7C300000, // 00EE CALL R12 0 - 0x98323009, // 00EF SETIDX R12 K24 R9 - 0x7C280400, // 00F0 CALL R10 2 - 0x8C28010D, // 00F1 GETMET R10 R0 K13 - 0x7C280200, // 00F2 CALL R10 1 - 0x60280008, // 00F3 GETGBL R10 G8 - 0x5C2C1000, // 00F4 MOVE R11 R8 - 0x7C280200, // 00F5 CALL R10 1 - 0x002A320A, // 00F6 ADD R10 K25 R10 - 0x900E280A, // 00F7 SETMBR R3 K20 R10 - 0x50280200, // 00F8 LDBOOL R10 1 0 - 0x80041400, // 00F9 RET 1 R10 - 0x7002003E, // 00FA JMP #013A - 0x54220003, // 00FB LDINT R8 4 - 0x1C200E08, // 00FC EQ R8 R7 R8 - 0x78220002, // 00FD JMPF R8 #0101 - 0x50200200, // 00FE LDBOOL R8 1 0 - 0x80041000, // 00FF RET 1 R8 - 0x70020038, // 0100 JMP #013A - 0x54220004, // 0101 LDINT R8 5 - 0x1C200E08, // 0102 EQ R8 R7 R8 - 0x78220002, // 0103 JMPF R8 #0107 - 0x50200200, // 0104 LDBOOL R8 1 0 - 0x80041000, // 0105 RET 1 R8 - 0x70020032, // 0106 JMP #013A - 0x54220005, // 0107 LDINT R8 6 - 0x1C200E08, // 0108 EQ R8 R7 R8 - 0x7822002A, // 0109 JMPF R8 #0135 - 0x8C200510, // 010A GETMET R8 R2 K16 - 0x58280006, // 010B LDCONST R10 K6 - 0x7C200400, // 010C CALL R8 2 - 0xB8262200, // 010D GETNGBL R9 K17 - 0x8C241312, // 010E GETMET R9 R9 K18 - 0x5C2C1000, // 010F MOVE R11 R8 - 0x58300006, // 0110 LDCONST R12 K6 - 0x543600FD, // 0111 LDINT R13 254 - 0x58380006, // 0112 LDCONST R14 K6 - 0x543E0167, // 0113 LDINT R15 360 - 0x7C240C00, // 0114 CALL R9 6 - 0x8C280510, // 0115 GETMET R10 R2 K16 - 0x58300007, // 0116 LDCONST R12 K7 - 0x7C280400, // 0117 CALL R10 2 - 0xB82E2200, // 0118 GETNGBL R11 K17 - 0x8C2C1712, // 0119 GETMET R11 R11 K18 - 0x5C341400, // 011A MOVE R13 R10 - 0x58380006, // 011B LDCONST R14 K6 - 0x543E00FD, // 011C LDINT R15 254 - 0x58400006, // 011D LDCONST R16 K6 - 0x544600FE, // 011E LDINT R17 255 - 0x7C2C0C00, // 011F CALL R11 6 - 0x8C30090B, // 0120 GETMET R12 R4 K11 - 0x60380013, // 0121 GETGBL R14 G19 - 0x7C380000, // 0122 CALL R14 0 - 0x983A2C09, // 0123 SETIDX R14 K22 R9 - 0x983A300B, // 0124 SETIDX R14 K24 R11 - 0x7C300400, // 0125 CALL R12 2 - 0x8C30010D, // 0126 GETMET R12 R0 K13 - 0x7C300200, // 0127 CALL R12 1 - 0x60300008, // 0128 GETGBL R12 G8 - 0x5C341000, // 0129 MOVE R13 R8 - 0x7C300200, // 012A CALL R12 1 - 0x00322E0C, // 012B ADD R12 K23 R12 - 0x0030191A, // 012C ADD R12 R12 K26 - 0x60340008, // 012D GETGBL R13 G8 - 0x5C381400, // 012E MOVE R14 R10 - 0x7C340200, // 012F CALL R13 1 - 0x0030180D, // 0130 ADD R12 R12 R13 - 0x900E280C, // 0131 SETMBR R3 K20 R12 - 0x50300200, // 0132 LDBOOL R12 1 0 - 0x80041800, // 0133 RET 1 R12 - 0x70020004, // 0134 JMP #013A - 0x54220046, // 0135 LDINT R8 71 - 0x1C200E08, // 0136 EQ R8 R7 R8 - 0x78220001, // 0137 JMPF R8 #013A - 0x50200200, // 0138 LDBOOL R8 1 0 - 0x80041000, // 0139 RET 1 R8 - 0x80000000, // 013A RET 0 + ( &(const binstruction[10]) { /* 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 + 0x90020302, // 0007 SETMBR R0 K1 K2 + 0x90020702, // 0008 SETMBR R0 K3 K2 + 0x80000000, // 0009 RET 0 }) ) ); @@ -385,310 +57,322 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[19]) { /* constants */ + ( &(const bvalue[13]) { /* 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(3), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(create_TLV), - /* K8 */ be_nested_str_weak(U2), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(create_TLV), + /* K7 */ be_nested_str_weak(U1), + /* K8 */ be_nested_str_weak(shadow_hue), /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(U1), + /* K10 */ be_nested_str_weak(shadow_sat), /* K11 */ be_nested_str_weak(U4), - /* K12 */ be_nested_str_weak(BOOL), - /* K13 */ be_nested_str_weak(shadow_onoff), - /* K14 */ be_nested_str_weak(shadow_bri), - /* K15 */ be_const_int(2), - /* K16 */ be_nested_str_weak(shadow_hue), - /* K17 */ be_nested_str_weak(shadow_sat), - /* K18 */ be_nested_str_weak(read_attribute), + /* K12 */ be_nested_str_weak(read_attribute), }), be_str_weak(read_attribute), &be_const_str_solidified, - ( &(const binstruction[280]) { /* code */ + ( &(const binstruction[105]) { /* 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 - 0x1C1C0B05, // 0005 EQ R7 R5 K5 - 0x781E0021, // 0006 JMPF R7 #0029 - 0x1C1C0D06, // 0007 EQ R7 R6 K6 - 0x781E0005, // 0008 JMPF R7 #000F - 0x8C1C0907, // 0009 GETMET R7 R4 K7 - 0x88240908, // 000A GETMBR R9 R4 K8 - 0x58280006, // 000B LDCONST R10 K6 - 0x7C1C0600, // 000C CALL R7 3 - 0x80040E00, // 000D RET 1 R7 - 0x70020018, // 000E JMP #0028 - 0x1C1C0D09, // 000F EQ R7 R6 K9 - 0x781E0005, // 0010 JMPF R7 #0017 - 0x8C1C0907, // 0011 GETMET R7 R4 K7 - 0x8824090A, // 0012 GETMBR R9 R4 K10 - 0x58280006, // 0013 LDCONST R10 K6 - 0x7C1C0600, // 0014 CALL R7 3 - 0x80040E00, // 0015 RET 1 R7 - 0x70020010, // 0016 JMP #0028 - 0x541EFFFB, // 0017 LDINT R7 65532 - 0x1C1C0C07, // 0018 EQ R7 R6 R7 - 0x781E0005, // 0019 JMPF R7 #0020 - 0x8C1C0907, // 001A GETMET R7 R4 K7 - 0x8824090B, // 001B GETMBR R9 R4 K11 - 0x58280006, // 001C LDCONST R10 K6 - 0x7C1C0600, // 001D CALL R7 3 - 0x80040E00, // 001E RET 1 R7 - 0x70020007, // 001F JMP #0028 - 0x541EFFFC, // 0020 LDINT R7 65533 - 0x1C1C0C07, // 0021 EQ R7 R6 R7 - 0x781E0004, // 0022 JMPF R7 #0028 - 0x8C1C0907, // 0023 GETMET R7 R4 K7 - 0x8824090B, // 0024 GETMBR R9 R4 K11 - 0x542A0003, // 0025 LDINT R10 4 - 0x7C1C0600, // 0026 CALL R7 3 - 0x80040E00, // 0027 RET 1 R7 - 0x700200ED, // 0028 JMP #0117 - 0x541E0003, // 0029 LDINT R7 4 - 0x1C1C0A07, // 002A EQ R7 R5 R7 - 0x781E0016, // 002B JMPF R7 #0043 - 0x1C1C0D06, // 002C EQ R7 R6 K6 - 0x781E0002, // 002D JMPF R7 #0031 - 0x4C1C0000, // 002E LDNIL R7 - 0x80040E00, // 002F RET 1 R7 - 0x70020010, // 0030 JMP #0042 - 0x541EFFFB, // 0031 LDINT R7 65532 - 0x1C1C0C07, // 0032 EQ R7 R6 R7 - 0x781E0005, // 0033 JMPF R7 #003A - 0x8C1C0907, // 0034 GETMET R7 R4 K7 - 0x8824090B, // 0035 GETMBR R9 R4 K11 - 0x58280006, // 0036 LDCONST R10 K6 - 0x7C1C0600, // 0037 CALL R7 3 - 0x80040E00, // 0038 RET 1 R7 - 0x70020007, // 0039 JMP #0042 - 0x541EFFFC, // 003A LDINT R7 65533 - 0x1C1C0C07, // 003B EQ R7 R6 R7 - 0x781E0004, // 003C JMPF R7 #0042 - 0x8C1C0907, // 003D GETMET R7 R4 K7 - 0x8824090B, // 003E GETMBR R9 R4 K11 - 0x542A0003, // 003F LDINT R10 4 - 0x7C1C0600, // 0040 CALL R7 3 - 0x80040E00, // 0041 RET 1 R7 - 0x700200D3, // 0042 JMP #0117 - 0x541E0004, // 0043 LDINT R7 5 - 0x1C1C0A07, // 0044 EQ R7 R5 R7 - 0x781E0011, // 0045 JMPF R7 #0058 - 0x541EFFFB, // 0046 LDINT R7 65532 - 0x1C1C0C07, // 0047 EQ R7 R6 R7 - 0x781E0005, // 0048 JMPF R7 #004F - 0x8C1C0907, // 0049 GETMET R7 R4 K7 - 0x8824090B, // 004A GETMBR R9 R4 K11 - 0x58280006, // 004B LDCONST R10 K6 - 0x7C1C0600, // 004C CALL R7 3 - 0x80040E00, // 004D RET 1 R7 - 0x70020007, // 004E JMP #0057 - 0x541EFFFC, // 004F LDINT R7 65533 - 0x1C1C0C07, // 0050 EQ R7 R6 R7 - 0x781E0004, // 0051 JMPF R7 #0057 - 0x8C1C0907, // 0052 GETMET R7 R4 K7 - 0x8824090B, // 0053 GETMBR R9 R4 K11 - 0x542A0003, // 0054 LDINT R10 4 - 0x7C1C0600, // 0055 CALL R7 3 - 0x80040E00, // 0056 RET 1 R7 - 0x700200BE, // 0057 JMP #0117 - 0x541E0005, // 0058 LDINT R7 6 - 0x1C1C0A07, // 0059 EQ R7 R5 R7 - 0x781E0019, // 005A JMPF R7 #0075 - 0x1C1C0D06, // 005B EQ R7 R6 K6 - 0x781E0005, // 005C JMPF R7 #0063 - 0x8C1C0907, // 005D GETMET R7 R4 K7 - 0x8824090C, // 005E GETMBR R9 R4 K12 - 0x8828010D, // 005F GETMBR R10 R0 K13 - 0x7C1C0600, // 0060 CALL R7 3 - 0x80040E00, // 0061 RET 1 R7 - 0x70020010, // 0062 JMP #0074 - 0x541EFFFB, // 0063 LDINT R7 65532 - 0x1C1C0C07, // 0064 EQ R7 R6 R7 - 0x781E0005, // 0065 JMPF R7 #006C - 0x8C1C0907, // 0066 GETMET R7 R4 K7 - 0x8824090B, // 0067 GETMBR R9 R4 K11 - 0x58280006, // 0068 LDCONST R10 K6 - 0x7C1C0600, // 0069 CALL R7 3 - 0x80040E00, // 006A RET 1 R7 - 0x70020007, // 006B JMP #0074 - 0x541EFFFC, // 006C LDINT R7 65533 - 0x1C1C0C07, // 006D EQ R7 R6 R7 - 0x781E0004, // 006E JMPF R7 #0074 - 0x8C1C0907, // 006F GETMET R7 R4 K7 - 0x8824090B, // 0070 GETMBR R9 R4 K11 - 0x542A0003, // 0071 LDINT R10 4 - 0x7C1C0600, // 0072 CALL R7 3 - 0x80040E00, // 0073 RET 1 R7 - 0x700200A1, // 0074 JMP #0117 - 0x541E0007, // 0075 LDINT R7 8 - 0x1C1C0A07, // 0076 EQ R7 R5 R7 - 0x781E003B, // 0077 JMPF R7 #00B4 - 0x1C1C0D06, // 0078 EQ R7 R6 K6 - 0x781E0005, // 0079 JMPF R7 #0080 - 0x8C1C0907, // 007A GETMET R7 R4 K7 - 0x8824090A, // 007B GETMBR R9 R4 K10 - 0x8828010E, // 007C GETMBR R10 R0 K14 - 0x7C1C0600, // 007D CALL R7 3 - 0x80040E00, // 007E RET 1 R7 - 0x70020032, // 007F JMP #00B3 - 0x1C1C0D0F, // 0080 EQ R7 R6 K15 - 0x781E0005, // 0081 JMPF R7 #0088 - 0x8C1C0907, // 0082 GETMET R7 R4 K7 - 0x8824090A, // 0083 GETMBR R9 R4 K10 - 0x58280006, // 0084 LDCONST R10 K6 - 0x7C1C0600, // 0085 CALL R7 3 - 0x80040E00, // 0086 RET 1 R7 - 0x7002002A, // 0087 JMP #00B3 - 0x1C1C0D05, // 0088 EQ R7 R6 K5 - 0x781E0005, // 0089 JMPF R7 #0090 - 0x8C1C0907, // 008A GETMET R7 R4 K7 - 0x8824090A, // 008B GETMBR R9 R4 K10 - 0x542A00FD, // 008C LDINT R10 254 - 0x7C1C0600, // 008D CALL R7 3 - 0x80040E00, // 008E RET 1 R7 - 0x70020022, // 008F JMP #00B3 - 0x541E000E, // 0090 LDINT R7 15 - 0x1C1C0C07, // 0091 EQ R7 R6 R7 - 0x781E0005, // 0092 JMPF R7 #0099 - 0x8C1C0907, // 0093 GETMET R7 R4 K7 - 0x8824090A, // 0094 GETMBR R9 R4 K10 - 0x58280006, // 0095 LDCONST R10 K6 - 0x7C1C0600, // 0096 CALL R7 3 - 0x80040E00, // 0097 RET 1 R7 - 0x70020019, // 0098 JMP #00B3 - 0x541E0010, // 0099 LDINT R7 17 - 0x1C1C0C07, // 009A EQ R7 R6 R7 - 0x781E0005, // 009B JMPF R7 #00A2 - 0x8C1C0907, // 009C GETMET R7 R4 K7 - 0x8824090A, // 009D GETMBR R9 R4 K10 - 0x8828010E, // 009E GETMBR R10 R0 K14 - 0x7C1C0600, // 009F CALL R7 3 - 0x80040E00, // 00A0 RET 1 R7 - 0x70020010, // 00A1 JMP #00B3 - 0x541EFFFB, // 00A2 LDINT R7 65532 - 0x1C1C0C07, // 00A3 EQ R7 R6 R7 - 0x781E0005, // 00A4 JMPF R7 #00AB - 0x8C1C0907, // 00A5 GETMET R7 R4 K7 - 0x8824090B, // 00A6 GETMBR R9 R4 K11 - 0x58280009, // 00A7 LDCONST R10 K9 - 0x7C1C0600, // 00A8 CALL R7 3 - 0x80040E00, // 00A9 RET 1 R7 - 0x70020007, // 00AA JMP #00B3 - 0x541EFFFC, // 00AB LDINT R7 65533 - 0x1C1C0C07, // 00AC EQ R7 R6 R7 - 0x781E0004, // 00AD JMPF R7 #00B3 - 0x8C1C0907, // 00AE GETMET R7 R4 K7 - 0x8824090B, // 00AF GETMBR R9 R4 K11 - 0x542A0004, // 00B0 LDINT R10 5 - 0x7C1C0600, // 00B1 CALL R7 3 - 0x80040E00, // 00B2 RET 1 R7 - 0x70020062, // 00B3 JMP #0117 - 0x541E02FF, // 00B4 LDINT R7 768 - 0x1C1C0A07, // 00B5 EQ R7 R5 R7 - 0x781E0057, // 00B6 JMPF R7 #010F - 0x1C1C0D06, // 00B7 EQ R7 R6 K6 - 0x781E0005, // 00B8 JMPF R7 #00BF - 0x8C1C0907, // 00B9 GETMET R7 R4 K7 - 0x8824090A, // 00BA GETMBR R9 R4 K10 - 0x88280110, // 00BB GETMBR R10 R0 K16 - 0x7C1C0600, // 00BC CALL R7 3 - 0x80040E00, // 00BD RET 1 R7 - 0x7002004E, // 00BE JMP #010E - 0x1C1C0D09, // 00BF EQ R7 R6 K9 - 0x781E0005, // 00C0 JMPF R7 #00C7 - 0x8C1C0907, // 00C1 GETMET R7 R4 K7 - 0x8824090A, // 00C2 GETMBR R9 R4 K10 - 0x88280111, // 00C3 GETMBR R10 R0 K17 - 0x7C1C0600, // 00C4 CALL R7 3 - 0x80040E00, // 00C5 RET 1 R7 - 0x70020046, // 00C6 JMP #010E - 0x541E0006, // 00C7 LDINT R7 7 - 0x1C1C0C07, // 00C8 EQ R7 R6 R7 - 0x781E0005, // 00C9 JMPF R7 #00D0 - 0x8C1C0907, // 00CA GETMET R7 R4 K7 - 0x8824090A, // 00CB GETMBR R9 R4 K10 - 0x58280006, // 00CC LDCONST R10 K6 - 0x7C1C0600, // 00CD CALL R7 3 - 0x80040E00, // 00CE RET 1 R7 - 0x7002003D, // 00CF JMP #010E - 0x541E0007, // 00D0 LDINT R7 8 - 0x1C1C0C07, // 00D1 EQ R7 R6 R7 - 0x781E0005, // 00D2 JMPF R7 #00D9 - 0x8C1C0907, // 00D3 GETMET R7 R4 K7 - 0x8824090A, // 00D4 GETMBR R9 R4 K10 - 0x58280006, // 00D5 LDCONST R10 K6 - 0x7C1C0600, // 00D6 CALL R7 3 - 0x80040E00, // 00D7 RET 1 R7 - 0x70020034, // 00D8 JMP #010E - 0x541E000E, // 00D9 LDINT R7 15 - 0x1C1C0C07, // 00DA EQ R7 R6 R7 - 0x781E0005, // 00DB JMPF R7 #00E2 - 0x8C1C0907, // 00DC GETMET R7 R4 K7 - 0x8824090A, // 00DD GETMBR R9 R4 K10 - 0x58280006, // 00DE LDCONST R10 K6 - 0x7C1C0600, // 00DF CALL R7 3 - 0x80040E00, // 00E0 RET 1 R7 - 0x7002002B, // 00E1 JMP #010E - 0x541E4000, // 00E2 LDINT R7 16385 - 0x1C1C0C07, // 00E3 EQ R7 R6 R7 - 0x781E0005, // 00E4 JMPF R7 #00EB - 0x8C1C0907, // 00E5 GETMET R7 R4 K7 - 0x8824090A, // 00E6 GETMBR R9 R4 K10 - 0x58280006, // 00E7 LDCONST R10 K6 - 0x7C1C0600, // 00E8 CALL R7 3 - 0x80040E00, // 00E9 RET 1 R7 - 0x70020022, // 00EA JMP #010E - 0x541E4009, // 00EB LDINT R7 16394 - 0x1C1C0C07, // 00EC EQ R7 R6 R7 - 0x781E0005, // 00ED JMPF R7 #00F4 - 0x8C1C0907, // 00EE GETMET R7 R4 K7 - 0x8824090A, // 00EF GETMBR R9 R4 K10 - 0x58280006, // 00F0 LDCONST R10 K6 - 0x7C1C0600, // 00F1 CALL R7 3 - 0x80040E00, // 00F2 RET 1 R7 - 0x70020019, // 00F3 JMP #010E - 0x541E000F, // 00F4 LDINT R7 16 - 0x1C1C0C07, // 00F5 EQ R7 R6 R7 - 0x781E0005, // 00F6 JMPF R7 #00FD - 0x8C1C0907, // 00F7 GETMET R7 R4 K7 - 0x8824090A, // 00F8 GETMBR R9 R4 K10 - 0x58280006, // 00F9 LDCONST R10 K6 - 0x7C1C0600, // 00FA CALL R7 3 - 0x80040E00, // 00FB RET 1 R7 - 0x70020010, // 00FC JMP #010E - 0x541EFFFB, // 00FD LDINT R7 65532 - 0x1C1C0C07, // 00FE EQ R7 R6 R7 - 0x781E0005, // 00FF JMPF R7 #0106 - 0x8C1C0907, // 0100 GETMET R7 R4 K7 - 0x8824090B, // 0101 GETMBR R9 R4 K11 - 0x58280009, // 0102 LDCONST R10 K9 - 0x7C1C0600, // 0103 CALL R7 3 - 0x80040E00, // 0104 RET 1 R7 - 0x70020007, // 0105 JMP #010E - 0x541EFFFC, // 0106 LDINT R7 65533 - 0x1C1C0C07, // 0107 EQ R7 R6 R7 - 0x781E0004, // 0108 JMPF R7 #010E - 0x8C1C0907, // 0109 GETMET R7 R4 K7 - 0x8824090B, // 010A GETMBR R9 R4 K11 - 0x542A0004, // 010B LDINT R10 5 - 0x7C1C0600, // 010C CALL R7 3 - 0x80040E00, // 010D RET 1 R7 - 0x70020007, // 010E JMP #0117 - 0x601C0003, // 010F GETGBL R7 G3 - 0x5C200000, // 0110 MOVE R8 R0 - 0x7C1C0200, // 0111 CALL R7 1 - 0x8C1C0F12, // 0112 GETMET R7 R7 K18 - 0x5C240200, // 0113 MOVE R9 R1 - 0x5C280400, // 0114 MOVE R10 R2 - 0x7C1C0600, // 0115 CALL R7 3 - 0x80040E00, // 0116 RET 1 R7 - 0x80000000, // 0117 RET 0 + 0x541E02FF, // 0005 LDINT R7 768 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E0057, // 0007 JMPF R7 #0060 + 0x1C1C0D05, // 0008 EQ R7 R6 K5 + 0x781E0005, // 0009 JMPF R7 #0010 + 0x8C1C0906, // 000A GETMET R7 R4 K6 + 0x88240907, // 000B GETMBR R9 R4 K7 + 0x88280108, // 000C GETMBR R10 R0 K8 + 0x7C1C0600, // 000D CALL R7 3 + 0x80040E00, // 000E RET 1 R7 + 0x7002004E, // 000F JMP #005F + 0x1C1C0D09, // 0010 EQ R7 R6 K9 + 0x781E0005, // 0011 JMPF R7 #0018 + 0x8C1C0906, // 0012 GETMET R7 R4 K6 + 0x88240907, // 0013 GETMBR R9 R4 K7 + 0x8828010A, // 0014 GETMBR R10 R0 K10 + 0x7C1C0600, // 0015 CALL R7 3 + 0x80040E00, // 0016 RET 1 R7 + 0x70020046, // 0017 JMP #005F + 0x541E0006, // 0018 LDINT R7 7 + 0x1C1C0C07, // 0019 EQ R7 R6 R7 + 0x781E0005, // 001A JMPF R7 #0021 + 0x8C1C0906, // 001B GETMET R7 R4 K6 + 0x88240907, // 001C GETMBR R9 R4 K7 + 0x58280005, // 001D LDCONST R10 K5 + 0x7C1C0600, // 001E CALL R7 3 + 0x80040E00, // 001F RET 1 R7 + 0x7002003D, // 0020 JMP #005F + 0x541E0007, // 0021 LDINT R7 8 + 0x1C1C0C07, // 0022 EQ R7 R6 R7 + 0x781E0005, // 0023 JMPF R7 #002A + 0x8C1C0906, // 0024 GETMET R7 R4 K6 + 0x88240907, // 0025 GETMBR R9 R4 K7 + 0x58280005, // 0026 LDCONST R10 K5 + 0x7C1C0600, // 0027 CALL R7 3 + 0x80040E00, // 0028 RET 1 R7 + 0x70020034, // 0029 JMP #005F + 0x541E000E, // 002A LDINT R7 15 + 0x1C1C0C07, // 002B EQ R7 R6 R7 + 0x781E0005, // 002C JMPF R7 #0033 + 0x8C1C0906, // 002D GETMET R7 R4 K6 + 0x88240907, // 002E GETMBR R9 R4 K7 + 0x58280005, // 002F LDCONST R10 K5 + 0x7C1C0600, // 0030 CALL R7 3 + 0x80040E00, // 0031 RET 1 R7 + 0x7002002B, // 0032 JMP #005F + 0x541E4000, // 0033 LDINT R7 16385 + 0x1C1C0C07, // 0034 EQ R7 R6 R7 + 0x781E0005, // 0035 JMPF R7 #003C + 0x8C1C0906, // 0036 GETMET R7 R4 K6 + 0x88240907, // 0037 GETMBR R9 R4 K7 + 0x58280005, // 0038 LDCONST R10 K5 + 0x7C1C0600, // 0039 CALL R7 3 + 0x80040E00, // 003A RET 1 R7 + 0x70020022, // 003B JMP #005F + 0x541E4009, // 003C LDINT R7 16394 + 0x1C1C0C07, // 003D EQ R7 R6 R7 + 0x781E0005, // 003E JMPF R7 #0045 + 0x8C1C0906, // 003F GETMET R7 R4 K6 + 0x88240907, // 0040 GETMBR R9 R4 K7 + 0x58280005, // 0041 LDCONST R10 K5 + 0x7C1C0600, // 0042 CALL R7 3 + 0x80040E00, // 0043 RET 1 R7 + 0x70020019, // 0044 JMP #005F + 0x541E000F, // 0045 LDINT R7 16 + 0x1C1C0C07, // 0046 EQ R7 R6 R7 + 0x781E0005, // 0047 JMPF R7 #004E + 0x8C1C0906, // 0048 GETMET R7 R4 K6 + 0x88240907, // 0049 GETMBR R9 R4 K7 + 0x58280005, // 004A LDCONST R10 K5 + 0x7C1C0600, // 004B CALL R7 3 + 0x80040E00, // 004C RET 1 R7 + 0x70020010, // 004D JMP #005F + 0x541EFFFB, // 004E LDINT R7 65532 + 0x1C1C0C07, // 004F EQ R7 R6 R7 + 0x781E0005, // 0050 JMPF R7 #0057 + 0x8C1C0906, // 0051 GETMET R7 R4 K6 + 0x8824090B, // 0052 GETMBR R9 R4 K11 + 0x58280009, // 0053 LDCONST R10 K9 + 0x7C1C0600, // 0054 CALL R7 3 + 0x80040E00, // 0055 RET 1 R7 + 0x70020007, // 0056 JMP #005F + 0x541EFFFC, // 0057 LDINT R7 65533 + 0x1C1C0C07, // 0058 EQ R7 R6 R7 + 0x781E0004, // 0059 JMPF R7 #005F + 0x8C1C0906, // 005A GETMET R7 R4 K6 + 0x8824090B, // 005B GETMBR R9 R4 K11 + 0x542A0004, // 005C LDINT R10 5 + 0x7C1C0600, // 005D CALL R7 3 + 0x80040E00, // 005E RET 1 R7 + 0x70020007, // 005F JMP #0068 + 0x601C0003, // 0060 GETGBL R7 G3 + 0x5C200000, // 0061 MOVE R8 R0 + 0x7C1C0200, // 0062 CALL R7 1 + 0x8C1C0F0C, // 0063 GETMET R7 R7 K12 + 0x5C240200, // 0064 MOVE R9 R1 + 0x5C280400, // 0065 MOVE R10 R2 + 0x7C1C0600, // 0066 CALL R7 3 + 0x80040E00, // 0067 RET 1 R7 + 0x80000000, // 0068 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */ + be_nested_proto( + 18, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(command), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(findsubval), + /* K7 */ be_nested_str_weak(tasmota), + /* K8 */ be_nested_str_weak(scale_uint), + /* K9 */ be_nested_str_weak(set), + /* K10 */ be_nested_str_weak(hue), + /* K11 */ be_nested_str_weak(update_shadow), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(hue_X3A), + /* K14 */ be_const_int(1), + /* K15 */ be_const_int(2), + /* K16 */ be_const_int(3), + /* K17 */ be_nested_str_weak(sat), + /* K18 */ be_nested_str_weak(sat_X3A), + /* K19 */ be_nested_str_weak(_X20sat_X3A), + /* K20 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[148]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0xB8160200, // 0001 GETNGBL R5 K1 + 0x88140B02, // 0002 GETMBR R5 R5 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x881C0704, // 0004 GETMBR R7 R3 K4 + 0x542202FF, // 0005 LDINT R8 768 + 0x1C200C08, // 0006 EQ R8 R6 R8 + 0x78220081, // 0007 JMPF R8 #008A + 0x1C200F05, // 0008 EQ R8 R7 K5 + 0x78220019, // 0009 JMPF R8 #0024 + 0x8C200506, // 000A GETMET R8 R2 K6 + 0x58280005, // 000B LDCONST R10 K5 + 0x7C200400, // 000C CALL R8 2 + 0xB8260E00, // 000D GETNGBL R9 K7 + 0x8C241308, // 000E GETMET R9 R9 K8 + 0x5C2C1000, // 000F MOVE R11 R8 + 0x58300005, // 0010 LDCONST R12 K5 + 0x543600FD, // 0011 LDINT R13 254 + 0x58380005, // 0012 LDCONST R14 K5 + 0x543E0167, // 0013 LDINT R15 360 + 0x7C240C00, // 0014 CALL R9 6 + 0x8C280909, // 0015 GETMET R10 R4 K9 + 0x60300013, // 0016 GETGBL R12 G19 + 0x7C300000, // 0017 CALL R12 0 + 0x98321409, // 0018 SETIDX R12 K10 R9 + 0x7C280400, // 0019 CALL R10 2 + 0x8C28010B, // 001A GETMET R10 R0 K11 + 0x7C280200, // 001B CALL R10 1 + 0x60280008, // 001C GETGBL R10 G8 + 0x5C2C1000, // 001D MOVE R11 R8 + 0x7C280200, // 001E CALL R10 1 + 0x002A1A0A, // 001F ADD R10 K13 R10 + 0x900E180A, // 0020 SETMBR R3 K12 R10 + 0x50280200, // 0021 LDBOOL R10 1 0 + 0x80041400, // 0022 RET 1 R10 + 0x70020064, // 0023 JMP #0089 + 0x1C200F0E, // 0024 EQ R8 R7 K14 + 0x78220002, // 0025 JMPF R8 #0029 + 0x50200200, // 0026 LDBOOL R8 1 0 + 0x80041000, // 0027 RET 1 R8 + 0x7002005F, // 0028 JMP #0089 + 0x1C200F0F, // 0029 EQ R8 R7 K15 + 0x78220002, // 002A JMPF R8 #002E + 0x50200200, // 002B LDBOOL R8 1 0 + 0x80041000, // 002C RET 1 R8 + 0x7002005A, // 002D JMP #0089 + 0x1C200F10, // 002E EQ R8 R7 K16 + 0x78220019, // 002F JMPF R8 #004A + 0x8C200506, // 0030 GETMET R8 R2 K6 + 0x58280005, // 0031 LDCONST R10 K5 + 0x7C200400, // 0032 CALL R8 2 + 0xB8260E00, // 0033 GETNGBL R9 K7 + 0x8C241308, // 0034 GETMET R9 R9 K8 + 0x5C2C1000, // 0035 MOVE R11 R8 + 0x58300005, // 0036 LDCONST R12 K5 + 0x543600FD, // 0037 LDINT R13 254 + 0x58380005, // 0038 LDCONST R14 K5 + 0x543E00FE, // 0039 LDINT R15 255 + 0x7C240C00, // 003A CALL R9 6 + 0x8C280909, // 003B GETMET R10 R4 K9 + 0x60300013, // 003C GETGBL R12 G19 + 0x7C300000, // 003D CALL R12 0 + 0x98322209, // 003E SETIDX R12 K17 R9 + 0x7C280400, // 003F CALL R10 2 + 0x8C28010B, // 0040 GETMET R10 R0 K11 + 0x7C280200, // 0041 CALL R10 1 + 0x60280008, // 0042 GETGBL R10 G8 + 0x5C2C1000, // 0043 MOVE R11 R8 + 0x7C280200, // 0044 CALL R10 1 + 0x002A240A, // 0045 ADD R10 K18 R10 + 0x900E180A, // 0046 SETMBR R3 K12 R10 + 0x50280200, // 0047 LDBOOL R10 1 0 + 0x80041400, // 0048 RET 1 R10 + 0x7002003E, // 0049 JMP #0089 + 0x54220003, // 004A LDINT R8 4 + 0x1C200E08, // 004B EQ R8 R7 R8 + 0x78220002, // 004C JMPF R8 #0050 + 0x50200200, // 004D LDBOOL R8 1 0 + 0x80041000, // 004E RET 1 R8 + 0x70020038, // 004F JMP #0089 + 0x54220004, // 0050 LDINT R8 5 + 0x1C200E08, // 0051 EQ R8 R7 R8 + 0x78220002, // 0052 JMPF R8 #0056 + 0x50200200, // 0053 LDBOOL R8 1 0 + 0x80041000, // 0054 RET 1 R8 + 0x70020032, // 0055 JMP #0089 + 0x54220005, // 0056 LDINT R8 6 + 0x1C200E08, // 0057 EQ R8 R7 R8 + 0x7822002A, // 0058 JMPF R8 #0084 + 0x8C200506, // 0059 GETMET R8 R2 K6 + 0x58280005, // 005A LDCONST R10 K5 + 0x7C200400, // 005B CALL R8 2 + 0xB8260E00, // 005C GETNGBL R9 K7 + 0x8C241308, // 005D GETMET R9 R9 K8 + 0x5C2C1000, // 005E MOVE R11 R8 + 0x58300005, // 005F LDCONST R12 K5 + 0x543600FD, // 0060 LDINT R13 254 + 0x58380005, // 0061 LDCONST R14 K5 + 0x543E0167, // 0062 LDINT R15 360 + 0x7C240C00, // 0063 CALL R9 6 + 0x8C280506, // 0064 GETMET R10 R2 K6 + 0x5830000E, // 0065 LDCONST R12 K14 + 0x7C280400, // 0066 CALL R10 2 + 0xB82E0E00, // 0067 GETNGBL R11 K7 + 0x8C2C1708, // 0068 GETMET R11 R11 K8 + 0x5C341400, // 0069 MOVE R13 R10 + 0x58380005, // 006A LDCONST R14 K5 + 0x543E00FD, // 006B LDINT R15 254 + 0x58400005, // 006C LDCONST R16 K5 + 0x544600FE, // 006D LDINT R17 255 + 0x7C2C0C00, // 006E CALL R11 6 + 0x8C300909, // 006F GETMET R12 R4 K9 + 0x60380013, // 0070 GETGBL R14 G19 + 0x7C380000, // 0071 CALL R14 0 + 0x983A1409, // 0072 SETIDX R14 K10 R9 + 0x983A220B, // 0073 SETIDX R14 K17 R11 + 0x7C300400, // 0074 CALL R12 2 + 0x8C30010B, // 0075 GETMET R12 R0 K11 + 0x7C300200, // 0076 CALL R12 1 + 0x60300008, // 0077 GETGBL R12 G8 + 0x5C341000, // 0078 MOVE R13 R8 + 0x7C300200, // 0079 CALL R12 1 + 0x00321A0C, // 007A ADD R12 K13 R12 + 0x00301913, // 007B ADD R12 R12 K19 + 0x60340008, // 007C GETGBL R13 G8 + 0x5C381400, // 007D MOVE R14 R10 + 0x7C340200, // 007E CALL R13 1 + 0x0030180D, // 007F ADD R12 R12 R13 + 0x900E180C, // 0080 SETMBR R3 K12 R12 + 0x50300200, // 0081 LDBOOL R12 1 0 + 0x80041800, // 0082 RET 1 R12 + 0x70020004, // 0083 JMP #0089 + 0x54220046, // 0084 LDINT R8 71 + 0x1C200E08, // 0085 EQ R8 R7 R8 + 0x78220001, // 0086 JMPF R8 #0089 + 0x50200200, // 0087 LDBOOL R8 1 0 + 0x80041000, // 0088 RET 1 R8 + 0x70020008, // 0089 JMP #0093 + 0x60200003, // 008A GETGBL R8 G3 + 0x5C240000, // 008B MOVE R9 R0 + 0x7C200200, // 008C CALL R8 1 + 0x8C201114, // 008D GETMET R8 R8 K20 + 0x5C280200, // 008E MOVE R10 R1 + 0x5C2C0400, // 008F MOVE R11 R2 + 0x5C300600, // 0090 MOVE R12 R3 + 0x7C200800, // 0091 CALL R8 4 + 0x80041000, // 0092 RET 1 R8 + 0x80000000, // 0093 RET 0 }) ) ); @@ -700,7 +384,7 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */ ********************************************************************/ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */ be_nested_proto( - 14, /* nstack */ + 12, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -708,196 +392,87 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[16]) { /* constants */ + ( &(const bvalue[13]) { /* constants */ /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(get), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(bri), + /* K1 */ be_nested_str_weak(update_shadow), + /* K2 */ be_nested_str_weak(get), + /* K3 */ be_nested_str_weak(find), /* K4 */ be_nested_str_weak(hue), /* K5 */ be_nested_str_weak(sat), - /* K6 */ be_nested_str_weak(power), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(scale_uint), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(shadow_bri), - /* K11 */ be_nested_str_weak(shadow_hue), - /* K12 */ be_nested_str_weak(shadow_sat), - /* K13 */ be_nested_str_weak(shadow_onoff), - /* K14 */ be_nested_str_weak(attribute_updated), - /* K15 */ be_const_int(1), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(scale_uint), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(shadow_hue), + /* K10 */ be_nested_str_weak(shadow_sat), + /* K11 */ be_nested_str_weak(attribute_updated), + /* K12 */ be_const_int(1), }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[98]) { /* code */ + ( &(const binstruction[63]) { /* 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 - 0x8C100502, // 0007 GETMET R4 R2 K2 - 0x58180004, // 0008 LDCONST R6 K4 - 0x4C1C0000, // 0009 LDNIL R7 - 0x7C100600, // 000A CALL R4 3 - 0x8C140502, // 000B GETMET R5 R2 K2 - 0x581C0005, // 000C LDCONST R7 K5 - 0x4C200000, // 000D LDNIL R8 - 0x7C140600, // 000E CALL R5 3 - 0x8C180502, // 000F GETMET R6 R2 K2 - 0x58200006, // 0010 LDCONST R8 K6 - 0x4C240000, // 0011 LDNIL R9 - 0x7C180600, // 0012 CALL R6 3 - 0x4C1C0000, // 0013 LDNIL R7 - 0x201C0607, // 0014 NE R7 R3 R7 - 0x781E0009, // 0015 JMPF R7 #0020 - 0xB81E0E00, // 0016 GETNGBL R7 K7 - 0x8C1C0F08, // 0017 GETMET R7 R7 K8 - 0x5C240600, // 0018 MOVE R9 R3 - 0x58280009, // 0019 LDCONST R10 K9 - 0x542E00FE, // 001A LDINT R11 255 - 0x58300009, // 001B LDCONST R12 K9 - 0x543600FD, // 001C LDINT R13 254 - 0x7C1C0C00, // 001D CALL R7 6 - 0x5C0C0E00, // 001E MOVE R3 R7 - 0x70020000, // 001F JMP #0021 - 0x880C010A, // 0020 GETMBR R3 R0 K10 - 0x4C1C0000, // 0021 LDNIL R7 - 0x201C0807, // 0022 NE R7 R4 R7 - 0x781E0009, // 0023 JMPF R7 #002E - 0xB81E0E00, // 0024 GETNGBL R7 K7 - 0x8C1C0F08, // 0025 GETMET R7 R7 K8 - 0x5C240800, // 0026 MOVE R9 R4 - 0x58280009, // 0027 LDCONST R10 K9 - 0x542E0167, // 0028 LDINT R11 360 - 0x58300009, // 0029 LDCONST R12 K9 - 0x543600FD, // 002A LDINT R13 254 - 0x7C1C0C00, // 002B CALL R7 6 - 0x5C100E00, // 002C MOVE R4 R7 - 0x70020000, // 002D JMP #002F - 0x880C010B, // 002E GETMBR R3 R0 K11 - 0x4C1C0000, // 002F LDNIL R7 - 0x201C0A07, // 0030 NE R7 R5 R7 - 0x781E0009, // 0031 JMPF R7 #003C - 0xB81E0E00, // 0032 GETNGBL R7 K7 - 0x8C1C0F08, // 0033 GETMET R7 R7 K8 - 0x5C240A00, // 0034 MOVE R9 R5 - 0x58280009, // 0035 LDCONST R10 K9 - 0x542E00FE, // 0036 LDINT R11 255 - 0x58300009, // 0037 LDCONST R12 K9 - 0x543600FD, // 0038 LDINT R13 254 - 0x7C1C0C00, // 0039 CALL R7 6 - 0x5C140E00, // 003A MOVE R5 R7 - 0x70020000, // 003B JMP #003D - 0x880C010C, // 003C GETMBR R3 R0 K12 - 0x881C010D, // 003D GETMBR R7 R0 K13 - 0x201C0C07, // 003E NE R7 R6 R7 - 0x781E0005, // 003F JMPF R7 #0046 - 0x8C1C010E, // 0040 GETMET R7 R0 K14 - 0x4C240000, // 0041 LDNIL R9 - 0x542A0005, // 0042 LDINT R10 6 - 0x582C0009, // 0043 LDCONST R11 K9 - 0x7C1C0800, // 0044 CALL R7 4 - 0x90021A06, // 0045 SETMBR R0 K13 R6 - 0x881C010A, // 0046 GETMBR R7 R0 K10 - 0x201C0607, // 0047 NE R7 R3 R7 - 0x781E0005, // 0048 JMPF R7 #004F - 0x8C1C010E, // 0049 GETMET R7 R0 K14 - 0x4C240000, // 004A LDNIL R9 - 0x542A0007, // 004B LDINT R10 8 - 0x582C0009, // 004C LDCONST R11 K9 - 0x7C1C0800, // 004D CALL R7 4 - 0x90021403, // 004E SETMBR R0 K10 R3 - 0x881C010B, // 004F GETMBR R7 R0 K11 - 0x201C0807, // 0050 NE R7 R4 R7 - 0x781E0005, // 0051 JMPF R7 #0058 - 0x8C1C010E, // 0052 GETMET R7 R0 K14 - 0x4C240000, // 0053 LDNIL R9 - 0x542A02FF, // 0054 LDINT R10 768 - 0x582C0009, // 0055 LDCONST R11 K9 - 0x7C1C0800, // 0056 CALL R7 4 - 0x90021604, // 0057 SETMBR R0 K11 R4 - 0x881C010C, // 0058 GETMBR R7 R0 K12 - 0x201C0A07, // 0059 NE R7 R5 R7 - 0x781E0005, // 005A JMPF R7 #0061 - 0x8C1C010E, // 005B GETMET R7 R0 K14 - 0x4C240000, // 005C LDNIL R9 - 0x542A02FF, // 005D LDINT R10 768 - 0x582C000F, // 005E LDCONST R11 K15 - 0x7C1C0800, // 005F CALL R7 4 - 0x90021805, // 0060 SETMBR R0 K12 R5 - 0x80000000, // 0061 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_Light3_init, /* 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[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_hue), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(shadow_bri), - /* K4 */ be_nested_str_weak(shadow_sat), - /* K5 */ be_nested_str_weak(shadow_onoff), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* 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 - 0x90020302, // 0007 SETMBR R0 K1 K2 - 0x90020702, // 0008 SETMBR R0 K3 K2 - 0x90020902, // 0009 SETMBR R0 K4 K2 - 0x500C0000, // 000A LDBOOL R3 0 0 - 0x90020A03, // 000B SETMBR R0 K5 R3 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Plugin_Light3_every_second, /* 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(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80000000, // 0002 RET 0 + 0x60080003, // 0001 GETGBL R2 G3 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C080200, // 0003 CALL R2 1 + 0x8C080501, // 0004 GETMET R2 R2 K1 + 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 + 0x78160005, // 002E JMPF R5 #0035 + 0x8C14010B, // 002F GETMET R5 R0 K11 + 0x4C1C0000, // 0030 LDNIL R7 + 0x542202FF, // 0031 LDINT R8 768 + 0x58240008, // 0032 LDCONST R9 K8 + 0x7C140800, // 0033 CALL R5 4 + 0x90021203, // 0034 SETMBR R0 K9 R3 + 0x8814010A, // 0035 GETMBR R5 R0 K10 + 0x20140805, // 0036 NE R5 R4 R5 + 0x78160005, // 0037 JMPF R5 #003E + 0x8C14010B, // 0038 GETMET R5 R0 K11 + 0x4C1C0000, // 0039 LDNIL R7 + 0x542202FF, // 003A LDINT R8 768 + 0x5824000C, // 003B LDCONST R9 K12 + 0x7C140800, // 003C CALL R5 4 + 0x90021404, // 003D SETMBR R0 K10 R4 + 0x80000000, // 003E RET 0 }) ) ); @@ -907,32 +482,15 @@ be_local_closure(Matter_Plugin_Light3_every_second, /* name */ /******************************************************************** ** Solidified class: Matter_Plugin_Light3 ********************************************************************/ -extern const bclass be_class_Matter_Plugin; +extern const bclass be_class_Matter_Plugin_Light1; be_local_class(Matter_Plugin_Light3, - 4, - &be_class_Matter_Plugin, - be_nested_map(11, + 2, + &be_class_Matter_Plugin_Light1, + be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_Light3_every_second_closure) }, - { be_const_key_weak(shadow_sat, -1), be_const_var(2) }, - { be_const_key_weak(shadow_hue, -1), be_const_var(0) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) }, - { be_const_key_weak(TYPES, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(269, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(update_shadow, 8), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) }, - { be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(6, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - 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(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(9, ( (struct bvalue*) &(const bvalue[]) { @@ -946,49 +504,18 @@ be_local_class(Matter_Plugin_Light3, be_const_int(65532), be_const_int(65533), })) ) } )) }, - { 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_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(4, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65532), - be_const_int(65533), + { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) }, + { be_const_key_weak(TYPES, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(269, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_int(4, -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(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(3) }, - { be_const_key_weak(shadow_bri, -1), be_const_var(1) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) }, - { be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) }, + { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Light3_init_closure) }, + { be_const_key_weak(shadow_hue, -1), be_const_var(0) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) }, + { be_const_key_weak(shadow_sat, -1), be_const_var(1) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) }, })), be_str_weak(Matter_Plugin_Light3) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h index d40f9e23f..18d4aeda5 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -1009,7 +1009,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[51]) { /* constants */ + ( &(const bvalue[50]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(check_privileged_access), /* K2 */ be_nested_str_weak(string), @@ -1046,25 +1046,24 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ /* K33 */ be_nested_str_weak(copy), /* K34 */ be_nested_str_weak(reverse), /* K35 */ be_nested_str_weak(tohex), - /* K36 */ be_nested_str_weak(remove), + /* K36 */ be_nested_str_weak(remove_fabric), /* K37 */ be_const_int(1), - /* K38 */ be_nested_str_weak(save_fabrics), - /* K39 */ be_nested_str_weak(log), - /* K40 */ be_nested_str_weak(format), - /* K41 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), - /* K42 */ be_const_int(2), - /* K43 */ be_nested_str_weak(content_start), - /* K44 */ be_nested_str_weak(Parameter_X20error), - /* K45 */ be_nested_str_weak(content_send_style), - /* K46 */ be_nested_str_weak(content_send), - /* K47 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), - /* K48 */ be_nested_str_weak(content_button), - /* K49 */ be_nested_str_weak(BUTTON_MANAGEMENT), - /* K50 */ be_nested_str_weak(content_stop), + /* K38 */ be_nested_str_weak(log), + /* K39 */ be_nested_str_weak(format), + /* K40 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K41 */ be_const_int(2), + /* K42 */ be_nested_str_weak(content_start), + /* K43 */ be_nested_str_weak(Parameter_X20error), + /* K44 */ be_nested_str_weak(content_send_style), + /* K45 */ be_nested_str_weak(content_send), + /* K46 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), + /* K47 */ be_nested_str_weak(content_button), + /* K48 */ be_nested_str_weak(BUTTON_MANAGEMENT), + /* K49 */ be_nested_str_weak(content_stop), }), be_str_weak(page_part_ctl), &be_const_str_solidified, - ( &(const binstruction[165]) { /* code */ + ( &(const binstruction[162]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x7C080200, // 0002 CALL R2 1 @@ -1076,7 +1075,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0xA4120800, // 0008 IMPORT R4 K4 0x8C140705, // 0009 GETMET R5 R3 K5 0x7C140200, // 000A CALL R5 1 - 0xA8020079, // 000B EXBLK 0 #0086 + 0xA8020076, // 000B EXBLK 0 #0083 0x8C180306, // 000C GETMET R6 R1 K6 0x58200007, // 000D LDCONST R8 K7 0x7C180400, // 000E CALL R6 2 @@ -1119,7 +1118,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180311, // 0033 GETMET R6 R1 K17 0x58200012, // 0034 LDCONST R8 K18 0x7C180400, // 0035 CALL R6 2 - 0x7002004C, // 0036 JMP #0084 + 0x70020049, // 0036 JMP #0081 0x8C180306, // 0037 GETMET R6 R1 K6 0x58200013, // 0038 LDCONST R8 K19 0x7C180400, // 0039 CALL R6 2 @@ -1136,7 +1135,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180311, // 0044 GETMET R6 R1 K17 0x58200012, // 0045 LDCONST R8 K18 0x7C180400, // 0046 CALL R6 2 - 0x7002003B, // 0047 JMP #0084 + 0x70020038, // 0047 JMP #0081 0x8C180306, // 0048 GETMET R6 R1 K6 0x5820001A, // 0049 LDCONST R8 K26 0x7C180400, // 004A CALL R6 2 @@ -1153,11 +1152,11 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180311, // 0055 GETMET R6 R1 K17 0x58200012, // 0056 LDCONST R8 K18 0x7C180400, // 0057 CALL R6 2 - 0x7002002A, // 0058 JMP #0084 + 0x70020027, // 0058 JMP #0081 0x8C180306, // 0059 GETMET R6 R1 K6 0x5820001C, // 005A LDCONST R8 K28 0x7C180400, // 005B CALL R6 2 - 0x781A0026, // 005C JMPF R6 #0084 + 0x781A0023, // 005C JMPF R6 #0081 0x8C18030B, // 005D GETMET R6 R1 K11 0x5820001C, // 005E LDCONST R8 K28 0x7C180400, // 005F CALL R6 2 @@ -1170,7 +1169,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x5C2C1000, // 0066 MOVE R11 R8 0x7C280200, // 0067 CALL R10 1 0x14280E0A, // 0068 LT R10 R7 R10 - 0x782A0011, // 0069 JMPF R10 #007C + 0x782A0013, // 0069 JMPF R10 #007E 0x94281007, // 006A GETIDX R10 R8 R7 0x8C281520, // 006B GETMET R10 R10 K32 0x7C280200, // 006C CALL R10 1 @@ -1181,55 +1180,52 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C281523, // 0071 GETMET R10 R10 K35 0x7C280200, // 0072 CALL R10 1 0x1C2C1406, // 0073 EQ R11 R10 R6 - 0x782E0004, // 0074 JMPF R11 #007A - 0x8C2C1124, // 0075 GETMET R11 R8 K36 - 0x5C340E00, // 0076 MOVE R13 R7 - 0x7C2C0400, // 0077 CALL R11 2 - 0x50240200, // 0078 LDBOOL R9 1 0 - 0x70020000, // 0079 JMP #007B - 0x001C0F25, // 007A ADD R7 R7 K37 - 0x7001FFE8, // 007B JMP #0065 - 0x78260003, // 007C JMPF R9 #0081 - 0x88280109, // 007D GETMBR R10 R0 K9 - 0x8828151E, // 007E GETMBR R10 R10 K30 - 0x8C281526, // 007F GETMET R10 R10 K38 - 0x7C280200, // 0080 CALL R10 1 - 0x8C280311, // 0081 GETMET R10 R1 K17 - 0x58300012, // 0082 LDCONST R12 K18 - 0x7C280400, // 0083 CALL R10 2 - 0xA8040001, // 0084 EXBLK 1 1 - 0x7002001D, // 0085 JMP #00A4 - 0xAC180002, // 0086 CATCH R6 0 2 - 0x7002001A, // 0087 JMP #00A3 - 0xB8222800, // 0088 GETNGBL R8 K20 - 0x8C201127, // 0089 GETMET R8 R8 K39 - 0x8C280528, // 008A GETMET R10 R2 K40 - 0x58300029, // 008B LDCONST R12 K41 - 0x5C340C00, // 008C MOVE R13 R6 - 0x5C380E00, // 008D MOVE R14 R7 - 0x7C280800, // 008E CALL R10 4 - 0x582C002A, // 008F LDCONST R11 K42 - 0x7C200600, // 0090 CALL R8 3 - 0x8C20032B, // 0091 GETMET R8 R1 K43 - 0x5828002C, // 0092 LDCONST R10 K44 - 0x7C200400, // 0093 CALL R8 2 - 0x8C20032D, // 0094 GETMET R8 R1 K45 - 0x7C200200, // 0095 CALL R8 1 - 0x8C20032E, // 0096 GETMET R8 R1 K46 - 0x8C280528, // 0097 GETMET R10 R2 K40 - 0x5830002F, // 0098 LDCONST R12 K47 - 0x5C340C00, // 0099 MOVE R13 R6 - 0x5C380E00, // 009A MOVE R14 R7 - 0x7C280800, // 009B CALL R10 4 + 0x782E0006, // 0074 JMPF R11 #007C + 0x882C0109, // 0075 GETMBR R11 R0 K9 + 0x8C2C1724, // 0076 GETMET R11 R11 K36 + 0x94341007, // 0077 GETIDX R13 R8 R7 + 0x7C2C0400, // 0078 CALL R11 2 + 0x50240200, // 0079 LDBOOL R9 1 0 + 0x70020002, // 007A JMP #007E + 0x70020000, // 007B JMP #007D + 0x001C0F25, // 007C ADD R7 R7 K37 + 0x7001FFE6, // 007D JMP #0065 + 0x8C280311, // 007E GETMET R10 R1 K17 + 0x58300012, // 007F LDCONST R12 K18 + 0x7C280400, // 0080 CALL R10 2 + 0xA8040001, // 0081 EXBLK 1 1 + 0x7002001D, // 0082 JMP #00A1 + 0xAC180002, // 0083 CATCH R6 0 2 + 0x7002001A, // 0084 JMP #00A0 + 0xB8222800, // 0085 GETNGBL R8 K20 + 0x8C201126, // 0086 GETMET R8 R8 K38 + 0x8C280527, // 0087 GETMET R10 R2 K39 + 0x58300028, // 0088 LDCONST R12 K40 + 0x5C340C00, // 0089 MOVE R13 R6 + 0x5C380E00, // 008A MOVE R14 R7 + 0x7C280800, // 008B CALL R10 4 + 0x582C0029, // 008C LDCONST R11 K41 + 0x7C200600, // 008D CALL R8 3 + 0x8C20032A, // 008E GETMET R8 R1 K42 + 0x5828002B, // 008F LDCONST R10 K43 + 0x7C200400, // 0090 CALL R8 2 + 0x8C20032C, // 0091 GETMET R8 R1 K44 + 0x7C200200, // 0092 CALL R8 1 + 0x8C20032D, // 0093 GETMET R8 R1 K45 + 0x8C280527, // 0094 GETMET R10 R2 K39 + 0x5830002E, // 0095 LDCONST R12 K46 + 0x5C340C00, // 0096 MOVE R13 R6 + 0x5C380E00, // 0097 MOVE R14 R7 + 0x7C280800, // 0098 CALL R10 4 + 0x7C200400, // 0099 CALL R8 2 + 0x8C20032F, // 009A GETMET R8 R1 K47 + 0x88280330, // 009B GETMBR R10 R1 K48 0x7C200400, // 009C CALL R8 2 - 0x8C200330, // 009D GETMET R8 R1 K48 - 0x88280331, // 009E GETMBR R10 R1 K49 - 0x7C200400, // 009F CALL R8 2 - 0x8C200332, // 00A0 GETMET R8 R1 K50 - 0x7C200200, // 00A1 CALL R8 1 - 0x70020000, // 00A2 JMP #00A4 - 0xB0080000, // 00A3 RAISE 2 R0 R0 - 0x80000000, // 00A4 RET 0 + 0x8C200331, // 009D GETMET R8 R1 K49 + 0x7C200200, // 009E CALL R8 1 + 0x70020000, // 009F JMP #00A1 + 0xB0080000, // 00A0 RAISE 2 R0 R0 + 0x80000000, // 00A1 RET 0 }) ) );