mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 13:46:37 +00:00
Matter persist plugins config (#18486)
This commit is contained in:
parent
a2b9574ec9
commit
39094bc079
@ -162,7 +162,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Pressure.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Light.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Illuminance.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h"
|
||||
|
||||
/*********************************************************************************************\
|
||||
@ -340,7 +340,7 @@ module matter (scope: global, strings: weak) {
|
||||
Plugin_Sensor, class(be_class_Matter_Plugin_Sensor) // Generic Sensor
|
||||
Plugin_Sensor_Pressure, class(be_class_Matter_Plugin_Sensor_Pressure) // Pressure Sensor
|
||||
Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
|
||||
Plugin_Sensor_Light, class(be_class_Matter_Plugin_Sensor_Light) // Light Sensor
|
||||
Plugin_Sensor_Illuminance, class(be_class_Matter_Plugin_Sensor_Illuminance) // Illuminance Sensor
|
||||
Plugin_Sensor_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,10 @@ class Matter_Device
|
||||
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_persist # true if plugins configuration needs to be saved
|
||||
var plugins_classes # map of registered classes by type name
|
||||
var udp_server # `matter.UDPServer()` object
|
||||
var message_handler # `matter.MessageHandler()` object
|
||||
var message_handler # `matter.MessageHandler()` object
|
||||
var sessions # `matter.Session_Store()` objet
|
||||
var ui
|
||||
# Commissioning open
|
||||
@ -73,14 +75,17 @@ class Matter_Device
|
||||
|
||||
self.started = false
|
||||
self.plugins = []
|
||||
self.plugins_persist = false # plugins need to saved only when the first fabric is associated
|
||||
self.plugins_classes = {}
|
||||
self.register_native_classes() # register all native classes
|
||||
self.vendorid = self.VENDOR_ID
|
||||
self.productid = self.PRODUCT_ID
|
||||
self.root_iterations = self.PBKDF_ITERATIONS
|
||||
self.root_salt = crypto.random(16) # bytes("5350414B453250204B65792053616C74")
|
||||
self.root_salt = crypto.random(16)
|
||||
self.ipv4only = false
|
||||
self.load_param()
|
||||
|
||||
self.sessions = matter.Session_Store()
|
||||
self.sessions = matter.Session_Store(self)
|
||||
self.sessions.load_fabrics()
|
||||
self.message_handler = matter.MessageHandler(self)
|
||||
self.ui = matter.UI(self)
|
||||
@ -106,6 +111,10 @@ class Matter_Device
|
||||
tasmota.add_driver(self)
|
||||
|
||||
self.register_commands()
|
||||
|
||||
if self.sessions.count_active_fabrics() > 0
|
||||
self.plugins_persist = true # if there are active fabrics, then we persist plugins configuration
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
@ -113,9 +122,7 @@ class Matter_Device
|
||||
def start()
|
||||
if self.started return end # abort if already started
|
||||
|
||||
# add the default plugin
|
||||
self.plugins.push(matter.Plugin_Root(self, 0))
|
||||
# autoconfigure other plugins
|
||||
# autoconfigure other plugins if needed
|
||||
self.autoconf_device()
|
||||
|
||||
# for now read sensors every 30 seconds
|
||||
@ -596,13 +603,18 @@ class Matter_Device
|
||||
#############################################################
|
||||
#
|
||||
def save_param()
|
||||
import json
|
||||
var j = json.dump({'distinguish':self.root_discriminator, 'passcode':self.root_passcode, 'ipv4only':self.ipv4only})
|
||||
import string
|
||||
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()
|
||||
end
|
||||
j += '}'
|
||||
try
|
||||
import string
|
||||
var f = open(self.FILENAME, "w")
|
||||
f.write(j)
|
||||
f.close()
|
||||
tasmota.log(string.format("MTR: =Saved parameters%s", self.plugins_persist ? " and condiguration" : ""), 2)
|
||||
return j
|
||||
except .. as e, m
|
||||
tasmota.log("MTR: Session_Store::save Exception:" + str(e) + "|" + str(m), 2)
|
||||
@ -627,6 +639,11 @@ 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_persist = true
|
||||
end
|
||||
except .. as e, m
|
||||
if e != "io_error"
|
||||
tasmota.log("MTR: Session_Store::load Exception:" + str(e) + "|" + str(m), 2)
|
||||
@ -645,6 +662,44 @@ class Matter_Device
|
||||
if dirty self.save_param() end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Load plugins configuration from json
|
||||
#
|
||||
# 'config' is a map
|
||||
# Ex:
|
||||
# {'32': {'filter': 'AXP192#Temperature', 'type': 'temperature'}, '40': {'filter': 'BMP280#Pressure', 'type': 'pressure'}, '34': {'filter': 'SHT3X#Temperature', 'type': 'temperature'}, '33': {'filter': 'BMP280#Temperature', 'type': 'temperature'}, '1': {'relay': 0, 'type': 'relay'}, '56': {'filter': 'SHT3X#Humidity', 'type': 'humidity'}, '0': {'type': 'root'}}
|
||||
def _load_plugins_config(config)
|
||||
import string
|
||||
|
||||
var endpoints = self.k2l_num(config)
|
||||
tasmota.log("MTR: endpoints to be configured "+str(endpoints), 3)
|
||||
|
||||
for ep: endpoints
|
||||
try
|
||||
var plugin_conf = config[str(ep)]
|
||||
tasmota.log(string.format("MTR: endpoint %i config %s", ep, plugin_conf), 3)
|
||||
|
||||
var pi_class_name = plugin_conf.find('type')
|
||||
if pi_class_name == nil tasmota.log("MTR: no class name, skipping", 3) continue end
|
||||
var pi_class = self.plugins_classes.find(pi_class_name)
|
||||
if pi_class == nil tasmota.log("MTR: unknown class name '"+str(pi_class_name)+"' skipping", 2) continue end
|
||||
|
||||
var pi = pi_class(self, ep, plugin_conf)
|
||||
self.plugins.push(pi)
|
||||
|
||||
var param_log = ''
|
||||
for k:self.k2l(plugin_conf)
|
||||
if k == 'type' continue end
|
||||
param_log += string.format(" %s:%s", k, plugin_conf[k])
|
||||
end
|
||||
tasmota.log(string.format("MTR: endpoint:%i type:%s%s", ep, pi_class_name, param_log), 2)
|
||||
except .. as e, m
|
||||
tasmota.log("MTR: Exception" + str(e) + "|" + str(m), 2)
|
||||
end
|
||||
end
|
||||
|
||||
tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Matter plugin management
|
||||
@ -916,9 +971,31 @@ class Matter_Device
|
||||
#############################################################
|
||||
# Autoconfigure device from template
|
||||
#
|
||||
# Applies only if there are no plugins already configured
|
||||
## TODO generate map instead
|
||||
def autoconf_device()
|
||||
import string
|
||||
import json
|
||||
|
||||
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)
|
||||
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Autoconfigure device from template to map
|
||||
#
|
||||
# Applies only if there are no plugins already configured
|
||||
def autoconf_device_map()
|
||||
import json
|
||||
var m = {}
|
||||
|
||||
# add the default plugin
|
||||
m["0"] = {'type':'root'}
|
||||
|
||||
# check if we have a light
|
||||
var endpoint = 1
|
||||
var light_present = false
|
||||
@ -929,14 +1006,11 @@ class Matter_Device
|
||||
var channels_count = size(light_status.find('channels', ""))
|
||||
if channels_count > 0
|
||||
if channels_count == 1
|
||||
self.plugins.push(matter.Plugin_Light1(self, endpoint))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Light_Dimmer", endpoint), 2)
|
||||
m[str(endpoint)] = {'type':'light1'}
|
||||
elif channels_count == 2
|
||||
self.plugins.push(matter.Plugin_Light2(self, endpoint))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Light_CT", endpoint), 2)
|
||||
m[str(endpoint)] = {'type':'light2'}
|
||||
else
|
||||
self.plugins.push(matter.Plugin_Light3(self, endpoint))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Light_RGB", endpoint), 2)
|
||||
m[str(endpoint)] = {'type':'light3'}
|
||||
end
|
||||
light_present = true
|
||||
endpoint += 1
|
||||
@ -949,8 +1023,7 @@ class Matter_Device
|
||||
if light_present relay_count -= 1 end # last power is taken for lights
|
||||
|
||||
while relay_index < relay_count
|
||||
self.plugins.push(matter.Plugin_OnOff(self, endpoint, relay_index))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Relay_%i", endpoint, relay_index + 1), 2)
|
||||
m[str(endpoint)] = {'type':'relay','relay':relay_index}
|
||||
relay_index += 1
|
||||
endpoint += 1
|
||||
end
|
||||
@ -965,8 +1038,7 @@ class Matter_Device
|
||||
var sensor_2 = sensors[k1]
|
||||
if isinstance(sensor_2, map) && sensor_2.contains("Temperature")
|
||||
var temp_rule = k1 + "#Temperature"
|
||||
self.plugins.push(matter.Plugin_Sensor_Temp(self, endpoint, temp_rule))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Temperature (%s)", endpoint, temp_rule), 2)
|
||||
m[str(endpoint)] = {'type':'temperature','filter':temp_rule}
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x28 break end
|
||||
@ -979,8 +1051,7 @@ class Matter_Device
|
||||
var sensor_2 = sensors[k1]
|
||||
if isinstance(sensor_2, map) && sensor_2.contains("Pressure")
|
||||
var temp_rule = k1 + "#Pressure"
|
||||
self.plugins.push(matter.Plugin_Sensor_Pressure(self, endpoint, temp_rule))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Pressure (%s)", endpoint, temp_rule), 2)
|
||||
m[str(endpoint)] = {'type':'pressure','filter':temp_rule}
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x2F break end
|
||||
@ -993,8 +1064,7 @@ class Matter_Device
|
||||
var sensor_2 = sensors[k1]
|
||||
if isinstance(sensor_2, map) && sensor_2.contains("Illuminance")
|
||||
var temp_rule = k1 + "#Illuminance"
|
||||
self.plugins.push(matter.Plugin_Sensor_Light(self, endpoint, temp_rule))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Light (%s)", endpoint, temp_rule), 2)
|
||||
m[str(endpoint)] = {'type':'illuminance','filter':temp_rule}
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x38 break end
|
||||
@ -1007,13 +1077,13 @@ class Matter_Device
|
||||
var sensor_2 = sensors[k1]
|
||||
if isinstance(sensor_2, map) && sensor_2.contains("Humidity")
|
||||
var temp_rule = k1 + "#Humidity"
|
||||
self.plugins.push(matter.Plugin_Sensor_Humidity(self, endpoint, temp_rule))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Humidity (%s)", endpoint, temp_rule), 2)
|
||||
m[str(endpoint)] = {'type':'humidity','filter':temp_rule}
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x40 break end
|
||||
end
|
||||
tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
|
||||
# tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
|
||||
return m
|
||||
end
|
||||
|
||||
# get keys of a map in sorted order
|
||||
@ -1021,6 +1091,66 @@ 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
|
||||
|
||||
# get keys of a map in sorted order, as numbers
|
||||
static def k2l_num(m) var l=[] if m==nil return l end for k:m.keys() l.push(int(k)) end
|
||||
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
|
||||
#
|
||||
# Adds a class by name
|
||||
def register_plugin_class(name, cl)
|
||||
self.plugins_classes[name] = cl
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# register_native_classes
|
||||
#
|
||||
# Adds a class by name
|
||||
def register_native_classes(name, cl)
|
||||
self.register_plugin_class('root', matter.Plugin_Root)
|
||||
self.register_plugin_class('light0', matter.Plugin_Light0)
|
||||
self.register_plugin_class('light1', matter.Plugin_Light1)
|
||||
self.register_plugin_class('light2', matter.Plugin_Light2)
|
||||
self.register_plugin_class('light3', matter.Plugin_Light3)
|
||||
self.register_plugin_class('relay', matter.Plugin_OnOff)
|
||||
self.register_plugin_class('temperature', matter.Plugin_Sensor_Temp)
|
||||
self.register_plugin_class('humidity', matter.Plugin_Sensor_Humidity)
|
||||
self.register_plugin_class('illuminance', matter.Plugin_Sensor_Illuminance)
|
||||
self.register_plugin_class('pressure', matter.Plugin_Sensor_Pressure)
|
||||
tasmota.log("MTR: registered classes "+str(self.k2l(self.plugins_classes)), 3)
|
||||
end
|
||||
|
||||
#####################################################################
|
||||
# Events
|
||||
#####################################################################
|
||||
def event_fabrics_saved()
|
||||
# if the plugins configuration was not persisted and a new fabric is saved, persist it
|
||||
if self.sessions.count_active_fabrics() > 0 && !self.plugins_persist
|
||||
self.plugins_persist = true
|
||||
self.save_param()
|
||||
end
|
||||
end
|
||||
|
||||
#####################################################################
|
||||
# Commands `Mtr___`
|
||||
#####################################################################
|
||||
|
@ -23,6 +23,7 @@
|
||||
#@ solidify:Matter_Plugin,weak
|
||||
|
||||
class Matter_Plugin
|
||||
static var NAME = "generic" # name of the plug-in in json
|
||||
static var CLUSTERS = {
|
||||
0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453
|
||||
}
|
||||
@ -39,7 +40,10 @@ class Matter_Plugin
|
||||
#############################################################
|
||||
# Constructor
|
||||
#
|
||||
def init(device, endpoint)
|
||||
# device: contains the root device object so the plugin can "call home"
|
||||
# endpoint: (int) the endpoint number (16 bits)
|
||||
# arguments: (map) the map for all complementary arguments that are plugin specific
|
||||
def init(device, endpoint, arguments)
|
||||
self.device = device
|
||||
self.endpoint = endpoint
|
||||
self.clusters = self.consolidate_clusters()
|
||||
@ -215,6 +219,31 @@ class Matter_Plugin
|
||||
def every_second()
|
||||
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
|
||||
|
@ -32,9 +32,9 @@ class Matter_Plugin_Device : Matter_Plugin
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, tasmota_relay_index)
|
||||
super(self).init(device, endpoint)
|
||||
end
|
||||
# def init(device, endpoint, arguments)
|
||||
# super(self).init(device, endpoint, arguments)
|
||||
# end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
||||
@ -38,8 +39,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint)
|
||||
super(self).init(device, endpoint)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.shadow_onoff = false
|
||||
end
|
||||
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
@ -40,8 +41,8 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint)
|
||||
super(self).init(device, endpoint)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.shadow_bri = 0
|
||||
end
|
||||
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
@ -41,8 +42,8 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint)
|
||||
super(self).init(device, endpoint)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.shadow_ct = 325
|
||||
self.update_ct_minmax()
|
||||
end
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
@ -40,8 +41,8 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint)
|
||||
super(self).init(device, endpoint)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.shadow_hue = 0
|
||||
self.shadow_sat = 0
|
||||
end
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
||||
@ -40,11 +41,11 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, tasmota_relay_index)
|
||||
super(self).init(device, endpoint)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.get_onoff() # read actual value
|
||||
if tasmota_relay_index == nil tasmota_relay_index = 0 end
|
||||
self.tasmota_relay_index = tasmota_relay_index
|
||||
self.tasmota_relay_index = arguments.find('relay')
|
||||
if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
@ -214,6 +215,17 @@ 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()
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
0x001F: [0,2,3,4], # Access Control Cluster, p.461
|
||||
@ -46,8 +47,8 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint)
|
||||
super(self).init(device, endpoint)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
@ -31,10 +31,12 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, sensor_filter)
|
||||
super(self).init(device, endpoint)
|
||||
self.tasmota_sensor_filter = sensor_filter
|
||||
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(sensor_filter)
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.tasmota_sensor_filter = arguments.find('filter')
|
||||
if self.tasmota_sensor_filter
|
||||
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
@ -72,5 +74,16 @@ 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
|
||||
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable
|
||||
}
|
||||
|
@ -22,9 +22,10 @@
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Sensor end
|
||||
|
||||
#@ solidify:Matter_Plugin_Sensor_Light,weak
|
||||
#@ solidify:Matter_Plugin_Sensor_Illuminance,weak
|
||||
|
||||
class Matter_Plugin_Sensor_Light : Matter_Plugin_Sensor
|
||||
class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
|
||||
static var NAME = "illuminance" # name of the plug-in in json
|
||||
static var CLUSTERS = {
|
||||
0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable
|
||||
}
|
||||
@ -81,4 +82,4 @@ class Matter_Plugin_Sensor_Light : Matter_Plugin_Sensor
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure
|
||||
matter.Plugin_Sensor_Illuminance = Matter_Plugin_Sensor_Illuminance
|
@ -25,6 +25,7 @@ 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 CLUSTERS = {
|
||||
0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
|
||||
}
|
||||
|
@ -25,8 +25,9 @@ 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 CLUSTERS = {
|
||||
0x0402: [0,1,2], # Temperature Measurement p.97 - no writable
|
||||
0x0402: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
|
||||
}
|
||||
static var TYPES = { 0x0302: 2 } # Temperature Sensor, rev 2
|
||||
|
||||
|
@ -32,12 +32,14 @@ class Matter_Expirable end
|
||||
#################################################################################
|
||||
#################################################################################
|
||||
class Matter_Session_Store
|
||||
var device # device root object
|
||||
var sessions
|
||||
var fabrics # list of provisioned fabrics
|
||||
static var _FABRICS = "_matter_fabrics.json"
|
||||
|
||||
#############################################################
|
||||
def init()
|
||||
def init(device)
|
||||
self.device = device
|
||||
self.sessions = matter.Expirable_list()
|
||||
self.fabrics = matter.Expirable_list()
|
||||
end
|
||||
@ -327,6 +329,7 @@ class Matter_Session_Store
|
||||
f.write(fabs)
|
||||
f.close()
|
||||
tasmota.log(string.format("MTR: =Saved %i fabric(s) and %i session(s)", fabs_size, sessions_saved), 2)
|
||||
self.device.event_fabrics_saved() # signal event
|
||||
except .. as e, m
|
||||
tasmota.log("MTR: Session_Store::save Exception:" + str(e) + "|" + str(m), 2)
|
||||
end
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,372 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_endpoint
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_get_endpoint, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
}),
|
||||
be_str_weak(get_endpoint),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: timed_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_timed_request, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(timed_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: to_json_parameters
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_to_json_parameters, /* 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 */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(every_second),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
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: 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: 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_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_init, /* name */
|
||||
be_nested_proto(
|
||||
6, /* 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(device),
|
||||
/* K1 */ be_nested_str_weak(endpoint),
|
||||
/* K2 */ be_nested_str_weak(clusters),
|
||||
/* K3 */ be_nested_str_weak(consolidate_clusters),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x8C100103, // 0002 GETMET R4 R0 K3
|
||||
0x7C100200, // 0003 CALL R4 1
|
||||
0x90020404, // 0004 SETMBR R0 K2 R4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: attribute_updated
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_attribute_updated, /* name */
|
||||
be_nested_proto(
|
||||
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[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
/* K1 */ be_nested_str_weak(device),
|
||||
/* K2 */ be_nested_str_weak(attribute_updated),
|
||||
}),
|
||||
be_str_weak(attribute_updated),
|
||||
&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
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
@ -287,244 +653,6 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_second
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_every_second, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(every_second),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: subscribe_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(subscribe_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C140000, // 0000 LDNIL R5
|
||||
0x80040A00, // 0001 RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: 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: 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: read_event
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_read_event, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(read_event),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C140000, // 0000 LDNIL R5
|
||||
0x80040A00, // 0001 RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_endpoint
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_get_endpoint, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
}),
|
||||
be_str_weak(get_endpoint),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: write_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_write_attribute, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(write_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(device),
|
||||
/* K1 */ be_nested_str_weak(endpoint),
|
||||
/* K2 */ be_nested_str_weak(clusters),
|
||||
/* K3 */ be_nested_str_weak(consolidate_clusters),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x8C0C0103, // 0002 GETMET R3 R0 K3
|
||||
0x7C0C0200, // 0003 CALL R3 1
|
||||
0x90020403, // 0004 SETMBR R0 K2 R3
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: timed_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_timed_request, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(timed_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_attribute_list
|
||||
********************************************************************/
|
||||
@ -605,87 +733,24 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* 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 */
|
||||
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: 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: attribute_updated
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_attribute_updated, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
/* K1 */ be_nested_str_weak(device),
|
||||
/* K2 */ be_nested_str_weak(attribute_updated),
|
||||
}),
|
||||
be_str_weak(attribute_updated),
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(subscribe_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
( &(const binstruction[ 2]) { /* 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
|
||||
0x80040A00, // 0001 RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -698,26 +763,31 @@ be_local_closure(Matter_Plugin_attribute_updated, /* name */
|
||||
be_local_class(Matter_Plugin,
|
||||
3,
|
||||
NULL,
|
||||
be_nested_map(21,
|
||||
be_nested_map(24,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
|
||||
{ be_const_key_weak(attribute_updated, 18), be_const_closure(Matter_Plugin_attribute_updated_closure) },
|
||||
{ be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
|
||||
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
|
||||
{ be_const_key_weak(subscribe_attribute, 1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
|
||||
{ be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
|
||||
{ be_const_key_weak(device, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(update_shadow, 17), be_const_closure(Matter_Plugin_update_shadow_closure) },
|
||||
{ be_const_key_weak(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(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
|
||||
{ be_const_key_weak(has, 8), be_const_closure(Matter_Plugin_has_closure) },
|
||||
{ be_const_key_weak(parse_sensors, 13), be_const_closure(Matter_Plugin_parse_sensors_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
|
||||
{ be_const_key_weak(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(timed_request, 9), be_const_closure(Matter_Plugin_timed_request_closure) },
|
||||
{ be_const_key_weak(read_event, 11), be_const_closure(Matter_Plugin_read_event_closure) },
|
||||
{ be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, 20), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_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(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(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
@ -731,9 +801,7 @@ be_local_class(Matter_Plugin,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) },
|
||||
{ be_const_key_weak(clusters, -1), be_const_var(2) },
|
||||
{ be_const_key_weak(endpoint, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_to_json_parameters_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin)
|
||||
);
|
||||
|
@ -6,86 +6,6 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(command),
|
||||
/* K4 */ be_const_int(3),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_const_int(1),
|
||||
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
|
||||
/* K8 */ be_nested_str_weak(add_TLV),
|
||||
/* K9 */ be_nested_str_weak(U2),
|
||||
/* K10 */ be_nested_str_weak(invoke_request),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[45]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140702, // 0002 GETMBR R5 R3 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x1C1C0B04, // 0004 EQ R7 R5 K4
|
||||
0x781E0016, // 0005 JMPF R7 #001D
|
||||
0x1C1C0D05, // 0006 EQ R7 R6 K5
|
||||
0x781E0002, // 0007 JMPF R7 #000B
|
||||
0x501C0200, // 0008 LDBOOL R7 1 0
|
||||
0x80040E00, // 0009 RET 1 R7
|
||||
0x70020010, // 000A JMP #001C
|
||||
0x1C1C0D06, // 000B EQ R7 R6 K6
|
||||
0x781E0009, // 000C JMPF R7 #0017
|
||||
0x8C1C0907, // 000D GETMET R7 R4 K7
|
||||
0x7C1C0200, // 000E CALL R7 1
|
||||
0x8C200F08, // 000F GETMET R8 R7 K8
|
||||
0x58280005, // 0010 LDCONST R10 K5
|
||||
0x882C0909, // 0011 GETMBR R11 R4 K9
|
||||
0x58300005, // 0012 LDCONST R12 K5
|
||||
0x7C200800, // 0013 CALL R8 4
|
||||
0x900E0705, // 0014 SETMBR R3 K3 K5
|
||||
0x80040E00, // 0015 RET 1 R7
|
||||
0x70020004, // 0016 JMP #001C
|
||||
0x541E003F, // 0017 LDINT R7 64
|
||||
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
||||
0x781E0001, // 0019 JMPF R7 #001C
|
||||
0x501C0200, // 001A LDBOOL R7 1 0
|
||||
0x80040E00, // 001B RET 1 R7
|
||||
0x7002000E, // 001C JMP #002C
|
||||
0x541E0003, // 001D LDINT R7 4
|
||||
0x1C1C0A07, // 001E EQ R7 R5 R7
|
||||
0x781E0002, // 001F JMPF R7 #0023
|
||||
0x501C0200, // 0020 LDBOOL R7 1 0
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020008, // 0022 JMP #002C
|
||||
0x601C0003, // 0023 GETGBL R7 G3
|
||||
0x5C200000, // 0024 MOVE R8 R0
|
||||
0x7C1C0200, // 0025 CALL R7 1
|
||||
0x8C1C0F0A, // 0026 GETMET R7 R7 K10
|
||||
0x5C240200, // 0027 MOVE R9 R1
|
||||
0x5C280400, // 0028 MOVE R10 R2
|
||||
0x5C2C0600, // 0029 MOVE R11 R3
|
||||
0x7C1C0800, // 002A CALL R7 4
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x80000000, // 002C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
@ -200,11 +120,11 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Device_init, /* name */
|
||||
be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
13, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -212,20 +132,67 @@ be_local_closure(Matter_Plugin_Device_init, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(command),
|
||||
/* K4 */ be_const_int(3),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_const_int(1),
|
||||
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
|
||||
/* K8 */ be_nested_str_weak(add_TLV),
|
||||
/* K9 */ be_nested_str_weak(U2),
|
||||
/* K10 */ be_nested_str_weak(invoke_request),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 8]) { /* 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
|
||||
0x7C100600, // 0006 CALL R4 3
|
||||
0x80000000, // 0007 RET 0
|
||||
( &(const binstruction[45]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140702, // 0002 GETMBR R5 R3 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x1C1C0B04, // 0004 EQ R7 R5 K4
|
||||
0x781E0016, // 0005 JMPF R7 #001D
|
||||
0x1C1C0D05, // 0006 EQ R7 R6 K5
|
||||
0x781E0002, // 0007 JMPF R7 #000B
|
||||
0x501C0200, // 0008 LDBOOL R7 1 0
|
||||
0x80040E00, // 0009 RET 1 R7
|
||||
0x70020010, // 000A JMP #001C
|
||||
0x1C1C0D06, // 000B EQ R7 R6 K6
|
||||
0x781E0009, // 000C JMPF R7 #0017
|
||||
0x8C1C0907, // 000D GETMET R7 R4 K7
|
||||
0x7C1C0200, // 000E CALL R7 1
|
||||
0x8C200F08, // 000F GETMET R8 R7 K8
|
||||
0x58280005, // 0010 LDCONST R10 K5
|
||||
0x882C0909, // 0011 GETMBR R11 R4 K9
|
||||
0x58300005, // 0012 LDCONST R12 K5
|
||||
0x7C200800, // 0013 CALL R8 4
|
||||
0x900E0705, // 0014 SETMBR R3 K3 K5
|
||||
0x80040E00, // 0015 RET 1 R7
|
||||
0x70020004, // 0016 JMP #001C
|
||||
0x541E003F, // 0017 LDINT R7 64
|
||||
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
||||
0x781E0001, // 0019 JMPF R7 #001C
|
||||
0x501C0200, // 001A LDBOOL R7 1 0
|
||||
0x80040E00, // 001B RET 1 R7
|
||||
0x7002000E, // 001C JMP #002C
|
||||
0x541E0003, // 001D LDINT R7 4
|
||||
0x1C1C0A07, // 001E EQ R7 R5 R7
|
||||
0x781E0002, // 001F JMPF R7 #0023
|
||||
0x501C0200, // 0020 LDBOOL R7 1 0
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020008, // 0022 JMP #002C
|
||||
0x601C0003, // 0023 GETGBL R7 G3
|
||||
0x5C200000, // 0024 MOVE R8 R0
|
||||
0x7C1C0200, // 0025 CALL R7 1
|
||||
0x8C1C0F0A, // 0026 GETMET R7 R7 K10
|
||||
0x5C240200, // 0027 MOVE R9 R1
|
||||
0x5C280400, // 0028 MOVE R10 R2
|
||||
0x5C2C0600, // 0029 MOVE R11 R3
|
||||
0x7C1C0800, // 002A CALL R7 4
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x80000000, // 002C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -239,16 +206,8 @@ extern const bclass be_class_Matter_Plugin;
|
||||
be_local_class(Matter_Plugin_Device,
|
||||
0,
|
||||
&be_class_Matter_Plugin,
|
||||
be_nested_map(5,
|
||||
be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(0, -1), be_const_int(0) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Device_read_attribute_closure) },
|
||||
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Device_init_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(2,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
@ -268,6 +227,13 @@ be_local_class(Matter_Plugin_Device,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPES, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(0, -1), be_const_int(0) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 1), be_const_closure(Matter_Plugin_Device_read_attribute_closure) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Device)
|
||||
);
|
||||
|
@ -6,6 +6,133 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Light0;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_const_int(3),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_const_int(1),
|
||||
/* K8 */ be_nested_str_weak(Matter_TLV_struct),
|
||||
/* K9 */ be_nested_str_weak(add_TLV),
|
||||
/* K10 */ be_nested_str_weak(U2),
|
||||
/* K11 */ be_nested_str_weak(set),
|
||||
/* K12 */ be_nested_str_weak(power),
|
||||
/* K13 */ be_nested_str_weak(update_shadow),
|
||||
/* K14 */ be_const_int(2),
|
||||
/* K15 */ be_nested_str_weak(shadow_onoff),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[87]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x1C200D05, // 0005 EQ R8 R6 K5
|
||||
0x78220016, // 0006 JMPF R8 #001E
|
||||
0x1C200F06, // 0007 EQ R8 R7 K6
|
||||
0x78220002, // 0008 JMPF R8 #000C
|
||||
0x50200200, // 0009 LDBOOL R8 1 0
|
||||
0x80041000, // 000A RET 1 R8
|
||||
0x70020010, // 000B JMP #001D
|
||||
0x1C200F07, // 000C EQ R8 R7 K7
|
||||
0x78220009, // 000D JMPF R8 #0018
|
||||
0x8C200B08, // 000E GETMET R8 R5 K8
|
||||
0x7C200200, // 000F CALL R8 1
|
||||
0x8C241109, // 0010 GETMET R9 R8 K9
|
||||
0x582C0006, // 0011 LDCONST R11 K6
|
||||
0x88300B0A, // 0012 GETMBR R12 R5 K10
|
||||
0x58340006, // 0013 LDCONST R13 K6
|
||||
0x7C240800, // 0014 CALL R9 4
|
||||
0x900E0906, // 0015 SETMBR R3 K4 K6
|
||||
0x80041000, // 0016 RET 1 R8
|
||||
0x70020004, // 0017 JMP #001D
|
||||
0x5422003F, // 0018 LDINT R8 64
|
||||
0x1C200E08, // 0019 EQ R8 R7 R8
|
||||
0x78220001, // 001A JMPF R8 #001D
|
||||
0x50200200, // 001B LDBOOL R8 1 0
|
||||
0x80041000, // 001C RET 1 R8
|
||||
0x70020037, // 001D JMP #0056
|
||||
0x54220003, // 001E LDINT R8 4
|
||||
0x1C200C08, // 001F EQ R8 R6 R8
|
||||
0x78220002, // 0020 JMPF R8 #0024
|
||||
0x50200200, // 0021 LDBOOL R8 1 0
|
||||
0x80041000, // 0022 RET 1 R8
|
||||
0x70020031, // 0023 JMP #0056
|
||||
0x54220004, // 0024 LDINT R8 5
|
||||
0x1C200C08, // 0025 EQ R8 R6 R8
|
||||
0x78220002, // 0026 JMPF R8 #002A
|
||||
0x50200200, // 0027 LDBOOL R8 1 0
|
||||
0x80041000, // 0028 RET 1 R8
|
||||
0x7002002B, // 0029 JMP #0056
|
||||
0x54220005, // 002A LDINT R8 6
|
||||
0x1C200C08, // 002B EQ R8 R6 R8
|
||||
0x78220028, // 002C JMPF R8 #0056
|
||||
0x1C200F06, // 002D EQ R8 R7 K6
|
||||
0x7822000A, // 002E JMPF R8 #003A
|
||||
0x8C20090B, // 002F GETMET R8 R4 K11
|
||||
0x60280013, // 0030 GETGBL R10 G19
|
||||
0x7C280000, // 0031 CALL R10 0
|
||||
0x502C0000, // 0032 LDBOOL R11 0 0
|
||||
0x982A180B, // 0033 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0034 CALL R8 2
|
||||
0x8C20010D, // 0035 GETMET R8 R0 K13
|
||||
0x7C200200, // 0036 CALL R8 1
|
||||
0x50200200, // 0037 LDBOOL R8 1 0
|
||||
0x80041000, // 0038 RET 1 R8
|
||||
0x7002001B, // 0039 JMP #0056
|
||||
0x1C200F07, // 003A EQ R8 R7 K7
|
||||
0x7822000A, // 003B JMPF R8 #0047
|
||||
0x8C20090B, // 003C GETMET R8 R4 K11
|
||||
0x60280013, // 003D GETGBL R10 G19
|
||||
0x7C280000, // 003E CALL R10 0
|
||||
0x502C0200, // 003F LDBOOL R11 1 0
|
||||
0x982A180B, // 0040 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0041 CALL R8 2
|
||||
0x8C20010D, // 0042 GETMET R8 R0 K13
|
||||
0x7C200200, // 0043 CALL R8 1
|
||||
0x50200200, // 0044 LDBOOL R8 1 0
|
||||
0x80041000, // 0045 RET 1 R8
|
||||
0x7002000E, // 0046 JMP #0056
|
||||
0x1C200F0E, // 0047 EQ R8 R7 K14
|
||||
0x7822000C, // 0048 JMPF R8 #0056
|
||||
0x8C20090B, // 0049 GETMET R8 R4 K11
|
||||
0x60280013, // 004A GETGBL R10 G19
|
||||
0x7C280000, // 004B CALL R10 0
|
||||
0x882C010F, // 004C GETMBR R11 R0 K15
|
||||
0x782E0000, // 004D JMPF R11 #004F
|
||||
0x502C0001, // 004E LDBOOL R11 0 1
|
||||
0x502C0200, // 004F LDBOOL R11 1 0
|
||||
0x982A180B, // 0050 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0051 CALL R8 2
|
||||
0x8C20010D, // 0052 GETMET R8 R0 K13
|
||||
0x7C200200, // 0053 CALL R8 1
|
||||
0x50200200, // 0054 LDBOOL R8 1 0
|
||||
0x80041000, // 0055 RET 1 R8
|
||||
0x80000000, // 0056 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
@ -219,140 +346,13 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_const_int(3),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_const_int(1),
|
||||
/* K8 */ be_nested_str_weak(Matter_TLV_struct),
|
||||
/* K9 */ be_nested_str_weak(add_TLV),
|
||||
/* K10 */ be_nested_str_weak(U2),
|
||||
/* K11 */ be_nested_str_weak(set),
|
||||
/* K12 */ be_nested_str_weak(power),
|
||||
/* K13 */ be_nested_str_weak(update_shadow),
|
||||
/* K14 */ be_const_int(2),
|
||||
/* K15 */ be_nested_str_weak(shadow_onoff),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[87]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x1C200D05, // 0005 EQ R8 R6 K5
|
||||
0x78220016, // 0006 JMPF R8 #001E
|
||||
0x1C200F06, // 0007 EQ R8 R7 K6
|
||||
0x78220002, // 0008 JMPF R8 #000C
|
||||
0x50200200, // 0009 LDBOOL R8 1 0
|
||||
0x80041000, // 000A RET 1 R8
|
||||
0x70020010, // 000B JMP #001D
|
||||
0x1C200F07, // 000C EQ R8 R7 K7
|
||||
0x78220009, // 000D JMPF R8 #0018
|
||||
0x8C200B08, // 000E GETMET R8 R5 K8
|
||||
0x7C200200, // 000F CALL R8 1
|
||||
0x8C241109, // 0010 GETMET R9 R8 K9
|
||||
0x582C0006, // 0011 LDCONST R11 K6
|
||||
0x88300B0A, // 0012 GETMBR R12 R5 K10
|
||||
0x58340006, // 0013 LDCONST R13 K6
|
||||
0x7C240800, // 0014 CALL R9 4
|
||||
0x900E0906, // 0015 SETMBR R3 K4 K6
|
||||
0x80041000, // 0016 RET 1 R8
|
||||
0x70020004, // 0017 JMP #001D
|
||||
0x5422003F, // 0018 LDINT R8 64
|
||||
0x1C200E08, // 0019 EQ R8 R7 R8
|
||||
0x78220001, // 001A JMPF R8 #001D
|
||||
0x50200200, // 001B LDBOOL R8 1 0
|
||||
0x80041000, // 001C RET 1 R8
|
||||
0x70020037, // 001D JMP #0056
|
||||
0x54220003, // 001E LDINT R8 4
|
||||
0x1C200C08, // 001F EQ R8 R6 R8
|
||||
0x78220002, // 0020 JMPF R8 #0024
|
||||
0x50200200, // 0021 LDBOOL R8 1 0
|
||||
0x80041000, // 0022 RET 1 R8
|
||||
0x70020031, // 0023 JMP #0056
|
||||
0x54220004, // 0024 LDINT R8 5
|
||||
0x1C200C08, // 0025 EQ R8 R6 R8
|
||||
0x78220002, // 0026 JMPF R8 #002A
|
||||
0x50200200, // 0027 LDBOOL R8 1 0
|
||||
0x80041000, // 0028 RET 1 R8
|
||||
0x7002002B, // 0029 JMP #0056
|
||||
0x54220005, // 002A LDINT R8 6
|
||||
0x1C200C08, // 002B EQ R8 R6 R8
|
||||
0x78220028, // 002C JMPF R8 #0056
|
||||
0x1C200F06, // 002D EQ R8 R7 K6
|
||||
0x7822000A, // 002E JMPF R8 #003A
|
||||
0x8C20090B, // 002F GETMET R8 R4 K11
|
||||
0x60280013, // 0030 GETGBL R10 G19
|
||||
0x7C280000, // 0031 CALL R10 0
|
||||
0x502C0000, // 0032 LDBOOL R11 0 0
|
||||
0x982A180B, // 0033 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0034 CALL R8 2
|
||||
0x8C20010D, // 0035 GETMET R8 R0 K13
|
||||
0x7C200200, // 0036 CALL R8 1
|
||||
0x50200200, // 0037 LDBOOL R8 1 0
|
||||
0x80041000, // 0038 RET 1 R8
|
||||
0x7002001B, // 0039 JMP #0056
|
||||
0x1C200F07, // 003A EQ R8 R7 K7
|
||||
0x7822000A, // 003B JMPF R8 #0047
|
||||
0x8C20090B, // 003C GETMET R8 R4 K11
|
||||
0x60280013, // 003D GETGBL R10 G19
|
||||
0x7C280000, // 003E CALL R10 0
|
||||
0x502C0200, // 003F LDBOOL R11 1 0
|
||||
0x982A180B, // 0040 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0041 CALL R8 2
|
||||
0x8C20010D, // 0042 GETMET R8 R0 K13
|
||||
0x7C200200, // 0043 CALL R8 1
|
||||
0x50200200, // 0044 LDBOOL R8 1 0
|
||||
0x80041000, // 0045 RET 1 R8
|
||||
0x7002000E, // 0046 JMP #0056
|
||||
0x1C200F0E, // 0047 EQ R8 R7 K14
|
||||
0x7822000C, // 0048 JMPF R8 #0056
|
||||
0x8C20090B, // 0049 GETMET R8 R4 K11
|
||||
0x60280013, // 004A GETGBL R10 G19
|
||||
0x7C280000, // 004B CALL R10 0
|
||||
0x882C010F, // 004C GETMBR R11 R0 K15
|
||||
0x782E0000, // 004D JMPF R11 #004F
|
||||
0x502C0001, // 004E LDBOOL R11 0 1
|
||||
0x502C0200, // 004F LDBOOL R11 1 0
|
||||
0x982A180B, // 0050 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0051 CALL R8 2
|
||||
0x8C20010D, // 0052 GETMET R8 R0 K13
|
||||
0x7C200200, // 0053 CALL R8 1
|
||||
0x50200200, // 0054 LDBOOL R8 1 0
|
||||
0x80041000, // 0055 RET 1 R8
|
||||
0x80000000, // 0056 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light0_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
@ -365,17 +365,18 @@ be_local_closure(Matter_Plugin_Light0_init, /* name */
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0x600C0003, // 0000 GETGBL R3 G3
|
||||
0x5C100000, // 0001 MOVE R4 R0
|
||||
0x7C0C0200, // 0002 CALL R3 1
|
||||
0x8C0C0700, // 0003 GETMET R3 R3 K0
|
||||
0x5C140200, // 0004 MOVE R5 R1
|
||||
0x5C180400, // 0005 MOVE R6 R2
|
||||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x500C0000, // 0007 LDBOOL R3 0 0
|
||||
0x90020203, // 0008 SETMBR R0 K1 R3
|
||||
0x80000000, // 0009 RET 0
|
||||
( &(const binstruction[11]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x50100000, // 0008 LDBOOL R4 0 0
|
||||
0x90020204, // 0009 SETMBR R0 K1 R4
|
||||
0x80000000, // 000A RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -389,11 +390,11 @@ extern const bclass be_class_Matter_Plugin;
|
||||
be_local_class(Matter_Plugin_Light0,
|
||||
1,
|
||||
&be_class_Matter_Plugin,
|
||||
be_nested_map(7,
|
||||
be_nested_map(8,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_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_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, {
|
||||
@ -431,14 +432,15 @@ 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(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(invoke_request, 2), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
|
||||
{ be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Light0)
|
||||
);
|
||||
|
@ -6,6 +6,158 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Light1;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light1_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(shadow_bri),
|
||||
/* K2 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x90020302, // 0008 SETMBR R0 K1 K2
|
||||
0x80000000, // 0009 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(create_TLV),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(shadow_bri),
|
||||
/* K9 */ be_const_int(2),
|
||||
/* K10 */ be_const_int(3),
|
||||
/* K11 */ be_nested_str_weak(U4),
|
||||
/* K12 */ be_const_int(1),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[77]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0007, // 0005 LDINT R7 8
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E003B, // 0007 JMPF R7 #0044
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0005, // 0009 JMPF R7 #0010
|
||||
0x8C1C0906, // 000A GETMET R7 R4 K6
|
||||
0x88240907, // 000B GETMBR R9 R4 K7
|
||||
0x88280108, // 000C GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 000D CALL R7 3
|
||||
0x80040E00, // 000E RET 1 R7
|
||||
0x70020032, // 000F JMP #0043
|
||||
0x1C1C0D09, // 0010 EQ R7 R6 K9
|
||||
0x781E0005, // 0011 JMPF R7 #0018
|
||||
0x8C1C0906, // 0012 GETMET R7 R4 K6
|
||||
0x88240907, // 0013 GETMBR R9 R4 K7
|
||||
0x58280005, // 0014 LDCONST R10 K5
|
||||
0x7C1C0600, // 0015 CALL R7 3
|
||||
0x80040E00, // 0016 RET 1 R7
|
||||
0x7002002A, // 0017 JMP #0043
|
||||
0x1C1C0D0A, // 0018 EQ R7 R6 K10
|
||||
0x781E0005, // 0019 JMPF R7 #0020
|
||||
0x8C1C0906, // 001A GETMET R7 R4 K6
|
||||
0x88240907, // 001B GETMBR R9 R4 K7
|
||||
0x542A00FD, // 001C LDINT R10 254
|
||||
0x7C1C0600, // 001D CALL R7 3
|
||||
0x80040E00, // 001E RET 1 R7
|
||||
0x70020022, // 001F JMP #0043
|
||||
0x541E000E, // 0020 LDINT R7 15
|
||||
0x1C1C0C07, // 0021 EQ R7 R6 R7
|
||||
0x781E0005, // 0022 JMPF R7 #0029
|
||||
0x8C1C0906, // 0023 GETMET R7 R4 K6
|
||||
0x88240907, // 0024 GETMBR R9 R4 K7
|
||||
0x58280005, // 0025 LDCONST R10 K5
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020019, // 0028 JMP #0043
|
||||
0x541E0010, // 0029 LDINT R7 17
|
||||
0x1C1C0C07, // 002A EQ R7 R6 R7
|
||||
0x781E0005, // 002B JMPF R7 #0032
|
||||
0x8C1C0906, // 002C GETMET R7 R4 K6
|
||||
0x88240907, // 002D GETMBR R9 R4 K7
|
||||
0x88280108, // 002E GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 002F CALL R7 3
|
||||
0x80040E00, // 0030 RET 1 R7
|
||||
0x70020010, // 0031 JMP #0043
|
||||
0x541EFFFB, // 0032 LDINT R7 65532
|
||||
0x1C1C0C07, // 0033 EQ R7 R6 R7
|
||||
0x781E0005, // 0034 JMPF R7 #003B
|
||||
0x8C1C0906, // 0035 GETMET R7 R4 K6
|
||||
0x8824090B, // 0036 GETMBR R9 R4 K11
|
||||
0x5828000C, // 0037 LDCONST R10 K12
|
||||
0x7C1C0600, // 0038 CALL R7 3
|
||||
0x80040E00, // 0039 RET 1 R7
|
||||
0x70020007, // 003A JMP #0043
|
||||
0x541EFFFC, // 003B LDINT R7 65533
|
||||
0x1C1C0C07, // 003C EQ R7 R6 R7
|
||||
0x781E0004, // 003D JMPF R7 #0043
|
||||
0x8C1C0906, // 003E GETMET R7 R4 K6
|
||||
0x8824090B, // 003F GETMBR R9 R4 K11
|
||||
0x542A0004, // 0040 LDINT R10 5
|
||||
0x7C1C0600, // 0041 CALL R7 3
|
||||
0x80040E00, // 0042 RET 1 R7
|
||||
0x70020007, // 0043 JMP #004C
|
||||
0x601C0003, // 0044 GETGBL R7 G3
|
||||
0x5C200000, // 0045 MOVE R8 R0
|
||||
0x7C1C0200, // 0046 CALL R7 1
|
||||
0x8C1C0F0D, // 0047 GETMET R7 R7 K13
|
||||
0x5C240200, // 0048 MOVE R9 R1
|
||||
0x5C280400, // 0049 MOVE R10 R2
|
||||
0x7C1C0600, // 004A CALL R7 3
|
||||
0x80040E00, // 004B RET 1 R7
|
||||
0x80000000, // 004C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
@ -229,157 +381,6 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light1_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(shadow_bri),
|
||||
/* K2 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0x600C0003, // 0000 GETGBL R3 G3
|
||||
0x5C100000, // 0001 MOVE R4 R0
|
||||
0x7C0C0200, // 0002 CALL R3 1
|
||||
0x8C0C0700, // 0003 GETMET R3 R3 K0
|
||||
0x5C140200, // 0004 MOVE R5 R1
|
||||
0x5C180400, // 0005 MOVE R6 R2
|
||||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x90020302, // 0007 SETMBR R0 K1 K2
|
||||
0x80000000, // 0008 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(create_TLV),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(shadow_bri),
|
||||
/* K9 */ be_const_int(2),
|
||||
/* K10 */ be_const_int(3),
|
||||
/* K11 */ be_nested_str_weak(U4),
|
||||
/* K12 */ be_const_int(1),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[77]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0007, // 0005 LDINT R7 8
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E003B, // 0007 JMPF R7 #0044
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0005, // 0009 JMPF R7 #0010
|
||||
0x8C1C0906, // 000A GETMET R7 R4 K6
|
||||
0x88240907, // 000B GETMBR R9 R4 K7
|
||||
0x88280108, // 000C GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 000D CALL R7 3
|
||||
0x80040E00, // 000E RET 1 R7
|
||||
0x70020032, // 000F JMP #0043
|
||||
0x1C1C0D09, // 0010 EQ R7 R6 K9
|
||||
0x781E0005, // 0011 JMPF R7 #0018
|
||||
0x8C1C0906, // 0012 GETMET R7 R4 K6
|
||||
0x88240907, // 0013 GETMBR R9 R4 K7
|
||||
0x58280005, // 0014 LDCONST R10 K5
|
||||
0x7C1C0600, // 0015 CALL R7 3
|
||||
0x80040E00, // 0016 RET 1 R7
|
||||
0x7002002A, // 0017 JMP #0043
|
||||
0x1C1C0D0A, // 0018 EQ R7 R6 K10
|
||||
0x781E0005, // 0019 JMPF R7 #0020
|
||||
0x8C1C0906, // 001A GETMET R7 R4 K6
|
||||
0x88240907, // 001B GETMBR R9 R4 K7
|
||||
0x542A00FD, // 001C LDINT R10 254
|
||||
0x7C1C0600, // 001D CALL R7 3
|
||||
0x80040E00, // 001E RET 1 R7
|
||||
0x70020022, // 001F JMP #0043
|
||||
0x541E000E, // 0020 LDINT R7 15
|
||||
0x1C1C0C07, // 0021 EQ R7 R6 R7
|
||||
0x781E0005, // 0022 JMPF R7 #0029
|
||||
0x8C1C0906, // 0023 GETMET R7 R4 K6
|
||||
0x88240907, // 0024 GETMBR R9 R4 K7
|
||||
0x58280005, // 0025 LDCONST R10 K5
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020019, // 0028 JMP #0043
|
||||
0x541E0010, // 0029 LDINT R7 17
|
||||
0x1C1C0C07, // 002A EQ R7 R6 R7
|
||||
0x781E0005, // 002B JMPF R7 #0032
|
||||
0x8C1C0906, // 002C GETMET R7 R4 K6
|
||||
0x88240907, // 002D GETMBR R9 R4 K7
|
||||
0x88280108, // 002E GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 002F CALL R7 3
|
||||
0x80040E00, // 0030 RET 1 R7
|
||||
0x70020010, // 0031 JMP #0043
|
||||
0x541EFFFB, // 0032 LDINT R7 65532
|
||||
0x1C1C0C07, // 0033 EQ R7 R6 R7
|
||||
0x781E0005, // 0034 JMPF R7 #003B
|
||||
0x8C1C0906, // 0035 GETMET R7 R4 K6
|
||||
0x8824090B, // 0036 GETMBR R9 R4 K11
|
||||
0x5828000C, // 0037 LDCONST R10 K12
|
||||
0x7C1C0600, // 0038 CALL R7 3
|
||||
0x80040E00, // 0039 RET 1 R7
|
||||
0x70020007, // 003A JMP #0043
|
||||
0x541EFFFC, // 003B LDINT R7 65533
|
||||
0x1C1C0C07, // 003C EQ R7 R6 R7
|
||||
0x781E0004, // 003D JMPF R7 #0043
|
||||
0x8C1C0906, // 003E GETMET R7 R4 K6
|
||||
0x8824090B, // 003F GETMBR R9 R4 K11
|
||||
0x542A0004, // 0040 LDINT R10 5
|
||||
0x7C1C0600, // 0041 CALL R7 3
|
||||
0x80040E00, // 0042 RET 1 R7
|
||||
0x70020007, // 0043 JMP #004C
|
||||
0x601C0003, // 0044 GETGBL R7 G3
|
||||
0x5C200000, // 0045 MOVE R8 R0
|
||||
0x7C1C0200, // 0046 CALL R7 1
|
||||
0x8C1C0F0D, // 0047 GETMET R7 R7 K13
|
||||
0x5C240200, // 0048 MOVE R9 R1
|
||||
0x5C280400, // 0049 MOVE R10 R2
|
||||
0x7C1C0600, // 004A CALL R7 3
|
||||
0x80040E00, // 004B RET 1 R7
|
||||
0x80000000, // 004C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Light1
|
||||
********************************************************************/
|
||||
@ -387,19 +388,15 @@ extern const bclass be_class_Matter_Plugin_Light0;
|
||||
be_local_class(Matter_Plugin_Light1,
|
||||
1,
|
||||
&be_class_Matter_Plugin_Light0,
|
||||
be_nested_map(7,
|
||||
be_nested_map(8,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
|
||||
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
|
||||
{ be_const_key_weak(shadow_bri, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(257, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(update_shadow, 6), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(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_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, {
|
||||
@ -414,6 +411,11 @@ 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_str_weak(Matter_Plugin_Light1)
|
||||
);
|
||||
|
@ -6,206 +6,6 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Light2;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_nested_str_weak(create_TLV),
|
||||
/* K6 */ be_nested_str_weak(U1),
|
||||
/* K7 */ be_nested_str_weak(shadow_ct),
|
||||
/* K8 */ be_const_int(2),
|
||||
/* K9 */ be_const_int(0),
|
||||
/* K10 */ be_nested_str_weak(ct_min),
|
||||
/* K11 */ be_nested_str_weak(ct_max),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[80]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E02FF, // 0005 LDINT R7 768
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E003E, // 0007 JMPF R7 #0047
|
||||
0x541E0006, // 0008 LDINT R7 7
|
||||
0x1C1C0C07, // 0009 EQ R7 R6 R7
|
||||
0x781E0005, // 000A JMPF R7 #0011
|
||||
0x8C1C0905, // 000B GETMET R7 R4 K5
|
||||
0x88240906, // 000C GETMBR R9 R4 K6
|
||||
0x88280107, // 000D GETMBR R10 R0 K7
|
||||
0x7C1C0600, // 000E CALL R7 3
|
||||
0x80040E00, // 000F RET 1 R7
|
||||
0x70020034, // 0010 JMP #0046
|
||||
0x541E0007, // 0011 LDINT R7 8
|
||||
0x1C1C0C07, // 0012 EQ R7 R6 R7
|
||||
0x781E0005, // 0013 JMPF R7 #001A
|
||||
0x8C1C0905, // 0014 GETMET R7 R4 K5
|
||||
0x88240906, // 0015 GETMBR R9 R4 K6
|
||||
0x58280008, // 0016 LDCONST R10 K8
|
||||
0x7C1C0600, // 0017 CALL R7 3
|
||||
0x80040E00, // 0018 RET 1 R7
|
||||
0x7002002B, // 0019 JMP #0046
|
||||
0x541E000E, // 001A LDINT R7 15
|
||||
0x1C1C0C07, // 001B EQ R7 R6 R7
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0905, // 001D GETMET R7 R4 K5
|
||||
0x88240906, // 001E GETMBR R9 R4 K6
|
||||
0x58280009, // 001F LDCONST R10 K9
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020022, // 0022 JMP #0046
|
||||
0x541E400A, // 0023 LDINT R7 16395
|
||||
0x1C1C0C07, // 0024 EQ R7 R6 R7
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0905, // 0026 GETMET R7 R4 K5
|
||||
0x88240906, // 0027 GETMBR R9 R4 K6
|
||||
0x8828010A, // 0028 GETMBR R10 R0 K10
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020019, // 002B JMP #0046
|
||||
0x541E400B, // 002C LDINT R7 16396
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0905, // 002F GETMET R7 R4 K5
|
||||
0x88240906, // 0030 GETMBR R9 R4 K6
|
||||
0x8828010B, // 0031 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x70020010, // 0034 JMP #0046
|
||||
0x541EFFFB, // 0035 LDINT R7 65532
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0005, // 0037 JMPF R7 #003E
|
||||
0x8C1C0905, // 0038 GETMET R7 R4 K5
|
||||
0x8824090C, // 0039 GETMBR R9 R4 K12
|
||||
0x542A000F, // 003A LDINT R10 16
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020007, // 003D JMP #0046
|
||||
0x541EFFFC, // 003E LDINT R7 65533
|
||||
0x1C1C0C07, // 003F EQ R7 R6 R7
|
||||
0x781E0004, // 0040 JMPF R7 #0046
|
||||
0x8C1C0905, // 0041 GETMET R7 R4 K5
|
||||
0x8824090C, // 0042 GETMBR R9 R4 K12
|
||||
0x542A0004, // 0043 LDINT R10 5
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x70020007, // 0046 JMP #004F
|
||||
0x601C0003, // 0047 GETGBL R7 G3
|
||||
0x5C200000, // 0048 MOVE R8 R0
|
||||
0x7C1C0200, // 0049 CALL R7 1
|
||||
0x8C1C0F0D, // 004A GETMET R7 R7 K13
|
||||
0x5C240200, // 004B MOVE R9 R1
|
||||
0x5C280400, // 004C MOVE R10 R2
|
||||
0x7C1C0600, // 004D CALL R7 3
|
||||
0x80040E00, // 004E RET 1 R7
|
||||
0x80000000, // 004F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(shadow_ct),
|
||||
/* K2 */ be_nested_str_weak(update_ct_minmax),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x600C0003, // 0000 GETGBL R3 G3
|
||||
0x5C100000, // 0001 MOVE R4 R0
|
||||
0x7C0C0200, // 0002 CALL R3 1
|
||||
0x8C0C0700, // 0003 GETMET R3 R3 K0
|
||||
0x5C140200, // 0004 MOVE R5 R1
|
||||
0x5C180400, // 0005 MOVE R6 R2
|
||||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x540E0144, // 0007 LDINT R3 325
|
||||
0x90020203, // 0008 SETMBR R0 K1 R3
|
||||
0x8C0C0102, // 0009 GETMET R3 R0 K2
|
||||
0x7C0C0200, // 000A CALL R3 1
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: update_ct_minmax
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(get_option),
|
||||
/* K2 */ be_nested_str_weak(ct_min),
|
||||
/* K3 */ be_nested_str_weak(ct_max),
|
||||
}),
|
||||
be_str_weak(update_ct_minmax),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x540E0051, // 0002 LDINT R3 82
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x78060001, // 0004 JMPF R1 #0007
|
||||
0x540A00C7, // 0005 LDINT R2 200
|
||||
0x70020000, // 0006 JMP #0008
|
||||
0x540A0098, // 0007 LDINT R2 153
|
||||
0x90020402, // 0008 SETMBR R0 K2 R2
|
||||
0x78060001, // 0009 JMPF R1 #000C
|
||||
0x540A017B, // 000A LDINT R2 380
|
||||
0x70020000, // 000B JMP #000D
|
||||
0x540A01F3, // 000C LDINT R2 500
|
||||
0x90020602, // 000D SETMBR R0 K3 R2
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
@ -370,6 +170,207 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_nested_str_weak(create_TLV),
|
||||
/* K6 */ be_nested_str_weak(U1),
|
||||
/* K7 */ be_nested_str_weak(shadow_ct),
|
||||
/* K8 */ be_const_int(2),
|
||||
/* K9 */ be_const_int(0),
|
||||
/* K10 */ be_nested_str_weak(ct_min),
|
||||
/* K11 */ be_nested_str_weak(ct_max),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[80]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E02FF, // 0005 LDINT R7 768
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E003E, // 0007 JMPF R7 #0047
|
||||
0x541E0006, // 0008 LDINT R7 7
|
||||
0x1C1C0C07, // 0009 EQ R7 R6 R7
|
||||
0x781E0005, // 000A JMPF R7 #0011
|
||||
0x8C1C0905, // 000B GETMET R7 R4 K5
|
||||
0x88240906, // 000C GETMBR R9 R4 K6
|
||||
0x88280107, // 000D GETMBR R10 R0 K7
|
||||
0x7C1C0600, // 000E CALL R7 3
|
||||
0x80040E00, // 000F RET 1 R7
|
||||
0x70020034, // 0010 JMP #0046
|
||||
0x541E0007, // 0011 LDINT R7 8
|
||||
0x1C1C0C07, // 0012 EQ R7 R6 R7
|
||||
0x781E0005, // 0013 JMPF R7 #001A
|
||||
0x8C1C0905, // 0014 GETMET R7 R4 K5
|
||||
0x88240906, // 0015 GETMBR R9 R4 K6
|
||||
0x58280008, // 0016 LDCONST R10 K8
|
||||
0x7C1C0600, // 0017 CALL R7 3
|
||||
0x80040E00, // 0018 RET 1 R7
|
||||
0x7002002B, // 0019 JMP #0046
|
||||
0x541E000E, // 001A LDINT R7 15
|
||||
0x1C1C0C07, // 001B EQ R7 R6 R7
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0905, // 001D GETMET R7 R4 K5
|
||||
0x88240906, // 001E GETMBR R9 R4 K6
|
||||
0x58280009, // 001F LDCONST R10 K9
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020022, // 0022 JMP #0046
|
||||
0x541E400A, // 0023 LDINT R7 16395
|
||||
0x1C1C0C07, // 0024 EQ R7 R6 R7
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0905, // 0026 GETMET R7 R4 K5
|
||||
0x88240906, // 0027 GETMBR R9 R4 K6
|
||||
0x8828010A, // 0028 GETMBR R10 R0 K10
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020019, // 002B JMP #0046
|
||||
0x541E400B, // 002C LDINT R7 16396
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0905, // 002F GETMET R7 R4 K5
|
||||
0x88240906, // 0030 GETMBR R9 R4 K6
|
||||
0x8828010B, // 0031 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x70020010, // 0034 JMP #0046
|
||||
0x541EFFFB, // 0035 LDINT R7 65532
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0005, // 0037 JMPF R7 #003E
|
||||
0x8C1C0905, // 0038 GETMET R7 R4 K5
|
||||
0x8824090C, // 0039 GETMBR R9 R4 K12
|
||||
0x542A000F, // 003A LDINT R10 16
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020007, // 003D JMP #0046
|
||||
0x541EFFFC, // 003E LDINT R7 65533
|
||||
0x1C1C0C07, // 003F EQ R7 R6 R7
|
||||
0x781E0004, // 0040 JMPF R7 #0046
|
||||
0x8C1C0905, // 0041 GETMET R7 R4 K5
|
||||
0x8824090C, // 0042 GETMBR R9 R4 K12
|
||||
0x542A0004, // 0043 LDINT R10 5
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x70020007, // 0046 JMP #004F
|
||||
0x601C0003, // 0047 GETGBL R7 G3
|
||||
0x5C200000, // 0048 MOVE R8 R0
|
||||
0x7C1C0200, // 0049 CALL R7 1
|
||||
0x8C1C0F0D, // 004A GETMET R7 R7 K13
|
||||
0x5C240200, // 004B MOVE R9 R1
|
||||
0x5C280400, // 004C MOVE R10 R2
|
||||
0x7C1C0600, // 004D CALL R7 3
|
||||
0x80040E00, // 004E RET 1 R7
|
||||
0x80000000, // 004F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_init, /* name */
|
||||
be_nested_proto(
|
||||
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_ct),
|
||||
/* K2 */ be_nested_str_weak(update_ct_minmax),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[13]) { /* 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
|
||||
0x54120144, // 0008 LDINT R4 325
|
||||
0x90020204, // 0009 SETMBR R0 K1 R4
|
||||
0x8C100102, // 000A GETMET R4 R0 K2
|
||||
0x7C100200, // 000B CALL R4 1
|
||||
0x80000000, // 000C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: update_ct_minmax
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(get_option),
|
||||
/* K2 */ be_nested_str_weak(ct_min),
|
||||
/* K3 */ be_nested_str_weak(ct_max),
|
||||
}),
|
||||
be_str_weak(update_ct_minmax),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x540E0051, // 0002 LDINT R3 82
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x78060001, // 0004 JMPF R1 #0007
|
||||
0x540A00C7, // 0005 LDINT R2 200
|
||||
0x70020000, // 0006 JMP #0008
|
||||
0x540A0098, // 0007 LDINT R2 153
|
||||
0x90020402, // 0008 SETMBR R0 K2 R2
|
||||
0x78060001, // 0009 JMPF R1 #000C
|
||||
0x540A017B, // 000A LDINT R2 380
|
||||
0x70020000, // 000B JMP #000D
|
||||
0x540A01F3, // 000C LDINT R2 500
|
||||
0x90020602, // 000D SETMBR R0 K3 R2
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Light2
|
||||
********************************************************************/
|
||||
@ -377,17 +378,19 @@ extern const bclass be_class_Matter_Plugin_Light1;
|
||||
be_local_class(Matter_Plugin_Light2,
|
||||
3,
|
||||
&be_class_Matter_Plugin_Light1,
|
||||
be_nested_map(10,
|
||||
be_nested_map(11,
|
||||
( (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(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(268, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
|
||||
{ be_const_key_weak(ct_min, 8), be_const_var(1) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_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_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, {
|
||||
@ -402,11 +405,10 @@ be_local_class(Matter_Plugin_Light2,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
|
||||
{ be_const_key_weak(update_ct_minmax, 6), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
|
||||
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
|
||||
{ be_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_str_weak(Matter_Plugin_Light2)
|
||||
);
|
||||
|
@ -6,186 +6,6 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Light3;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light3_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 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[10]) { /* code */
|
||||
0x600C0003, // 0000 GETGBL R3 G3
|
||||
0x5C100000, // 0001 MOVE R4 R0
|
||||
0x7C0C0200, // 0002 CALL R3 1
|
||||
0x8C0C0700, // 0003 GETMET R3 R3 K0
|
||||
0x5C140200, // 0004 MOVE R5 R1
|
||||
0x5C180400, // 0005 MOVE R6 R2
|
||||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x90020302, // 0007 SETMBR R0 K1 K2
|
||||
0x90020702, // 0008 SETMBR R0 K3 K2
|
||||
0x80000000, // 0009 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** 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: invoke_request
|
||||
********************************************************************/
|
||||
@ -379,6 +199,148 @@ 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
|
||||
********************************************************************/
|
||||
@ -479,6 +441,45 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** 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
|
||||
********************************************************************/
|
||||
@ -486,9 +487,21 @@ extern const bclass be_class_Matter_Plugin_Light1;
|
||||
be_local_class(Matter_Plugin_Light3,
|
||||
2,
|
||||
&be_class_Matter_Plugin_Light1,
|
||||
be_nested_map(8,
|
||||
be_nested_map(9,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ 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(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[]) {
|
||||
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
@ -505,17 +518,6 @@ be_local_class(Matter_Plugin_Light3,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
|
||||
{ be_const_key_weak(TYPES, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(269, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Light3_init_closure) },
|
||||
{ be_const_key_weak(shadow_hue, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
|
||||
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Light3)
|
||||
);
|
||||
|
@ -6,6 +6,101 @@
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_OnOff;
|
||||
|
||||
/********************************************************************
|
||||
** 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
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** 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
|
||||
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: invoke_request
|
||||
********************************************************************/
|
||||
@ -163,56 +258,49 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** 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(relay),
|
||||
/* 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
|
||||
( &(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
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -252,9 +340,9 @@ be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_onoff
|
||||
** Solidified function: to_json_parameters
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
|
||||
be_local_closure(Matter_Plugin_OnOff_to_json_parameters, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
@ -265,24 +353,49 @@ be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
|
||||
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),
|
||||
/* 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),
|
||||
}),
|
||||
be_str_weak(set_onoff),
|
||||
be_str_weak(to_json_parameters),
|
||||
&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
|
||||
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
|
||||
( &(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: every_second
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_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(get_onoff),
|
||||
}),
|
||||
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
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -502,77 +615,6 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_init, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(get_onoff),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str_weak(tasmota_relay_index),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* 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
|
||||
0x7C100600, // 0006 CALL R4 3
|
||||
0x8C100101, // 0007 GETMET R4 R0 K1
|
||||
0x7C100200, // 0008 CALL R4 1
|
||||
0x4C100000, // 0009 LDNIL R4
|
||||
0x1C100604, // 000A EQ R4 R3 R4
|
||||
0x78120000, // 000B JMPF R4 #000D
|
||||
0x580C0002, // 000C LDCONST R3 K2
|
||||
0x90020603, // 000D SETMBR R0 K3 R3
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_second
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_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(get_onoff),
|
||||
}),
|
||||
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 class: Matter_Plugin_OnOff
|
||||
********************************************************************/
|
||||
@ -580,18 +622,18 @@ extern const bclass be_class_Matter_Plugin;
|
||||
be_local_class(Matter_Plugin_OnOff,
|
||||
2,
|
||||
&be_class_Matter_Plugin,
|
||||
be_nested_map(11,
|
||||
be_nested_map(13,
|
||||
( (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(get_onoff, 8), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
|
||||
{ be_const_key_weak(shadow_onoff, 5), be_const_var(1) },
|
||||
{ be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(266, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
|
||||
{ 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_map( * be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
@ -630,10 +672,12 @@ be_local_class(Matter_Plugin_OnOff,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
|
||||
{ be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
|
||||
{ be_const_key_weak(tasmota_relay_index, 2), be_const_var(0) },
|
||||
{ be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
|
||||
{ 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_str_weak(Matter_Plugin_OnOff)
|
||||
);
|
||||
|
@ -1151,8 +1151,8 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Root_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
@ -1164,15 +1164,16 @@ be_local_closure(Matter_Plugin_Root_init, /* name */
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 8]) { /* code */
|
||||
0x600C0003, // 0000 GETGBL R3 G3
|
||||
0x5C100000, // 0001 MOVE R4 R0
|
||||
0x7C0C0200, // 0002 CALL R3 1
|
||||
0x8C0C0700, // 0003 GETMET R3 R3 K0
|
||||
0x5C140200, // 0004 MOVE R5 R1
|
||||
0x5C180400, // 0005 MOVE R6 R2
|
||||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x80000000, // 0007 RET 0
|
||||
( &(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
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -2073,15 +2074,17 @@ extern const bclass be_class_Matter_Plugin;
|
||||
be_local_class(Matter_Plugin_Root,
|
||||
0,
|
||||
&be_class_Matter_Plugin,
|
||||
be_nested_map(6,
|
||||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
|
||||
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_Root_write_attribute_closure) },
|
||||
{ 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(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_map( * be_nested_map(13,
|
||||
@ -2186,7 +2189,6 @@ be_local_class(Matter_Plugin_Root,
|
||||
be_const_int(8),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Root)
|
||||
);
|
||||
|
@ -30,6 +30,118 @@ be_local_closure(Matter_Plugin_Sensor_pre_value, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(tasmota_sensor_filter),
|
||||
/* K2 */ be_nested_str_weak(find),
|
||||
/* K3 */ be_nested_str_weak(filter),
|
||||
/* K4 */ be_nested_str_weak(tasmota_sensor_matcher),
|
||||
/* K5 */ be_nested_str_weak(tasmota),
|
||||
/* K6 */ be_nested_str_weak(Rule_Matcher),
|
||||
/* K7 */ be_nested_str_weak(parse),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x8C100702, // 0008 GETMET R4 R3 K2
|
||||
0x58180003, // 0009 LDCONST R6 K3
|
||||
0x7C100400, // 000A CALL R4 2
|
||||
0x90020204, // 000B SETMBR R0 K1 R4
|
||||
0x88100101, // 000C GETMBR R4 R0 K1
|
||||
0x78120005, // 000D JMPF R4 #0014
|
||||
0xB8120A00, // 000E GETNGBL R4 K5
|
||||
0x88100906, // 000F GETMBR R4 R4 K6
|
||||
0x8C100907, // 0010 GETMET R4 R4 K7
|
||||
0x88180101, // 0011 GETMBR R6 R0 K1
|
||||
0x7C100400, // 0012 CALL R4 2
|
||||
0x90020804, // 0013 SETMBR R0 K4 R4
|
||||
0x80000000, // 0014 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: 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
|
||||
********************************************************************/
|
||||
@ -80,75 +192,6 @@ 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 function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_init, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(tasmota_sensor_filter),
|
||||
/* K2 */ be_nested_str_weak(tasmota_sensor_matcher),
|
||||
/* K3 */ be_nested_str_weak(tasmota),
|
||||
/* K4 */ be_nested_str_weak(Rule_Matcher),
|
||||
/* K5 */ be_nested_str_weak(parse),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* 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
|
||||
0x7C100600, // 0006 CALL R4 3
|
||||
0x90020203, // 0007 SETMBR R0 K1 R3
|
||||
0xB8120600, // 0008 GETNGBL R4 K3
|
||||
0x88100904, // 0009 GETMBR R4 R4 K4
|
||||
0x8C100905, // 000A GETMET R4 R4 K5
|
||||
0x5C180600, // 000B MOVE R6 R3
|
||||
0x7C100400, // 000C CALL R4 2
|
||||
0x90020404, // 000D SETMBR R0 K2 R4
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor
|
||||
********************************************************************/
|
||||
@ -156,15 +199,16 @@ extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_Sensor,
|
||||
3,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(7,
|
||||
be_nested_map(8,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(pre_value, 2), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
|
||||
{ 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_filter, 3), be_const_var(0) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
|
||||
{ be_const_key_weak(valued_changed, 0), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
|
||||
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor)
|
||||
);
|
||||
|
@ -6,6 +6,34 @@
|
||||
|
||||
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
|
||||
********************************************************************/
|
||||
@ -38,34 +66,6 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* 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: read_attribute
|
||||
********************************************************************/
|
||||
@ -183,16 +183,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
|
||||
be_local_class(Matter_Plugin_Sensor_Humidity,
|
||||
0,
|
||||
&be_class_Matter_Plugin_Sensor,
|
||||
be_nested_map(5,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
|
||||
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
|
||||
{ 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, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ 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(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,6 +206,7 @@ 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_str_weak(Matter_Plugin_Sensor_Humidity)
|
||||
);
|
||||
|
@ -1,15 +1,42 @@
|
||||
/* Solidification of Matter_Plugin_Sensor_Light.h */
|
||||
/* Solidification of Matter_Plugin_Sensor_Illuminance.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Light;
|
||||
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_Light_valued_changed, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
@ -38,37 +65,10 @@ be_local_closure(Matter_Plugin_Sensor_Light_valued_changed, /* name */
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: pre_value
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Light_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: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Light_read_attribute, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_Illuminance_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
3, /* argc */
|
||||
@ -176,22 +176,22 @@ be_local_closure(Matter_Plugin_Sensor_Light_read_attribute, /* name */
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor_Light
|
||||
** Solidified class: Matter_Plugin_Sensor_Illuminance
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor;
|
||||
be_local_class(Matter_Plugin_Sensor_Light,
|
||||
be_local_class(Matter_Plugin_Sensor_Illuminance,
|
||||
0,
|
||||
&be_class_Matter_Plugin_Sensor,
|
||||
be_nested_map(5,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Light_valued_changed_closure) },
|
||||
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Light_pre_value_closure) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Light_read_attribute_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ 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(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,14 +205,15 @@ be_local_class(Matter_Plugin_Sensor_Light,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Light)
|
||||
be_str_weak(Matter_Plugin_Sensor_Illuminance)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Sensor_Light_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Light);
|
||||
be_setglobal(vm, "Matter_Plugin_Sensor_Light");
|
||||
void be_load_Matter_Plugin_Sensor_Illuminance_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Illuminance);
|
||||
be_setglobal(vm, "Matter_Plugin_Sensor_Illuminance");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
@ -6,6 +6,33 @@
|
||||
|
||||
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
|
||||
********************************************************************/
|
||||
@ -38,33 +65,6 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* 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: read_attribute
|
||||
********************************************************************/
|
||||
@ -182,16 +182,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
|
||||
be_local_class(Matter_Plugin_Sensor_Pressure,
|
||||
0,
|
||||
&be_class_Matter_Plugin_Sensor,
|
||||
be_nested_map(5,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
|
||||
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
|
||||
{ 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, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ 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(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,6 +205,7 @@ 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_str_weak(Matter_Plugin_Sensor_Pressure)
|
||||
);
|
||||
|
@ -6,6 +6,34 @@
|
||||
|
||||
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
|
||||
********************************************************************/
|
||||
@ -38,34 +66,6 @@ be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* 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: read_attribute
|
||||
********************************************************************/
|
||||
@ -180,27 +180,30 @@ extern const bclass be_class_Matter_Plugin_Sensor;
|
||||
be_local_class(Matter_Plugin_Sensor_Temp,
|
||||
0,
|
||||
&be_class_Matter_Plugin_Sensor,
|
||||
be_nested_map(5,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
|
||||
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
|
||||
{ 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, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ 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(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(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(3,
|
||||
be_const_list( * be_nested_list(5,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Temp)
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user