mirror of https://github.com/arendst/Tasmota.git
Matter minor fixes (#18341)
This commit is contained in:
parent
9c6fdc7027
commit
6033be6e98
|
@ -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_Root.h"
|
||||||
#include "solidify/solidified_Matter_Plugin_Device.h"
|
#include "solidify/solidified_Matter_Plugin_Device.h"
|
||||||
#include "solidify/solidified_Matter_Plugin_OnOff.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_Light1.h"
|
||||||
#include "solidify/solidified_Matter_Plugin_Light2.h"
|
#include "solidify/solidified_Matter_Plugin_Light2.h"
|
||||||
#include "solidify/solidified_Matter_Plugin_Light3.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_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_Device, class(be_class_Matter_Plugin_Device) // Generic device (abstract)
|
||||||
Plugin_OnOff, class(be_class_Matter_Plugin_OnOff) // Relay/Light behavior (OnOff)
|
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_Light1, class(be_class_Matter_Plugin_Light1) // Dimmable Light
|
||||||
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
|
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
|
||||||
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
|
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
|
||||||
|
|
|
@ -59,6 +59,16 @@ class Matter_Commisioning_Context
|
||||||
self.y = crypto.random(32)
|
self.y = crypto.random(32)
|
||||||
end
|
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)
|
def process_incoming(msg)
|
||||||
#
|
#
|
||||||
if !self.device.is_commissioning_open() && msg.opcode >= 0x20 && msg.opcode <= 0x24
|
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)
|
# StatusReport(GeneralCode: SUCCESS, ProtocolId: SECURE_CHANNEL, ProtocolCode: SESSION_ESTABLISHMENT_SUCCESS)
|
||||||
var raw = self.send_status_report(msg, 0x00, 0x0000, 0x0000, false)
|
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
|
end
|
||||||
|
|
||||||
def find_fabric_by_destination_id(destinationId, initiatorRandom)
|
def find_fabric_by_destination_id(destinationId, initiatorRandom)
|
||||||
|
|
|
@ -382,22 +382,22 @@ class Matter_Frame
|
||||||
n.resize(13) # add zeros
|
n.resize(13) # add zeros
|
||||||
end
|
end
|
||||||
|
|
||||||
tasmota.log("MTR: ******************************", 4)
|
# tasmota.log("MTR: ******************************", 4)
|
||||||
tasmota.log("MTR: i2r =" + i2r.tohex(), 4)
|
# tasmota.log("MTR: i2r =" + i2r.tohex(), 4)
|
||||||
tasmota.log("MTR: p =" + p.tohex(), 4)
|
# tasmota.log("MTR: p =" + p.tohex(), 4)
|
||||||
tasmota.log("MTR: a =" + a.tohex(), 4)
|
# tasmota.log("MTR: a =" + a.tohex(), 4)
|
||||||
tasmota.log("MTR: n =" + n.tohex(), 4)
|
# tasmota.log("MTR: n =" + n.tohex(), 4)
|
||||||
tasmota.log("MTR: mic =" + mic.tohex(), 4)
|
# tasmota.log("MTR: mic =" + mic.tohex(), 4)
|
||||||
|
|
||||||
# decrypt
|
# decrypt
|
||||||
var aes = crypto.AES_CCM(i2r, n, a, size(p), 16)
|
var aes = crypto.AES_CCM(i2r, n, a, size(p), 16)
|
||||||
var cleartext = aes.decrypt(p)
|
var cleartext = aes.decrypt(p)
|
||||||
var tag = aes.tag()
|
var tag = aes.tag()
|
||||||
|
|
||||||
tasmota.log("MTR: ******************************", 4)
|
# tasmota.log("MTR: ******************************", 4)
|
||||||
tasmota.log("MTR: cleartext =" + cleartext.tohex(), 4)
|
# tasmota.log("MTR: cleartext =" + cleartext.tohex(), 4)
|
||||||
tasmota.log("MTR: tag =" + tag.tohex(), 4)
|
# tasmota.log("MTR: tag =" + tag.tohex(), 4)
|
||||||
tasmota.log("MTR: ******************************", 4)
|
# tasmota.log("MTR: ******************************", 4)
|
||||||
|
|
||||||
if tag != mic
|
if tag != mic
|
||||||
tasmota.log("MTR: rejected packet due to invalid MIC", 3)
|
tasmota.log("MTR: rejected packet due to invalid MIC", 3)
|
||||||
|
@ -431,23 +431,23 @@ class Matter_Frame
|
||||||
end
|
end
|
||||||
n.resize(13) # add zeros
|
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: ******************************", 4)
|
||||||
tasmota.log("MTR: r2i =" + r2i.tohex(), 4)
|
# tasmota.log("MTR: r2i =" + r2i.tohex(), 4)
|
||||||
tasmota.log("MTR: p =" + p.tohex(), 4)
|
# tasmota.log("MTR: p =" + p.tohex(), 4)
|
||||||
tasmota.log("MTR: a =" + a.tohex(), 4)
|
# tasmota.log("MTR: a =" + a.tohex(), 4)
|
||||||
tasmota.log("MTR: n =" + n.tohex(), 4)
|
# tasmota.log("MTR: n =" + n.tohex(), 4)
|
||||||
|
|
||||||
# decrypt
|
# decrypt
|
||||||
var aes = crypto.AES_CCM(r2i, n, a, size(p), 16)
|
var aes = crypto.AES_CCM(r2i, n, a, size(p), 16)
|
||||||
var ciphertext = aes.encrypt(p)
|
var ciphertext = aes.encrypt(p)
|
||||||
var tag = aes.tag()
|
var tag = aes.tag()
|
||||||
|
|
||||||
tasmota.log("MTR: ******************************", 4)
|
# tasmota.log("MTR: ******************************", 4)
|
||||||
tasmota.log("MTR: ciphertext =" + ciphertext.tohex(), 4)
|
# tasmota.log("MTR: ciphertext =" + ciphertext.tohex(), 4)
|
||||||
tasmota.log("MTR: tag =" + tag.tohex(), 4)
|
# tasmota.log("MTR: tag =" + tag.tohex(), 4)
|
||||||
tasmota.log("MTR: ******************************", 4)
|
# tasmota.log("MTR: ******************************", 4)
|
||||||
|
|
||||||
# packet is good, put back content in raw
|
# packet is good, put back content in raw
|
||||||
self.raw.resize(self.payload_idx) # remove cleartext payload
|
self.raw.resize(self.payload_idx) # remove cleartext payload
|
||||||
|
@ -463,7 +463,7 @@ class Matter_Frame
|
||||||
var r = matter.Frame(self.message_handler, raw)
|
var r = matter.Frame(self.message_handler, raw)
|
||||||
r.decode_header()
|
r.decode_header()
|
||||||
r.decode_payload()
|
r.decode_payload()
|
||||||
tasmota.log("MTR: sending decode: " + matter.inspect(r), 3)
|
tasmota.log("MTR: sending decode: " + matter.inspect(r), 4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
matter.Frame = Matter_Frame
|
matter.Frame = Matter_Frame
|
||||||
|
|
|
@ -26,8 +26,8 @@ class Matter_MessageHandler
|
||||||
var device # `tansport.msg_send(raw:bytes() [,...]) -> bool` true if succeeded
|
var device # `tansport.msg_send(raw:bytes() [,...]) -> bool` true if succeeded
|
||||||
|
|
||||||
# handlers
|
# handlers
|
||||||
var commissioning
|
var commissioning # Commissioning Context instance, handling the PASE/CASE phases
|
||||||
var im # handler for Interaction Model
|
var im # Instance of `matter.IM` handling Interaction Model
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
def init(device)
|
def init(device)
|
||||||
|
@ -175,16 +175,6 @@ class Matter_MessageHandler
|
||||||
self.device.msg_send(raw, addr, port, id, session_id)
|
self.device.msg_send(raw, addr, port, id, session_id)
|
||||||
end
|
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
|
# placeholder, nothing to run for now
|
||||||
def every_second()
|
def every_second()
|
||||||
|
|
|
@ -45,6 +45,11 @@ class Matter_Plugin
|
||||||
self.clusters = self.consolidate_clusters()
|
self.clusters = self.consolidate_clusters()
|
||||||
end
|
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
|
# signal that an attribute has been changed
|
||||||
#
|
#
|
||||||
|
@ -208,6 +213,7 @@ class Matter_Plugin
|
||||||
#############################################################
|
#############################################################
|
||||||
# every_second
|
# every_second
|
||||||
def every_second()
|
def every_second()
|
||||||
|
self.update_shadow() # force reading value and sending subscriptions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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
|
|
@ -20,30 +20,29 @@
|
||||||
# Matter plug-in for core behavior
|
# Matter plug-in for core behavior
|
||||||
|
|
||||||
# dummy declaration for solidification
|
# dummy declaration for solidification
|
||||||
class Matter_Plugin end
|
class Matter_Plugin_Light0 end
|
||||||
|
|
||||||
#@ solidify:Matter_Plugin_Light1,weak
|
#@ solidify:Matter_Plugin_Light1,weak
|
||||||
|
|
||||||
class Matter_Plugin_Light1 : Matter_Plugin
|
class Matter_Plugin_Light1 : Matter_Plugin_Light0
|
||||||
static var CLUSTERS = {
|
static var CLUSTERS = {
|
||||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
# 0x0003: inherited # Identify 1.2 p.16
|
||||||
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
|
# 0x0004: inherited # Groups 1.3 p.21
|
||||||
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
|
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
|
||||||
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
|
# 0x0006: inherited # On/Off 1.5 p.48
|
||||||
0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57
|
0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57
|
||||||
}
|
}
|
||||||
static var TYPES = { 0x0101: 2 } # Dimmable Light
|
static var TYPES = { 0x0101: 2 } # Dimmable Light
|
||||||
|
|
||||||
var shadow_bri
|
var shadow_bri
|
||||||
var shadow_onoff
|
# var shadow_onoff # inherited
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Constructor
|
# Constructor
|
||||||
def init(device, endpoint)
|
def init(device, endpoint)
|
||||||
super(self).init(device, endpoint)
|
super(self).init(device, endpoint)
|
||||||
self.shadow_bri = 0
|
self.shadow_bri = 0
|
||||||
self.shadow_onoff = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
@ -53,10 +52,9 @@ class Matter_Plugin_Light1 : Matter_Plugin
|
||||||
import light
|
import light
|
||||||
var light_status = light.get()
|
var light_status = light.get()
|
||||||
var bri = light_status.find('bri', nil)
|
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 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
|
if bri != self.shadow_bri self.attribute_updated(nil, 0x0008, 0x0000) self.shadow_bri = bri end
|
||||||
|
super(self).update_shadow() # superclass manages 'power'
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
@ -69,47 +67,7 @@ class Matter_Plugin_Light1 : Matter_Plugin
|
||||||
var attribute = ctx.attribute
|
var attribute = ctx.attribute
|
||||||
|
|
||||||
# ====================================================================================================
|
# ====================================================================================================
|
||||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
|
||||||
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 ----------
|
if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
|
||||||
return TLV.create_TLV(TLV.U1, self.shadow_bri)
|
return TLV.create_TLV(TLV.U1, self.shadow_bri)
|
||||||
elif attribute == 0x0002 # ---------- MinLevel / u1 ----------
|
elif attribute == 0x0002 # ---------- MinLevel / u1 ----------
|
||||||
|
@ -143,48 +101,7 @@ class Matter_Plugin_Light1 : Matter_Plugin
|
||||||
var command = ctx.command
|
var command = ctx.command
|
||||||
|
|
||||||
# ====================================================================================================
|
# ====================================================================================================
|
||||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
|
||||||
|
|
||||||
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 ----------
|
if command == 0x0000 # ---------- MoveToLevel ----------
|
||||||
var bri_in = val.findsubval(0) # Hue 0..254
|
var bri_in = val.findsubval(0) # Hue 0..254
|
||||||
var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255)
|
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
|
# TODO, we don't really support it
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
return super(self).invoke_request(session, val, ctx)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
|
||||||
# every_second
|
|
||||||
def every_second()
|
|
||||||
self.update_shadow() # force reading value and sending subscriptions
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
matter.Plugin_Light1 = Matter_Plugin_Light1
|
matter.Plugin_Light1 = Matter_Plugin_Light1
|
||||||
|
|
|
@ -20,32 +20,30 @@
|
||||||
# Matter plug-in for core behavior
|
# Matter plug-in for core behavior
|
||||||
|
|
||||||
# dummy declaration for solidification
|
# dummy declaration for solidification
|
||||||
class Matter_Plugin end
|
class Matter_Plugin_Light1 end
|
||||||
|
|
||||||
#@ solidify:Matter_Plugin_Light2,weak
|
#@ solidify:Matter_Plugin_Light2,weak
|
||||||
|
|
||||||
class Matter_Plugin_Light2 : Matter_Plugin
|
class Matter_Plugin_Light2 : Matter_Plugin_Light1
|
||||||
static var CLUSTERS = {
|
static var CLUSTERS = {
|
||||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
# 0x0003: inherited # Identify 1.2 p.16
|
||||||
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
|
# 0x0004: inherited # Groups 1.3 p.21
|
||||||
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
|
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
|
||||||
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
|
# 0x0006: inherited # On/Off 1.5 p.48
|
||||||
0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57
|
# 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
|
static var TYPES = { 0x010C: 2 } # Color Temperature Light
|
||||||
|
|
||||||
var shadow_bri, shadow_ct
|
var shadow_ct
|
||||||
var ct_min, ct_max
|
var ct_min, ct_max
|
||||||
var shadow_onoff
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Constructor
|
# Constructor
|
||||||
def init(device, endpoint)
|
def init(device, endpoint)
|
||||||
super(self).init(device, endpoint)
|
super(self).init(device, endpoint)
|
||||||
self.shadow_bri = 0
|
|
||||||
self.shadow_ct = 325
|
self.shadow_ct = 325
|
||||||
self.shadow_onoff = false
|
|
||||||
self.update_ct_minmax()
|
self.update_ct_minmax()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -55,14 +53,10 @@ class Matter_Plugin_Light2 : Matter_Plugin
|
||||||
def update_shadow()
|
def update_shadow()
|
||||||
import light
|
import light
|
||||||
self.update_ct_minmax()
|
self.update_ct_minmax()
|
||||||
|
super(self).update_shadow()
|
||||||
var light_status = light.get()
|
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)
|
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 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
|
if ct != self.shadow_ct self.attribute_updated(nil, 0x0300, 0x0007) self.shadow_ct = ct end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -83,67 +77,9 @@ class Matter_Plugin_Light2 : Matter_Plugin
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
var attribute = ctx.attribute
|
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 ----------
|
if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
|
||||||
return TLV.create_TLV(TLV.U1, self.shadow_ct)
|
return TLV.create_TLV(TLV.U1, self.shadow_ct)
|
||||||
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
||||||
|
@ -178,85 +114,7 @@ class Matter_Plugin_Light2 : Matter_Plugin
|
||||||
var command = ctx.command
|
var command = ctx.command
|
||||||
|
|
||||||
# ====================================================================================================
|
# ====================================================================================================
|
||||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||||
|
|
||||||
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 command == 0x000A # ---------- MoveToColorTemperature ----------
|
if command == 0x000A # ---------- MoveToColorTemperature ----------
|
||||||
var ct_in = val.findsubval(0) # CT
|
var ct_in = val.findsubval(0) # CT
|
||||||
if ct_in < self.ct_min ct_in = self.ct_min end
|
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
|
# TODO, we don't really support it
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
return super(self).invoke_request(session, val, ctx)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
|
||||||
# every_second
|
|
||||||
def every_second()
|
|
||||||
self.update_shadow() # force reading value and sending subscriptions
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
matter.Plugin_Light2 = Matter_Plugin_Light2
|
matter.Plugin_Light2 = Matter_Plugin_Light2
|
||||||
|
|
|
@ -20,33 +20,30 @@
|
||||||
# Matter plug-in for core behavior
|
# Matter plug-in for core behavior
|
||||||
|
|
||||||
# dummy declaration for solidification
|
# dummy declaration for solidification
|
||||||
class Matter_Plugin end
|
class Matter_Plugin_Light1 end
|
||||||
|
|
||||||
#@ solidify:Matter_Plugin_Light3,weak
|
#@ solidify:Matter_Plugin_Light3,weak
|
||||||
|
|
||||||
class Matter_Plugin_Light3 : Matter_Plugin
|
class Matter_Plugin_Light3 : Matter_Plugin_Light1
|
||||||
static var CLUSTERS = {
|
static var CLUSTERS = {
|
||||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
# 0x0003: inherited # Identify 1.2 p.16
|
||||||
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
|
# 0x0004: inherited # Groups 1.3 p.21
|
||||||
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
|
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
|
||||||
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
|
# 0x0006: inherited # On/Off 1.5 p.48
|
||||||
0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57
|
# 0x0008: inherited # Level Control 1.6 p.57
|
||||||
0x0300: [0,1,7,8,0xF,0x4001,0x400A,0xFFFC,0xFFFD],# Color Control 3.2 p.111
|
0x0300: [0,1,7,8,0xF,0x4001,0x400A,0xFFFC,0xFFFD],# Color Control 3.2 p.111
|
||||||
}
|
}
|
||||||
static var TYPES = { 0x010D: 2 } # Extended Color Light
|
static var TYPES = { 0x010D: 2 } # Extended Color Light
|
||||||
|
|
||||||
var shadow_hue, shadow_bri, shadow_sat
|
var shadow_hue, shadow_sat
|
||||||
var shadow_onoff
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Constructor
|
# Constructor
|
||||||
def init(device, endpoint)
|
def init(device, endpoint)
|
||||||
super(self).init(device, endpoint)
|
super(self).init(device, endpoint)
|
||||||
self.shadow_hue = 0
|
self.shadow_hue = 0
|
||||||
self.shadow_bri = 0
|
|
||||||
self.shadow_sat = 0
|
self.shadow_sat = 0
|
||||||
self.shadow_onoff = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
@ -54,16 +51,12 @@ class Matter_Plugin_Light3 : Matter_Plugin
|
||||||
#
|
#
|
||||||
def update_shadow()
|
def update_shadow()
|
||||||
import light
|
import light
|
||||||
|
super(self).update_shadow()
|
||||||
var light_status = light.get()
|
var light_status = light.get()
|
||||||
var bri = light_status.find('bri', nil)
|
|
||||||
var hue = light_status.find('hue', nil)
|
var hue = light_status.find('hue', nil)
|
||||||
var sat = light_status.find('sat', nil)
|
var sat = light_status.find('sat', nil)
|
||||||
var pow = light_status.find('power', nil)
|
if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end
|
||||||
if bri != nil bri = tasmota.scale_uint(bri, 0, 255, 0, 254) else bri = self.shadow_bri end
|
if sat != nil sat = tasmota.scale_uint(sat, 0, 255, 0, 254) else sat = self.shadow_sat 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 != self.shadow_hue self.attribute_updated(nil, 0x0300, 0x0000) self.shadow_hue = hue 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
|
if sat != self.shadow_sat self.attribute_updated(nil, 0x0300, 0x0001) self.shadow_sat = sat end
|
||||||
end
|
end
|
||||||
|
@ -76,67 +69,9 @@ class Matter_Plugin_Light3 : Matter_Plugin
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
var attribute = ctx.attribute
|
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 ----------
|
if attribute == 0x0000 # ---------- CurrentHue / u1 ----------
|
||||||
return TLV.create_TLV(TLV.U1, self.shadow_hue)
|
return TLV.create_TLV(TLV.U1, self.shadow_hue)
|
||||||
elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ----------
|
elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ----------
|
||||||
|
@ -179,84 +114,7 @@ class Matter_Plugin_Light3 : Matter_Plugin
|
||||||
var command = ctx.command
|
var command = ctx.command
|
||||||
|
|
||||||
# ====================================================================================================
|
# ====================================================================================================
|
||||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||||
|
|
||||||
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 command == 0x0000 # ---------- MoveToHue ----------
|
if command == 0x0000 # ---------- MoveToHue ----------
|
||||||
var hue_in = val.findsubval(0) # Hue 0..254
|
var hue_in = val.findsubval(0) # Hue 0..254
|
||||||
var hue = tasmota.scale_uint(hue_in, 0, 254, 0, 360)
|
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
|
# TODO, we don't really support it
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
return super(self).invoke_request(session, val, ctx)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
|
||||||
# every_second
|
|
||||||
def every_second()
|
|
||||||
self.update_shadow() # force reading value and sending subscriptions
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
matter.Plugin_Light3 = Matter_Plugin_Light3
|
matter.Plugin_Light3 = Matter_Plugin_Light3
|
||||||
|
|
|
@ -278,13 +278,13 @@ class Matter_UI
|
||||||
while idx < size(fabrics)
|
while idx < size(fabrics)
|
||||||
var fabric_hex = fabrics[idx].get_fabric_id().copy().reverse().tohex()
|
var fabric_hex = fabrics[idx].get_fabric_id().copy().reverse().tohex()
|
||||||
if fabric_hex == del_fabric
|
if fabric_hex == del_fabric
|
||||||
fabrics.remove(idx)
|
self.device.remove_fabric(fabrics[idx])
|
||||||
dirty = true
|
dirty = true
|
||||||
|
break
|
||||||
else
|
else
|
||||||
idx += 1
|
idx += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if dirty self.device.sessions.save_fabrics() end
|
|
||||||
|
|
||||||
#- and force restart -#
|
#- and force restart -#
|
||||||
webserver.redirect("/?rst=")
|
webserver.redirect("/?rst=")
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -219,7 +219,7 @@ be_local_closure(Matter_Frame_encrypt, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[28]) { /* constants */
|
( &(const bvalue[17]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(crypto),
|
/* K0 */ be_nested_str_weak(crypto),
|
||||||
/* K1 */ be_nested_str_weak(raw),
|
/* K1 */ be_nested_str_weak(raw),
|
||||||
/* K2 */ be_nested_str_weak(session),
|
/* K2 */ be_nested_str_weak(session),
|
||||||
|
@ -234,24 +234,13 @@ be_local_closure(Matter_Frame_encrypt, /* name */
|
||||||
/* K11 */ be_nested_str_weak(is_CASE),
|
/* K11 */ be_nested_str_weak(is_CASE),
|
||||||
/* K12 */ be_nested_str_weak(get_device_id),
|
/* K12 */ be_nested_str_weak(get_device_id),
|
||||||
/* K13 */ be_nested_str_weak(resize),
|
/* K13 */ be_nested_str_weak(resize),
|
||||||
/* K14 */ be_nested_str_weak(tasmota),
|
/* K14 */ be_nested_str_weak(AES_CCM),
|
||||||
/* K15 */ be_nested_str_weak(log),
|
/* K15 */ be_nested_str_weak(encrypt),
|
||||||
/* K16 */ be_nested_str_weak(MTR_X3A_X20cleartext_X3A_X20),
|
/* K16 */ be_nested_str_weak(tag),
|
||||||
/* 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),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(encrypt),
|
be_str_weak(encrypt),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[122]) { /* code */
|
( &(const binstruction[57]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||||
|
@ -286,94 +275,29 @@ be_local_closure(Matter_Frame_encrypt, /* name */
|
||||||
0x8C200F0D, // 001F GETMET R8 R7 K13
|
0x8C200F0D, // 001F GETMET R8 R7 K13
|
||||||
0x542A000C, // 0020 LDINT R10 13
|
0x542A000C, // 0020 LDINT R10 13
|
||||||
0x7C200400, // 0021 CALL R8 2
|
0x7C200400, // 0021 CALL R8 2
|
||||||
0xB8221C00, // 0022 GETNGBL R8 K14
|
0x8C20030E, // 0022 GETMET R8 R1 K14
|
||||||
0x8C20110F, // 0023 GETMET R8 R8 K15
|
0x5C280800, // 0023 MOVE R10 R4
|
||||||
0x88280101, // 0024 GETMBR R10 R0 K1
|
0x5C2C0E00, // 0024 MOVE R11 R7
|
||||||
0x8C281511, // 0025 GETMET R10 R10 K17
|
0x5C300A00, // 0025 MOVE R12 R5
|
||||||
0x7C280200, // 0026 CALL R10 1
|
0x6034000C, // 0026 GETGBL R13 G12
|
||||||
0x002A200A, // 0027 ADD R10 K16 R10
|
0x5C380C00, // 0027 MOVE R14 R6
|
||||||
0x542E0003, // 0028 LDINT R11 4
|
0x7C340200, // 0028 CALL R13 1
|
||||||
0x7C200600, // 0029 CALL R8 3
|
0x543A000F, // 0029 LDINT R14 16
|
||||||
0xB8221C00, // 002A GETNGBL R8 K14
|
0x7C200C00, // 002A CALL R8 6
|
||||||
0x8C20110F, // 002B GETMET R8 R8 K15
|
0x8C24110F, // 002B GETMET R9 R8 K15
|
||||||
0x58280012, // 002C LDCONST R10 K18
|
0x5C2C0C00, // 002C MOVE R11 R6
|
||||||
0x542E0003, // 002D LDINT R11 4
|
0x7C240400, // 002D CALL R9 2
|
||||||
0x7C200600, // 002E CALL R8 3
|
0x8C281110, // 002E GETMET R10 R8 K16
|
||||||
0xB8221C00, // 002F GETNGBL R8 K14
|
0x7C280200, // 002F CALL R10 1
|
||||||
0x8C20110F, // 0030 GETMET R8 R8 K15
|
0x882C0101, // 0030 GETMBR R11 R0 K1
|
||||||
0x8C280911, // 0031 GETMET R10 R4 K17
|
0x8C2C170D, // 0031 GETMET R11 R11 K13
|
||||||
0x7C280200, // 0032 CALL R10 1
|
0x88340105, // 0032 GETMBR R13 R0 K5
|
||||||
0x002A260A, // 0033 ADD R10 K19 R10
|
0x7C2C0400, // 0033 CALL R11 2
|
||||||
0x542E0003, // 0034 LDINT R11 4
|
0x882C0101, // 0034 GETMBR R11 R0 K1
|
||||||
0x7C200600, // 0035 CALL R8 3
|
0x402C1609, // 0035 CONNECT R11 R11 R9
|
||||||
0xB8221C00, // 0036 GETNGBL R8 K14
|
0x882C0101, // 0036 GETMBR R11 R0 K1
|
||||||
0x8C20110F, // 0037 GETMET R8 R8 K15
|
0x402C160A, // 0037 CONNECT R11 R11 R10
|
||||||
0x8C280D11, // 0038 GETMET R10 R6 K17
|
0x80000000, // 0038 RET 0
|
||||||
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
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -393,7 +317,7 @@ be_local_closure(Matter_Frame_debug, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[10]) { /* constants */
|
( &(const bvalue[ 9]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(matter),
|
/* K0 */ be_nested_str_weak(matter),
|
||||||
/* K1 */ be_nested_str_weak(Frame),
|
/* K1 */ be_nested_str_weak(Frame),
|
||||||
/* K2 */ be_nested_str_weak(message_handler),
|
/* K2 */ be_nested_str_weak(message_handler),
|
||||||
|
@ -403,7 +327,6 @@ be_local_closure(Matter_Frame_debug, /* name */
|
||||||
/* K6 */ be_nested_str_weak(log),
|
/* K6 */ be_nested_str_weak(log),
|
||||||
/* K7 */ be_nested_str_weak(MTR_X3A_X20sending_X20decode_X3A_X20),
|
/* K7 */ be_nested_str_weak(MTR_X3A_X20sending_X20decode_X3A_X20),
|
||||||
/* K8 */ be_nested_str_weak(inspect),
|
/* K8 */ be_nested_str_weak(inspect),
|
||||||
/* K9 */ be_const_int(3),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(debug),
|
be_str_weak(debug),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
|
@ -424,7 +347,7 @@ be_local_closure(Matter_Frame_debug, /* name */
|
||||||
0x5C1C0400, // 000D MOVE R7 R2
|
0x5C1C0400, // 000D MOVE R7 R2
|
||||||
0x7C140400, // 000E CALL R5 2
|
0x7C140400, // 000E CALL R5 2
|
||||||
0x00160E05, // 000F ADD R5 K7 R5
|
0x00160E05, // 000F ADD R5 K7 R5
|
||||||
0x58180009, // 0010 LDCONST R6 K9
|
0x541A0003, // 0010 LDINT R6 4
|
||||||
0x7C0C0600, // 0011 CALL R3 3
|
0x7C0C0600, // 0011 CALL R3 3
|
||||||
0x80000000, // 0012 RET 0
|
0x80000000, // 0012 RET 0
|
||||||
})
|
})
|
||||||
|
@ -1116,7 +1039,7 @@ be_local_closure(Matter_Frame_decrypt, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[36]) { /* constants */
|
( &(const bvalue[27]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(crypto),
|
/* K0 */ be_nested_str_weak(crypto),
|
||||||
/* K1 */ be_nested_str_weak(session),
|
/* K1 */ be_nested_str_weak(session),
|
||||||
/* K2 */ be_nested_str_weak(raw),
|
/* 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),
|
/* K19 */ be_nested_str_weak(source_node_id),
|
||||||
/* K20 */ be_nested_str_weak(peer_node_id),
|
/* K20 */ be_nested_str_weak(peer_node_id),
|
||||||
/* K21 */ be_nested_str_weak(resize),
|
/* K21 */ be_nested_str_weak(resize),
|
||||||
/* K22 */ be_nested_str_weak(tasmota),
|
/* K22 */ be_nested_str_weak(AES_CCM),
|
||||||
/* K23 */ be_nested_str_weak(log),
|
/* K23 */ be_nested_str_weak(tag),
|
||||||
/* 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),
|
/* K24 */ be_nested_str_weak(tasmota),
|
||||||
/* K25 */ be_nested_str_weak(MTR_X3A_X20i2r_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
|
/* K25 */ be_nested_str_weak(log),
|
||||||
/* K26 */ be_nested_str_weak(tohex),
|
/* K26 */ be_nested_str_weak(MTR_X3A_X20rejected_X20packet_X20due_X20to_X20invalid_X20MIC),
|
||||||
/* 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),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(decrypt),
|
be_str_weak(decrypt),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[165]) { /* code */
|
( &(const binstruction[101]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||||
|
@ -1234,94 +1148,30 @@ be_local_closure(Matter_Frame_decrypt, /* name */
|
||||||
0x8C241115, // 004A GETMET R9 R8 K21
|
0x8C241115, // 004A GETMET R9 R8 K21
|
||||||
0x542E000C, // 004B LDINT R11 13
|
0x542E000C, // 004B LDINT R11 13
|
||||||
0x7C240400, // 004C CALL R9 2
|
0x7C240400, // 004C CALL R9 2
|
||||||
0xB8262C00, // 004D GETNGBL R9 K22
|
0x8C240316, // 004D GETMET R9 R1 K22
|
||||||
0x8C241317, // 004E GETMET R9 R9 K23
|
0x5C2C0A00, // 004E MOVE R11 R5
|
||||||
0x582C0018, // 004F LDCONST R11 K24
|
0x5C301000, // 004F MOVE R12 R8
|
||||||
0x54320003, // 0050 LDINT R12 4
|
0x5C340C00, // 0050 MOVE R13 R6
|
||||||
0x7C240600, // 0051 CALL R9 3
|
0x6038000C, // 0051 GETGBL R14 G12
|
||||||
0xB8262C00, // 0052 GETNGBL R9 K22
|
0x5C3C0E00, // 0052 MOVE R15 R7
|
||||||
0x8C241317, // 0053 GETMET R9 R9 K23
|
0x7C380200, // 0053 CALL R14 1
|
||||||
0x8C2C0B1A, // 0054 GETMET R11 R5 K26
|
0x543E000F, // 0054 LDINT R15 16
|
||||||
0x7C2C0200, // 0055 CALL R11 1
|
0x7C240C00, // 0055 CALL R9 6
|
||||||
0x002E320B, // 0056 ADD R11 K25 R11
|
0x8C28130C, // 0056 GETMET R10 R9 K12
|
||||||
0x54320003, // 0057 LDINT R12 4
|
0x5C300E00, // 0057 MOVE R12 R7
|
||||||
0x7C240600, // 0058 CALL R9 3
|
0x7C280400, // 0058 CALL R10 2
|
||||||
0xB8262C00, // 0059 GETNGBL R9 K22
|
0x8C2C1317, // 0059 GETMET R11 R9 K23
|
||||||
0x8C241317, // 005A GETMET R9 R9 K23
|
0x7C2C0200, // 005A CALL R11 1
|
||||||
0x8C2C0F1A, // 005B GETMET R11 R7 K26
|
0x20301604, // 005B NE R12 R11 R4
|
||||||
0x7C2C0200, // 005C CALL R11 1
|
0x78320006, // 005C JMPF R12 #0064
|
||||||
0x002E360B, // 005D ADD R11 K27 R11
|
0xB8323000, // 005D GETNGBL R12 K24
|
||||||
0x54320003, // 005E LDINT R12 4
|
0x8C301919, // 005E GETMET R12 R12 K25
|
||||||
0x7C240600, // 005F CALL R9 3
|
0x5838001A, // 005F LDCONST R14 K26
|
||||||
0xB8262C00, // 0060 GETNGBL R9 K22
|
0x583C000F, // 0060 LDCONST R15 K15
|
||||||
0x8C241317, // 0061 GETMET R9 R9 K23
|
0x7C300600, // 0061 CALL R12 3
|
||||||
0x8C2C0D1A, // 0062 GETMET R11 R6 K26
|
0x4C300000, // 0062 LDNIL R12
|
||||||
0x7C2C0200, // 0063 CALL R11 1
|
0x80041800, // 0063 RET 1 R12
|
||||||
0x002E380B, // 0064 ADD R11 K28 R11
|
0x80041400, // 0064 RET 1 R10
|
||||||
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
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,6 +6,112 @@
|
||||||
|
|
||||||
extern const bclass be_class_Matter_MessageHandler;
|
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
|
** 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
|
** Solidified function: send_response
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -687,17 +630,16 @@ be_local_closure(Matter_MessageHandler_send_response, /* name */
|
||||||
be_local_class(Matter_MessageHandler,
|
be_local_class(Matter_MessageHandler,
|
||||||
3,
|
3,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(9,
|
be_nested_map(8,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(send_response, 5), be_const_closure(Matter_MessageHandler_send_response_closure) },
|
{ be_const_key_weak(commissioning, 5), be_const_var(1) },
|
||||||
{ 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(every_second, -1), be_const_closure(Matter_MessageHandler_every_second_closure) },
|
{ 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)
|
be_str_weak(Matter_MessageHandler)
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,143 +6,6 @@
|
||||||
|
|
||||||
extern const bclass be_class_Matter_Plugin;
|
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
|
** 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
|
** 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(
|
be_nested_proto(
|
||||||
1, /* nstack */
|
1, /* nstack */
|
||||||
1, /* argc */
|
1, /* argc */
|
||||||
|
@ -360,7 +379,7 @@ be_local_closure(Matter_Plugin_every_second, /* name */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
0, /* has constants */
|
0, /* has constants */
|
||||||
NULL, /* no const */
|
NULL, /* no const */
|
||||||
be_str_weak(every_second),
|
be_str_weak(update_shadow),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 1]) { /* code */
|
( &(const binstruction[ 1]) { /* code */
|
||||||
0x80000000, // 0000 RET 0
|
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
|
** 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
|
** 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(
|
be_nested_proto(
|
||||||
7, /* nstack */
|
2, /* nstack */
|
||||||
3, /* argc */
|
2, /* argc */
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 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, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
|
@ -488,11 +618,10 @@ be_local_closure(Matter_Plugin_read_event, /* name */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
0, /* has constants */
|
0, /* has constants */
|
||||||
NULL, /* no const */
|
NULL, /* no const */
|
||||||
be_str_weak(read_event),
|
be_str_weak(parse_sensors),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 2]) { /* code */
|
( &(const binstruction[ 1]) { /* code */
|
||||||
0x4C140000, // 0000 LDNIL R5
|
0x80000000, // 0000 RET 0
|
||||||
0x80040A00, // 0001 RET 1 R5
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -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_local_closure(Matter_Plugin_invoke_request, /* 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_nested_proto(
|
be_nested_proto(
|
||||||
5, /* nstack */
|
5, /* nstack */
|
||||||
4, /* argc */
|
4, /* argc */
|
||||||
|
@ -538,7 +642,7 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
0, /* has constants */
|
0, /* has constants */
|
||||||
NULL, /* no const */
|
NULL, /* no const */
|
||||||
be_str_weak(write_attribute),
|
be_str_weak(invoke_request),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 2]) { /* code */
|
( &(const binstruction[ 2]) { /* code */
|
||||||
0x4C100000, // 0000 LDNIL R4
|
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
|
** Solidified class: Matter_Plugin
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_class(Matter_Plugin,
|
be_local_class(Matter_Plugin,
|
||||||
3,
|
3,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(20,
|
be_nested_map(21,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (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(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(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,
|
be_const_map( * be_nested_map(1,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
{ 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_int(65533),
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
{ be_const_key_weak(init, 13), be_const_closure(Matter_Plugin_init_closure) },
|
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) },
|
||||||
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
|
{ be_const_key_weak(clusters, -1), be_const_var(2) },
|
||||||
{ be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
|
{ be_const_key_weak(endpoint, -1), be_const_var(1) },
|
||||||
{ 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_str_weak(Matter_Plugin)
|
be_str_weak(Matter_Plugin)
|
||||||
);
|
);
|
||||||
|
|
|
@ -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 */
|
|
@ -6,113 +6,6 @@
|
||||||
|
|
||||||
extern const bclass be_class_Matter_Plugin_Light1;
|
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
|
** Solidified function: invoke_request
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -126,215 +19,140 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[22]) { /* constants */
|
( &(const bvalue[19]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(light),
|
/* K0 */ be_nested_str_weak(light),
|
||||||
/* K1 */ be_nested_str_weak(matter),
|
/* K1 */ be_nested_str_weak(matter),
|
||||||
/* K2 */ be_nested_str_weak(TLV),
|
/* K2 */ be_nested_str_weak(TLV),
|
||||||
/* K3 */ be_nested_str_weak(cluster),
|
/* K3 */ be_nested_str_weak(cluster),
|
||||||
/* K4 */ be_nested_str_weak(command),
|
/* K4 */ be_nested_str_weak(command),
|
||||||
/* K5 */ be_const_int(3),
|
/* K5 */ be_const_int(0),
|
||||||
/* K6 */ be_const_int(0),
|
/* K6 */ be_nested_str_weak(findsubval),
|
||||||
/* K7 */ be_const_int(1),
|
/* K7 */ be_nested_str_weak(tasmota),
|
||||||
/* K8 */ be_nested_str_weak(Matter_TLV_struct),
|
/* K8 */ be_nested_str_weak(scale_uint),
|
||||||
/* K9 */ be_nested_str_weak(add_TLV),
|
/* K9 */ be_nested_str_weak(set),
|
||||||
/* K10 */ be_nested_str_weak(U2),
|
/* K10 */ be_nested_str_weak(bri),
|
||||||
/* K11 */ be_nested_str_weak(set),
|
/* K11 */ be_nested_str_weak(update_shadow),
|
||||||
/* K12 */ be_nested_str_weak(power),
|
/* K12 */ be_nested_str_weak(log),
|
||||||
/* K13 */ be_nested_str_weak(update_shadow),
|
/* K13 */ be_nested_str_weak(bri_X3A),
|
||||||
/* K14 */ be_const_int(2),
|
/* K14 */ be_const_int(1),
|
||||||
/* K15 */ be_nested_str_weak(shadow_onoff),
|
/* K15 */ be_const_int(2),
|
||||||
/* K16 */ be_nested_str_weak(findsubval),
|
/* K16 */ be_const_int(3),
|
||||||
/* K17 */ be_nested_str_weak(tasmota),
|
/* K17 */ be_nested_str_weak(power),
|
||||||
/* K18 */ be_nested_str_weak(scale_uint),
|
/* K18 */ be_nested_str_weak(invoke_request),
|
||||||
/* K19 */ be_nested_str_weak(bri),
|
|
||||||
/* K20 */ be_nested_str_weak(log),
|
|
||||||
/* K21 */ be_nested_str_weak(bri_X3A),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(invoke_request),
|
be_str_weak(invoke_request),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[182]) { /* code */
|
( &(const binstruction[110]) { /* code */
|
||||||
0xA4120000, // 0000 IMPORT R4 K0
|
0xA4120000, // 0000 IMPORT R4 K0
|
||||||
0xB8160200, // 0001 GETNGBL R5 K1
|
0xB8160200, // 0001 GETNGBL R5 K1
|
||||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||||
0x1C200D05, // 0005 EQ R8 R6 K5
|
0x54220007, // 0005 LDINT R8 8
|
||||||
0x78220016, // 0006 JMPF R8 #001E
|
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||||
0x1C200F06, // 0007 EQ R8 R7 K6
|
0x7822005B, // 0007 JMPF R8 #0064
|
||||||
0x78220002, // 0008 JMPF R8 #000C
|
0x1C200F05, // 0008 EQ R8 R7 K5
|
||||||
0x50200200, // 0009 LDBOOL R8 1 0
|
0x78220019, // 0009 JMPF R8 #0024
|
||||||
0x80041000, // 000A RET 1 R8
|
0x8C200506, // 000A GETMET R8 R2 K6
|
||||||
0x70020010, // 000B JMP #001D
|
0x58280005, // 000B LDCONST R10 K5
|
||||||
0x1C200F07, // 000C EQ R8 R7 K7
|
0x7C200400, // 000C CALL R8 2
|
||||||
0x78220009, // 000D JMPF R8 #0018
|
0xB8260E00, // 000D GETNGBL R9 K7
|
||||||
0x8C200B08, // 000E GETMET R8 R5 K8
|
0x8C241308, // 000E GETMET R9 R9 K8
|
||||||
0x7C200200, // 000F CALL R8 1
|
0x5C2C1000, // 000F MOVE R11 R8
|
||||||
0x8C241109, // 0010 GETMET R9 R8 K9
|
0x58300005, // 0010 LDCONST R12 K5
|
||||||
0x582C0006, // 0011 LDCONST R11 K6
|
0x543600FD, // 0011 LDINT R13 254
|
||||||
0x88300B0A, // 0012 GETMBR R12 R5 K10
|
0x58380005, // 0012 LDCONST R14 K5
|
||||||
0x58340006, // 0013 LDCONST R13 K6
|
0x543E00FE, // 0013 LDINT R15 255
|
||||||
0x7C240800, // 0014 CALL R9 4
|
0x7C240C00, // 0014 CALL R9 6
|
||||||
0x900E0906, // 0015 SETMBR R3 K4 K6
|
0x8C280909, // 0015 GETMET R10 R4 K9
|
||||||
0x80041000, // 0016 RET 1 R8
|
0x60300013, // 0016 GETGBL R12 G19
|
||||||
0x70020004, // 0017 JMP #001D
|
0x7C300000, // 0017 CALL R12 0
|
||||||
0x5422003F, // 0018 LDINT R8 64
|
0x98321409, // 0018 SETIDX R12 K10 R9
|
||||||
0x1C200E08, // 0019 EQ R8 R7 R8
|
0x7C280400, // 0019 CALL R10 2
|
||||||
0x78220001, // 001A JMPF R8 #001D
|
0x8C28010B, // 001A GETMET R10 R0 K11
|
||||||
0x50200200, // 001B LDBOOL R8 1 0
|
0x7C280200, // 001B CALL R10 1
|
||||||
0x80041000, // 001C RET 1 R8
|
0x60280008, // 001C GETGBL R10 G8
|
||||||
0x70020096, // 001D JMP #00B5
|
0x5C2C1000, // 001D MOVE R11 R8
|
||||||
0x54220003, // 001E LDINT R8 4
|
0x7C280200, // 001E CALL R10 1
|
||||||
0x1C200C08, // 001F EQ R8 R6 R8
|
0x002A1A0A, // 001F ADD R10 K13 R10
|
||||||
0x78220002, // 0020 JMPF R8 #0024
|
0x900E180A, // 0020 SETMBR R3 K12 R10
|
||||||
0x50200200, // 0021 LDBOOL R8 1 0
|
0x50280200, // 0021 LDBOOL R10 1 0
|
||||||
0x80041000, // 0022 RET 1 R8
|
0x80041400, // 0022 RET 1 R10
|
||||||
0x70020090, // 0023 JMP #00B5
|
0x7002003E, // 0023 JMP #0063
|
||||||
0x54220004, // 0024 LDINT R8 5
|
0x1C200F0E, // 0024 EQ R8 R7 K14
|
||||||
0x1C200C08, // 0025 EQ R8 R6 R8
|
0x78220002, // 0025 JMPF R8 #0029
|
||||||
0x78220002, // 0026 JMPF R8 #002A
|
0x50200200, // 0026 LDBOOL R8 1 0
|
||||||
0x50200200, // 0027 LDBOOL R8 1 0
|
0x80041000, // 0027 RET 1 R8
|
||||||
0x80041000, // 0028 RET 1 R8
|
0x70020039, // 0028 JMP #0063
|
||||||
0x7002008A, // 0029 JMP #00B5
|
0x1C200F0F, // 0029 EQ R8 R7 K15
|
||||||
0x54220005, // 002A LDINT R8 6
|
0x78220002, // 002A JMPF R8 #002E
|
||||||
0x1C200C08, // 002B EQ R8 R6 R8
|
0x50200200, // 002B LDBOOL R8 1 0
|
||||||
0x78220029, // 002C JMPF R8 #0057
|
0x80041000, // 002C RET 1 R8
|
||||||
0x1C200F06, // 002D EQ R8 R7 K6
|
0x70020034, // 002D JMP #0063
|
||||||
0x7822000A, // 002E JMPF R8 #003A
|
0x1C200F10, // 002E EQ R8 R7 K16
|
||||||
0x8C20090B, // 002F GETMET R8 R4 K11
|
0x78220002, // 002F JMPF R8 #0033
|
||||||
0x60280013, // 0030 GETGBL R10 G19
|
0x50200200, // 0030 LDBOOL R8 1 0
|
||||||
0x7C280000, // 0031 CALL R10 0
|
0x80041000, // 0031 RET 1 R8
|
||||||
0x502C0000, // 0032 LDBOOL R11 0 0
|
0x7002002F, // 0032 JMP #0063
|
||||||
0x982A180B, // 0033 SETIDX R10 K12 R11
|
0x54220003, // 0033 LDINT R8 4
|
||||||
0x7C200400, // 0034 CALL R8 2
|
0x1C200E08, // 0034 EQ R8 R7 R8
|
||||||
0x8C20010D, // 0035 GETMET R8 R0 K13
|
0x7822001B, // 0035 JMPF R8 #0052
|
||||||
0x7C200200, // 0036 CALL R8 1
|
0x8C200506, // 0036 GETMET R8 R2 K6
|
||||||
0x50200200, // 0037 LDBOOL R8 1 0
|
0x58280005, // 0037 LDCONST R10 K5
|
||||||
0x80041000, // 0038 RET 1 R8
|
0x7C200400, // 0038 CALL R8 2
|
||||||
0x7002001B, // 0039 JMP #0056
|
0xB8260E00, // 0039 GETNGBL R9 K7
|
||||||
0x1C200F07, // 003A EQ R8 R7 K7
|
0x8C241308, // 003A GETMET R9 R9 K8
|
||||||
0x7822000A, // 003B JMPF R8 #0047
|
0x5C2C1000, // 003B MOVE R11 R8
|
||||||
0x8C20090B, // 003C GETMET R8 R4 K11
|
0x58300005, // 003C LDCONST R12 K5
|
||||||
0x60280013, // 003D GETGBL R10 G19
|
0x543600FD, // 003D LDINT R13 254
|
||||||
0x7C280000, // 003E CALL R10 0
|
0x58380005, // 003E LDCONST R14 K5
|
||||||
0x502C0200, // 003F LDBOOL R11 1 0
|
0x543E00FE, // 003F LDINT R15 255
|
||||||
0x982A180B, // 0040 SETIDX R10 K12 R11
|
0x7C240C00, // 0040 CALL R9 6
|
||||||
0x7C200400, // 0041 CALL R8 2
|
0x24281305, // 0041 GT R10 R9 K5
|
||||||
0x8C20010D, // 0042 GETMET R8 R0 K13
|
0x8C2C0909, // 0042 GETMET R11 R4 K9
|
||||||
0x7C200200, // 0043 CALL R8 1
|
0x60340013, // 0043 GETGBL R13 G19
|
||||||
0x50200200, // 0044 LDBOOL R8 1 0
|
0x7C340000, // 0044 CALL R13 0
|
||||||
0x80041000, // 0045 RET 1 R8
|
0x98361409, // 0045 SETIDX R13 K10 R9
|
||||||
0x7002000E, // 0046 JMP #0056
|
0x9836220A, // 0046 SETIDX R13 K17 R10
|
||||||
0x1C200F0E, // 0047 EQ R8 R7 K14
|
0x7C2C0400, // 0047 CALL R11 2
|
||||||
0x7822000C, // 0048 JMPF R8 #0056
|
0x8C2C010B, // 0048 GETMET R11 R0 K11
|
||||||
0x8C20090B, // 0049 GETMET R8 R4 K11
|
0x7C2C0200, // 0049 CALL R11 1
|
||||||
0x60280013, // 004A GETGBL R10 G19
|
0x602C0008, // 004A GETGBL R11 G8
|
||||||
0x7C280000, // 004B CALL R10 0
|
0x5C301000, // 004B MOVE R12 R8
|
||||||
0x882C010F, // 004C GETMBR R11 R0 K15
|
0x7C2C0200, // 004C CALL R11 1
|
||||||
0x782E0000, // 004D JMPF R11 #004F
|
0x002E1A0B, // 004D ADD R11 K13 R11
|
||||||
0x502C0001, // 004E LDBOOL R11 0 1
|
0x900E180B, // 004E SETMBR R3 K12 R11
|
||||||
0x502C0200, // 004F LDBOOL R11 1 0
|
0x502C0200, // 004F LDBOOL R11 1 0
|
||||||
0x982A180B, // 0050 SETIDX R10 K12 R11
|
0x80041600, // 0050 RET 1 R11
|
||||||
0x7C200400, // 0051 CALL R8 2
|
0x70020010, // 0051 JMP #0063
|
||||||
0x8C20010D, // 0052 GETMET R8 R0 K13
|
0x54220004, // 0052 LDINT R8 5
|
||||||
0x7C200200, // 0053 CALL R8 1
|
0x1C200E08, // 0053 EQ R8 R7 R8
|
||||||
0x50200200, // 0054 LDBOOL R8 1 0
|
0x78220002, // 0054 JMPF R8 #0058
|
||||||
0x80041000, // 0055 RET 1 R8
|
0x50200200, // 0055 LDBOOL R8 1 0
|
||||||
0x7002005D, // 0056 JMP #00B5
|
0x80041000, // 0056 RET 1 R8
|
||||||
0x54220007, // 0057 LDINT R8 8
|
0x7002000A, // 0057 JMP #0063
|
||||||
0x1C200C08, // 0058 EQ R8 R6 R8
|
0x54220005, // 0058 LDINT R8 6
|
||||||
0x7822005A, // 0059 JMPF R8 #00B5
|
0x1C200E08, // 0059 EQ R8 R7 R8
|
||||||
0x1C200F06, // 005A EQ R8 R7 K6
|
0x78220002, // 005A JMPF R8 #005E
|
||||||
0x78220019, // 005B JMPF R8 #0076
|
0x50200200, // 005B LDBOOL R8 1 0
|
||||||
0x8C200510, // 005C GETMET R8 R2 K16
|
0x80041000, // 005C RET 1 R8
|
||||||
0x58280006, // 005D LDCONST R10 K6
|
0x70020004, // 005D JMP #0063
|
||||||
0x7C200400, // 005E CALL R8 2
|
0x54220006, // 005E LDINT R8 7
|
||||||
0xB8262200, // 005F GETNGBL R9 K17
|
0x1C200E08, // 005F EQ R8 R7 R8
|
||||||
0x8C241312, // 0060 GETMET R9 R9 K18
|
0x78220001, // 0060 JMPF R8 #0063
|
||||||
0x5C2C1000, // 0061 MOVE R11 R8
|
0x50200200, // 0061 LDBOOL R8 1 0
|
||||||
0x58300006, // 0062 LDCONST R12 K6
|
0x80041000, // 0062 RET 1 R8
|
||||||
0x543600FD, // 0063 LDINT R13 254
|
0x70020008, // 0063 JMP #006D
|
||||||
0x58380006, // 0064 LDCONST R14 K6
|
0x60200003, // 0064 GETGBL R8 G3
|
||||||
0x543E00FE, // 0065 LDINT R15 255
|
0x5C240000, // 0065 MOVE R9 R0
|
||||||
0x7C240C00, // 0066 CALL R9 6
|
0x7C200200, // 0066 CALL R8 1
|
||||||
0x8C28090B, // 0067 GETMET R10 R4 K11
|
0x8C201112, // 0067 GETMET R8 R8 K18
|
||||||
0x60300013, // 0068 GETGBL R12 G19
|
0x5C280200, // 0068 MOVE R10 R1
|
||||||
0x7C300000, // 0069 CALL R12 0
|
0x5C2C0400, // 0069 MOVE R11 R2
|
||||||
0x98322609, // 006A SETIDX R12 K19 R9
|
0x5C300600, // 006A MOVE R12 R3
|
||||||
0x7C280400, // 006B CALL R10 2
|
0x7C200800, // 006B CALL R8 4
|
||||||
0x8C28010D, // 006C GETMET R10 R0 K13
|
0x80041000, // 006C RET 1 R8
|
||||||
0x7C280200, // 006D CALL R10 1
|
0x80000000, // 006D RET 0
|
||||||
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
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -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(
|
be_nested_proto(
|
||||||
11, /* nstack */
|
11, /* nstack */
|
||||||
3, /* argc */
|
1, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[17]) { /* constants */
|
( &(const bvalue[10]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(string),
|
/* K0 */ be_nested_str_weak(light),
|
||||||
/* K1 */ be_nested_str_weak(matter),
|
/* K1 */ be_nested_str_weak(get),
|
||||||
/* K2 */ be_nested_str_weak(TLV),
|
/* K2 */ be_nested_str_weak(find),
|
||||||
/* K3 */ be_nested_str_weak(cluster),
|
/* K3 */ be_nested_str_weak(bri),
|
||||||
/* K4 */ be_nested_str_weak(attribute),
|
/* K4 */ be_nested_str_weak(tasmota),
|
||||||
/* K5 */ be_const_int(3),
|
/* K5 */ be_nested_str_weak(scale_uint),
|
||||||
/* K6 */ be_const_int(0),
|
/* K6 */ be_const_int(0),
|
||||||
/* K7 */ be_nested_str_weak(create_TLV),
|
/* K7 */ be_nested_str_weak(shadow_bri),
|
||||||
/* K8 */ be_nested_str_weak(U2),
|
/* K8 */ be_nested_str_weak(attribute_updated),
|
||||||
/* K9 */ be_const_int(1),
|
/* K9 */ be_nested_str_weak(update_shadow),
|
||||||
/* 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),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(read_attribute),
|
be_str_weak(update_shadow),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[189]) { /* code */
|
( &(const binstruction[36]) { /* code */
|
||||||
0xA40E0000, // 0000 IMPORT R3 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0xB8120200, // 0001 GETNGBL R4 K1
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
0x7C080200, // 0002 CALL R2 1
|
||||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
0x8C0C0502, // 0003 GETMET R3 R2 K2
|
||||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
0x58140003, // 0004 LDCONST R5 K3
|
||||||
0x1C1C0B05, // 0005 EQ R7 R5 K5
|
0x4C180000, // 0005 LDNIL R6
|
||||||
0x781E0021, // 0006 JMPF R7 #0029
|
0x7C0C0600, // 0006 CALL R3 3
|
||||||
0x1C1C0D06, // 0007 EQ R7 R6 K6
|
0x4C100000, // 0007 LDNIL R4
|
||||||
0x781E0005, // 0008 JMPF R7 #000F
|
0x20100604, // 0008 NE R4 R3 R4
|
||||||
0x8C1C0907, // 0009 GETMET R7 R4 K7
|
0x78120009, // 0009 JMPF R4 #0014
|
||||||
0x88240908, // 000A GETMBR R9 R4 K8
|
0xB8120800, // 000A GETNGBL R4 K4
|
||||||
0x58280006, // 000B LDCONST R10 K6
|
0x8C100905, // 000B GETMET R4 R4 K5
|
||||||
0x7C1C0600, // 000C CALL R7 3
|
0x5C180600, // 000C MOVE R6 R3
|
||||||
0x80040E00, // 000D RET 1 R7
|
0x581C0006, // 000D LDCONST R7 K6
|
||||||
0x70020018, // 000E JMP #0028
|
0x542200FE, // 000E LDINT R8 255
|
||||||
0x1C1C0D09, // 000F EQ R7 R6 K9
|
0x58240006, // 000F LDCONST R9 K6
|
||||||
0x781E0005, // 0010 JMPF R7 #0017
|
0x542A00FD, // 0010 LDINT R10 254
|
||||||
0x8C1C0907, // 0011 GETMET R7 R4 K7
|
0x7C100C00, // 0011 CALL R4 6
|
||||||
0x8824090A, // 0012 GETMBR R9 R4 K10
|
0x5C0C0800, // 0012 MOVE R3 R4
|
||||||
0x58280006, // 0013 LDCONST R10 K6
|
0x70020000, // 0013 JMP #0015
|
||||||
0x7C1C0600, // 0014 CALL R7 3
|
0x880C0107, // 0014 GETMBR R3 R0 K7
|
||||||
0x80040E00, // 0015 RET 1 R7
|
0x88100107, // 0015 GETMBR R4 R0 K7
|
||||||
0x70020010, // 0016 JMP #0028
|
0x20100604, // 0016 NE R4 R3 R4
|
||||||
0x541EFFFB, // 0017 LDINT R7 65532
|
0x78120005, // 0017 JMPF R4 #001E
|
||||||
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
0x8C100108, // 0018 GETMET R4 R0 K8
|
||||||
0x781E0005, // 0019 JMPF R7 #0020
|
0x4C180000, // 0019 LDNIL R6
|
||||||
0x8C1C0907, // 001A GETMET R7 R4 K7
|
0x541E0007, // 001A LDINT R7 8
|
||||||
0x8824090B, // 001B GETMBR R9 R4 K11
|
0x58200006, // 001B LDCONST R8 K6
|
||||||
0x58280006, // 001C LDCONST R10 K6
|
0x7C100800, // 001C CALL R4 4
|
||||||
0x7C1C0600, // 001D CALL R7 3
|
0x90020E03, // 001D SETMBR R0 K7 R3
|
||||||
0x80040E00, // 001E RET 1 R7
|
0x60100003, // 001E GETGBL R4 G3
|
||||||
0x70020007, // 001F JMP #0028
|
0x5C140000, // 001F MOVE R5 R0
|
||||||
0x541EFFFC, // 0020 LDINT R7 65533
|
0x7C100200, // 0020 CALL R4 1
|
||||||
0x1C1C0C07, // 0021 EQ R7 R6 R7
|
0x8C100909, // 0021 GETMET R4 R4 K9
|
||||||
0x781E0004, // 0022 JMPF R7 #0028
|
0x7C100200, // 0022 CALL R4 1
|
||||||
0x8C1C0907, // 0023 GETMET R7 R4 K7
|
0x80000000, // 0023 RET 0
|
||||||
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
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -584,15 +242,14 @@ be_local_closure(Matter_Plugin_Light1_init, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 4]) { /* constants */
|
( &(const bvalue[ 3]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(init),
|
/* K0 */ be_nested_str_weak(init),
|
||||||
/* K1 */ be_nested_str_weak(shadow_bri),
|
/* K1 */ be_nested_str_weak(shadow_bri),
|
||||||
/* K2 */ be_const_int(0),
|
/* K2 */ be_const_int(0),
|
||||||
/* K3 */ be_nested_str_weak(shadow_onoff),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(init),
|
be_str_weak(init),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[11]) { /* code */
|
( &(const binstruction[ 9]) { /* code */
|
||||||
0x600C0003, // 0000 GETGBL R3 G3
|
0x600C0003, // 0000 GETGBL R3 G3
|
||||||
0x5C100000, // 0001 MOVE R4 R0
|
0x5C100000, // 0001 MOVE R4 R0
|
||||||
0x7C0C0200, // 0002 CALL R3 1
|
0x7C0C0200, // 0002 CALL R3 1
|
||||||
|
@ -601,9 +258,122 @@ be_local_closure(Matter_Plugin_Light1_init, /* name */
|
||||||
0x5C180400, // 0005 MOVE R6 R2
|
0x5C180400, // 0005 MOVE R6 R2
|
||||||
0x7C0C0600, // 0006 CALL R3 3
|
0x7C0C0600, // 0006 CALL R3 3
|
||||||
0x90020302, // 0007 SETMBR R0 K1 K2
|
0x90020302, // 0007 SETMBR R0 K1 K2
|
||||||
0x500C0000, // 0008 LDBOOL R3 0 0
|
0x80000000, // 0008 RET 0
|
||||||
0x90020603, // 0009 SETMBR R0 K3 R3
|
})
|
||||||
0x80000000, // 000A 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
|
** 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,
|
be_local_class(Matter_Plugin_Light1,
|
||||||
2,
|
1,
|
||||||
&be_class_Matter_Plugin,
|
&be_class_Matter_Plugin_Light0,
|
||||||
be_nested_map(9,
|
be_nested_map(7,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
|
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
|
||||||
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
|
{ 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_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||||
be_const_map( * be_nested_map(1,
|
be_const_map( * be_nested_map(1,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_int(257, -1), be_const_int(2) },
|
{ 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_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[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_int(5, -1), 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(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,
|
be_const_list( * be_nested_list(7,
|
||||||
( (struct bvalue*) &(const bvalue[]) {
|
( (struct bvalue*) &(const bvalue[]) {
|
||||||
be_const_int(0),
|
be_const_int(0),
|
||||||
|
@ -668,18 +413,7 @@ be_local_class(Matter_Plugin_Light1,
|
||||||
be_const_int(65532),
|
be_const_int(65532),
|
||||||
be_const_int(65533),
|
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)
|
be_str_weak(Matter_Plugin_Light1)
|
||||||
);
|
);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1009,7 +1009,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[51]) { /* constants */
|
( &(const bvalue[50]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(webserver),
|
/* K0 */ be_nested_str_weak(webserver),
|
||||||
/* K1 */ be_nested_str_weak(check_privileged_access),
|
/* K1 */ be_nested_str_weak(check_privileged_access),
|
||||||
/* K2 */ be_nested_str_weak(string),
|
/* 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),
|
/* K33 */ be_nested_str_weak(copy),
|
||||||
/* K34 */ be_nested_str_weak(reverse),
|
/* K34 */ be_nested_str_weak(reverse),
|
||||||
/* K35 */ be_nested_str_weak(tohex),
|
/* K35 */ be_nested_str_weak(tohex),
|
||||||
/* K36 */ be_nested_str_weak(remove),
|
/* K36 */ be_nested_str_weak(remove_fabric),
|
||||||
/* K37 */ be_const_int(1),
|
/* K37 */ be_const_int(1),
|
||||||
/* K38 */ be_nested_str_weak(save_fabrics),
|
/* K38 */ be_nested_str_weak(log),
|
||||||
/* K39 */ be_nested_str_weak(log),
|
/* K39 */ be_nested_str_weak(format),
|
||||||
/* K40 */ be_nested_str_weak(format),
|
/* K40 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||||
/* K41 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
/* K41 */ be_const_int(2),
|
||||||
/* K42 */ be_const_int(2),
|
/* K42 */ be_nested_str_weak(content_start),
|
||||||
/* K43 */ be_nested_str_weak(content_start),
|
/* K43 */ be_nested_str_weak(Parameter_X20error),
|
||||||
/* K44 */ be_nested_str_weak(Parameter_X20error),
|
/* K44 */ be_nested_str_weak(content_send_style),
|
||||||
/* K45 */ be_nested_str_weak(content_send_style),
|
/* K45 */ be_nested_str_weak(content_send),
|
||||||
/* K46 */ 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(_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(content_button),
|
/* K48 */ be_nested_str_weak(BUTTON_MANAGEMENT),
|
||||||
/* K49 */ be_nested_str_weak(BUTTON_MANAGEMENT),
|
/* K49 */ be_nested_str_weak(content_stop),
|
||||||
/* K50 */ be_nested_str_weak(content_stop),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(page_part_ctl),
|
be_str_weak(page_part_ctl),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[165]) { /* code */
|
( &(const binstruction[162]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
0x7C080200, // 0002 CALL R2 1
|
0x7C080200, // 0002 CALL R2 1
|
||||||
|
@ -1076,7 +1075,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0xA4120800, // 0008 IMPORT R4 K4
|
0xA4120800, // 0008 IMPORT R4 K4
|
||||||
0x8C140705, // 0009 GETMET R5 R3 K5
|
0x8C140705, // 0009 GETMET R5 R3 K5
|
||||||
0x7C140200, // 000A CALL R5 1
|
0x7C140200, // 000A CALL R5 1
|
||||||
0xA8020079, // 000B EXBLK 0 #0086
|
0xA8020076, // 000B EXBLK 0 #0083
|
||||||
0x8C180306, // 000C GETMET R6 R1 K6
|
0x8C180306, // 000C GETMET R6 R1 K6
|
||||||
0x58200007, // 000D LDCONST R8 K7
|
0x58200007, // 000D LDCONST R8 K7
|
||||||
0x7C180400, // 000E CALL R6 2
|
0x7C180400, // 000E CALL R6 2
|
||||||
|
@ -1119,7 +1118,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x8C180311, // 0033 GETMET R6 R1 K17
|
0x8C180311, // 0033 GETMET R6 R1 K17
|
||||||
0x58200012, // 0034 LDCONST R8 K18
|
0x58200012, // 0034 LDCONST R8 K18
|
||||||
0x7C180400, // 0035 CALL R6 2
|
0x7C180400, // 0035 CALL R6 2
|
||||||
0x7002004C, // 0036 JMP #0084
|
0x70020049, // 0036 JMP #0081
|
||||||
0x8C180306, // 0037 GETMET R6 R1 K6
|
0x8C180306, // 0037 GETMET R6 R1 K6
|
||||||
0x58200013, // 0038 LDCONST R8 K19
|
0x58200013, // 0038 LDCONST R8 K19
|
||||||
0x7C180400, // 0039 CALL R6 2
|
0x7C180400, // 0039 CALL R6 2
|
||||||
|
@ -1136,7 +1135,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x8C180311, // 0044 GETMET R6 R1 K17
|
0x8C180311, // 0044 GETMET R6 R1 K17
|
||||||
0x58200012, // 0045 LDCONST R8 K18
|
0x58200012, // 0045 LDCONST R8 K18
|
||||||
0x7C180400, // 0046 CALL R6 2
|
0x7C180400, // 0046 CALL R6 2
|
||||||
0x7002003B, // 0047 JMP #0084
|
0x70020038, // 0047 JMP #0081
|
||||||
0x8C180306, // 0048 GETMET R6 R1 K6
|
0x8C180306, // 0048 GETMET R6 R1 K6
|
||||||
0x5820001A, // 0049 LDCONST R8 K26
|
0x5820001A, // 0049 LDCONST R8 K26
|
||||||
0x7C180400, // 004A CALL R6 2
|
0x7C180400, // 004A CALL R6 2
|
||||||
|
@ -1153,11 +1152,11 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x8C180311, // 0055 GETMET R6 R1 K17
|
0x8C180311, // 0055 GETMET R6 R1 K17
|
||||||
0x58200012, // 0056 LDCONST R8 K18
|
0x58200012, // 0056 LDCONST R8 K18
|
||||||
0x7C180400, // 0057 CALL R6 2
|
0x7C180400, // 0057 CALL R6 2
|
||||||
0x7002002A, // 0058 JMP #0084
|
0x70020027, // 0058 JMP #0081
|
||||||
0x8C180306, // 0059 GETMET R6 R1 K6
|
0x8C180306, // 0059 GETMET R6 R1 K6
|
||||||
0x5820001C, // 005A LDCONST R8 K28
|
0x5820001C, // 005A LDCONST R8 K28
|
||||||
0x7C180400, // 005B CALL R6 2
|
0x7C180400, // 005B CALL R6 2
|
||||||
0x781A0026, // 005C JMPF R6 #0084
|
0x781A0023, // 005C JMPF R6 #0081
|
||||||
0x8C18030B, // 005D GETMET R6 R1 K11
|
0x8C18030B, // 005D GETMET R6 R1 K11
|
||||||
0x5820001C, // 005E LDCONST R8 K28
|
0x5820001C, // 005E LDCONST R8 K28
|
||||||
0x7C180400, // 005F CALL R6 2
|
0x7C180400, // 005F CALL R6 2
|
||||||
|
@ -1170,7 +1169,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x5C2C1000, // 0066 MOVE R11 R8
|
0x5C2C1000, // 0066 MOVE R11 R8
|
||||||
0x7C280200, // 0067 CALL R10 1
|
0x7C280200, // 0067 CALL R10 1
|
||||||
0x14280E0A, // 0068 LT R10 R7 R10
|
0x14280E0A, // 0068 LT R10 R7 R10
|
||||||
0x782A0011, // 0069 JMPF R10 #007C
|
0x782A0013, // 0069 JMPF R10 #007E
|
||||||
0x94281007, // 006A GETIDX R10 R8 R7
|
0x94281007, // 006A GETIDX R10 R8 R7
|
||||||
0x8C281520, // 006B GETMET R10 R10 K32
|
0x8C281520, // 006B GETMET R10 R10 K32
|
||||||
0x7C280200, // 006C CALL R10 1
|
0x7C280200, // 006C CALL R10 1
|
||||||
|
@ -1181,55 +1180,52 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x8C281523, // 0071 GETMET R10 R10 K35
|
0x8C281523, // 0071 GETMET R10 R10 K35
|
||||||
0x7C280200, // 0072 CALL R10 1
|
0x7C280200, // 0072 CALL R10 1
|
||||||
0x1C2C1406, // 0073 EQ R11 R10 R6
|
0x1C2C1406, // 0073 EQ R11 R10 R6
|
||||||
0x782E0004, // 0074 JMPF R11 #007A
|
0x782E0006, // 0074 JMPF R11 #007C
|
||||||
0x8C2C1124, // 0075 GETMET R11 R8 K36
|
0x882C0109, // 0075 GETMBR R11 R0 K9
|
||||||
0x5C340E00, // 0076 MOVE R13 R7
|
0x8C2C1724, // 0076 GETMET R11 R11 K36
|
||||||
0x7C2C0400, // 0077 CALL R11 2
|
0x94341007, // 0077 GETIDX R13 R8 R7
|
||||||
0x50240200, // 0078 LDBOOL R9 1 0
|
0x7C2C0400, // 0078 CALL R11 2
|
||||||
0x70020000, // 0079 JMP #007B
|
0x50240200, // 0079 LDBOOL R9 1 0
|
||||||
0x001C0F25, // 007A ADD R7 R7 K37
|
0x70020002, // 007A JMP #007E
|
||||||
0x7001FFE8, // 007B JMP #0065
|
0x70020000, // 007B JMP #007D
|
||||||
0x78260003, // 007C JMPF R9 #0081
|
0x001C0F25, // 007C ADD R7 R7 K37
|
||||||
0x88280109, // 007D GETMBR R10 R0 K9
|
0x7001FFE6, // 007D JMP #0065
|
||||||
0x8828151E, // 007E GETMBR R10 R10 K30
|
0x8C280311, // 007E GETMET R10 R1 K17
|
||||||
0x8C281526, // 007F GETMET R10 R10 K38
|
0x58300012, // 007F LDCONST R12 K18
|
||||||
0x7C280200, // 0080 CALL R10 1
|
0x7C280400, // 0080 CALL R10 2
|
||||||
0x8C280311, // 0081 GETMET R10 R1 K17
|
0xA8040001, // 0081 EXBLK 1 1
|
||||||
0x58300012, // 0082 LDCONST R12 K18
|
0x7002001D, // 0082 JMP #00A1
|
||||||
0x7C280400, // 0083 CALL R10 2
|
0xAC180002, // 0083 CATCH R6 0 2
|
||||||
0xA8040001, // 0084 EXBLK 1 1
|
0x7002001A, // 0084 JMP #00A0
|
||||||
0x7002001D, // 0085 JMP #00A4
|
0xB8222800, // 0085 GETNGBL R8 K20
|
||||||
0xAC180002, // 0086 CATCH R6 0 2
|
0x8C201126, // 0086 GETMET R8 R8 K38
|
||||||
0x7002001A, // 0087 JMP #00A3
|
0x8C280527, // 0087 GETMET R10 R2 K39
|
||||||
0xB8222800, // 0088 GETNGBL R8 K20
|
0x58300028, // 0088 LDCONST R12 K40
|
||||||
0x8C201127, // 0089 GETMET R8 R8 K39
|
0x5C340C00, // 0089 MOVE R13 R6
|
||||||
0x8C280528, // 008A GETMET R10 R2 K40
|
0x5C380E00, // 008A MOVE R14 R7
|
||||||
0x58300029, // 008B LDCONST R12 K41
|
0x7C280800, // 008B CALL R10 4
|
||||||
0x5C340C00, // 008C MOVE R13 R6
|
0x582C0029, // 008C LDCONST R11 K41
|
||||||
0x5C380E00, // 008D MOVE R14 R7
|
0x7C200600, // 008D CALL R8 3
|
||||||
0x7C280800, // 008E CALL R10 4
|
0x8C20032A, // 008E GETMET R8 R1 K42
|
||||||
0x582C002A, // 008F LDCONST R11 K42
|
0x5828002B, // 008F LDCONST R10 K43
|
||||||
0x7C200600, // 0090 CALL R8 3
|
0x7C200400, // 0090 CALL R8 2
|
||||||
0x8C20032B, // 0091 GETMET R8 R1 K43
|
0x8C20032C, // 0091 GETMET R8 R1 K44
|
||||||
0x5828002C, // 0092 LDCONST R10 K44
|
0x7C200200, // 0092 CALL R8 1
|
||||||
0x7C200400, // 0093 CALL R8 2
|
0x8C20032D, // 0093 GETMET R8 R1 K45
|
||||||
0x8C20032D, // 0094 GETMET R8 R1 K45
|
0x8C280527, // 0094 GETMET R10 R2 K39
|
||||||
0x7C200200, // 0095 CALL R8 1
|
0x5830002E, // 0095 LDCONST R12 K46
|
||||||
0x8C20032E, // 0096 GETMET R8 R1 K46
|
0x5C340C00, // 0096 MOVE R13 R6
|
||||||
0x8C280528, // 0097 GETMET R10 R2 K40
|
0x5C380E00, // 0097 MOVE R14 R7
|
||||||
0x5830002F, // 0098 LDCONST R12 K47
|
0x7C280800, // 0098 CALL R10 4
|
||||||
0x5C340C00, // 0099 MOVE R13 R6
|
0x7C200400, // 0099 CALL R8 2
|
||||||
0x5C380E00, // 009A MOVE R14 R7
|
0x8C20032F, // 009A GETMET R8 R1 K47
|
||||||
0x7C280800, // 009B CALL R10 4
|
0x88280330, // 009B GETMBR R10 R1 K48
|
||||||
0x7C200400, // 009C CALL R8 2
|
0x7C200400, // 009C CALL R8 2
|
||||||
0x8C200330, // 009D GETMET R8 R1 K48
|
0x8C200331, // 009D GETMET R8 R1 K49
|
||||||
0x88280331, // 009E GETMBR R10 R1 K49
|
0x7C200200, // 009E CALL R8 1
|
||||||
0x7C200400, // 009F CALL R8 2
|
0x70020000, // 009F JMP #00A1
|
||||||
0x8C200332, // 00A0 GETMET R8 R1 K50
|
0xB0080000, // 00A0 RAISE 2 R0 R0
|
||||||
0x7C200200, // 00A1 CALL R8 1
|
0x80000000, // 00A1 RET 0
|
||||||
0x70020000, // 00A2 JMP #00A4
|
|
||||||
0xB0080000, // 00A3 RAISE 2 R0 R0
|
|
||||||
0x80000000, // 00A4 RET 0
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue