Matter add UI to change endpoints configuration (#18498)

This commit is contained in:
s-hadinger 2023-04-24 23:01:02 +02:00 committed by GitHub
parent 98cad1a192
commit fba15dea71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 6132 additions and 5436 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
- Matter add UI to change endpoints configuration
### Breaking Changed

View File

@ -68,4 +68,9 @@ matter.Base38 = Matter_Base38
#-
assert(matter.Base38.encode(bytes("DEADBEEF")) == "C.R.5B6")
assert(matter.Base38.encode(bytes("")) == "")
assert(matter.Base38.encode(bytes("00")) == "00")
assert(matter.Base38.encode(bytes("FFFFFFFF")) == "PLS18R6")
-#

View File

@ -21,16 +21,16 @@
class Matter_Device
static var UDP_PORT = 5540 # this is the default port for group multicast, we also use it for unicast
static var PASSCODE_DEFAULT = 20202021
static var PBKDF_ITERATIONS = 1000 # I don't see any reason to choose a different number
static var VENDOR_ID = 0xFFF1
static var PRODUCT_ID = 0x8000
static var FILENAME = "_matter_device.json"
static var PASE_TIMEOUT = 10*60 # default open commissioning window (10 minutes)
var started # is the Matter Device started (configured, mDNS and UDPServer started)
var plugins # list of plugins
var plugins # list of plugins instances
var plugins_persist # true if plugins configuration needs to be saved
var plugins_classes # map of registered classes by type name
var plugins_config # map of JSON configuration for plugins
var udp_server # `matter.UDPServer()` object
var message_handler # `matter.MessageHandler()` object
var sessions # `matter.Session_Store()` objet
@ -600,10 +600,11 @@ class Matter_Device
#
def save_param()
import string
import json
var j = string.format('{"distinguish":%i,"passcode":%i,"ipv4only":%s', self.root_discriminator, self.root_passcode, self.ipv4only ? 'true':'false')
if self.plugins_persist
j += ',"config":'
j += self.plugins_to_json()
j += json.dump(self.plugins_config)
end
j += '}'
try
@ -635,9 +636,9 @@ class Matter_Device
self.root_discriminator = j.find("distinguish", self.root_discriminator)
self.root_passcode = j.find("passcode", self.root_passcode)
self.ipv4only = bool(j.find("ipv4only", false))
var config = j.find("config")
if config
self._load_plugins_config(config)
self.plugins_config = j.find("config")
if self.plugins_config
self._load_plugins_config(self.plugins_config)
self.plugins_persist = true
end
except .. as e, m
@ -652,7 +653,7 @@ class Matter_Device
dirty = true
end
if self.root_passcode == nil
self.root_passcode = self.PASSCODE_DEFAULT
self.root_passcode = self.generate_random_passcode()
dirty = true
end
if dirty self.save_param() end
@ -975,9 +976,9 @@ class Matter_Device
if size(self.plugins) > 0 return end # already configured
var config = self.autoconf_device_map()
tasmota.log("MTR: autoconfig = " + str(config), 3)
self._load_plugins_config(config)
self.plugins_config = self.autoconf_device_map()
tasmota.log("MTR: autoconfig = " + str(self.plugins_config), 3)
self._load_plugins_config(self.plugins_config)
if !self.plugins_persist && self.sessions.count_active_fabrics() > 0
self.plugins_persist = true
@ -1096,24 +1097,6 @@ class Matter_Device
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
end
#############################################################
# plugins_to_json
#
# Export plugins configuration as a JSON string
def plugins_to_json()
import string
var s = '{'
var i = 0
while i < size(self.plugins)
var pi = self.plugins[i]
if i > 0 s += ',' end
s += string.format('"%i":%s', pi.get_endpoint(), pi.to_json())
i += 1
end
s += '}'
return s
end
#############################################################
# register_plugin_class
#
@ -1122,6 +1105,24 @@ class Matter_Device
self.plugins_classes[name] = cl
end
#############################################################
# get_plugin_class_displayname
#
# get a class name light "light0" and return displayname
def get_plugin_class_displayname(name)
var cl = self.plugins_classes.find(name)
return cl ? cl.NAME : ""
end
#############################################################
# get_plugin_class_arg
#
# get a class name light "light0" and return the name of the json argumen (or empty)
def get_plugin_class_arg(name)
var cl = self.plugins_classes.find(name)
return cl ? cl.ARG : ""
end
#############################################################
# register_native_classes
#
@ -1151,6 +1152,23 @@ class Matter_Device
end
end
#####################################################################
# Generate random passcode
#####################################################################
static var PASSCODE_INVALID = [ 0, 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321]
def generate_random_passcode()
import crypto
var passcode
while true
passcode = crypto.random(4).get(0, 4) & 0x7FFFFFF
if passcode > 0x5F5E0FE continue end # larger than allowed
for inv: self.PASSCODE_INVALID
if passcode == inv passcode = nil end
end
if passcode != nil return passcode end
end
end
#####################################################################
# Commands `Mtr___`
#####################################################################

View File

@ -203,8 +203,10 @@ class Matter_MessageHandler
return ret
except .. as e, m
tasmota.log("MTR: MessageHandler::msg_received exception: "+str(e)+";"+str(m))
import debug
debug.traceback()
if self._debug_present
import debug
debug.traceback()
end
return false
end
end

View File

@ -23,7 +23,10 @@
#@ solidify:Matter_Plugin,weak
class Matter_Plugin
static var NAME = "generic" # name of the plug-in in json
static var TYPE = "generic" # name of the plug-in in json
static var NAME = "" # display name of the plug-in
static var ARG = "" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
static var CLUSTERS = {
0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453
}
@ -220,30 +223,6 @@ class Matter_Plugin
self.update_shadow() # force reading value and sending subscriptions
end
#############################################################
# to_json
#
# generate the json string for parameter of the plug-in
# this function calls a method to be overriden with custom parameters
def to_json()
import string
var s = string.format('{"type":"%s"', self.NAME)
s = self.to_json_parameters(s)
s += '}'
return s
end
#############################################################
# to_json_parameters
#
# To be overriden.
# returns a json sub-string to add after endpoint and type name
def to_json_parameters(s)
# s += ',"my_param":"my_value"'
return s
end
end
matter.Plugin = Matter_Plugin

View File

@ -25,7 +25,8 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_Light0,weak
class Matter_Plugin_Light0 : Matter_Plugin
static var NAME = "light0" # name of the plug-in in json
static var TYPE = "light0" # name of the plug-in in json
static var NAME = "Light 0 On" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Light0 end
#@ solidify:Matter_Plugin_Light1,weak
class Matter_Plugin_Light1 : Matter_Plugin_Light0
static var NAME = "light1" # name of the plug-in in json
static var TYPE = "light1" # name of the plug-in in json
static var NAME = "Light 1 Dimmer" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Light1 end
#@ solidify:Matter_Plugin_Light2,weak
class Matter_Plugin_Light2 : Matter_Plugin_Light1
static var NAME = "light2" # name of the plug-in in json
static var TYPE = "light2" # name of the plug-in in json
static var NAME = "Light 2 CT" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Light1 end
#@ solidify:Matter_Plugin_Light3,weak
class Matter_Plugin_Light3 : Matter_Plugin_Light1
static var NAME = "light3" # name of the plug-in in json
static var TYPE = "light3" # name of the plug-in in json
static var NAME = "Light 3 RGB" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16

View File

@ -25,7 +25,10 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_OnOff,weak
class Matter_Plugin_OnOff : Matter_Plugin
static var NAME = "relay" # name of the plug-in in json
static var TYPE = "relay" # name of the plug-in in json
static var NAME = "Relay" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
@ -44,7 +47,7 @@ class Matter_Plugin_OnOff : Matter_Plugin
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.get_onoff() # read actual value
self.tasmota_relay_index = arguments.find('relay')
self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#)
if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
end
@ -215,17 +218,6 @@ class Matter_Plugin_OnOff : Matter_Plugin
self.attribute_updated(nil, 0x0006, 0x0000) # send to all endpoints
end
#############################################################
# to_json_parameters
#
# To be overriden.
# returns a json sub-string to add after endpoint and type name
def to_json_parameters(s)
import string
s += string.format(',"relay":%i', self.tasmota_relay_index)
return s
end
#############################################################
# every_second
def every_second()

View File

@ -25,7 +25,8 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_Root,weak
class Matter_Plugin_Root : Matter_Plugin
static var NAME = "root" # name of the plug-in in json
static var TYPE = "root" # name of the plug-in in json
static var NAME = "Root node" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x001F: [0,2,3,4], # Access Control Cluster, p.461

View File

@ -25,6 +25,7 @@ class Matter_Plugin_Device end
#@ solidify:Matter_Plugin_Sensor,weak
class Matter_Plugin_Sensor : Matter_Plugin_Device
static var ARG = "filter" # additional argument name (or empty if none)
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
var tasmota_sensor_matcher # Actual matcher object
var shadow_value # Last known value
@ -33,7 +34,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.tasmota_sensor_filter = arguments.find('filter')
self.tasmota_sensor_filter = arguments.find(self.ARG#-'filter'-#)
if self.tasmota_sensor_filter
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
end
@ -74,16 +75,5 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
return val
end
#############################################################
# to_json_parameters
#
# To be overriden.
# returns a json sub-string to add after endpoint and type name
def to_json_parameters(s)
import string
s += string.format(',"filter":"%s"', self.tasmota_sensor_filter)
return s
end
end
matter.Plugin_Sensor = Matter_Plugin_Sensor

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Humidity,weak
class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
static var NAME = "humidity" # name of the plug-in in json
static var TYPE = "humidity" # name of the plug-in in json
static var NAME = "Humidity" # display name of the plug-in
static var CLUSTERS = {
0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable
}

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Illuminance,weak
class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
static var NAME = "illuminance" # name of the plug-in in json
static var TYPE = "illuminance" # name of the plug-in in json
static var NAME = "Illuminance" # display name of the plug-in
static var CLUSTERS = {
0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable
}

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Pressure,weak
class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
static var NAME = "pressure" # name of the plug-in in json
static var TYPE = "pressure" # name of the plug-in in json
static var NAME = "Pressure" # display name of the plug-in
static var CLUSTERS = {
0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
}

View File

@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Temp,weak
class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
static var NAME = "temperature" # name of the plug-in in json
static var TYPE = "temperature" # name of the plug-in in json
static var NAME = "Temperature" # display name of the plug-in
static var CLUSTERS = {
0x0402: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
}

View File

@ -328,7 +328,7 @@ class Matter_Session : Matter_Expirable
end
#############################################################
# Session::to_json()
# Session::tojson()
#
# convert a single entry as json
# returns a JSON string

View File

@ -32,6 +32,8 @@ import matter
# WebUI for the partition manager
#################################################################################
class Matter_UI
static var _CLASSES_TYPES = "root|relay|light0|light1|light2|light3"
"|temperature|pressure|illuminance|humidity"
var device
def init(device)
@ -64,7 +66,7 @@ class Matter_UI
webserver.content_send(string.format("<fieldset><legend><b>&nbsp;Matter %s&nbsp;</b></legend><p></p>",
matter_enabled ? "Enabled" : "Disabled"))
webserver.content_send("<p style='width:320px;'>Matter support is experimental.</p>")
webserver.content_send("<p style='width:320px;'>Check the <a href='https://tasmota.github.io/docs/Matter/' target='_blank'>Matter documentation</a>.</p>")
webserver.content_send("<form action='/matterc' method='post' onsubmit='return confirm(\"This will cause a restart.\");'>")
webserver.content_send(string.format("<p></p><button name='%s' class='button bgrn'>", matter_enabled ? "disable" : "enable"))
@ -158,7 +160,7 @@ class Matter_UI
import string
webserver.content_send("<fieldset><legend><b>&nbsp;Matter Passcode&nbsp;</b></legend><p></p>")
webserver.content_send("<form action='/matterc' method='post' >")
webserver.content_send("<form action='/matterc' method='post' onsubmit='return confirm(\"This will cause a restart.\");'>")
webserver.content_send("<p>Passcode:</p>")
webserver.content_send(string.format("<input type='number' min='1' max='99999998' name='passcode' value='%i'>", self.device.root_passcode))
webserver.content_send("<p>Distinguish id:</p>")
@ -172,7 +174,7 @@ class Matter_UI
#- ---------------------------------------------------------------------- -#
#- Show commissioning information and QR Code
#- ---------------------------------------------------------------------- -#
def show_fabric_info(p)
def show_fabric_info()
import webserver
import string
@ -198,7 +200,7 @@ class Matter_UI
webserver.content_send(string.format("Fabric: %s<br>", fabric_rev.tohex()))
webserver.content_send(string.format("Device: %s<br>&nbsp;", deviceid_rev.tohex()))
webserver.content_send("<form action='/matterc' method='post'>")
webserver.content_send("<form action='/matterc' method='post' onsubmit='return confirm(\"Are you sure?\");'>")
webserver.content_send(string.format("<input name='del_fabric' type='hidden' value='%i'>", f.get_fabric_index()))
webserver.content_send("<button name='del' class='button bgrn'>Delete Fabric</button></form></p>")
@ -210,6 +212,79 @@ class Matter_UI
end
#- ---------------------------------------------------------------------- -#
#- Show plugins configuration
#- ---------------------------------------------------------------------- -#
def show_plugins_configuration()
import webserver
import string
webserver.content_send("<fieldset><legend><b>&nbsp;Current Configuration&nbsp;</b></legend><p></p>")
webserver.content_send("<form action='/matterc' method='post'")
webserver.content_send("onsubmit='return confirm(\"This will RESET the configuration to the default. You will need to associate again.\");'>")
webserver.content_send("<button name='auto' class='button bred'>Reset to default</button><p></p></form>")
webserver.content_send("<form action='/matterc' method='post'")
webserver.content_send("onsubmit='return confirm(\"Changing the configuration requires to associate again.\");'>")
webserver.content_send("<table style='width:100%'>")
webserver.content_send("<tr><td width='35'><b>Ep.</b></td><td><b>Type</b></td><td><b>Param</b></td></tr>")
# display one line per plug-in
var endpoints = self.device.k2l_num(self.device.plugins_config)
var i = 0
while i < size(endpoints)
var ep = endpoints[i]
var conf = self.device.plugins_config[str(ep)]
var typ = conf.find('type')
if !typ continue end
var arg_name = self.device.get_plugin_class_arg(typ)
var arg = arg_name ? str(conf.find(arg_name, '')) : ''
webserver.content_send(string.format("<tr><td><input type='text' name='ep%03i' maxlength='4' size='3' pattern='[0-9]{1,4}' value='%i'></td>", i, ep))
webserver.content_send(string.format("<td><select name='pi%03i'>", i))
self.plugin_option(conf.find('type', ''))
webserver.content_send(string.format("</select></td>"))
webserver.content_send(string.format("<td><font size='-1'><input type='text' name='arg%03i' minlength='0' size='8' value='%s'></font></td>",
i, webserver.html_escape(arg)))
i += 1
end
# add an empty line for adding a configuration
webserver.content_send(string.format("<tr><td><input type='text' name='ep%03i' maxlength='4' size='3' pattern='[0-9]{1,4}' value=''></td>", i))
webserver.content_send(string.format("<td><select name='pi%03i'>", i))
self.plugin_option('')
webserver.content_send(string.format("</select></td>"))
webserver.content_send(string.format("<td><font size='-1'><input type='text' name='arg%03i' minlength='0' size='8' value=''></font></td>", i))
webserver.content_send("</table><p></p>")
webserver.content_send("<button name='config' class='button bgrn'>Change configuration</button></form>")
webserver.content_send("<p></p></fieldset><p></p>")
end
#- ---------------------------------------------------------------------- -#
#- Show all possible classes for plugin
#- ---------------------------------------------------------------------- -#
def plugin_option(cur)
import webserver
import string
var class_types = string.split(self._CLASSES_TYPES, '|')
var i = 0
webserver.content_send("<option value=''></option>")
while i < size(class_types)
var typ = class_types[i]
var nam = self.device.get_plugin_class_displayname(typ)
webserver.content_send(string.format("<option value='%s'%s>%s</option>", typ, (typ == cur) ? " selected" : "", nam))
i += 1
end
end
#######################################################################
# Display the complete page
#######################################################################
@ -224,6 +299,7 @@ class Matter_UI
if self.show_enable()
self.show_passcode_form()
self.show_plugins_configuration()
self.show_fabric_info()
end
webserver.content_button(webserver.BUTTON_CONFIGURATION)
@ -241,9 +317,7 @@ class Matter_UI
import partition_core
import persist
#- check that the partition is valid -#
var p = partition_core.Partition()
var error
try
@ -251,6 +325,7 @@ class Matter_UI
# Change Passcode and/or Passcode
#---------------------------------------------------------------------#
if webserver.has_arg("passcode") || webserver.has_arg("discriminator")
tasmota.log(string.format("MTR: /matterc received '%s' command", 'passcode'), 3)
if webserver.has_arg("passcode")
self.device.root_passcode = int(webserver.arg("passcode"))
end
@ -263,17 +338,29 @@ class Matter_UI
#- and force restart -#
webserver.redirect("/?rst=")
#---------------------------------------------------------------------#
# Enable Matter
#---------------------------------------------------------------------#
elif webserver.has_arg("enable")
tasmota.log(string.format("MTR: /matterc received '%s' command", 'enable'), 3)
tasmota.cmd("SetOption" + str(matter.MATTER_OPTION) + " 1")
#- and force restart -#
webserver.redirect("/?rst=")
#---------------------------------------------------------------------#
# Disable Matter
#---------------------------------------------------------------------#
elif webserver.has_arg("disable")
tasmota.log(string.format("MTR: /matterc received '%s' command", 'disable'), 3)
tasmota.cmd("SetOption" + str(matter.MATTER_OPTION) + " 0")
#- and force restart -#
webserver.redirect("/?rst=")
#---------------------------------------------------------------------#
# Delete Fabric
#---------------------------------------------------------------------#
elif webserver.has_arg("del_fabric")
tasmota.log(string.format("MTR: /matterc received '%s' command", 'del_fabric'), 3)
var del_fabric = int(webserver.arg("del_fabric"))
var idx = 0
var fabrics = self.device.sessions.fabrics
@ -285,11 +372,87 @@ class Matter_UI
idx += 1
end
end
#- and force restart -#
#- reload same page -#
webserver.redirect("/matterc?")
#---------------------------------------------------------------------#
# Reset to default auto-configuration
#---------------------------------------------------------------------#
elif webserver.has_arg("auto")
tasmota.log(string.format("MTR: /matterc received '%s' command", 'auto'), 3)
self.device.plugins_persist = false
self.device.save_param()
#- and force restart -#
webserver.redirect("/?rst=")
#---------------------------------------------------------------------#
# Apply new configuration template
#---------------------------------------------------------------------#
elif webserver.has_arg("config")
var config = {}
tasmota.log(string.format("MTR: /matterc received '%s' command", 'config'), 3)
# iterate by id
var idx = 0
var idx_str = string.format("%03i", idx)
while webserver.has_arg('ep'+idx_str)
var ep = webserver.arg('ep'+idx_str)
var ep_int = int(ep)
var typ = webserver.arg('pi'+idx_str)
var arg = webserver.arg('arg'+idx_str)
tasmota.log(string.format("MTR: ep=%i type=%s arg=%s", ep, typ, arg), 3)
if ep != '' && typ != ''
# check if type exists
var typ_class = self.device.plugins_classes.find(typ)
if typ_class != nil
var elt = {'type':typ}
var arg_name = typ_class.ARG
var arg_type = typ_class.ARG_TYPE
if arg && arg_name
elt[arg_name] = arg_type(arg)
end
config[ep] = elt
else
tasmota.log(string.format("MTR: unknown type = %s", typ), 2)
end
else
tasmota.log("MTR: skipping parameter", 2)
end
idx += 1
idx_str = string.format("%03i", idx)
end
tasmota.log(string.format("MTR: config = %s", str(config)), 3)
# sanity check
if !config.contains("0") error = "Missing endpoint 0" end
if error
tasmota.log(string.format("MTR: config error = %s", error), 3)
else
self.device.plugins_config = config
self.device.plugins_persist = true
self.device.save_param()
#- and force restart -#
webserver.redirect("/?rst=")
end
end
if error
webserver.content_start("Parameter error") #- title of the web page -#
webserver.content_send_style() #- send standard Tasmota styles -#
webserver.content_send(string.format("<p style='width:340px;'><b>Error:</b>%s</p>", webserver.html_escape(error)))
webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to configuration page -#
webserver.content_stop() #- end of web page -#
end
except .. as e, m
tasmota.log(string.format("BRY: Exception> '%s' - %s", e, m), 2)
#- display error page -#
@ -298,7 +461,7 @@ class Matter_UI
webserver.content_send(string.format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
webserver.content_button(webserver.BUTTON_MANAGEMENT) #- button back to management page -#
webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to configuration page -#
webserver.content_stop() #- end of web page -#
end
end

View File

@ -221,7 +221,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[74]) { /* constants */
( &(const bvalue[75]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(Frame),
@ -294,12 +294,13 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
/* K69 */ be_nested_str_weak(MTR_X3A_X20ignoring_X20unhandled_X20protocol_id_X3A),
/* K70 */ be_nested_str_weak(MTR_X3A_X20MessageHandler_X3A_X3Amsg_received_X20exception_X3A_X20),
/* K71 */ be_nested_str_weak(_X3B),
/* K72 */ be_nested_str_weak(debug),
/* K73 */ be_nested_str_weak(traceback),
/* K72 */ be_nested_str_weak(_debug_present),
/* K73 */ be_nested_str_weak(debug),
/* K74 */ be_nested_str_weak(traceback),
}),
be_str_weak(msg_received),
&be_const_str_solidified,
( &(const binstruction[388]) { /* code */
( &(const binstruction[390]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0x50140000, // 0001 LDBOOL R5 0 0
0xA802016A, // 0002 EXBLK 0 #016E
@ -665,9 +666,9 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0xA8040001, // 016A EXBLK 1 1
0x80040A00, // 016B RET 1 R5
0xA8040001, // 016C EXBLK 1 1
0x70020014, // 016D JMP #0183
0x70020016, // 016D JMP #0185
0xAC180002, // 016E CATCH R6 0 2
0x70020011, // 016F JMP #0182
0x70020013, // 016F JMP #0184
0xB8220A00, // 0170 GETNGBL R8 K5
0x8C201106, // 0171 GETMET R8 R8 K6
0x60280008, // 0172 GETGBL R10 G8
@ -680,14 +681,16 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x7C2C0200, // 0179 CALL R11 1
0x0028140B, // 017A ADD R10 R10 R11
0x7C200400, // 017B CALL R8 2
0xA4229000, // 017C IMPORT R8 K72
0x8C241149, // 017D GETMET R9 R8 K73
0x7C240200, // 017E CALL R9 1
0x50240000, // 017F LDBOOL R9 0 0
0x80041200, // 0180 RET 1 R9
0x70020000, // 0181 JMP #0183
0xB0080000, // 0182 RAISE 2 R0 R0
0x80000000, // 0183 RET 0
0x88200148, // 017C GETMBR R8 R0 K72
0x78220002, // 017D JMPF R8 #0181
0xA4229200, // 017E IMPORT R8 K73
0x8C24114A, // 017F GETMET R9 R8 K74
0x7C240200, // 0180 CALL R9 1
0x50200000, // 0181 LDBOOL R8 0 0
0x80041000, // 0182 RET 1 R8
0x70020000, // 0183 JMP #0185
0xB0080000, // 0184 RAISE 2 R0 R0
0x80000000, // 0185 RET 0
})
)
);

View File

@ -7,26 +7,38 @@
extern const bclass be_class_Matter_Plugin;
/********************************************************************
** Solidified function: get_endpoint
** Solidified function: attribute_updated
********************************************************************/
be_local_closure(Matter_Plugin_get_endpoint, /* name */
be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
11, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(endpoint),
/* K1 */ be_nested_str_weak(device),
/* K2 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(get_endpoint),
be_str_weak(attribute_updated),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x80040200, // 0001 RET 1 R1
( &(const binstruction[12]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x1C140205, // 0001 EQ R5 R1 R5
0x78160000, // 0002 JMPF R5 #0004
0x88040100, // 0003 GETMBR R1 R0 K0
0x88140101, // 0004 GETMBR R5 R0 K1
0x8C140B02, // 0005 GETMET R5 R5 K2
0x5C1C0200, // 0006 MOVE R7 R1
0x5C200400, // 0007 MOVE R8 R2
0x5C240600, // 0008 MOVE R9 R3
0x5C280800, // 0009 MOVE R10 R4
0x7C140A00, // 000A CALL R5 5
0x80000000, // 000B RET 0
})
)
);
@ -59,126 +71,11 @@ be_local_closure(Matter_Plugin_timed_request, /* name */
/********************************************************************
** Solidified function: to_json_parameters
** Solidified function: get_endpoint
********************************************************************/
be_local_closure(Matter_Plugin_to_json_parameters, /* name */
be_local_closure(Matter_Plugin_get_endpoint, /* 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(to_json_parameters),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80040200, // 0000 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** 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: to_json
********************************************************************/
be_local_closure(Matter_Plugin_to_json, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(format),
/* K2 */ be_nested_str_weak(_X7B_X22type_X22_X3A_X22_X25s_X22),
/* K3 */ be_nested_str_weak(NAME),
/* K4 */ be_nested_str_weak(to_json_parameters),
/* K5 */ be_nested_str_weak(_X7D),
}),
be_str_weak(to_json),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x58100002, // 0002 LDCONST R4 K2
0x88140103, // 0003 GETMBR R5 R0 K3
0x7C080600, // 0004 CALL R2 3
0x8C0C0104, // 0005 GETMET R3 R0 K4
0x5C140400, // 0006 MOVE R5 R2
0x7C0C0400, // 0007 CALL R3 2
0x5C080600, // 0008 MOVE R2 R3
0x00080505, // 0009 ADD R2 R2 K5
0x80040400, // 000A RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: subscribe_event
********************************************************************/
be_local_closure(Matter_Plugin_subscribe_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(subscribe_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x80040A00, // 0001 RET 1 R5
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: every_second
********************************************************************/
be_local_closure(Matter_Plugin_every_second, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -187,39 +84,13 @@ be_local_closure(Matter_Plugin_every_second, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K0 */ be_nested_str_weak(endpoint),
}),
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
********************************************************************/
be_local_closure(Matter_Plugin_invoke_request, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(invoke_request),
be_str_weak(get_endpoint),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
0x88040100, // 0000 GETMBR R1 R0 K0
0x80040200, // 0001 RET 1 R1
})
)
);
@ -227,12 +98,12 @@ be_local_closure(Matter_Plugin_invoke_request, /* name */
/********************************************************************
** Solidified function: parse_sensors
** Solidified function: subscribe_attribute
********************************************************************/
be_local_closure(Matter_Plugin_parse_sensors, /* name */
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
6, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@ -240,59 +111,11 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(parse_sensors),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_update_shadow, /* name */
be_nested_proto(
1, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** 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_str_weak(subscribe_attribute),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
0x4C140000, // 0000 LDNIL R5
0x80040A00, // 0001 RET 1 R5
})
)
);
@ -334,38 +157,144 @@ be_local_closure(Matter_Plugin_init, /* name */
/********************************************************************
** Solidified function: attribute_updated
** Solidified function: write_attribute
********************************************************************/
be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_local_closure(Matter_Plugin_write_attribute, /* name */
be_nested_proto(
11, /* nstack */
5, /* argc */
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(write_attribute),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: has
********************************************************************/
be_local_closure(Matter_Plugin_has, /* name */
be_nested_proto(
6, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(endpoint),
/* K1 */ be_nested_str_weak(device),
/* K2 */ be_nested_str_weak(attribute_updated),
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
/* K1 */ be_nested_str_weak(contains),
/* K2 */ be_nested_str_weak(endpoints),
/* K3 */ be_nested_str_weak(find),
}),
be_str_weak(attribute_updated),
be_str_weak(has),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x1C140205, // 0001 EQ R5 R1 R5
0x78160000, // 0002 JMPF R5 #0004
0x88040100, // 0003 GETMBR R1 R0 K0
0x88140101, // 0004 GETMBR R5 R0 K1
0x8C140B02, // 0005 GETMET R5 R5 K2
0x5C1C0200, // 0006 MOVE R7 R1
0x5C200400, // 0007 MOVE R8 R2
0x5C240600, // 0008 MOVE R9 R3
0x5C280800, // 0009 MOVE R10 R4
0x7C140A00, // 000A CALL R5 5
0x80000000, // 000B RET 0
( &(const binstruction[15]) { /* code */
0x880C0100, // 0000 GETMBR R3 R0 K0
0x8C0C0701, // 0001 GETMET R3 R3 K1
0x5C140200, // 0002 MOVE R5 R1
0x7C0C0400, // 0003 CALL R3 2
0x780E0006, // 0004 JMPF R3 #000C
0x880C0102, // 0005 GETMBR R3 R0 K2
0x8C0C0703, // 0006 GETMET R3 R3 K3
0x5C140400, // 0007 MOVE R5 R2
0x7C0C0400, // 0008 CALL R3 2
0x4C100000, // 0009 LDNIL R4
0x200C0604, // 000A NE R3 R3 R4
0x740E0000, // 000B JMPT R3 #000D
0x500C0001, // 000C LDBOOL R3 0 1
0x500C0200, // 000D LDBOOL R3 1 0
0x80040600, // 000E RET 1 R3
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_invoke_request, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_update_shadow, /* name */
be_nested_proto(
1, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** 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
})
)
);
@ -507,49 +436,6 @@ be_local_closure(Matter_Plugin_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: has
********************************************************************/
be_local_closure(Matter_Plugin_has, /* name */
be_nested_proto(
6, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
/* K1 */ be_nested_str_weak(contains),
/* K2 */ be_nested_str_weak(endpoints),
/* K3 */ be_nested_str_weak(find),
}),
be_str_weak(has),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x880C0100, // 0000 GETMBR R3 R0 K0
0x8C0C0701, // 0001 GETMET R3 R3 K1
0x5C140200, // 0002 MOVE R5 R1
0x7C0C0400, // 0003 CALL R3 2
0x780E0006, // 0004 JMPF R3 #000C
0x880C0102, // 0005 GETMBR R3 R0 K2
0x8C0C0703, // 0006 GETMET R3 R3 K3
0x5C140400, // 0007 MOVE R5 R2
0x7C0C0400, // 0008 CALL R3 2
0x4C100000, // 0009 LDNIL R4
0x200C0604, // 000A NE R3 R3 R4
0x740E0000, // 000B JMPT R3 #000D
0x500C0001, // 000C LDBOOL R3 0 1
0x500C0200, // 000D LDBOOL R3 1 0
0x80040600, // 000E RET 1 R3
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: consolidate_clusters
********************************************************************/
@ -653,6 +539,33 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040008, // 0000 GETGBL R1 G8
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_attribute_list
********************************************************************/
@ -686,6 +599,55 @@ be_local_closure(Matter_Plugin_get_attribute_list, /* 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: 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_cluster_list
********************************************************************/
@ -733,9 +695,9 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
/********************************************************************
** Solidified function: subscribe_attribute
** Solidified function: subscribe_event
********************************************************************/
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
be_local_closure(Matter_Plugin_subscribe_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
@ -746,7 +708,7 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(subscribe_attribute),
be_str_weak(subscribe_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
@ -763,30 +725,11 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
be_local_class(Matter_Plugin,
3,
NULL,
be_nested_map(24,
be_nested_map(25,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(subscribe_attribute, 23), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
{ be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
{ be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
{ be_const_key_weak(device, 21), be_const_var(0) },
{ be_const_key_weak(endpoint, 0), be_const_var(1) },
{ be_const_key_weak(get_cluster_list, 17), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(generic) },
{ be_const_key_weak(to_json, 5), be_const_closure(Matter_Plugin_to_json_closure) },
{ be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
{ be_const_key_weak(every_second, 8), be_const_closure(Matter_Plugin_every_second_closure) },
{ be_const_key_weak(clusters, 22), be_const_var(2) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
{ be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
{ be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) },
{ be_const_key_weak(read_event, 16), be_const_closure(Matter_Plugin_read_event_closure) },
{ be_const_key_weak(write_attribute, 15), be_const_closure(Matter_Plugin_write_attribute_closure) },
{ be_const_key_weak(subscribe_event, 14), be_const_closure(Matter_Plugin_subscribe_event_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
{ be_const_key_weak(timed_request, 7), be_const_closure(Matter_Plugin_timed_request_closure) },
{ be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@ -801,7 +744,27 @@ be_local_class(Matter_Plugin,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_to_json_parameters_closure) },
{ be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
{ be_const_key_weak(subscribe_event, 18), be_const_closure(Matter_Plugin_subscribe_event_closure) },
{ be_const_key_weak(clusters, -1), be_const_var(2) },
{ be_const_key_weak(endpoint, -1), be_const_var(1) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
{ be_const_key_weak(write_attribute, 23), be_const_closure(Matter_Plugin_write_attribute_closure) },
{ be_const_key_weak(device, -1), be_const_var(0) },
{ be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_invoke_request_closure) },
{ be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) },
{ be_const_key_weak(TYPE, 9), be_nested_str_weak(generic) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
{ be_const_key_weak(get_attribute_list, 17), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
{ be_const_key_weak(ARG, 16), be_nested_str_weak() },
{ be_const_key_weak(consolidate_clusters, 13), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
{ be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
{ be_const_key_weak(NAME, 3), be_nested_str_weak() },
})),
be_str_weak(Matter_Plugin)
);

View File

@ -390,11 +390,17 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Light0,
1,
&be_class_Matter_Plugin,
be_nested_map(8,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
{ be_const_key_weak(CLUSTERS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(shadow_onoff, 8), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_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, {
@ -432,15 +438,10 @@ be_local_class(Matter_Plugin_Light0,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 0), 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(NAME, -1), be_nested_str_weak(light0) },
{ 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(TYPE, -1), be_nested_str_weak(light0) },
})),
be_str_weak(Matter_Plugin_Light0)
);

View File

@ -7,151 +7,69 @@
extern const bclass be_class_Matter_Plugin_Light1;
/********************************************************************
** Solidified function: init
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light1_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_bri),
/* K2 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x90020302, // 0008 SETMBR R0 K1 K2
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[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),
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(get),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(bri),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(scale_uint),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(shadow_bri),
/* K8 */ be_nested_str_weak(attribute_updated),
/* K9 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(read_attribute),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[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
( &(const binstruction[36]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x7C080200, // 0002 CALL R2 1
0x8C0C0502, // 0003 GETMET R3 R2 K2
0x58140003, // 0004 LDCONST R5 K3
0x4C180000, // 0005 LDNIL R6
0x7C0C0600, // 0006 CALL R3 3
0x4C100000, // 0007 LDNIL R4
0x20100604, // 0008 NE R4 R3 R4
0x78120009, // 0009 JMPF R4 #0014
0xB8120800, // 000A GETNGBL R4 K4
0x8C100905, // 000B GETMET R4 R4 K5
0x5C180600, // 000C MOVE R6 R3
0x581C0006, // 000D LDCONST R7 K6
0x542200FE, // 000E LDINT R8 255
0x58240006, // 000F LDCONST R9 K6
0x542A00FD, // 0010 LDINT R10 254
0x7C100C00, // 0011 CALL R4 6
0x5C0C0800, // 0012 MOVE R3 R4
0x70020000, // 0013 JMP #0015
0x880C0107, // 0014 GETMBR R3 R0 K7
0x88100107, // 0015 GETMBR R4 R0 K7
0x20100604, // 0016 NE R4 R3 R4
0x78120005, // 0017 JMPF R4 #001E
0x8C100108, // 0018 GETMET R4 R0 K8
0x4C180000, // 0019 LDNIL R6
0x541E0007, // 001A LDINT R7 8
0x58200006, // 001B LDCONST R8 K6
0x7C100800, // 001C CALL R4 4
0x90020E03, // 001D SETMBR R0 K7 R3
0x60100003, // 001E GETGBL R4 G3
0x5C140000, // 001F MOVE R5 R0
0x7C100200, // 0020 CALL R4 1
0x8C100909, // 0021 GETMET R4 R4 K9
0x7C100200, // 0022 CALL R4 1
0x80000000, // 0023 RET 0
})
)
);
@ -312,69 +230,151 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
/********************************************************************
** Solidified function: update_shadow
** Solidified function: read_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
be_nested_proto(
11, /* nstack */
1, /* argc */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(get),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(bri),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(scale_uint),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(shadow_bri),
/* K8 */ be_nested_str_weak(attribute_updated),
/* K9 */ be_nested_str_weak(update_shadow),
( &(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(update_shadow),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[36]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x7C080200, // 0002 CALL R2 1
0x8C0C0502, // 0003 GETMET R3 R2 K2
0x58140003, // 0004 LDCONST R5 K3
0x4C180000, // 0005 LDNIL R6
0x7C0C0600, // 0006 CALL R3 3
0x4C100000, // 0007 LDNIL R4
0x20100604, // 0008 NE R4 R3 R4
0x78120009, // 0009 JMPF R4 #0014
0xB8120800, // 000A GETNGBL R4 K4
0x8C100905, // 000B GETMET R4 R4 K5
0x5C180600, // 000C MOVE R6 R3
0x581C0006, // 000D LDCONST R7 K6
0x542200FE, // 000E LDINT R8 255
0x58240006, // 000F LDCONST R9 K6
0x542A00FD, // 0010 LDINT R10 254
0x7C100C00, // 0011 CALL R4 6
0x5C0C0800, // 0012 MOVE R3 R4
0x70020000, // 0013 JMP #0015
0x880C0107, // 0014 GETMBR R3 R0 K7
0x88100107, // 0015 GETMBR R4 R0 K7
0x20100604, // 0016 NE R4 R3 R4
0x78120005, // 0017 JMPF R4 #001E
0x8C100108, // 0018 GETMET R4 R0 K8
0x4C180000, // 0019 LDNIL R6
0x541E0007, // 001A LDINT R7 8
0x58200006, // 001B LDCONST R8 K6
0x7C100800, // 001C CALL R4 4
0x90020E03, // 001D SETMBR R0 K7 R3
0x60100003, // 001E GETGBL R4 G3
0x5C140000, // 001F MOVE R5 R0
0x7C100200, // 0020 CALL R4 1
0x8C100909, // 0021 GETMET R4 R4 K9
0x7C100200, // 0022 CALL R4 1
0x80000000, // 0023 RET 0
( &(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
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light1_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_bri),
/* K2 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x90020302, // 0008 SETMBR R0 K1 K2
0x80000000, // 0009 RET 0
})
)
);
@ -388,15 +388,17 @@ extern const bclass be_class_Matter_Plugin_Light0;
be_local_class(Matter_Plugin_Light1,
1,
&be_class_Matter_Plugin_Light0,
be_nested_map(8,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light1) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(257, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
{ be_const_key_weak(CLUSTERS, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -411,11 +413,10 @@ be_local_class(Matter_Plugin_Light1,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Light1_init_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
{ be_const_key_weak(shadow_bri, 4), be_const_var(0) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(light1) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
{ 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)
);

View File

@ -6,170 +6,6 @@
extern const bclass be_class_Matter_Plugin_Light2;
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(findsubval),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(ct_min),
/* K8 */ be_nested_str_weak(ct_max),
/* K9 */ be_nested_str_weak(set),
/* K10 */ be_nested_str_weak(ct),
/* K11 */ be_nested_str_weak(update_shadow),
/* K12 */ be_nested_str_weak(log),
/* K13 */ be_nested_str_weak(ct_X3A),
/* K14 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[65]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
0x7822002E, // 0007 JMPF R8 #0037
0x54220009, // 0008 LDINT R8 10
0x1C200E08, // 0009 EQ R8 R7 R8
0x78220019, // 000A JMPF R8 #0025
0x8C200505, // 000B GETMET R8 R2 K5
0x58280006, // 000C LDCONST R10 K6
0x7C200400, // 000D CALL R8 2
0x88240107, // 000E GETMBR R9 R0 K7
0x14241009, // 000F LT R9 R8 R9
0x78260000, // 0010 JMPF R9 #0012
0x88200107, // 0011 GETMBR R8 R0 K7
0x88240108, // 0012 GETMBR R9 R0 K8
0x24241009, // 0013 GT R9 R8 R9
0x78260000, // 0014 JMPF R9 #0016
0x88200108, // 0015 GETMBR R8 R0 K8
0x8C240909, // 0016 GETMET R9 R4 K9
0x602C0013, // 0017 GETGBL R11 G19
0x7C2C0000, // 0018 CALL R11 0
0x982E1408, // 0019 SETIDX R11 K10 R8
0x7C240400, // 001A CALL R9 2
0x8C24010B, // 001B GETMET R9 R0 K11
0x7C240200, // 001C CALL R9 1
0x60240008, // 001D GETGBL R9 G8
0x5C281000, // 001E MOVE R10 R8
0x7C240200, // 001F CALL R9 1
0x00261A09, // 0020 ADD R9 K13 R9
0x900E1809, // 0021 SETMBR R3 K12 R9
0x50240200, // 0022 LDBOOL R9 1 0
0x80041200, // 0023 RET 1 R9
0x70020010, // 0024 JMP #0036
0x54220046, // 0025 LDINT R8 71
0x1C200E08, // 0026 EQ R8 R7 R8
0x78220002, // 0027 JMPF R8 #002B
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x7002000A, // 002A JMP #0036
0x5422004A, // 002B LDINT R8 75
0x1C200E08, // 002C EQ R8 R7 R8
0x78220002, // 002D JMPF R8 #0031
0x50200200, // 002E LDBOOL R8 1 0
0x80041000, // 002F RET 1 R8
0x70020004, // 0030 JMP #0036
0x5422004B, // 0031 LDINT R8 76
0x1C200E08, // 0032 EQ R8 R7 R8
0x78220001, // 0033 JMPF R8 #0036
0x50200200, // 0034 LDBOOL R8 1 0
0x80041000, // 0035 RET 1 R8
0x70020008, // 0036 JMP #0040
0x60200003, // 0037 GETGBL R8 G3
0x5C240000, // 0038 MOVE R9 R0
0x7C200200, // 0039 CALL R8 1
0x8C20110E, // 003A GETMET R8 R8 K14
0x5C280200, // 003B MOVE R10 R1
0x5C2C0400, // 003C MOVE R11 R2
0x5C300600, // 003D MOVE R12 R3
0x7C200800, // 003E CALL R8 4
0x80041000, // 003F RET 1 R8
0x80000000, // 0040 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light2_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[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(update_ct_minmax),
/* K2 */ be_nested_str_weak(update_shadow),
/* K3 */ be_nested_str_weak(get),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(ct),
/* K6 */ be_nested_str_weak(shadow_ct),
/* K7 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x60080003, // 0003 GETGBL R2 G3
0x5C0C0000, // 0004 MOVE R3 R0
0x7C080200, // 0005 CALL R2 1
0x8C080502, // 0006 GETMET R2 R2 K2
0x7C080200, // 0007 CALL R2 1
0x8C080303, // 0008 GETMET R2 R1 K3
0x7C080200, // 0009 CALL R2 1
0x8C0C0504, // 000A GETMET R3 R2 K4
0x58140005, // 000B LDCONST R5 K5
0x4C180000, // 000C LDNIL R6
0x7C0C0600, // 000D CALL R3 3
0x4C100000, // 000E LDNIL R4
0x1C100604, // 000F EQ R4 R3 R4
0x78120000, // 0010 JMPF R4 #0012
0x880C0106, // 0011 GETMBR R3 R0 K6
0x88100106, // 0012 GETMBR R4 R0 K6
0x20100604, // 0013 NE R4 R3 R4
0x78120005, // 0014 JMPF R4 #001B
0x8C100107, // 0015 GETMET R4 R0 K7
0x4C180000, // 0016 LDNIL R6
0x541E02FF, // 0017 LDINT R7 768
0x54220006, // 0018 LDINT R8 7
0x7C100800, // 0019 CALL R4 4
0x90020C03, // 001A SETMBR R0 K6 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -288,6 +124,66 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light2_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[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(update_ct_minmax),
/* K2 */ be_nested_str_weak(update_shadow),
/* K3 */ be_nested_str_weak(get),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(ct),
/* K6 */ be_nested_str_weak(shadow_ct),
/* K7 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x60080003, // 0003 GETGBL R2 G3
0x5C0C0000, // 0004 MOVE R3 R0
0x7C080200, // 0005 CALL R2 1
0x8C080502, // 0006 GETMET R2 R2 K2
0x7C080200, // 0007 CALL R2 1
0x8C080303, // 0008 GETMET R2 R1 K3
0x7C080200, // 0009 CALL R2 1
0x8C0C0504, // 000A GETMET R3 R2 K4
0x58140005, // 000B LDCONST R5 K5
0x4C180000, // 000C LDNIL R6
0x7C0C0600, // 000D CALL R3 3
0x4C100000, // 000E LDNIL R4
0x1C100604, // 000F EQ R4 R3 R4
0x78120000, // 0010 JMPF R4 #0012
0x880C0106, // 0011 GETMBR R3 R0 K6
0x88100106, // 0012 GETMBR R4 R0 K6
0x20100604, // 0013 NE R4 R3 R4
0x78120005, // 0014 JMPF R4 #001B
0x8C100107, // 0015 GETMET R4 R0 K7
0x4C180000, // 0016 LDNIL R6
0x541E02FF, // 0017 LDINT R7 768
0x54220006, // 0018 LDINT R8 7
0x7C100800, // 0019 CALL R4 4
0x90020C03, // 001A SETMBR R0 K6 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
@ -371,6 +267,110 @@ be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(findsubval),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(ct_min),
/* K8 */ be_nested_str_weak(ct_max),
/* K9 */ be_nested_str_weak(set),
/* K10 */ be_nested_str_weak(ct),
/* K11 */ be_nested_str_weak(update_shadow),
/* K12 */ be_nested_str_weak(log),
/* K13 */ be_nested_str_weak(ct_X3A),
/* K14 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[65]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
0x7822002E, // 0007 JMPF R8 #0037
0x54220009, // 0008 LDINT R8 10
0x1C200E08, // 0009 EQ R8 R7 R8
0x78220019, // 000A JMPF R8 #0025
0x8C200505, // 000B GETMET R8 R2 K5
0x58280006, // 000C LDCONST R10 K6
0x7C200400, // 000D CALL R8 2
0x88240107, // 000E GETMBR R9 R0 K7
0x14241009, // 000F LT R9 R8 R9
0x78260000, // 0010 JMPF R9 #0012
0x88200107, // 0011 GETMBR R8 R0 K7
0x88240108, // 0012 GETMBR R9 R0 K8
0x24241009, // 0013 GT R9 R8 R9
0x78260000, // 0014 JMPF R9 #0016
0x88200108, // 0015 GETMBR R8 R0 K8
0x8C240909, // 0016 GETMET R9 R4 K9
0x602C0013, // 0017 GETGBL R11 G19
0x7C2C0000, // 0018 CALL R11 0
0x982E1408, // 0019 SETIDX R11 K10 R8
0x7C240400, // 001A CALL R9 2
0x8C24010B, // 001B GETMET R9 R0 K11
0x7C240200, // 001C CALL R9 1
0x60240008, // 001D GETGBL R9 G8
0x5C281000, // 001E MOVE R10 R8
0x7C240200, // 001F CALL R9 1
0x00261A09, // 0020 ADD R9 K13 R9
0x900E1809, // 0021 SETMBR R3 K12 R9
0x50240200, // 0022 LDBOOL R9 1 0
0x80041200, // 0023 RET 1 R9
0x70020010, // 0024 JMP #0036
0x54220046, // 0025 LDINT R8 71
0x1C200E08, // 0026 EQ R8 R7 R8
0x78220002, // 0027 JMPF R8 #002B
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x7002000A, // 002A JMP #0036
0x5422004A, // 002B LDINT R8 75
0x1C200E08, // 002C EQ R8 R7 R8
0x78220002, // 002D JMPF R8 #0031
0x50200200, // 002E LDBOOL R8 1 0
0x80041000, // 002F RET 1 R8
0x70020004, // 0030 JMP #0036
0x5422004B, // 0031 LDINT R8 76
0x1C200E08, // 0032 EQ R8 R7 R8
0x78220001, // 0033 JMPF R8 #0036
0x50200200, // 0034 LDBOOL R8 1 0
0x80041000, // 0035 RET 1 R8
0x70020008, // 0036 JMP #0040
0x60200003, // 0037 GETGBL R8 G3
0x5C240000, // 0038 MOVE R9 R0
0x7C200200, // 0039 CALL R8 1
0x8C20110E, // 003A GETMET R8 R8 K14
0x5C280200, // 003B MOVE R10 R1
0x5C2C0400, // 003C MOVE R11 R2
0x5C300600, // 003D MOVE R12 R3
0x7C200800, // 003E CALL R8 4
0x80041000, // 003F RET 1 R8
0x80000000, // 0040 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light2
********************************************************************/
@ -378,19 +378,23 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light2,
3,
&be_class_Matter_Plugin_Light1,
be_nested_map(11,
be_nested_map(12,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
{ be_const_key_weak(NAME, 5), be_nested_str_weak(light2) },
{ be_const_key_weak(read_attribute, 8), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(ct_min, -1), be_const_var(1) },
{ be_const_key_weak(shadow_ct, 8), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(268, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ct_min, 1), be_const_var(1) },
{ be_const_key_weak(CLUSTERS, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(ct_max, 7), be_const_var(2) },
{ be_const_key_weak(TYPE, 0), be_nested_str_weak(light2) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(NAME, 5), be_nested_str_weak(Light_X202_X20CT) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
{ be_const_key_weak(update_shadow, 4), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -405,10 +409,7 @@ be_local_class(Matter_Plugin_Light2,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
{ be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_Light2)
);

View File

@ -6,6 +6,287 @@
extern const bclass be_class_Matter_Plugin_Light3;
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
be_nested_proto(
12, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(update_shadow),
/* K2 */ be_nested_str_weak(get),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(hue),
/* K5 */ be_nested_str_weak(sat),
/* K6 */ be_nested_str_weak(tasmota),
/* K7 */ be_nested_str_weak(scale_uint),
/* K8 */ be_const_int(0),
/* K9 */ be_nested_str_weak(shadow_hue),
/* K10 */ be_nested_str_weak(shadow_sat),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(1),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[63]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x60080003, // 0001 GETGBL R2 G3
0x5C0C0000, // 0002 MOVE R3 R0
0x7C080200, // 0003 CALL R2 1
0x8C080501, // 0004 GETMET R2 R2 K1
0x7C080200, // 0005 CALL R2 1
0x8C080302, // 0006 GETMET R2 R1 K2
0x7C080200, // 0007 CALL R2 1
0x8C0C0503, // 0008 GETMET R3 R2 K3
0x58140004, // 0009 LDCONST R5 K4
0x4C180000, // 000A LDNIL R6
0x7C0C0600, // 000B CALL R3 3
0x8C100503, // 000C GETMET R4 R2 K3
0x58180005, // 000D LDCONST R6 K5
0x4C1C0000, // 000E LDNIL R7
0x7C100600, // 000F CALL R4 3
0x4C140000, // 0010 LDNIL R5
0x20140605, // 0011 NE R5 R3 R5
0x78160009, // 0012 JMPF R5 #001D
0xB8160C00, // 0013 GETNGBL R5 K6
0x8C140B07, // 0014 GETMET R5 R5 K7
0x5C1C0600, // 0015 MOVE R7 R3
0x58200008, // 0016 LDCONST R8 K8
0x54260167, // 0017 LDINT R9 360
0x58280008, // 0018 LDCONST R10 K8
0x542E00FD, // 0019 LDINT R11 254
0x7C140C00, // 001A CALL R5 6
0x5C0C0A00, // 001B MOVE R3 R5
0x70020000, // 001C JMP #001E
0x880C0109, // 001D GETMBR R3 R0 K9
0x4C140000, // 001E LDNIL R5
0x20140805, // 001F NE R5 R4 R5
0x78160009, // 0020 JMPF R5 #002B
0xB8160C00, // 0021 GETNGBL R5 K6
0x8C140B07, // 0022 GETMET R5 R5 K7
0x5C1C0800, // 0023 MOVE R7 R4
0x58200008, // 0024 LDCONST R8 K8
0x542600FE, // 0025 LDINT R9 255
0x58280008, // 0026 LDCONST R10 K8
0x542E00FD, // 0027 LDINT R11 254
0x7C140C00, // 0028 CALL R5 6
0x5C100A00, // 0029 MOVE R4 R5
0x70020000, // 002A JMP #002C
0x8810010A, // 002B GETMBR R4 R0 K10
0x88140109, // 002C GETMBR R5 R0 K9
0x20140605, // 002D NE R5 R3 R5
0x78160005, // 002E JMPF R5 #0035
0x8C14010B, // 002F GETMET R5 R0 K11
0x4C1C0000, // 0030 LDNIL R7
0x542202FF, // 0031 LDINT R8 768
0x58240008, // 0032 LDCONST R9 K8
0x7C140800, // 0033 CALL R5 4
0x90021203, // 0034 SETMBR R0 K9 R3
0x8814010A, // 0035 GETMBR R5 R0 K10
0x20140805, // 0036 NE R5 R4 R5
0x78160005, // 0037 JMPF R5 #003E
0x8C14010B, // 0038 GETMET R5 R0 K11
0x4C1C0000, // 0039 LDNIL R7
0x542202FF, // 003A LDINT R8 768
0x5824000C, // 003B LDCONST R9 K12
0x7C140800, // 003C CALL R5 4
0x90021404, // 003D SETMBR R0 K10 R4
0x80000000, // 003E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(create_TLV),
/* K7 */ be_nested_str_weak(U1),
/* K8 */ be_nested_str_weak(shadow_hue),
/* K9 */ be_const_int(1),
/* K10 */ be_nested_str_weak(shadow_sat),
/* K11 */ be_nested_str_weak(U4),
/* K12 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[105]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
0x88140503, // 0003 GETMBR R5 R2 K3
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E02FF, // 0005 LDINT R7 768
0x1C1C0A07, // 0006 EQ R7 R5 R7
0x781E0057, // 0007 JMPF R7 #0060
0x1C1C0D05, // 0008 EQ R7 R6 K5
0x781E0005, // 0009 JMPF R7 #0010
0x8C1C0906, // 000A GETMET R7 R4 K6
0x88240907, // 000B GETMBR R9 R4 K7
0x88280108, // 000C GETMBR R10 R0 K8
0x7C1C0600, // 000D CALL R7 3
0x80040E00, // 000E RET 1 R7
0x7002004E, // 000F JMP #005F
0x1C1C0D09, // 0010 EQ R7 R6 K9
0x781E0005, // 0011 JMPF R7 #0018
0x8C1C0906, // 0012 GETMET R7 R4 K6
0x88240907, // 0013 GETMBR R9 R4 K7
0x8828010A, // 0014 GETMBR R10 R0 K10
0x7C1C0600, // 0015 CALL R7 3
0x80040E00, // 0016 RET 1 R7
0x70020046, // 0017 JMP #005F
0x541E0006, // 0018 LDINT R7 7
0x1C1C0C07, // 0019 EQ R7 R6 R7
0x781E0005, // 001A JMPF R7 #0021
0x8C1C0906, // 001B GETMET R7 R4 K6
0x88240907, // 001C GETMBR R9 R4 K7
0x58280005, // 001D LDCONST R10 K5
0x7C1C0600, // 001E CALL R7 3
0x80040E00, // 001F RET 1 R7
0x7002003D, // 0020 JMP #005F
0x541E0007, // 0021 LDINT R7 8
0x1C1C0C07, // 0022 EQ R7 R6 R7
0x781E0005, // 0023 JMPF R7 #002A
0x8C1C0906, // 0024 GETMET R7 R4 K6
0x88240907, // 0025 GETMBR R9 R4 K7
0x58280005, // 0026 LDCONST R10 K5
0x7C1C0600, // 0027 CALL R7 3
0x80040E00, // 0028 RET 1 R7
0x70020034, // 0029 JMP #005F
0x541E000E, // 002A LDINT R7 15
0x1C1C0C07, // 002B EQ R7 R6 R7
0x781E0005, // 002C JMPF R7 #0033
0x8C1C0906, // 002D GETMET R7 R4 K6
0x88240907, // 002E GETMBR R9 R4 K7
0x58280005, // 002F LDCONST R10 K5
0x7C1C0600, // 0030 CALL R7 3
0x80040E00, // 0031 RET 1 R7
0x7002002B, // 0032 JMP #005F
0x541E4000, // 0033 LDINT R7 16385
0x1C1C0C07, // 0034 EQ R7 R6 R7
0x781E0005, // 0035 JMPF R7 #003C
0x8C1C0906, // 0036 GETMET R7 R4 K6
0x88240907, // 0037 GETMBR R9 R4 K7
0x58280005, // 0038 LDCONST R10 K5
0x7C1C0600, // 0039 CALL R7 3
0x80040E00, // 003A RET 1 R7
0x70020022, // 003B JMP #005F
0x541E4009, // 003C LDINT R7 16394
0x1C1C0C07, // 003D EQ R7 R6 R7
0x781E0005, // 003E JMPF R7 #0045
0x8C1C0906, // 003F GETMET R7 R4 K6
0x88240907, // 0040 GETMBR R9 R4 K7
0x58280005, // 0041 LDCONST R10 K5
0x7C1C0600, // 0042 CALL R7 3
0x80040E00, // 0043 RET 1 R7
0x70020019, // 0044 JMP #005F
0x541E000F, // 0045 LDINT R7 16
0x1C1C0C07, // 0046 EQ R7 R6 R7
0x781E0005, // 0047 JMPF R7 #004E
0x8C1C0906, // 0048 GETMET R7 R4 K6
0x88240907, // 0049 GETMBR R9 R4 K7
0x58280005, // 004A LDCONST R10 K5
0x7C1C0600, // 004B CALL R7 3
0x80040E00, // 004C RET 1 R7
0x70020010, // 004D JMP #005F
0x541EFFFB, // 004E LDINT R7 65532
0x1C1C0C07, // 004F EQ R7 R6 R7
0x781E0005, // 0050 JMPF R7 #0057
0x8C1C0906, // 0051 GETMET R7 R4 K6
0x8824090B, // 0052 GETMBR R9 R4 K11
0x58280009, // 0053 LDCONST R10 K9
0x7C1C0600, // 0054 CALL R7 3
0x80040E00, // 0055 RET 1 R7
0x70020007, // 0056 JMP #005F
0x541EFFFC, // 0057 LDINT R7 65533
0x1C1C0C07, // 0058 EQ R7 R6 R7
0x781E0004, // 0059 JMPF R7 #005F
0x8C1C0906, // 005A GETMET R7 R4 K6
0x8824090B, // 005B GETMBR R9 R4 K11
0x542A0004, // 005C LDINT R10 5
0x7C1C0600, // 005D CALL R7 3
0x80040E00, // 005E RET 1 R7
0x70020007, // 005F JMP #0068
0x601C0003, // 0060 GETGBL R7 G3
0x5C200000, // 0061 MOVE R8 R0
0x7C1C0200, // 0062 CALL R7 1
0x8C1C0F0C, // 0063 GETMET R7 R7 K12
0x5C240200, // 0064 MOVE R9 R1
0x5C280400, // 0065 MOVE R10 R2
0x7C1C0600, // 0066 CALL R7 3
0x80040E00, // 0067 RET 1 R7
0x80000000, // 0068 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light3_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_hue),
/* K2 */ be_const_int(0),
/* K3 */ be_nested_str_weak(shadow_sat),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x90020302, // 0008 SETMBR R0 K1 K2
0x90020702, // 0009 SETMBR R0 K3 K2
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@ -199,287 +480,6 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(create_TLV),
/* K7 */ be_nested_str_weak(U1),
/* K8 */ be_nested_str_weak(shadow_hue),
/* K9 */ be_const_int(1),
/* K10 */ be_nested_str_weak(shadow_sat),
/* K11 */ be_nested_str_weak(U4),
/* K12 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[105]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
0x88140503, // 0003 GETMBR R5 R2 K3
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E02FF, // 0005 LDINT R7 768
0x1C1C0A07, // 0006 EQ R7 R5 R7
0x781E0057, // 0007 JMPF R7 #0060
0x1C1C0D05, // 0008 EQ R7 R6 K5
0x781E0005, // 0009 JMPF R7 #0010
0x8C1C0906, // 000A GETMET R7 R4 K6
0x88240907, // 000B GETMBR R9 R4 K7
0x88280108, // 000C GETMBR R10 R0 K8
0x7C1C0600, // 000D CALL R7 3
0x80040E00, // 000E RET 1 R7
0x7002004E, // 000F JMP #005F
0x1C1C0D09, // 0010 EQ R7 R6 K9
0x781E0005, // 0011 JMPF R7 #0018
0x8C1C0906, // 0012 GETMET R7 R4 K6
0x88240907, // 0013 GETMBR R9 R4 K7
0x8828010A, // 0014 GETMBR R10 R0 K10
0x7C1C0600, // 0015 CALL R7 3
0x80040E00, // 0016 RET 1 R7
0x70020046, // 0017 JMP #005F
0x541E0006, // 0018 LDINT R7 7
0x1C1C0C07, // 0019 EQ R7 R6 R7
0x781E0005, // 001A JMPF R7 #0021
0x8C1C0906, // 001B GETMET R7 R4 K6
0x88240907, // 001C GETMBR R9 R4 K7
0x58280005, // 001D LDCONST R10 K5
0x7C1C0600, // 001E CALL R7 3
0x80040E00, // 001F RET 1 R7
0x7002003D, // 0020 JMP #005F
0x541E0007, // 0021 LDINT R7 8
0x1C1C0C07, // 0022 EQ R7 R6 R7
0x781E0005, // 0023 JMPF R7 #002A
0x8C1C0906, // 0024 GETMET R7 R4 K6
0x88240907, // 0025 GETMBR R9 R4 K7
0x58280005, // 0026 LDCONST R10 K5
0x7C1C0600, // 0027 CALL R7 3
0x80040E00, // 0028 RET 1 R7
0x70020034, // 0029 JMP #005F
0x541E000E, // 002A LDINT R7 15
0x1C1C0C07, // 002B EQ R7 R6 R7
0x781E0005, // 002C JMPF R7 #0033
0x8C1C0906, // 002D GETMET R7 R4 K6
0x88240907, // 002E GETMBR R9 R4 K7
0x58280005, // 002F LDCONST R10 K5
0x7C1C0600, // 0030 CALL R7 3
0x80040E00, // 0031 RET 1 R7
0x7002002B, // 0032 JMP #005F
0x541E4000, // 0033 LDINT R7 16385
0x1C1C0C07, // 0034 EQ R7 R6 R7
0x781E0005, // 0035 JMPF R7 #003C
0x8C1C0906, // 0036 GETMET R7 R4 K6
0x88240907, // 0037 GETMBR R9 R4 K7
0x58280005, // 0038 LDCONST R10 K5
0x7C1C0600, // 0039 CALL R7 3
0x80040E00, // 003A RET 1 R7
0x70020022, // 003B JMP #005F
0x541E4009, // 003C LDINT R7 16394
0x1C1C0C07, // 003D EQ R7 R6 R7
0x781E0005, // 003E JMPF R7 #0045
0x8C1C0906, // 003F GETMET R7 R4 K6
0x88240907, // 0040 GETMBR R9 R4 K7
0x58280005, // 0041 LDCONST R10 K5
0x7C1C0600, // 0042 CALL R7 3
0x80040E00, // 0043 RET 1 R7
0x70020019, // 0044 JMP #005F
0x541E000F, // 0045 LDINT R7 16
0x1C1C0C07, // 0046 EQ R7 R6 R7
0x781E0005, // 0047 JMPF R7 #004E
0x8C1C0906, // 0048 GETMET R7 R4 K6
0x88240907, // 0049 GETMBR R9 R4 K7
0x58280005, // 004A LDCONST R10 K5
0x7C1C0600, // 004B CALL R7 3
0x80040E00, // 004C RET 1 R7
0x70020010, // 004D JMP #005F
0x541EFFFB, // 004E LDINT R7 65532
0x1C1C0C07, // 004F EQ R7 R6 R7
0x781E0005, // 0050 JMPF R7 #0057
0x8C1C0906, // 0051 GETMET R7 R4 K6
0x8824090B, // 0052 GETMBR R9 R4 K11
0x58280009, // 0053 LDCONST R10 K9
0x7C1C0600, // 0054 CALL R7 3
0x80040E00, // 0055 RET 1 R7
0x70020007, // 0056 JMP #005F
0x541EFFFC, // 0057 LDINT R7 65533
0x1C1C0C07, // 0058 EQ R7 R6 R7
0x781E0004, // 0059 JMPF R7 #005F
0x8C1C0906, // 005A GETMET R7 R4 K6
0x8824090B, // 005B GETMBR R9 R4 K11
0x542A0004, // 005C LDINT R10 5
0x7C1C0600, // 005D CALL R7 3
0x80040E00, // 005E RET 1 R7
0x70020007, // 005F JMP #0068
0x601C0003, // 0060 GETGBL R7 G3
0x5C200000, // 0061 MOVE R8 R0
0x7C1C0200, // 0062 CALL R7 1
0x8C1C0F0C, // 0063 GETMET R7 R7 K12
0x5C240200, // 0064 MOVE R9 R1
0x5C280400, // 0065 MOVE R10 R2
0x7C1C0600, // 0066 CALL R7 3
0x80040E00, // 0067 RET 1 R7
0x80000000, // 0068 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
be_nested_proto(
12, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(update_shadow),
/* K2 */ be_nested_str_weak(get),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(hue),
/* K5 */ be_nested_str_weak(sat),
/* K6 */ be_nested_str_weak(tasmota),
/* K7 */ be_nested_str_weak(scale_uint),
/* K8 */ be_const_int(0),
/* K9 */ be_nested_str_weak(shadow_hue),
/* K10 */ be_nested_str_weak(shadow_sat),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(1),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[63]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x60080003, // 0001 GETGBL R2 G3
0x5C0C0000, // 0002 MOVE R3 R0
0x7C080200, // 0003 CALL R2 1
0x8C080501, // 0004 GETMET R2 R2 K1
0x7C080200, // 0005 CALL R2 1
0x8C080302, // 0006 GETMET R2 R1 K2
0x7C080200, // 0007 CALL R2 1
0x8C0C0503, // 0008 GETMET R3 R2 K3
0x58140004, // 0009 LDCONST R5 K4
0x4C180000, // 000A LDNIL R6
0x7C0C0600, // 000B CALL R3 3
0x8C100503, // 000C GETMET R4 R2 K3
0x58180005, // 000D LDCONST R6 K5
0x4C1C0000, // 000E LDNIL R7
0x7C100600, // 000F CALL R4 3
0x4C140000, // 0010 LDNIL R5
0x20140605, // 0011 NE R5 R3 R5
0x78160009, // 0012 JMPF R5 #001D
0xB8160C00, // 0013 GETNGBL R5 K6
0x8C140B07, // 0014 GETMET R5 R5 K7
0x5C1C0600, // 0015 MOVE R7 R3
0x58200008, // 0016 LDCONST R8 K8
0x54260167, // 0017 LDINT R9 360
0x58280008, // 0018 LDCONST R10 K8
0x542E00FD, // 0019 LDINT R11 254
0x7C140C00, // 001A CALL R5 6
0x5C0C0A00, // 001B MOVE R3 R5
0x70020000, // 001C JMP #001E
0x880C0109, // 001D GETMBR R3 R0 K9
0x4C140000, // 001E LDNIL R5
0x20140805, // 001F NE R5 R4 R5
0x78160009, // 0020 JMPF R5 #002B
0xB8160C00, // 0021 GETNGBL R5 K6
0x8C140B07, // 0022 GETMET R5 R5 K7
0x5C1C0800, // 0023 MOVE R7 R4
0x58200008, // 0024 LDCONST R8 K8
0x542600FE, // 0025 LDINT R9 255
0x58280008, // 0026 LDCONST R10 K8
0x542E00FD, // 0027 LDINT R11 254
0x7C140C00, // 0028 CALL R5 6
0x5C100A00, // 0029 MOVE R4 R5
0x70020000, // 002A JMP #002C
0x8810010A, // 002B GETMBR R4 R0 K10
0x88140109, // 002C GETMBR R5 R0 K9
0x20140605, // 002D NE R5 R3 R5
0x78160005, // 002E JMPF R5 #0035
0x8C14010B, // 002F GETMET R5 R0 K11
0x4C1C0000, // 0030 LDNIL R7
0x542202FF, // 0031 LDINT R8 768
0x58240008, // 0032 LDCONST R9 K8
0x7C140800, // 0033 CALL R5 4
0x90021203, // 0034 SETMBR R0 K9 R3
0x8814010A, // 0035 GETMBR R5 R0 K10
0x20140805, // 0036 NE R5 R4 R5
0x78160005, // 0037 JMPF R5 #003E
0x8C14010B, // 0038 GETMET R5 R0 K11
0x4C1C0000, // 0039 LDNIL R7
0x542202FF, // 003A LDINT R8 768
0x5824000C, // 003B LDCONST R9 K12
0x7C140800, // 003C CALL R5 4
0x90021404, // 003D SETMBR R0 K10 R4
0x80000000, // 003E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light3_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_hue),
/* K2 */ be_const_int(0),
/* K3 */ be_nested_str_weak(shadow_sat),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x90020302, // 0008 SETMBR R0 K1 K2
0x90020702, // 0009 SETMBR R0 K3 K2
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light3
********************************************************************/
@ -487,20 +487,15 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light3,
2,
&be_class_Matter_Plugin_Light1,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) },
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(light3) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) },
{ be_const_key_weak(shadow_hue, 8), be_const_var(0) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_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(1,
( (struct bmapnode*) &(const bmapnode[]) {
@ -518,6 +513,12 @@ be_local_class(Matter_Plugin_Light3,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(NAME, 3), be_nested_str_weak(Light_X203_X20RGB) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) },
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
{ be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
})),
be_str_weak(Matter_Plugin_Light3)
);

View File

@ -7,94 +7,49 @@
extern const bclass be_class_Matter_Plugin_OnOff;
/********************************************************************
** Solidified function: get_onoff
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_power),
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(get_onoff),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(shadow_onoff),
/* K4 */ be_nested_str_weak(onoff_changed),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(ARG),
/* K5 */ be_const_int(0),
}),
be_str_weak(get_onoff),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x880C0102, // 0002 GETMBR R3 R0 K2
0x7C040400, // 0003 CALL R1 2
0x4C080000, // 0004 LDNIL R2
0x20080202, // 0005 NE R2 R1 R2
0x780A000C, // 0006 JMPF R2 #0014
0x88080103, // 0007 GETMBR R2 R0 K3
0x4C0C0000, // 0008 LDNIL R3
0x20080403, // 0009 NE R2 R2 R3
0x780A0007, // 000A JMPF R2 #0013
0x88080103, // 000B GETMBR R2 R0 K3
0x600C0017, // 000C GETGBL R3 G23
0x5C100200, // 000D MOVE R4 R1
0x7C0C0200, // 000E CALL R3 1
0x20080403, // 000F NE R2 R2 R3
0x780A0001, // 0010 JMPF R2 #0013
0x8C080104, // 0011 GETMET R2 R0 K4
0x7C080200, // 0012 CALL R2 1
0x90020601, // 0013 SETMBR R0 K3 R1
0x88080103, // 0014 GETMBR R2 R0 K3
0x4C0C0000, // 0015 LDNIL R3
0x1C080403, // 0016 EQ R2 R2 R3
0x780A0001, // 0017 JMPF R2 #001A
0x50080000, // 0018 LDBOOL R2 0 0
0x90020602, // 0019 SETMBR R0 K3 R2
0x88080103, // 001A GETMBR R2 R0 K3
0x80040400, // 001B RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(set_power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(get_onoff),
}),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x88100102, // 0002 GETMBR R4 R0 K2
0x60140017, // 0003 GETGBL R5 G23
( &(const binstruction[20]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x7C140200, // 0005 CALL R5 1
0x7C080600, // 0006 CALL R2 3
0x8C080103, // 0007 GETMET R2 R0 K3
0x7C080200, // 0008 CALL R2 1
0x80000000, // 0009 RET 0
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100101, // 0008 GETMET R4 R0 K1
0x7C100200, // 0009 CALL R4 1
0x8C100703, // 000A GETMET R4 R3 K3
0x88180104, // 000B GETMBR R6 R0 K4
0x7C100400, // 000C CALL R4 2
0x90020404, // 000D SETMBR R0 K2 R4
0x88100102, // 000E GETMBR R4 R0 K2
0x4C140000, // 000F LDNIL R5
0x1C100805, // 0010 EQ R4 R4 R5
0x78120000, // 0011 JMPF R4 #0013
0x90020505, // 0012 SETMBR R0 K2 K5
0x80000000, // 0013 RET 0
})
)
);
@ -258,91 +213,9 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
/********************************************************************
** Solidified function: init
** Solidified function: set_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(get_onoff),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(relay),
/* K5 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100101, // 0008 GETMET R4 R0 K1
0x7C100200, // 0009 CALL R4 1
0x8C100703, // 000A GETMET R4 R3 K3
0x58180004, // 000B LDCONST R6 K4
0x7C100400, // 000C CALL R4 2
0x90020404, // 000D SETMBR R0 K2 R4
0x88100102, // 000E GETMBR R4 R0 K2
0x4C140000, // 000F LDNIL R5
0x1C100805, // 0010 EQ R4 R4 R5
0x78120000, // 0011 JMPF R4 #0013
0x90020505, // 0012 SETMBR R0 K2 K5
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: onoff_changed
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(onoff_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x4C0C0000, // 0001 LDNIL R3
0x54120005, // 0002 LDINT R4 6
0x58140001, // 0003 LDCONST R5 K1
0x7C040800, // 0004 CALL R1 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: to_json_parameters
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_to_json_parameters, /* name */
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
@ -353,21 +226,108 @@ be_local_closure(Matter_Plugin_OnOff_to_json_parameters, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(format),
/* K2 */ be_nested_str_weak(_X2C_X22relay_X22_X3A_X25i),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(set_power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(get_onoff),
}),
be_str_weak(to_json_parameters),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x8C0C0501, // 0001 GETMET R3 R2 K1
0x58140002, // 0002 LDCONST R5 K2
0x88180103, // 0003 GETMBR R6 R0 K3
0x7C0C0600, // 0004 CALL R3 3
0x00040203, // 0005 ADD R1 R1 R3
0x80040200, // 0006 RET 1 R1
( &(const binstruction[10]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x88100102, // 0002 GETMBR R4 R0 K2
0x60140017, // 0003 GETGBL R5 G23
0x5C180200, // 0004 MOVE R6 R1
0x7C140200, // 0005 CALL R5 1
0x7C080600, // 0006 CALL R2 3
0x8C080103, // 0007 GETMET R2 R0 K3
0x7C080200, // 0008 CALL R2 1
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(shadow_onoff),
/* K4 */ be_nested_str_weak(onoff_changed),
}),
be_str_weak(get_onoff),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x880C0102, // 0002 GETMBR R3 R0 K2
0x7C040400, // 0003 CALL R1 2
0x4C080000, // 0004 LDNIL R2
0x20080202, // 0005 NE R2 R1 R2
0x780A000C, // 0006 JMPF R2 #0014
0x88080103, // 0007 GETMBR R2 R0 K3
0x4C0C0000, // 0008 LDNIL R3
0x20080403, // 0009 NE R2 R2 R3
0x780A0007, // 000A JMPF R2 #0013
0x88080103, // 000B GETMBR R2 R0 K3
0x600C0017, // 000C GETGBL R3 G23
0x5C100200, // 000D MOVE R4 R1
0x7C0C0200, // 000E CALL R3 1
0x20080403, // 000F NE R2 R2 R3
0x780A0001, // 0010 JMPF R2 #0013
0x8C080104, // 0011 GETMET R2 R0 K4
0x7C080200, // 0012 CALL R2 1
0x90020601, // 0013 SETMBR R0 K3 R1
0x88080103, // 0014 GETMBR R2 R0 K3
0x4C0C0000, // 0015 LDNIL R3
0x1C080403, // 0016 EQ R2 R2 R3
0x780A0001, // 0017 JMPF R2 #001A
0x50080000, // 0018 LDBOOL R2 0 0
0x90020602, // 0019 SETMBR R0 K3 R2
0x88080103, // 001A GETMBR R2 R0 K3
0x80040400, // 001B RET 1 R2
})
)
);
@ -615,6 +575,38 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: onoff_changed
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(onoff_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x4C0C0000, // 0001 LDNIL R3
0x54120005, // 0002 LDINT R4 6
0x58140001, // 0003 LDCONST R5 K1
0x7C040800, // 0004 CALL R1 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
@ -622,19 +614,20 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_OnOff,
2,
&be_class_Matter_Plugin,
be_nested_map(13,
be_nested_map(15,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
{ be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(init, 8), be_const_closure(Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
{ be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_OnOff_to_json_parameters_closure) },
{ be_const_key_weak(NAME, 3), be_nested_str_weak(relay) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
{ be_const_key_weak(ARG_TYPE, 7), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
{ be_const_key_weak(tasmota_relay_index, 1), be_const_var(0) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(CLUSTERS, 6), 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, {
@ -672,12 +665,13 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(set_onoff, 4), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
{ be_const_key_weak(ARG, 11), be_nested_str_weak(relay) },
{ be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
})),
be_str_weak(Matter_Plugin_OnOff)
);

View File

@ -6,6 +6,181 @@
extern const bclass be_class_Matter_Plugin_Root;
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Root_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(init),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x80000000, // 0008 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: write_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(int),
/* K7 */ be_nested_str_weak(int64),
/* K8 */ be_nested_str_weak(_breadcrumb),
/* K9 */ be_nested_str_weak(attribute_updated),
/* K10 */ be_nested_str_weak(endpoint),
/* K11 */ be_nested_str_weak(status),
/* K12 */ be_nested_str_weak(CONSTRAINT_ERROR),
/* K13 */ be_const_int(1),
/* K14 */ be_nested_str_weak(INVALID_ACTION),
}),
be_str_weak(write_attribute),
&be_const_str_solidified,
( &(const binstruction[102]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x881C0504, // 0004 GETMBR R7 R2 K4
0x5422002F, // 0005 LDINT R8 48
0x1C200C08, // 0006 EQ R8 R6 R8
0x7822001A, // 0007 JMPF R8 #0023
0x1C200F05, // 0008 EQ R8 R7 K5
0x78220017, // 0009 JMPF R8 #0022
0x60200004, // 000A GETGBL R8 G4
0x5C240600, // 000B MOVE R9 R3
0x7C200200, // 000C CALL R8 1
0x1C201106, // 000D EQ R8 R8 K6
0x74220004, // 000E JMPT R8 #0014
0x6020000F, // 000F GETGBL R8 G15
0x5C240600, // 0010 MOVE R9 R3
0xB82A0E00, // 0011 GETNGBL R10 K7
0x7C200400, // 0012 CALL R8 2
0x78220008, // 0013 JMPF R8 #001D
0x90061003, // 0014 SETMBR R1 K8 R3
0x8C200109, // 0015 GETMET R8 R0 K9
0x8828050A, // 0016 GETMBR R10 R2 K10
0x882C0503, // 0017 GETMBR R11 R2 K3
0x88300504, // 0018 GETMBR R12 R2 K4
0x7C200800, // 0019 CALL R8 4
0x50200200, // 001A LDBOOL R8 1 0
0x80041000, // 001B RET 1 R8
0x70020004, // 001C JMP #0022
0xB8220200, // 001D GETNGBL R8 K1
0x8820110C, // 001E GETMBR R8 R8 K12
0x900A1608, // 001F SETMBR R2 K11 R8
0x50200000, // 0020 LDBOOL R8 0 0
0x80041000, // 0021 RET 1 R8
0x70020041, // 0022 JMP #0065
0x5422001E, // 0023 LDINT R8 31
0x1C200C08, // 0024 EQ R8 R6 R8
0x78220004, // 0025 JMPF R8 #002B
0x1C200F05, // 0026 EQ R8 R7 K5
0x78220001, // 0027 JMPF R8 #002A
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x70020039, // 002A JMP #0065
0x54220027, // 002B LDINT R8 40
0x1C200C08, // 002C EQ R8 R6 R8
0x7822000B, // 002D JMPF R8 #003A
0x54220004, // 002E LDINT R8 5
0x1C200E08, // 002F EQ R8 R7 R8
0x78220002, // 0030 JMPF R8 #0034
0x50200200, // 0031 LDBOOL R8 1 0
0x80041000, // 0032 RET 1 R8
0x70020004, // 0033 JMP #0039
0x54220005, // 0034 LDINT R8 6
0x1C200E08, // 0035 EQ R8 R7 R8
0x78220001, // 0036 JMPF R8 #0039
0x50200200, // 0037 LDBOOL R8 1 0
0x80041000, // 0038 RET 1 R8
0x7002002A, // 0039 JMP #0065
0x54220029, // 003A LDINT R8 42
0x1C200C08, // 003B EQ R8 R6 R8
0x78220004, // 003C JMPF R8 #0042
0x1C200F05, // 003D EQ R8 R7 K5
0x78220001, // 003E JMPF R8 #0041
0x50200200, // 003F LDBOOL R8 1 0
0x80041000, // 0040 RET 1 R8
0x70020022, // 0041 JMP #0065
0x5422002A, // 0042 LDINT R8 43
0x1C200C08, // 0043 EQ R8 R6 R8
0x78220007, // 0044 JMPF R8 #004D
0x1C200F05, // 0045 EQ R8 R7 K5
0x78220004, // 0046 JMPF R8 #004C
0xB8220200, // 0047 GETNGBL R8 K1
0x8820110C, // 0048 GETMBR R8 R8 K12
0x900A1608, // 0049 SETMBR R2 K11 R8
0x50200000, // 004A LDBOOL R8 0 0
0x80041000, // 004B RET 1 R8
0x70020017, // 004C JMP #0065
0x5422002B, // 004D LDINT R8 44
0x1C200C08, // 004E EQ R8 R6 R8
0x78220009, // 004F JMPF R8 #005A
0x1C200F05, // 0050 EQ R8 R7 K5
0x78220002, // 0051 JMPF R8 #0055
0x50200200, // 0052 LDBOOL R8 1 0
0x80041000, // 0053 RET 1 R8
0x70020003, // 0054 JMP #0059
0x1C200F0D, // 0055 EQ R8 R7 K13
0x78220001, // 0056 JMPF R8 #0059
0x50200200, // 0057 LDBOOL R8 1 0
0x80041000, // 0058 RET 1 R8
0x7002000A, // 0059 JMP #0065
0x54220030, // 005A LDINT R8 49
0x1C200C08, // 005B EQ R8 R6 R8
0x78220007, // 005C JMPF R8 #0065
0x54220003, // 005D LDINT R8 4
0x1C200E08, // 005E EQ R8 R7 R8
0x78220004, // 005F JMPF R8 #0065
0xB8220200, // 0060 GETNGBL R8 K1
0x8820110E, // 0061 GETMBR R8 R8 K14
0x900A1608, // 0062 SETMBR R2 K11 R8
0x50200000, // 0063 LDBOOL R8 0 0
0x80041000, // 0064 RET 1 R8
0x80000000, // 0065 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -1005,181 +1180,6 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: write_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(int),
/* K7 */ be_nested_str_weak(int64),
/* K8 */ be_nested_str_weak(_breadcrumb),
/* K9 */ be_nested_str_weak(attribute_updated),
/* K10 */ be_nested_str_weak(endpoint),
/* K11 */ be_nested_str_weak(status),
/* K12 */ be_nested_str_weak(CONSTRAINT_ERROR),
/* K13 */ be_const_int(1),
/* K14 */ be_nested_str_weak(INVALID_ACTION),
}),
be_str_weak(write_attribute),
&be_const_str_solidified,
( &(const binstruction[102]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x881C0504, // 0004 GETMBR R7 R2 K4
0x5422002F, // 0005 LDINT R8 48
0x1C200C08, // 0006 EQ R8 R6 R8
0x7822001A, // 0007 JMPF R8 #0023
0x1C200F05, // 0008 EQ R8 R7 K5
0x78220017, // 0009 JMPF R8 #0022
0x60200004, // 000A GETGBL R8 G4
0x5C240600, // 000B MOVE R9 R3
0x7C200200, // 000C CALL R8 1
0x1C201106, // 000D EQ R8 R8 K6
0x74220004, // 000E JMPT R8 #0014
0x6020000F, // 000F GETGBL R8 G15
0x5C240600, // 0010 MOVE R9 R3
0xB82A0E00, // 0011 GETNGBL R10 K7
0x7C200400, // 0012 CALL R8 2
0x78220008, // 0013 JMPF R8 #001D
0x90061003, // 0014 SETMBR R1 K8 R3
0x8C200109, // 0015 GETMET R8 R0 K9
0x8828050A, // 0016 GETMBR R10 R2 K10
0x882C0503, // 0017 GETMBR R11 R2 K3
0x88300504, // 0018 GETMBR R12 R2 K4
0x7C200800, // 0019 CALL R8 4
0x50200200, // 001A LDBOOL R8 1 0
0x80041000, // 001B RET 1 R8
0x70020004, // 001C JMP #0022
0xB8220200, // 001D GETNGBL R8 K1
0x8820110C, // 001E GETMBR R8 R8 K12
0x900A1608, // 001F SETMBR R2 K11 R8
0x50200000, // 0020 LDBOOL R8 0 0
0x80041000, // 0021 RET 1 R8
0x70020041, // 0022 JMP #0065
0x5422001E, // 0023 LDINT R8 31
0x1C200C08, // 0024 EQ R8 R6 R8
0x78220004, // 0025 JMPF R8 #002B
0x1C200F05, // 0026 EQ R8 R7 K5
0x78220001, // 0027 JMPF R8 #002A
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x70020039, // 002A JMP #0065
0x54220027, // 002B LDINT R8 40
0x1C200C08, // 002C EQ R8 R6 R8
0x7822000B, // 002D JMPF R8 #003A
0x54220004, // 002E LDINT R8 5
0x1C200E08, // 002F EQ R8 R7 R8
0x78220002, // 0030 JMPF R8 #0034
0x50200200, // 0031 LDBOOL R8 1 0
0x80041000, // 0032 RET 1 R8
0x70020004, // 0033 JMP #0039
0x54220005, // 0034 LDINT R8 6
0x1C200E08, // 0035 EQ R8 R7 R8
0x78220001, // 0036 JMPF R8 #0039
0x50200200, // 0037 LDBOOL R8 1 0
0x80041000, // 0038 RET 1 R8
0x7002002A, // 0039 JMP #0065
0x54220029, // 003A LDINT R8 42
0x1C200C08, // 003B EQ R8 R6 R8
0x78220004, // 003C JMPF R8 #0042
0x1C200F05, // 003D EQ R8 R7 K5
0x78220001, // 003E JMPF R8 #0041
0x50200200, // 003F LDBOOL R8 1 0
0x80041000, // 0040 RET 1 R8
0x70020022, // 0041 JMP #0065
0x5422002A, // 0042 LDINT R8 43
0x1C200C08, // 0043 EQ R8 R6 R8
0x78220007, // 0044 JMPF R8 #004D
0x1C200F05, // 0045 EQ R8 R7 K5
0x78220004, // 0046 JMPF R8 #004C
0xB8220200, // 0047 GETNGBL R8 K1
0x8820110C, // 0048 GETMBR R8 R8 K12
0x900A1608, // 0049 SETMBR R2 K11 R8
0x50200000, // 004A LDBOOL R8 0 0
0x80041000, // 004B RET 1 R8
0x70020017, // 004C JMP #0065
0x5422002B, // 004D LDINT R8 44
0x1C200C08, // 004E EQ R8 R6 R8
0x78220009, // 004F JMPF R8 #005A
0x1C200F05, // 0050 EQ R8 R7 K5
0x78220002, // 0051 JMPF R8 #0055
0x50200200, // 0052 LDBOOL R8 1 0
0x80041000, // 0053 RET 1 R8
0x70020003, // 0054 JMP #0059
0x1C200F0D, // 0055 EQ R8 R7 K13
0x78220001, // 0056 JMPF R8 #0059
0x50200200, // 0057 LDBOOL R8 1 0
0x80041000, // 0058 RET 1 R8
0x7002000A, // 0059 JMP #0065
0x54220030, // 005A LDINT R8 49
0x1C200C08, // 005B EQ R8 R6 R8
0x78220007, // 005C JMPF R8 #0065
0x54220003, // 005D LDINT R8 4
0x1C200E08, // 005E EQ R8 R7 R8
0x78220004, // 005F JMPF R8 #0065
0xB8220200, // 0060 GETNGBL R8 K1
0x8820110E, // 0061 GETMBR R8 R8 K14
0x900A1608, // 0062 SETMBR R2 K11 R8
0x50200000, // 0063 LDBOOL R8 0 0
0x80041000, // 0064 RET 1 R8
0x80000000, // 0065 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Root_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(init),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x80000000, // 0008 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@ -2074,19 +2074,11 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Root,
0,
&be_class_Matter_Plugin,
be_nested_map(7,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(root) },
{ be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(22, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_Root_write_attribute_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Root_init_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(CLUSTERS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(13,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(52, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -2188,6 +2180,15 @@ be_local_class(Matter_Plugin_Root,
be_const_int(2),
be_const_int(8),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(init, 0), be_const_closure(Matter_Plugin_Root_init_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(root) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Root_X20node) },
{ 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(22, -1), be_const_int(1) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Root)

View File

@ -47,7 +47,7 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(tasmota_sensor_filter),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(filter),
/* K3 */ be_nested_str_weak(ARG),
/* K4 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K5 */ be_nested_str_weak(tasmota),
/* K6 */ be_nested_str_weak(Rule_Matcher),
@ -65,7 +65,7 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100702, // 0008 GETMET R4 R3 K2
0x58180003, // 0009 LDCONST R6 K3
0x88180103, // 0009 GETMBR R6 R0 K3
0x7C100400, // 000A CALL R4 2
0x90020204, // 000B SETMBR R0 K1 R4
0x88100101, // 000C GETMBR R4 R0 K1
@ -83,65 +83,6 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: to_json_parameters
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_to_json_parameters, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(format),
/* K2 */ be_nested_str_weak(_X2C_X22filter_X22_X3A_X22_X25s_X22),
/* K3 */ be_nested_str_weak(tasmota_sensor_filter),
}),
be_str_weak(to_json_parameters),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x8C0C0501, // 0001 GETMET R3 R2 K1
0x58140002, // 0002 LDCONST R5 K2
0x88180103, // 0003 GETMBR R6 R0 K3
0x7C0C0600, // 0004 CALL R3 3
0x00040203, // 0005 ADD R1 R1 R3
0x80040200, // 0006 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
@ -192,6 +133,30 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor
********************************************************************/
@ -202,13 +167,13 @@ be_local_class(Matter_Plugin_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
{ be_const_key_weak(tasmota_sensor_filter, 7), be_const_var(0) },
{ be_const_key_weak(init, 6), be_const_closure(Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(to_json_parameters, 1), be_const_closure(Matter_Plugin_Sensor_to_json_parameters_closure) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
{ be_const_key_weak(shadow_value, -1), be_const_var(2) },
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
{ be_const_key_weak(tasmota_sensor_matcher, 6), be_const_var(1) },
{ be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
{ be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
})),
be_str_weak(Matter_Plugin_Sensor)
);

View File

@ -6,66 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x540E0063, // 0001 LDINT R3 100
0x080C0203, // 0002 MUL R3 R1 R3
0x7C080200, // 0003 CALL R2 1
0x80040400, // 0004 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x54160404, // 0002 LDINT R5 1029
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -176,6 +116,66 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x540E0063, // 0001 LDINT R3 100
0x080C0203, // 0002 MUL R3 R1 R3
0x7C080200, // 0003 CALL R2 1
0x80040400, // 0004 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x54160404, // 0002 LDINT R5 1029
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Humidity
********************************************************************/
@ -183,16 +183,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Humidity,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(6,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(NAME, 1), be_nested_str_weak(humidity) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
{ be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@ -206,7 +200,14 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Humidity)
);

View File

@ -6,65 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Illuminance;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
0x80040400, // 0003 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x541603FF, // 0002 LDINT R5 1024
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -175,6 +116,65 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
0x80040400, // 0003 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x541603FF, // 0002 LDINT R5 1024
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Illuminance
********************************************************************/
@ -182,16 +182,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Illuminance,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(6,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(NAME, 1), be_nested_str_weak(illuminance) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
{ be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@ -205,7 +199,14 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Illuminance)
);

View File

@ -6,65 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
0x80040400, // 0003 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x54160402, // 0002 LDINT R5 1027
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -175,6 +116,65 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
0x80040400, // 0003 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x54160402, // 0002 LDINT R5 1027
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Pressure
********************************************************************/
@ -182,16 +182,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Pressure,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(6,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(NAME, 1), be_nested_str_weak(pressure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
{ be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@ -205,7 +199,14 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Pressure)
);

View File

@ -6,66 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x540E0063, // 0001 LDINT R3 100
0x080C0203, // 0002 MUL R3 R1 R3
0x7C080200, // 0003 CALL R2 1
0x80040400, // 0004 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x54160401, // 0002 LDINT R5 1026
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -173,6 +113,66 @@ be_local_closure(Matter_Plugin_Sensor_Temp_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x540E0063, // 0001 LDINT R3 100
0x080C0203, // 0002 MUL R3 R1 R3
0x7C080200, // 0003 CALL R2 1
0x80040400, // 0004 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(valued_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x4C100000, // 0001 LDNIL R4
0x54160401, // 0002 LDINT R5 1026
0x58180001, // 0003 LDCONST R6 K1
0x7C080800, // 0004 CALL R2 4
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Temp
********************************************************************/
@ -180,16 +180,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Temp,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(6,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(NAME, 1), be_nested_str_weak(temperature) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
{ be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@ -203,7 +197,14 @@ be_local_class(Matter_Plugin_Sensor_Temp,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Temp)
);

File diff suppressed because it is too large Load Diff