mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-16 15:26:29 +00:00
Matter add sensors: Humidity, Pressure, Illuminance; optimize memory (#18441)
This commit is contained in:
parent
9150de9df8
commit
4bac940a40
@ -29,6 +29,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Berry `instrospect.name()` to get names of functions, modules and classes (#18422)
|
||||
- Berry add `searchall()` and `matchall()` to `re` module and pre-compiled patterns (#18429)
|
||||
- Matter automatically exposes all detected Temperature sensors (#18430)
|
||||
- Matter add sensors: Humidity, Pressure, Illuminance; optimize memory
|
||||
|
||||
### Changed
|
||||
- ESP32 LVGL library from v8.3.5 to v8.3.6 (no functional change)
|
||||
|
@ -226,7 +226,7 @@
|
||||
#define BE_USE_OS_MODULE 0
|
||||
#define BE_USE_GLOBAL_MODULE 1
|
||||
#define BE_USE_SYS_MODULE 1
|
||||
#define BE_USE_DEBUG_MODULE 0
|
||||
#define BE_USE_DEBUG_MODULE 1
|
||||
#define BE_USE_GC_MODULE 1
|
||||
#define BE_USE_SOLIDIFY_MODULE 0
|
||||
#define BE_USE_INTROSPECT_MODULE 1
|
||||
|
@ -159,7 +159,11 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
|
||||
#include "solidify/solidified_Matter_Plugin_Light1.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Light2.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Light3.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Temp_Sensor.h"
|
||||
#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_Humidity.h"
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Get a bytes() object of the certificate DAC/PAI_Cert
|
||||
@ -333,7 +337,11 @@ module matter (scope: global, strings: weak) {
|
||||
Plugin_Light1, class(be_class_Matter_Plugin_Light1) // Dimmable Light
|
||||
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
|
||||
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
|
||||
Plugin_Temp_Sensor, class(be_class_Matter_Plugin_Temp_Sensor) // Temperature Sensor
|
||||
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_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor
|
||||
}
|
||||
|
||||
@const_object_info_end */
|
||||
|
@ -305,10 +305,10 @@ class Matter_Commisioning_Context
|
||||
end
|
||||
end
|
||||
# TODO if there is only 1 fabric, we can try to use it anyways
|
||||
if size(self.device.sessions.fabrics) == 1
|
||||
tasmota.log("MTR: *** Could not find fabric, trying only fabric in store", 2)
|
||||
return self.device.sessions.fabrics[0]
|
||||
end
|
||||
# if size(self.device.sessions.fabrics) == 1
|
||||
# tasmota.log("MTR: *** Could not find fabric, trying only fabric in store", 2)
|
||||
# return self.device.sessions.fabrics[0]
|
||||
# end
|
||||
return nil
|
||||
end
|
||||
|
||||
|
@ -147,6 +147,10 @@ class Matter_Device
|
||||
var pairing_code = self.compute_manual_pairing_code()
|
||||
tasmota.log(string.format("MTR: Manual pairing code: %s-%s-%s", pairing_code[0..3], pairing_code[4..6], pairing_code[7..]), 2)
|
||||
|
||||
# output MQTT
|
||||
var qr_code = self.compute_qrcode_content()
|
||||
tasmota.publish_result(string.format('{"Matter":{"Commissioning":1,"PairingCode":"%s","QRCode":"%s"}}', pairing_code, qr_code), 'Matter')
|
||||
|
||||
# compute PBKDF
|
||||
self._compute_pbkdf(self.root_passcode, self.root_iterations, self.root_salt)
|
||||
self.start_basic_commissioning(timeout_s, self.root_iterations, self.root_discriminator, self.root_salt, self.root_w0, #-self.root_w1,-# self.root_L, nil)
|
||||
@ -202,6 +206,9 @@ class Matter_Device
|
||||
#############################################################
|
||||
# Stop PASE commissioning, mostly called when CASE is about to start
|
||||
def stop_basic_commissioning()
|
||||
if self.is_root_commissioning_open()
|
||||
tasmota.publish_result('{"Matter":{"Commissioning":0}}', 'Matter')
|
||||
end
|
||||
self.commissioning_open = nil
|
||||
|
||||
self.mdns_remove_PASE()
|
||||
@ -548,6 +555,7 @@ class Matter_Device
|
||||
ctx.cluster = cl
|
||||
ctx.attribute = at
|
||||
var finished = cb(pi, ctx, direct) # call the callback with the plugin and the context
|
||||
# tasmota.log("MTR: gc="+str(tasmota.gc()), 2)
|
||||
if direct && finished return end
|
||||
end
|
||||
end
|
||||
@ -955,13 +963,55 @@ 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_Temp_Sensor(self, endpoint, temp_rule))
|
||||
self.plugins.push(matter.Plugin_Sensor_Temp(self, endpoint, temp_rule))
|
||||
tasmota.log(string.format("MTR: Endpoint:%i Temperature (%s)", endpoint, temp_rule), 2)
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x28 break end
|
||||
end
|
||||
|
||||
# pressure sensors
|
||||
# they are starting at endpoint `40..47` (8 max)
|
||||
endpoint = 0x28
|
||||
for k1:self.k2l(sensors)
|
||||
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)
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x2F break end
|
||||
end
|
||||
|
||||
# light sensors
|
||||
# they are starting at endpoint `48..55` (8 max)
|
||||
endpoint = 0x30
|
||||
for k1:self.k2l(sensors)
|
||||
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)
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x38 break end
|
||||
end
|
||||
|
||||
# huidity sensors
|
||||
# they are starting at endpoint `56..63` (8 max)
|
||||
endpoint = 0x38
|
||||
for k1:self.k2l(sensors)
|
||||
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)
|
||||
endpoint += 1
|
||||
end
|
||||
if endpoint > 0x40 break end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# get keys of a map in sorted order
|
||||
@ -969,9 +1019,6 @@ class Matter_Device
|
||||
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
|
||||
end
|
||||
|
||||
|
||||
# keys to llist
|
||||
|
||||
end
|
||||
matter.Device = Matter_Device
|
||||
|
||||
|
@ -221,7 +221,11 @@ class Matter_IM
|
||||
attr_name = attr_name ? " (" + attr_name + ")" : ""
|
||||
# Special case to report unsupported item, if pi==nil
|
||||
var res = (pi != nil) ? pi.read_attribute(session, ctx) : nil
|
||||
var found = true # stop expansion since we have a value
|
||||
var a1_raw # this is the bytes() block we need to add to response (or nil)
|
||||
if res != nil
|
||||
var res_str = str(res) # get the value with anonymous tag before it is tagged, for logging
|
||||
|
||||
var a1 = matter.AttributeReportIB()
|
||||
a1.attribute_data = matter.AttributeDataIB()
|
||||
a1.attribute_data.data_version = 1
|
||||
@ -233,16 +237,15 @@ class Matter_IM
|
||||
|
||||
var a1_tlv = a1.to_TLV()
|
||||
var a1_len = a1_tlv.encode_len()
|
||||
var a1_bytes = bytes(a1_len)
|
||||
var a2 = TLV.create_TLV(TLV.RAW, a1_tlv.tlv2raw(a1_bytes))
|
||||
var a1_bytes = bytes(a1_len) # pre-size bytes() to the actual size
|
||||
a1_raw = a1_tlv.tlv2raw(a1_bytes)
|
||||
# tasmota.log(string.format("MTR: guessed len=%i actual=%i '%s'", a1_len, size(a1_raw), a1_raw.tohex()), 2)
|
||||
|
||||
ret.attribute_reports.push(a2)
|
||||
if !no_log
|
||||
tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - %s", session.local_session_id, str(ctx), attr_name, str(res)), 2)
|
||||
end
|
||||
return true # stop expansion since we have a value
|
||||
tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - %s", session.local_session_id, str(ctx), attr_name, res_str), 2)
|
||||
end
|
||||
elif ctx.status != nil
|
||||
if direct
|
||||
if direct # we report an error only if a concrete direct read, not with wildcards
|
||||
var a1 = matter.AttributeReportIB()
|
||||
a1.attribute_status = matter.AttributeStatusIB()
|
||||
a1.attribute_status.path = matter.AttributePathIB()
|
||||
@ -254,18 +257,33 @@ class Matter_IM
|
||||
|
||||
var a1_tlv = a1.to_TLV()
|
||||
var a1_len = a1_tlv.encode_len()
|
||||
var a1_bytes = bytes(a1_len)
|
||||
var a2 = TLV.create_TLV(TLV.RAW, a1_tlv.tlv2raw(a1_bytes))
|
||||
|
||||
ret.attribute_reports.push(a2)
|
||||
var a1_bytes = bytes(a1_len) # pre-size bytes() to the actual size
|
||||
a1_raw = a1_tlv.tlv2raw(a1_bytes)
|
||||
|
||||
tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - STATUS: 0x%02X %s", session.local_session_id, str(ctx), attr_name, ctx.status, ctx.status == matter.UNSUPPORTED_ATTRIBUTE ? "UNSUPPORTED_ATTRIBUTE" : ""), 2)
|
||||
return true
|
||||
end
|
||||
else
|
||||
tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - IGNORED", session.local_session_id, str(ctx), attr_name), 2)
|
||||
# ignore if content is nil and status is undefined
|
||||
return false
|
||||
found = false
|
||||
end
|
||||
|
||||
# check if we still have enough room in last block
|
||||
if a1_raw # do we have bytes to add, and it's not zero size
|
||||
if size(ret.attribute_reports) == 0
|
||||
ret.attribute_reports.push(a1_raw) # push raw binary instead of a TLV
|
||||
else # already blocks present, see if we can add to the latest, or need to create a new block
|
||||
var last_block = ret.attribute_reports[-1]
|
||||
if size(last_block) + size(a1_raw) <= matter.IM_ReportData.MAX_MESSAGE
|
||||
# add to last block
|
||||
last_block .. a1_raw
|
||||
else
|
||||
ret.attribute_reports.push(a1_raw) # push raw binary instead of a TLV
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return found # return true if we had a match
|
||||
end
|
||||
|
||||
var endpoints = self.device.get_active_endpoints()
|
||||
|
@ -171,26 +171,11 @@ class Matter_IM_ReportData : Matter_IM_Message
|
||||
var data = self.data # TLV data of the response (if any)
|
||||
var was_chunked = data.more_chunked_messages # is this following a chunked packet?
|
||||
|
||||
# compute the acceptable size
|
||||
var msg_sz = 0 # message size up to now
|
||||
var elements = 0 # number of elements added
|
||||
var sz_attribute_reports = (data.attribute_reports != nil) ? size(data.attribute_reports) : 0
|
||||
if sz_attribute_reports > 0
|
||||
msg_sz = data.attribute_reports[0].to_TLV().encode_len()
|
||||
elements = 1
|
||||
end
|
||||
while msg_sz < self.MAX_MESSAGE && elements < sz_attribute_reports
|
||||
var next_sz = data.attribute_reports[elements].to_TLV().encode_len()
|
||||
if msg_sz + next_sz < self.MAX_MESSAGE
|
||||
msg_sz += next_sz
|
||||
elements += 1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
# the message were grouped by right-sized binaries upfront, we just need to send one block at time
|
||||
var elements = 1 # number of elements added
|
||||
|
||||
# tasmota.log(string.format("MTR: exch=%i elements=%i msg_sz=%i total=%i", self.get_exchangeid(), elements, msg_sz, sz_attribute_reports), 3)
|
||||
var next_elemnts = []
|
||||
var next_elemnts
|
||||
if data.attribute_reports != nil
|
||||
next_elemnts = data.attribute_reports[elements .. ]
|
||||
data.attribute_reports = data.attribute_reports[0 .. elements - 1]
|
||||
@ -222,7 +207,7 @@ class Matter_IM_ReportData : Matter_IM_Message
|
||||
responder.send_response_frame(resp)
|
||||
self.last_counter = resp.message_counter
|
||||
|
||||
if size(next_elemnts) > 0
|
||||
if next_elemnts != nil && size(next_elemnts) > 0
|
||||
data.attribute_reports = next_elemnts
|
||||
tasmota.log(string.format("MTR: to_be_sent_later size=%i exch=%i", size(data.attribute_reports), resp.exchange_id), 3)
|
||||
self.ready = false # wait for Status Report before continuing sending
|
||||
|
@ -0,0 +1,76 @@
|
||||
#
|
||||
# Matter_Plugin_Sensor.be - implements the behavior for a generic Sensor
|
||||
#
|
||||
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Device end
|
||||
|
||||
#@ solidify:Matter_Plugin_Sensor,weak
|
||||
|
||||
class Matter_Plugin_Sensor : Matter_Plugin_Device
|
||||
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
|
||||
var tasmota_sensor_matcher # Actual matcher object
|
||||
var shadow_value # Last known value
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, sensor_filter)
|
||||
super(self).init(device, endpoint)
|
||||
self.tasmota_sensor_filter = sensor_filter
|
||||
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(sensor_filter)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# parse sensor
|
||||
#
|
||||
# The device calls regularly `tasmota.read_sensors()` and converts
|
||||
# it to json.
|
||||
def parse_sensors(payload)
|
||||
if self.tasmota_sensor_matcher
|
||||
var val = self.pre_value(real(self.tasmota_sensor_matcher.match(payload)))
|
||||
if val != nil
|
||||
if val != self.shadow_value
|
||||
self.valued_changed(val)
|
||||
end
|
||||
self.shadow_value = val
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
# self.attribute_updated(nil, 0x0402, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Pre-process value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This allows to convert the raw sensor value to the target one, typically int
|
||||
def pre_value(val)
|
||||
return val
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Sensor = Matter_Plugin_Sensor
|
@ -0,0 +1,84 @@
|
||||
#
|
||||
# Matter_Plugin_Sensor_Pressure.be - implements the behavior for a Pressure Sensor
|
||||
#
|
||||
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Sensor end
|
||||
|
||||
#@ solidify:Matter_Plugin_Sensor_Humidity,weak
|
||||
|
||||
class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
|
||||
static var CLUSTERS = {
|
||||
0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable
|
||||
}
|
||||
static var TYPES = { 0x0307: 2 } # Humidity Sensor, rev 2
|
||||
|
||||
#############################################################
|
||||
# Pre-process value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This allows to convert the raw sensor value to the target one, typically int
|
||||
def pre_value(val)
|
||||
return int(val * 100) # 1/100th of percentage
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0405, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx)
|
||||
import string
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0405 # ========== Humidity Measurement 2.4 p.98 ==========
|
||||
if attribute == 0x0000 # ---------- Humidity / u16 ----------
|
||||
if self.shadow_value != nil
|
||||
return TLV.create_TLV(TLV.U2, int(self.shadow_value))
|
||||
else
|
||||
return TLV.create_TLV(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / u16 ----------
|
||||
return TLV.create_TLV(TLV.U2, 500) # 0%
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / u16 ----------
|
||||
return TLV.create_TLV(TLV.U2, 10000) # 100%
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Extended Range
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).read_attribute(session, ctx)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Sensor_Humidity = Matter_Plugin_Sensor_Humidity
|
@ -0,0 +1,84 @@
|
||||
#
|
||||
# Matter_Plugin_Sensor_Light.be - implements the behavior for a Light Sensor
|
||||
#
|
||||
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Sensor end
|
||||
|
||||
#@ solidify:Matter_Plugin_Sensor_Light,weak
|
||||
|
||||
class Matter_Plugin_Sensor_Light : Matter_Plugin_Sensor
|
||||
static var CLUSTERS = {
|
||||
0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable
|
||||
}
|
||||
static var TYPES = { 0x0106: 2 } # Temperature Sensor, rev 2
|
||||
|
||||
#############################################################
|
||||
# Pre-process value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This allows to convert the raw sensor value to the target one, typically int
|
||||
def pre_value(val)
|
||||
return int(val) # value in lux
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0400, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx)
|
||||
import string
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0400 # ========== Illuminance Measurement 2.2 p.95 ==========
|
||||
if attribute == 0x0000 # ---------- MeasuredValue / i16 ----------
|
||||
if self.shadow_value != nil
|
||||
return TLV.create_TLV(TLV.I2, int(self.shadow_value))
|
||||
else
|
||||
return TLV.create_TLV(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
|
||||
return TLV.create_TLV(TLV.I2, 0) # 0 lux
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
|
||||
return TLV.create_TLV(TLV.I2, 10000) # 10000 lux
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0)
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).read_attribute(session, ctx)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure
|
@ -0,0 +1,84 @@
|
||||
#
|
||||
# Matter_Plugin_Sensor_Pressure.be - implements the behavior for a Pressure Sensor
|
||||
#
|
||||
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Sensor end
|
||||
|
||||
#@ solidify:Matter_Plugin_Sensor_Pressure,weak
|
||||
|
||||
class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
|
||||
static var CLUSTERS = {
|
||||
0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
|
||||
}
|
||||
static var TYPES = { 0x0305: 2 } # Temperature Sensor, rev 2
|
||||
|
||||
#############################################################
|
||||
# Pre-process value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This allows to convert the raw sensor value to the target one, typically int
|
||||
def pre_value(val)
|
||||
return int(val)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0403, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx)
|
||||
import string
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0403 # ========== Pressure Measurement 2.4 p.98 ==========
|
||||
if attribute == 0x0000 # ---------- MeasuredValue / i16 ----------
|
||||
if self.shadow_value != nil
|
||||
return TLV.create_TLV(TLV.I2, int(self.shadow_value))
|
||||
else
|
||||
return TLV.create_TLV(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
|
||||
return TLV.create_TLV(TLV.I2, 500) # 500 hPA
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
|
||||
return TLV.create_TLV(TLV.I2, 1500) # 1500 hPA
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Extended Range
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).read_attribute(session, ctx)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Matter_Plugin_Temp_Sensor.be - implements the behavior for a Temperature Sensor
|
||||
# Matter_Plugin_Sensor_Temp.be - implements the behavior for a Temperature Sensor
|
||||
#
|
||||
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
|
||||
#
|
||||
@ -20,56 +20,32 @@
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Device end
|
||||
class Matter_Plugin_Sensor end
|
||||
|
||||
#@ solidify:Matter_Plugin_Temp_Sensor,weak
|
||||
#@ solidify:Matter_Plugin_Sensor_Temp,weak
|
||||
|
||||
class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
|
||||
class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
|
||||
static var CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
# 0x0004: inherited # Groups 1.3 p.21
|
||||
0x0402: [0,1,2], # Temperature Measurement p.97 - no writable
|
||||
}
|
||||
static var TYPES = { 0x0302: 2 } # Temperature Sensor, rev 2
|
||||
|
||||
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
|
||||
var tasmota_sensor_matcher # Actual matcher object
|
||||
var shadow_temperature # fake status for now # TODO
|
||||
|
||||
#############################################################
|
||||
# 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)
|
||||
# Pre-process value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This allows to convert the raw sensor value to the target one, typically int
|
||||
def pre_value(val)
|
||||
return int(val * 100)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# parse sensor
|
||||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# The device calls regularly `tasmota.read_sensors()` and converts
|
||||
# it to json.
|
||||
def parse_sensors(payload)
|
||||
if self.tasmota_sensor_matcher
|
||||
var val = real(self.tasmota_sensor_matcher.match(payload))
|
||||
if val != nil
|
||||
# import string
|
||||
# tasmota.log(string.format("MTR: update temperature for endpoint %i - %.1f C", self.endpoint,), 3)
|
||||
if val != self.shadow_temperature
|
||||
self.attribute_updated(nil, 0x0402, 0x0000)
|
||||
end
|
||||
self.shadow_temperature = val
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# get_temperature
|
||||
#
|
||||
# Update shadow and signal any change
|
||||
def get_temperature()
|
||||
return self.shadow_temperature
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0402, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
@ -84,8 +60,8 @@ class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0402 # ========== Temperature Measurement 2.3 p.97 ==========
|
||||
if attribute == 0x0000 # ---------- MeasuredValue / i16 (*100) ----------
|
||||
if self.shadow_temperature != nil
|
||||
return TLV.create_TLV(TLV.I2, int(self.shadow_temperature * 100))
|
||||
if self.shadow_value != nil
|
||||
return TLV.create_TLV(TLV.I2, self.shadow_value)
|
||||
else
|
||||
return TLV.create_TLV(TLV.NULL, nil)
|
||||
end
|
||||
@ -93,6 +69,10 @@ class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
|
||||
return TLV.create_TLV(TLV.I2, -5000) # -50 °C
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 (*100) ----------
|
||||
return TLV.create_TLV(TLV.I2, 15000) # 150 °C
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0)
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # 4 = New data model format and notation
|
||||
end
|
||||
|
||||
else
|
||||
@ -100,10 +80,5 @@ class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# every_second
|
||||
def every_second()
|
||||
self.get_temperature() # force reading value and sending subscriptions
|
||||
end
|
||||
end
|
||||
matter.Plugin_Temp_Sensor = Matter_Plugin_Temp_Sensor
|
||||
matter.Plugin_Sensor_Temp = Matter_Plugin_Sensor_Temp
|
@ -637,7 +637,11 @@ class Matter_TLV
|
||||
|
||||
# output each one after the other
|
||||
for v : val_list
|
||||
v.tlv2raw(b)
|
||||
if isinstance(v, bytes)
|
||||
b .. v
|
||||
else
|
||||
v.tlv2raw(b)
|
||||
end
|
||||
end
|
||||
|
||||
# add 'end of container'
|
||||
@ -728,9 +732,13 @@ class Matter_TLV
|
||||
# returns `self` to allow calls to be chained
|
||||
def add_obj(tag, obj)
|
||||
if obj != nil
|
||||
var value = obj.to_TLV()
|
||||
value.tag_sub = tag
|
||||
self.val.push(value)
|
||||
if isinstance(obj, bytes)
|
||||
self.val.push(obj)
|
||||
else
|
||||
var value = obj.to_TLV()
|
||||
value.tag_sub = tag
|
||||
self.val.push(value)
|
||||
end
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
@ -66,7 +66,7 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[25]) { /* constants */
|
||||
( &(const bvalue[21]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(crypto),
|
||||
/* K1 */ be_nested_str_weak(tasmota),
|
||||
/* K2 */ be_nested_str_weak(log),
|
||||
@ -88,14 +88,10 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
|
||||
/* K18 */ be_nested_str_weak(out),
|
||||
/* K19 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D),
|
||||
/* K20 */ be_nested_str_weak(stop_iteration),
|
||||
/* K21 */ be_const_int(1),
|
||||
/* K22 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Could_X20not_X20find_X20fabric_X2C_X20trying_X20only_X20fabric_X20in_X20store),
|
||||
/* K23 */ be_const_int(2),
|
||||
/* K24 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(find_fabric_by_destination_id),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[94]) { /* code */
|
||||
( &(const binstruction[77]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x8C100902, // 0002 GETMET R4 R4 K2
|
||||
@ -171,25 +167,8 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
|
||||
0x58100014, // 0048 LDCONST R4 K20
|
||||
0xAC100200, // 0049 CATCH R4 1 0
|
||||
0xB0080000, // 004A RAISE 2 R0 R0
|
||||
0x6010000C, // 004B GETGBL R4 G12
|
||||
0x88140106, // 004C GETMBR R5 R0 K6
|
||||
0x88140B07, // 004D GETMBR R5 R5 K7
|
||||
0x88140B08, // 004E GETMBR R5 R5 K8
|
||||
0x7C100200, // 004F CALL R4 1
|
||||
0x1C100915, // 0050 EQ R4 R4 K21
|
||||
0x78120009, // 0051 JMPF R4 #005C
|
||||
0xB8120200, // 0052 GETNGBL R4 K1
|
||||
0x8C100902, // 0053 GETMET R4 R4 K2
|
||||
0x58180016, // 0054 LDCONST R6 K22
|
||||
0x581C0017, // 0055 LDCONST R7 K23
|
||||
0x7C100600, // 0056 CALL R4 3
|
||||
0x88100106, // 0057 GETMBR R4 R0 K6
|
||||
0x88100907, // 0058 GETMBR R4 R4 K7
|
||||
0x88100908, // 0059 GETMBR R4 R4 K8
|
||||
0x94100918, // 005A GETIDX R4 R4 K24
|
||||
0x80040800, // 005B RET 1 R4
|
||||
0x4C100000, // 005C LDNIL R4
|
||||
0x80040800, // 005D RET 1 R4
|
||||
0x4C100000, // 004B LDNIL R4
|
||||
0x80040800, // 004C RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -898,7 +898,7 @@ be_local_closure(Matter_Device_sort_distinct, /* name */
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -906,36 +906,49 @@ be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(commissioning_open),
|
||||
/* K1 */ be_nested_str_weak(mdns_remove_PASE),
|
||||
/* K2 */ be_nested_str_weak(commissioning_iterations),
|
||||
/* K3 */ be_nested_str_weak(commissioning_discriminator),
|
||||
/* K4 */ be_nested_str_weak(commissioning_salt),
|
||||
/* K5 */ be_nested_str_weak(commissioning_w0),
|
||||
/* K6 */ be_nested_str_weak(commissioning_L),
|
||||
/* K7 */ be_nested_str_weak(commissioning_admin_fabric),
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(is_root_commissioning_open),
|
||||
/* K1 */ be_nested_str_weak(tasmota),
|
||||
/* K2 */ be_nested_str_weak(publish_result),
|
||||
/* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
|
||||
/* K4 */ be_nested_str_weak(Matter),
|
||||
/* K5 */ be_nested_str_weak(commissioning_open),
|
||||
/* K6 */ be_nested_str_weak(mdns_remove_PASE),
|
||||
/* K7 */ be_nested_str_weak(commissioning_iterations),
|
||||
/* K8 */ be_nested_str_weak(commissioning_discriminator),
|
||||
/* K9 */ be_nested_str_weak(commissioning_salt),
|
||||
/* K10 */ be_nested_str_weak(commissioning_w0),
|
||||
/* K11 */ be_nested_str_weak(commissioning_L),
|
||||
/* K12 */ be_nested_str_weak(commissioning_admin_fabric),
|
||||
}),
|
||||
be_str_weak(stop_basic_commissioning),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
0x4C040000, // 0000 LDNIL R1
|
||||
0x90020001, // 0001 SETMBR R0 K0 R1
|
||||
0x8C040101, // 0002 GETMET R1 R0 K1
|
||||
0x7C040200, // 0003 CALL R1 1
|
||||
0x4C040000, // 0004 LDNIL R1
|
||||
0x90020401, // 0005 SETMBR R0 K2 R1
|
||||
0x4C040000, // 0006 LDNIL R1
|
||||
0x90020601, // 0007 SETMBR R0 K3 R1
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x78060004, // 0002 JMPF R1 #0008
|
||||
0xB8060200, // 0003 GETNGBL R1 K1
|
||||
0x8C040302, // 0004 GETMET R1 R1 K2
|
||||
0x580C0003, // 0005 LDCONST R3 K3
|
||||
0x58100004, // 0006 LDCONST R4 K4
|
||||
0x7C040600, // 0007 CALL R1 3
|
||||
0x4C040000, // 0008 LDNIL R1
|
||||
0x90020801, // 0009 SETMBR R0 K4 R1
|
||||
0x4C040000, // 000A LDNIL R1
|
||||
0x90020A01, // 000B SETMBR R0 K5 R1
|
||||
0x90020A01, // 0009 SETMBR R0 K5 R1
|
||||
0x8C040106, // 000A GETMET R1 R0 K6
|
||||
0x7C040200, // 000B CALL R1 1
|
||||
0x4C040000, // 000C LDNIL R1
|
||||
0x90020C01, // 000D SETMBR R0 K6 R1
|
||||
0x90020E01, // 000D SETMBR R0 K7 R1
|
||||
0x4C040000, // 000E LDNIL R1
|
||||
0x90020E01, // 000F SETMBR R0 K7 R1
|
||||
0x80000000, // 0010 RET 0
|
||||
0x90021001, // 000F SETMBR R0 K8 R1
|
||||
0x4C040000, // 0010 LDNIL R1
|
||||
0x90021201, // 0011 SETMBR R0 K9 R1
|
||||
0x4C040000, // 0012 LDNIL R1
|
||||
0x90021401, // 0013 SETMBR R0 K10 R1
|
||||
0x4C040000, // 0014 LDNIL R1
|
||||
0x90021601, // 0015 SETMBR R0 K11 R1
|
||||
0x4C040000, // 0016 LDNIL R1
|
||||
0x90021801, // 0017 SETMBR R0 K12 R1
|
||||
0x80000000, // 0018 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -1067,7 +1080,7 @@ be_local_closure(Matter_Device_every_250ms, /* name */
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
14, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -1075,7 +1088,7 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[19]) { /* constants */
|
||||
( &(const bvalue[23]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(PASE_TIMEOUT),
|
||||
/* K2 */ be_nested_str_weak(compute_manual_pairing_code),
|
||||
@ -1087,18 +1100,22 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
|
||||
/* K8 */ be_const_int(3),
|
||||
/* K9 */ be_const_int(2147483647),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str_weak(_compute_pbkdf),
|
||||
/* K12 */ be_nested_str_weak(root_passcode),
|
||||
/* K13 */ be_nested_str_weak(root_iterations),
|
||||
/* K14 */ be_nested_str_weak(root_salt),
|
||||
/* K15 */ be_nested_str_weak(start_basic_commissioning),
|
||||
/* K16 */ be_nested_str_weak(root_discriminator),
|
||||
/* K17 */ be_nested_str_weak(root_w0),
|
||||
/* K18 */ be_nested_str_weak(root_L),
|
||||
/* K11 */ be_nested_str_weak(compute_qrcode_content),
|
||||
/* K12 */ be_nested_str_weak(publish_result),
|
||||
/* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
|
||||
/* K14 */ be_nested_str_weak(Matter),
|
||||
/* K15 */ be_nested_str_weak(_compute_pbkdf),
|
||||
/* K16 */ be_nested_str_weak(root_passcode),
|
||||
/* K17 */ be_nested_str_weak(root_iterations),
|
||||
/* K18 */ be_nested_str_weak(root_salt),
|
||||
/* K19 */ be_nested_str_weak(start_basic_commissioning),
|
||||
/* K20 */ be_nested_str_weak(root_discriminator),
|
||||
/* K21 */ be_nested_str_weak(root_w0),
|
||||
/* K22 */ be_nested_str_weak(root_L),
|
||||
}),
|
||||
be_str_weak(start_root_basic_commissioning),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[38]) { /* code */
|
||||
( &(const binstruction[49]) { /* code */
|
||||
0xA40A0000, // 0000 IMPORT R2 K0
|
||||
0x4C0C0000, // 0001 LDNIL R3
|
||||
0x1C0C0203, // 0002 EQ R3 R1 R3
|
||||
@ -1123,20 +1140,31 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
|
||||
0x581C000A, // 0015 LDCONST R7 K10
|
||||
0x7C100600, // 0016 CALL R4 3
|
||||
0x8C10010B, // 0017 GETMET R4 R0 K11
|
||||
0x8818010C, // 0018 GETMBR R6 R0 K12
|
||||
0x881C010D, // 0019 GETMBR R7 R0 K13
|
||||
0x8820010E, // 001A GETMBR R8 R0 K14
|
||||
0x7C100800, // 001B CALL R4 4
|
||||
0x8C10010F, // 001C GETMET R4 R0 K15
|
||||
0x5C180200, // 001D MOVE R6 R1
|
||||
0x881C010D, // 001E GETMBR R7 R0 K13
|
||||
0x88200110, // 001F GETMBR R8 R0 K16
|
||||
0x8824010E, // 0020 GETMBR R9 R0 K14
|
||||
0x88280111, // 0021 GETMBR R10 R0 K17
|
||||
0x882C0112, // 0022 GETMBR R11 R0 K18
|
||||
0x4C300000, // 0023 LDNIL R12
|
||||
0x7C101000, // 0024 CALL R4 8
|
||||
0x80000000, // 0025 RET 0
|
||||
0x7C100200, // 0018 CALL R4 1
|
||||
0xB8160600, // 0019 GETNGBL R5 K3
|
||||
0x8C140B0C, // 001A GETMET R5 R5 K12
|
||||
0x8C1C0505, // 001B GETMET R7 R2 K5
|
||||
0x5824000D, // 001C LDCONST R9 K13
|
||||
0x5C280600, // 001D MOVE R10 R3
|
||||
0x5C2C0800, // 001E MOVE R11 R4
|
||||
0x7C1C0800, // 001F CALL R7 4
|
||||
0x5820000E, // 0020 LDCONST R8 K14
|
||||
0x7C140600, // 0021 CALL R5 3
|
||||
0x8C14010F, // 0022 GETMET R5 R0 K15
|
||||
0x881C0110, // 0023 GETMBR R7 R0 K16
|
||||
0x88200111, // 0024 GETMBR R8 R0 K17
|
||||
0x88240112, // 0025 GETMBR R9 R0 K18
|
||||
0x7C140800, // 0026 CALL R5 4
|
||||
0x8C140113, // 0027 GETMET R5 R0 K19
|
||||
0x5C1C0200, // 0028 MOVE R7 R1
|
||||
0x88200111, // 0029 GETMBR R8 R0 K17
|
||||
0x88240114, // 002A GETMBR R9 R0 K20
|
||||
0x88280112, // 002B GETMBR R10 R0 K18
|
||||
0x882C0115, // 002C GETMBR R11 R0 K21
|
||||
0x88300116, // 002D GETMBR R12 R0 K22
|
||||
0x4C340000, // 002E LDNIL R13
|
||||
0x7C141000, // 002F CALL R5 8
|
||||
0x80000000, // 0030 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -3294,7 +3322,7 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[34]) { /* constants */
|
||||
( &(const bvalue[46]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_const_int(1),
|
||||
@ -3326,13 +3354,25 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
|
||||
/* K28 */ be_nested_str_weak(contains),
|
||||
/* K29 */ be_nested_str_weak(Temperature),
|
||||
/* K30 */ be_nested_str_weak(_X23Temperature),
|
||||
/* K31 */ be_nested_str_weak(Plugin_Temp_Sensor),
|
||||
/* K31 */ be_nested_str_weak(Plugin_Sensor_Temp),
|
||||
/* K32 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Temperature_X20_X28_X25s_X29),
|
||||
/* K33 */ be_nested_str_weak(stop_iteration),
|
||||
/* K34 */ be_nested_str_weak(Pressure),
|
||||
/* K35 */ be_nested_str_weak(_X23Pressure),
|
||||
/* K36 */ be_nested_str_weak(Plugin_Sensor_Pressure),
|
||||
/* K37 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Pressure_X20_X28_X25s_X29),
|
||||
/* K38 */ be_nested_str_weak(Illuminance),
|
||||
/* K39 */ be_nested_str_weak(_X23Illuminance),
|
||||
/* K40 */ be_nested_str_weak(Plugin_Sensor_Light),
|
||||
/* K41 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_X20_X28_X25s_X29),
|
||||
/* K42 */ be_nested_str_weak(Humidity),
|
||||
/* K43 */ be_nested_str_weak(_X23Humidity),
|
||||
/* K44 */ be_nested_str_weak(Plugin_Sensor_Humidity),
|
||||
/* K45 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Humidity_X20_X28_X25s_X29),
|
||||
}),
|
||||
be_str_weak(autoconf_device),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[160]) { /* code */
|
||||
( &(const binstruction[307]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x580C0002, // 0002 LDCONST R3 K2
|
||||
@ -3492,7 +3532,154 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
|
||||
0x58280021, // 009C LDCONST R10 K33
|
||||
0xAC280200, // 009D CATCH R10 1 0
|
||||
0xB0080000, // 009E RAISE 2 R0 R0
|
||||
0x80000000, // 009F RET 0
|
||||
0x540E0027, // 009F LDINT R3 40
|
||||
0x60280010, // 00A0 GETGBL R10 G16
|
||||
0x8C2C011B, // 00A1 GETMET R11 R0 K27
|
||||
0x5C341200, // 00A2 MOVE R13 R9
|
||||
0x7C2C0400, // 00A3 CALL R11 2
|
||||
0x7C280200, // 00A4 CALL R10 1
|
||||
0xA8020026, // 00A5 EXBLK 0 #00CD
|
||||
0x5C2C1400, // 00A6 MOVE R11 R10
|
||||
0x7C2C0000, // 00A7 CALL R11 0
|
||||
0x9430120B, // 00A8 GETIDX R12 R9 R11
|
||||
0x6034000F, // 00A9 GETGBL R13 G15
|
||||
0x5C381800, // 00AA MOVE R14 R12
|
||||
0x603C0013, // 00AB GETGBL R15 G19
|
||||
0x7C340400, // 00AC CALL R13 2
|
||||
0x78360017, // 00AD JMPF R13 #00C6
|
||||
0x8C34191C, // 00AE GETMET R13 R12 K28
|
||||
0x583C0022, // 00AF LDCONST R15 K34
|
||||
0x7C340400, // 00B0 CALL R13 2
|
||||
0x78360013, // 00B1 JMPF R13 #00C6
|
||||
0x00341723, // 00B2 ADD R13 R11 K35
|
||||
0x88380109, // 00B3 GETMBR R14 R0 K9
|
||||
0x8C381D0A, // 00B4 GETMET R14 R14 K10
|
||||
0xB8421600, // 00B5 GETNGBL R16 K11
|
||||
0x8C402124, // 00B6 GETMET R16 R16 K36
|
||||
0x5C480000, // 00B7 MOVE R18 R0
|
||||
0x5C4C0600, // 00B8 MOVE R19 R3
|
||||
0x5C501A00, // 00B9 MOVE R20 R13
|
||||
0x7C400800, // 00BA CALL R16 4
|
||||
0x7C380400, // 00BB CALL R14 2
|
||||
0xB83A1A00, // 00BC GETNGBL R14 K13
|
||||
0x8C381D0E, // 00BD GETMET R14 R14 K14
|
||||
0x8C40030F, // 00BE GETMET R16 R1 K15
|
||||
0x58480025, // 00BF LDCONST R18 K37
|
||||
0x5C4C0600, // 00C0 MOVE R19 R3
|
||||
0x5C501A00, // 00C1 MOVE R20 R13
|
||||
0x7C400800, // 00C2 CALL R16 4
|
||||
0x58440011, // 00C3 LDCONST R17 K17
|
||||
0x7C380600, // 00C4 CALL R14 3
|
||||
0x000C0702, // 00C5 ADD R3 R3 K2
|
||||
0x5436002E, // 00C6 LDINT R13 47
|
||||
0x2434060D, // 00C7 GT R13 R3 R13
|
||||
0x78360000, // 00C8 JMPF R13 #00CA
|
||||
0x70020000, // 00C9 JMP #00CB
|
||||
0x7001FFDA, // 00CA JMP #00A6
|
||||
0xA8040001, // 00CB EXBLK 1 1
|
||||
0x70020002, // 00CC JMP #00D0
|
||||
0x58280021, // 00CD LDCONST R10 K33
|
||||
0xAC280200, // 00CE CATCH R10 1 0
|
||||
0xB0080000, // 00CF RAISE 2 R0 R0
|
||||
0x540E002F, // 00D0 LDINT R3 48
|
||||
0x60280010, // 00D1 GETGBL R10 G16
|
||||
0x8C2C011B, // 00D2 GETMET R11 R0 K27
|
||||
0x5C341200, // 00D3 MOVE R13 R9
|
||||
0x7C2C0400, // 00D4 CALL R11 2
|
||||
0x7C280200, // 00D5 CALL R10 1
|
||||
0xA8020026, // 00D6 EXBLK 0 #00FE
|
||||
0x5C2C1400, // 00D7 MOVE R11 R10
|
||||
0x7C2C0000, // 00D8 CALL R11 0
|
||||
0x9430120B, // 00D9 GETIDX R12 R9 R11
|
||||
0x6034000F, // 00DA GETGBL R13 G15
|
||||
0x5C381800, // 00DB MOVE R14 R12
|
||||
0x603C0013, // 00DC GETGBL R15 G19
|
||||
0x7C340400, // 00DD CALL R13 2
|
||||
0x78360017, // 00DE JMPF R13 #00F7
|
||||
0x8C34191C, // 00DF GETMET R13 R12 K28
|
||||
0x583C0026, // 00E0 LDCONST R15 K38
|
||||
0x7C340400, // 00E1 CALL R13 2
|
||||
0x78360013, // 00E2 JMPF R13 #00F7
|
||||
0x00341727, // 00E3 ADD R13 R11 K39
|
||||
0x88380109, // 00E4 GETMBR R14 R0 K9
|
||||
0x8C381D0A, // 00E5 GETMET R14 R14 K10
|
||||
0xB8421600, // 00E6 GETNGBL R16 K11
|
||||
0x8C402128, // 00E7 GETMET R16 R16 K40
|
||||
0x5C480000, // 00E8 MOVE R18 R0
|
||||
0x5C4C0600, // 00E9 MOVE R19 R3
|
||||
0x5C501A00, // 00EA MOVE R20 R13
|
||||
0x7C400800, // 00EB CALL R16 4
|
||||
0x7C380400, // 00EC CALL R14 2
|
||||
0xB83A1A00, // 00ED GETNGBL R14 K13
|
||||
0x8C381D0E, // 00EE GETMET R14 R14 K14
|
||||
0x8C40030F, // 00EF GETMET R16 R1 K15
|
||||
0x58480029, // 00F0 LDCONST R18 K41
|
||||
0x5C4C0600, // 00F1 MOVE R19 R3
|
||||
0x5C501A00, // 00F2 MOVE R20 R13
|
||||
0x7C400800, // 00F3 CALL R16 4
|
||||
0x58440011, // 00F4 LDCONST R17 K17
|
||||
0x7C380600, // 00F5 CALL R14 3
|
||||
0x000C0702, // 00F6 ADD R3 R3 K2
|
||||
0x54360037, // 00F7 LDINT R13 56
|
||||
0x2434060D, // 00F8 GT R13 R3 R13
|
||||
0x78360000, // 00F9 JMPF R13 #00FB
|
||||
0x70020000, // 00FA JMP #00FC
|
||||
0x7001FFDA, // 00FB JMP #00D7
|
||||
0xA8040001, // 00FC EXBLK 1 1
|
||||
0x70020002, // 00FD JMP #0101
|
||||
0x58280021, // 00FE LDCONST R10 K33
|
||||
0xAC280200, // 00FF CATCH R10 1 0
|
||||
0xB0080000, // 0100 RAISE 2 R0 R0
|
||||
0x540E0037, // 0101 LDINT R3 56
|
||||
0x60280010, // 0102 GETGBL R10 G16
|
||||
0x8C2C011B, // 0103 GETMET R11 R0 K27
|
||||
0x5C341200, // 0104 MOVE R13 R9
|
||||
0x7C2C0400, // 0105 CALL R11 2
|
||||
0x7C280200, // 0106 CALL R10 1
|
||||
0xA8020026, // 0107 EXBLK 0 #012F
|
||||
0x5C2C1400, // 0108 MOVE R11 R10
|
||||
0x7C2C0000, // 0109 CALL R11 0
|
||||
0x9430120B, // 010A GETIDX R12 R9 R11
|
||||
0x6034000F, // 010B GETGBL R13 G15
|
||||
0x5C381800, // 010C MOVE R14 R12
|
||||
0x603C0013, // 010D GETGBL R15 G19
|
||||
0x7C340400, // 010E CALL R13 2
|
||||
0x78360017, // 010F JMPF R13 #0128
|
||||
0x8C34191C, // 0110 GETMET R13 R12 K28
|
||||
0x583C002A, // 0111 LDCONST R15 K42
|
||||
0x7C340400, // 0112 CALL R13 2
|
||||
0x78360013, // 0113 JMPF R13 #0128
|
||||
0x0034172B, // 0114 ADD R13 R11 K43
|
||||
0x88380109, // 0115 GETMBR R14 R0 K9
|
||||
0x8C381D0A, // 0116 GETMET R14 R14 K10
|
||||
0xB8421600, // 0117 GETNGBL R16 K11
|
||||
0x8C40212C, // 0118 GETMET R16 R16 K44
|
||||
0x5C480000, // 0119 MOVE R18 R0
|
||||
0x5C4C0600, // 011A MOVE R19 R3
|
||||
0x5C501A00, // 011B MOVE R20 R13
|
||||
0x7C400800, // 011C CALL R16 4
|
||||
0x7C380400, // 011D CALL R14 2
|
||||
0xB83A1A00, // 011E GETNGBL R14 K13
|
||||
0x8C381D0E, // 011F GETMET R14 R14 K14
|
||||
0x8C40030F, // 0120 GETMET R16 R1 K15
|
||||
0x5848002D, // 0121 LDCONST R18 K45
|
||||
0x5C4C0600, // 0122 MOVE R19 R3
|
||||
0x5C501A00, // 0123 MOVE R20 R13
|
||||
0x7C400800, // 0124 CALL R16 4
|
||||
0x58440011, // 0125 LDCONST R17 K17
|
||||
0x7C380600, // 0126 CALL R14 3
|
||||
0x000C0702, // 0127 ADD R3 R3 K2
|
||||
0x5436003F, // 0128 LDINT R13 64
|
||||
0x2434060D, // 0129 GT R13 R3 R13
|
||||
0x78360000, // 012A JMPF R13 #012C
|
||||
0x70020000, // 012B JMP #012D
|
||||
0x7001FFDA, // 012C JMP #0108
|
||||
0xA8040001, // 012D EXBLK 1 1
|
||||
0x70020002, // 012E JMP #0132
|
||||
0x58280021, // 012F LDCONST R10 K33
|
||||
0xAC280200, // 0130 CATCH R10 1 0
|
||||
0xB0080000, // 0131 RAISE 2 R0 R0
|
||||
0x80000000, // 0132 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -1371,7 +1371,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
|
||||
1, /* has sup protos */
|
||||
( &(const struct bproto*[ 2]) {
|
||||
be_nested_proto(
|
||||
23, /* nstack */
|
||||
25, /* nstack */
|
||||
4, /* argc */
|
||||
0, /* varg */
|
||||
1, /* has upvals */
|
||||
@ -1382,7 +1382,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[39]) { /* constants */
|
||||
( &(const bvalue[40]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
@ -1404,28 +1404,29 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
|
||||
/* K18 */ be_nested_str_weak(data),
|
||||
/* K19 */ be_nested_str_weak(to_TLV),
|
||||
/* K20 */ be_nested_str_weak(encode_len),
|
||||
/* K21 */ be_nested_str_weak(create_TLV),
|
||||
/* K22 */ be_nested_str_weak(RAW),
|
||||
/* K23 */ be_nested_str_weak(tlv2raw),
|
||||
/* K24 */ be_nested_str_weak(attribute_reports),
|
||||
/* K25 */ be_nested_str_weak(push),
|
||||
/* K26 */ be_nested_str_weak(tasmota),
|
||||
/* K27 */ be_nested_str_weak(log),
|
||||
/* K28 */ be_nested_str_weak(format),
|
||||
/* K29 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20_X25s),
|
||||
/* K30 */ be_nested_str_weak(local_session_id),
|
||||
/* K31 */ be_const_int(2),
|
||||
/* K32 */ be_nested_str_weak(status),
|
||||
/* K33 */ be_nested_str_weak(attribute_status),
|
||||
/* K34 */ be_nested_str_weak(AttributeStatusIB),
|
||||
/* K35 */ be_nested_str_weak(StatusIB),
|
||||
/* K36 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20STATUS_X3A_X200x_X2502X_X20_X25s),
|
||||
/* K37 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
|
||||
/* K38 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20IGNORED),
|
||||
/* K21 */ be_nested_str_weak(tlv2raw),
|
||||
/* K22 */ be_nested_str_weak(tasmota),
|
||||
/* K23 */ be_nested_str_weak(log),
|
||||
/* K24 */ be_nested_str_weak(format),
|
||||
/* K25 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20_X25s),
|
||||
/* K26 */ be_nested_str_weak(local_session_id),
|
||||
/* K27 */ be_const_int(2),
|
||||
/* K28 */ be_nested_str_weak(status),
|
||||
/* K29 */ be_nested_str_weak(attribute_status),
|
||||
/* K30 */ be_nested_str_weak(AttributeStatusIB),
|
||||
/* K31 */ be_nested_str_weak(StatusIB),
|
||||
/* K32 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20STATUS_X3A_X200x_X2502X_X20_X25s),
|
||||
/* K33 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
|
||||
/* K34 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20IGNORED),
|
||||
/* K35 */ be_nested_str_weak(attribute_reports),
|
||||
/* K36 */ be_const_int(0),
|
||||
/* K37 */ be_nested_str_weak(push),
|
||||
/* K38 */ be_nested_str_weak(IM_ReportData),
|
||||
/* K39 */ be_nested_str_weak(MAX_MESSAGE),
|
||||
}),
|
||||
be_str_weak(read_single_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[175]) { /* code */
|
||||
( &(const binstruction[206]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
@ -1449,158 +1450,189 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
|
||||
0x7C1C0600, // 0014 CALL R7 3
|
||||
0x70020000, // 0015 JMP #0017
|
||||
0x4C1C0000, // 0016 LDNIL R7
|
||||
0x4C200000, // 0017 LDNIL R8
|
||||
0x20200E08, // 0018 NE R8 R7 R8
|
||||
0x78220041, // 0019 JMPF R8 #005C
|
||||
0xB8220200, // 001A GETNGBL R8 K1
|
||||
0x8C20110A, // 001B GETMET R8 R8 K10
|
||||
0x7C200200, // 001C CALL R8 1
|
||||
0xB8260200, // 001D GETNGBL R9 K1
|
||||
0x8C24130C, // 001E GETMET R9 R9 K12
|
||||
0x7C240200, // 001F CALL R9 1
|
||||
0x90221609, // 0020 SETMBR R8 K11 R9
|
||||
0x8824110B, // 0021 GETMBR R9 R8 K11
|
||||
0x90261B0E, // 0022 SETMBR R9 K13 K14
|
||||
0x8824110B, // 0023 GETMBR R9 R8 K11
|
||||
0xB82A0200, // 0024 GETNGBL R10 K1
|
||||
0x8C281510, // 0025 GETMET R10 R10 K16
|
||||
0x7C280200, // 0026 CALL R10 1
|
||||
0x90261E0A, // 0027 SETMBR R9 K15 R10
|
||||
0x8824110B, // 0028 GETMBR R9 R8 K11
|
||||
0x8824130F, // 0029 GETMBR R9 R9 K15
|
||||
0x88280511, // 002A GETMBR R10 R2 K17
|
||||
0x9026220A, // 002B SETMBR R9 K17 R10
|
||||
0x8824110B, // 002C GETMBR R9 R8 K11
|
||||
0x8824130F, // 002D GETMBR R9 R9 K15
|
||||
0x88280504, // 002E GETMBR R10 R2 K4
|
||||
0x9026080A, // 002F SETMBR R9 K4 R10
|
||||
0x8824110B, // 0030 GETMBR R9 R8 K11
|
||||
0x8824130F, // 0031 GETMBR R9 R9 K15
|
||||
0x88280505, // 0032 GETMBR R10 R2 K5
|
||||
0x90260A0A, // 0033 SETMBR R9 K5 R10
|
||||
0x8824110B, // 0034 GETMBR R9 R8 K11
|
||||
0x90262407, // 0035 SETMBR R9 K18 R7
|
||||
0x8C241113, // 0036 GETMET R9 R8 K19
|
||||
0x7C240200, // 0037 CALL R9 1
|
||||
0x8C281314, // 0038 GETMET R10 R9 K20
|
||||
0x7C280200, // 0039 CALL R10 1
|
||||
0x602C0015, // 003A GETGBL R11 G21
|
||||
0x5C301400, // 003B MOVE R12 R10
|
||||
0x7C2C0200, // 003C CALL R11 1
|
||||
0x8C300B15, // 003D GETMET R12 R5 K21
|
||||
0x88380B16, // 003E GETMBR R14 R5 K22
|
||||
0x8C3C1317, // 003F GETMET R15 R9 K23
|
||||
0x5C441600, // 0040 MOVE R17 R11
|
||||
0x7C3C0400, // 0041 CALL R15 2
|
||||
0x7C300600, // 0042 CALL R12 3
|
||||
0x88340118, // 0043 GETMBR R13 R0 K24
|
||||
0x8C341B19, // 0044 GETMET R13 R13 K25
|
||||
0x5C3C1800, // 0045 MOVE R15 R12
|
||||
0x7C340400, // 0046 CALL R13 2
|
||||
0x68340001, // 0047 GETUPV R13 U1
|
||||
0x7436000F, // 0048 JMPT R13 #0059
|
||||
0xB8363400, // 0049 GETNGBL R13 K26
|
||||
0x8C341B1B, // 004A GETMET R13 R13 K27
|
||||
0x8C3C091C, // 004B GETMET R15 R4 K28
|
||||
0x5844001D, // 004C LDCONST R17 K29
|
||||
0x68480000, // 004D GETUPV R18 U0
|
||||
0x8848251E, // 004E GETMBR R18 R18 K30
|
||||
0x604C0008, // 004F GETGBL R19 G8
|
||||
0x5C500400, // 0050 MOVE R20 R2
|
||||
0x7C4C0200, // 0051 CALL R19 1
|
||||
0x5C500C00, // 0052 MOVE R20 R6
|
||||
0x60540008, // 0053 GETGBL R21 G8
|
||||
0x5C580E00, // 0054 MOVE R22 R7
|
||||
0x7C540200, // 0055 CALL R21 1
|
||||
0x7C3C0C00, // 0056 CALL R15 6
|
||||
0x5840001F, // 0057 LDCONST R16 K31
|
||||
0x7C340600, // 0058 CALL R13 3
|
||||
0x50340200, // 0059 LDBOOL R13 1 0
|
||||
0x80041A00, // 005A RET 1 R13
|
||||
0x70020051, // 005B JMP #00AE
|
||||
0x88200520, // 005C GETMBR R8 R2 K32
|
||||
0x4C240000, // 005D LDNIL R9
|
||||
0x20201009, // 005E NE R8 R8 R9
|
||||
0x7822003E, // 005F JMPF R8 #009F
|
||||
0x780E003C, // 0060 JMPF R3 #009E
|
||||
0xB8220200, // 0061 GETNGBL R8 K1
|
||||
0x8C20110A, // 0062 GETMET R8 R8 K10
|
||||
0x7C200200, // 0063 CALL R8 1
|
||||
0xB8260200, // 0064 GETNGBL R9 K1
|
||||
0x8C241322, // 0065 GETMET R9 R9 K34
|
||||
0x7C240200, // 0066 CALL R9 1
|
||||
0x90224209, // 0067 SETMBR R8 K33 R9
|
||||
0x88241121, // 0068 GETMBR R9 R8 K33
|
||||
0xB82A0200, // 0069 GETNGBL R10 K1
|
||||
0x8C281510, // 006A GETMET R10 R10 K16
|
||||
0x7C280200, // 006B CALL R10 1
|
||||
0x90261E0A, // 006C SETMBR R9 K15 R10
|
||||
0x88241121, // 006D GETMBR R9 R8 K33
|
||||
0xB82A0200, // 006E GETNGBL R10 K1
|
||||
0x8C281523, // 006F GETMET R10 R10 K35
|
||||
0x7C280200, // 0070 CALL R10 1
|
||||
0x9026400A, // 0071 SETMBR R9 K32 R10
|
||||
0x88241121, // 0072 GETMBR R9 R8 K33
|
||||
0x8824130F, // 0073 GETMBR R9 R9 K15
|
||||
0x88280511, // 0074 GETMBR R10 R2 K17
|
||||
0x9026220A, // 0075 SETMBR R9 K17 R10
|
||||
0x88241121, // 0076 GETMBR R9 R8 K33
|
||||
0x8824130F, // 0077 GETMBR R9 R9 K15
|
||||
0x88280504, // 0078 GETMBR R10 R2 K4
|
||||
0x9026080A, // 0079 SETMBR R9 K4 R10
|
||||
0x88241121, // 007A GETMBR R9 R8 K33
|
||||
0x8824130F, // 007B GETMBR R9 R9 K15
|
||||
0x88280505, // 007C GETMBR R10 R2 K5
|
||||
0x90260A0A, // 007D SETMBR R9 K5 R10
|
||||
0x88241121, // 007E GETMBR R9 R8 K33
|
||||
0x88241320, // 007F GETMBR R9 R9 K32
|
||||
0x88280520, // 0080 GETMBR R10 R2 K32
|
||||
0x9026400A, // 0081 SETMBR R9 K32 R10
|
||||
0x88240118, // 0082 GETMBR R9 R0 K24
|
||||
0x8C241319, // 0083 GETMET R9 R9 K25
|
||||
0x5C2C1000, // 0084 MOVE R11 R8
|
||||
0x7C240400, // 0085 CALL R9 2
|
||||
0xB8263400, // 0086 GETNGBL R9 K26
|
||||
0x8C24131B, // 0087 GETMET R9 R9 K27
|
||||
0x8C2C091C, // 0088 GETMET R11 R4 K28
|
||||
0x58340024, // 0089 LDCONST R13 K36
|
||||
0x68380000, // 008A GETUPV R14 U0
|
||||
0x88381D1E, // 008B GETMBR R14 R14 K30
|
||||
0x603C0008, // 008C GETGBL R15 G8
|
||||
0x5C400400, // 008D MOVE R16 R2
|
||||
0x7C3C0200, // 008E CALL R15 1
|
||||
0x5C400C00, // 008F MOVE R16 R6
|
||||
0x88440520, // 0090 GETMBR R17 R2 K32
|
||||
0x88480520, // 0091 GETMBR R18 R2 K32
|
||||
0xB84E0200, // 0092 GETNGBL R19 K1
|
||||
0x884C2725, // 0093 GETMBR R19 R19 K37
|
||||
0x1C482413, // 0094 EQ R18 R18 R19
|
||||
0x784A0001, // 0095 JMPF R18 #0098
|
||||
0x58480025, // 0096 LDCONST R18 K37
|
||||
0x70020000, // 0097 JMP #0099
|
||||
0x58480008, // 0098 LDCONST R18 K8
|
||||
0x7C2C0E00, // 0099 CALL R11 7
|
||||
0x5830001F, // 009A LDCONST R12 K31
|
||||
0x7C240600, // 009B CALL R9 3
|
||||
0x50240200, // 009C LDBOOL R9 1 0
|
||||
0x80041200, // 009D RET 1 R9
|
||||
0x7002000E, // 009E JMP #00AE
|
||||
0xB8223400, // 009F GETNGBL R8 K26
|
||||
0x8C20111B, // 00A0 GETMET R8 R8 K27
|
||||
0x8C28091C, // 00A1 GETMET R10 R4 K28
|
||||
0x58300026, // 00A2 LDCONST R12 K38
|
||||
0x68340000, // 00A3 GETUPV R13 U0
|
||||
0x88341B1E, // 00A4 GETMBR R13 R13 K30
|
||||
0x60380008, // 00A5 GETGBL R14 G8
|
||||
0x5C3C0400, // 00A6 MOVE R15 R2
|
||||
0x7C380200, // 00A7 CALL R14 1
|
||||
0x5C3C0C00, // 00A8 MOVE R15 R6
|
||||
0x7C280A00, // 00A9 CALL R10 5
|
||||
0x582C001F, // 00AA LDCONST R11 K31
|
||||
0x7C200600, // 00AB CALL R8 3
|
||||
0x50200200, // 0017 LDBOOL R8 1 0
|
||||
0x4C240000, // 0018 LDNIL R9
|
||||
0x4C280000, // 0019 LDNIL R10
|
||||
0x20280E0A, // 001A NE R10 R7 R10
|
||||
0x782A003A, // 001B JMPF R10 #0057
|
||||
0x60280008, // 001C GETGBL R10 G8
|
||||
0x5C2C0E00, // 001D MOVE R11 R7
|
||||
0x7C280200, // 001E CALL R10 1
|
||||
0xB82E0200, // 001F GETNGBL R11 K1
|
||||
0x8C2C170A, // 0020 GETMET R11 R11 K10
|
||||
0x7C2C0200, // 0021 CALL R11 1
|
||||
0xB8320200, // 0022 GETNGBL R12 K1
|
||||
0x8C30190C, // 0023 GETMET R12 R12 K12
|
||||
0x7C300200, // 0024 CALL R12 1
|
||||
0x902E160C, // 0025 SETMBR R11 K11 R12
|
||||
0x8830170B, // 0026 GETMBR R12 R11 K11
|
||||
0x90321B0E, // 0027 SETMBR R12 K13 K14
|
||||
0x8830170B, // 0028 GETMBR R12 R11 K11
|
||||
0xB8360200, // 0029 GETNGBL R13 K1
|
||||
0x8C341B10, // 002A GETMET R13 R13 K16
|
||||
0x7C340200, // 002B CALL R13 1
|
||||
0x90321E0D, // 002C SETMBR R12 K15 R13
|
||||
0x8830170B, // 002D GETMBR R12 R11 K11
|
||||
0x8830190F, // 002E GETMBR R12 R12 K15
|
||||
0x88340511, // 002F GETMBR R13 R2 K17
|
||||
0x9032220D, // 0030 SETMBR R12 K17 R13
|
||||
0x8830170B, // 0031 GETMBR R12 R11 K11
|
||||
0x8830190F, // 0032 GETMBR R12 R12 K15
|
||||
0x88340504, // 0033 GETMBR R13 R2 K4
|
||||
0x9032080D, // 0034 SETMBR R12 K4 R13
|
||||
0x8830170B, // 0035 GETMBR R12 R11 K11
|
||||
0x8830190F, // 0036 GETMBR R12 R12 K15
|
||||
0x88340505, // 0037 GETMBR R13 R2 K5
|
||||
0x90320A0D, // 0038 SETMBR R12 K5 R13
|
||||
0x8830170B, // 0039 GETMBR R12 R11 K11
|
||||
0x90322407, // 003A SETMBR R12 K18 R7
|
||||
0x8C301713, // 003B GETMET R12 R11 K19
|
||||
0x7C300200, // 003C CALL R12 1
|
||||
0x8C341914, // 003D GETMET R13 R12 K20
|
||||
0x7C340200, // 003E CALL R13 1
|
||||
0x60380015, // 003F GETGBL R14 G21
|
||||
0x5C3C1A00, // 0040 MOVE R15 R13
|
||||
0x7C380200, // 0041 CALL R14 1
|
||||
0x8C3C1915, // 0042 GETMET R15 R12 K21
|
||||
0x5C441C00, // 0043 MOVE R17 R14
|
||||
0x7C3C0400, // 0044 CALL R15 2
|
||||
0x5C241E00, // 0045 MOVE R9 R15
|
||||
0x683C0001, // 0046 GETUPV R15 U1
|
||||
0x743E000D, // 0047 JMPT R15 #0056
|
||||
0xB83E2C00, // 0048 GETNGBL R15 K22
|
||||
0x8C3C1F17, // 0049 GETMET R15 R15 K23
|
||||
0x8C440918, // 004A GETMET R17 R4 K24
|
||||
0x584C0019, // 004B LDCONST R19 K25
|
||||
0x68500000, // 004C GETUPV R20 U0
|
||||
0x8850291A, // 004D GETMBR R20 R20 K26
|
||||
0x60540008, // 004E GETGBL R21 G8
|
||||
0x5C580400, // 004F MOVE R22 R2
|
||||
0x7C540200, // 0050 CALL R21 1
|
||||
0x5C580C00, // 0051 MOVE R22 R6
|
||||
0x5C5C1400, // 0052 MOVE R23 R10
|
||||
0x7C440C00, // 0053 CALL R17 6
|
||||
0x5848001B, // 0054 LDCONST R18 K27
|
||||
0x7C3C0600, // 0055 CALL R15 3
|
||||
0x70020055, // 0056 JMP #00AD
|
||||
0x8828051C, // 0057 GETMBR R10 R2 K28
|
||||
0x4C2C0000, // 0058 LDNIL R11
|
||||
0x2028140B, // 0059 NE R10 R10 R11
|
||||
0x782A0043, // 005A JMPF R10 #009F
|
||||
0x780E0041, // 005B JMPF R3 #009E
|
||||
0xB82A0200, // 005C GETNGBL R10 K1
|
||||
0x8C28150A, // 005D GETMET R10 R10 K10
|
||||
0x7C280200, // 005E CALL R10 1
|
||||
0xB82E0200, // 005F GETNGBL R11 K1
|
||||
0x8C2C171E, // 0060 GETMET R11 R11 K30
|
||||
0x7C2C0200, // 0061 CALL R11 1
|
||||
0x902A3A0B, // 0062 SETMBR R10 K29 R11
|
||||
0x882C151D, // 0063 GETMBR R11 R10 K29
|
||||
0xB8320200, // 0064 GETNGBL R12 K1
|
||||
0x8C301910, // 0065 GETMET R12 R12 K16
|
||||
0x7C300200, // 0066 CALL R12 1
|
||||
0x902E1E0C, // 0067 SETMBR R11 K15 R12
|
||||
0x882C151D, // 0068 GETMBR R11 R10 K29
|
||||
0xB8320200, // 0069 GETNGBL R12 K1
|
||||
0x8C30191F, // 006A GETMET R12 R12 K31
|
||||
0x7C300200, // 006B CALL R12 1
|
||||
0x902E380C, // 006C SETMBR R11 K28 R12
|
||||
0x882C151D, // 006D GETMBR R11 R10 K29
|
||||
0x882C170F, // 006E GETMBR R11 R11 K15
|
||||
0x88300511, // 006F GETMBR R12 R2 K17
|
||||
0x902E220C, // 0070 SETMBR R11 K17 R12
|
||||
0x882C151D, // 0071 GETMBR R11 R10 K29
|
||||
0x882C170F, // 0072 GETMBR R11 R11 K15
|
||||
0x88300504, // 0073 GETMBR R12 R2 K4
|
||||
0x902E080C, // 0074 SETMBR R11 K4 R12
|
||||
0x882C151D, // 0075 GETMBR R11 R10 K29
|
||||
0x882C170F, // 0076 GETMBR R11 R11 K15
|
||||
0x88300505, // 0077 GETMBR R12 R2 K5
|
||||
0x902E0A0C, // 0078 SETMBR R11 K5 R12
|
||||
0x882C151D, // 0079 GETMBR R11 R10 K29
|
||||
0x882C171C, // 007A GETMBR R11 R11 K28
|
||||
0x8830051C, // 007B GETMBR R12 R2 K28
|
||||
0x902E380C, // 007C SETMBR R11 K28 R12
|
||||
0x8C2C1513, // 007D GETMET R11 R10 K19
|
||||
0x7C2C0200, // 007E CALL R11 1
|
||||
0x8C301714, // 007F GETMET R12 R11 K20
|
||||
0x7C300200, // 0080 CALL R12 1
|
||||
0x60340015, // 0081 GETGBL R13 G21
|
||||
0x5C381800, // 0082 MOVE R14 R12
|
||||
0x7C340200, // 0083 CALL R13 1
|
||||
0x8C381715, // 0084 GETMET R14 R11 K21
|
||||
0x5C401A00, // 0085 MOVE R16 R13
|
||||
0x7C380400, // 0086 CALL R14 2
|
||||
0x5C241C00, // 0087 MOVE R9 R14
|
||||
0xB83A2C00, // 0088 GETNGBL R14 K22
|
||||
0x8C381D17, // 0089 GETMET R14 R14 K23
|
||||
0x8C400918, // 008A GETMET R16 R4 K24
|
||||
0x58480020, // 008B LDCONST R18 K32
|
||||
0x684C0000, // 008C GETUPV R19 U0
|
||||
0x884C271A, // 008D GETMBR R19 R19 K26
|
||||
0x60500008, // 008E GETGBL R20 G8
|
||||
0x5C540400, // 008F MOVE R21 R2
|
||||
0x7C500200, // 0090 CALL R20 1
|
||||
0x5C540C00, // 0091 MOVE R21 R6
|
||||
0x8858051C, // 0092 GETMBR R22 R2 K28
|
||||
0x885C051C, // 0093 GETMBR R23 R2 K28
|
||||
0xB8620200, // 0094 GETNGBL R24 K1
|
||||
0x88603121, // 0095 GETMBR R24 R24 K33
|
||||
0x1C5C2E18, // 0096 EQ R23 R23 R24
|
||||
0x785E0001, // 0097 JMPF R23 #009A
|
||||
0x585C0021, // 0098 LDCONST R23 K33
|
||||
0x70020000, // 0099 JMP #009B
|
||||
0x585C0008, // 009A LDCONST R23 K8
|
||||
0x7C400E00, // 009B CALL R16 7
|
||||
0x5844001B, // 009C LDCONST R17 K27
|
||||
0x7C380600, // 009D CALL R14 3
|
||||
0x7002000D, // 009E JMP #00AD
|
||||
0xB82A2C00, // 009F GETNGBL R10 K22
|
||||
0x8C281517, // 00A0 GETMET R10 R10 K23
|
||||
0x8C300918, // 00A1 GETMET R12 R4 K24
|
||||
0x58380022, // 00A2 LDCONST R14 K34
|
||||
0x683C0000, // 00A3 GETUPV R15 U0
|
||||
0x883C1F1A, // 00A4 GETMBR R15 R15 K26
|
||||
0x60400008, // 00A5 GETGBL R16 G8
|
||||
0x5C440400, // 00A6 MOVE R17 R2
|
||||
0x7C400200, // 00A7 CALL R16 1
|
||||
0x5C440C00, // 00A8 MOVE R17 R6
|
||||
0x7C300A00, // 00A9 CALL R12 5
|
||||
0x5834001B, // 00AA LDCONST R13 K27
|
||||
0x7C280600, // 00AB CALL R10 3
|
||||
0x50200000, // 00AC LDBOOL R8 0 0
|
||||
0x80041000, // 00AD RET 1 R8
|
||||
0x80000000, // 00AE RET 0
|
||||
0x7826001E, // 00AD JMPF R9 #00CD
|
||||
0x6028000C, // 00AE GETGBL R10 G12
|
||||
0x882C0123, // 00AF GETMBR R11 R0 K35
|
||||
0x7C280200, // 00B0 CALL R10 1
|
||||
0x1C281524, // 00B1 EQ R10 R10 K36
|
||||
0x782A0004, // 00B2 JMPF R10 #00B8
|
||||
0x88280123, // 00B3 GETMBR R10 R0 K35
|
||||
0x8C281525, // 00B4 GETMET R10 R10 K37
|
||||
0x5C301200, // 00B5 MOVE R12 R9
|
||||
0x7C280400, // 00B6 CALL R10 2
|
||||
0x70020014, // 00B7 JMP #00CD
|
||||
0x5429FFFE, // 00B8 LDINT R10 -1
|
||||
0x882C0123, // 00B9 GETMBR R11 R0 K35
|
||||
0x9428160A, // 00BA GETIDX R10 R11 R10
|
||||
0x6030000C, // 00BB GETGBL R12 G12
|
||||
0x5C341400, // 00BC MOVE R13 R10
|
||||
0x7C300200, // 00BD CALL R12 1
|
||||
0x6034000C, // 00BE GETGBL R13 G12
|
||||
0x5C381200, // 00BF MOVE R14 R9
|
||||
0x7C340200, // 00C0 CALL R13 1
|
||||
0x0030180D, // 00C1 ADD R12 R12 R13
|
||||
0xB8360200, // 00C2 GETNGBL R13 K1
|
||||
0x88341B26, // 00C3 GETMBR R13 R13 K38
|
||||
0x88341B27, // 00C4 GETMBR R13 R13 K39
|
||||
0x1830180D, // 00C5 LE R12 R12 R13
|
||||
0x78320001, // 00C6 JMPF R12 #00C9
|
||||
0x40301409, // 00C7 CONNECT R12 R10 R9
|
||||
0x70020003, // 00C8 JMP #00CD
|
||||
0x882C0123, // 00C9 GETMBR R11 R0 K35
|
||||
0x8C2C1725, // 00CA GETMET R11 R11 K37
|
||||
0x5C341200, // 00CB MOVE R13 R9
|
||||
0x7C2C0400, // 00CC CALL R11 2
|
||||
0x80041000, // 00CD RET 1 R8
|
||||
})
|
||||
),
|
||||
be_nested_proto(
|
||||
|
@ -529,7 +529,7 @@ extern const bclass be_class_Matter_IM_ReportData;
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_IM_ReportData_send_im, /* name */
|
||||
be_nested_proto(
|
||||
21, /* nstack */
|
||||
19, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -537,43 +537,42 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[32]) { /* constants */
|
||||
( &(const bvalue[31]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(ready),
|
||||
/* K2 */ be_nested_str_weak(resp),
|
||||
/* K3 */ be_nested_str_weak(data),
|
||||
/* K4 */ be_nested_str_weak(more_chunked_messages),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K5 */ be_const_int(1),
|
||||
/* K6 */ be_nested_str_weak(attribute_reports),
|
||||
/* K7 */ be_nested_str_weak(to_TLV),
|
||||
/* K8 */ be_nested_str_weak(encode_len),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str_weak(MAX_MESSAGE),
|
||||
/* K11 */ be_const_int(2147483647),
|
||||
/* K12 */ be_nested_str_weak(tasmota),
|
||||
/* K13 */ be_nested_str_weak(log),
|
||||
/* K14 */ be_nested_str_weak(format),
|
||||
/* K15 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20next_chunk_X20exch_X3D_X25i),
|
||||
/* K16 */ be_nested_str_weak(get_exchangeid),
|
||||
/* K17 */ be_const_int(3),
|
||||
/* K18 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20first_chunk_X20exch_X3D_X25i),
|
||||
/* K19 */ be_nested_str_weak(tlv2raw),
|
||||
/* K20 */ be_nested_str_weak(encode_frame),
|
||||
/* K21 */ be_nested_str_weak(encrypt),
|
||||
/* K22 */ be_nested_str_weak(MTR_X3A_X20_X3Csnd_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20id_X3D_X25i_X20exch_X3D_X25i_X20rack_X3D_X25s),
|
||||
/* K23 */ be_nested_str_weak(session),
|
||||
/* K24 */ be_nested_str_weak(local_session_id),
|
||||
/* K25 */ be_nested_str_weak(message_counter),
|
||||
/* K26 */ be_nested_str_weak(exchange_id),
|
||||
/* K27 */ be_nested_str_weak(ack_message_counter),
|
||||
/* K28 */ be_nested_str_weak(send_response_frame),
|
||||
/* K29 */ be_nested_str_weak(last_counter),
|
||||
/* K30 */ be_nested_str_weak(MTR_X3A_X20to_be_sent_later_X20size_X3D_X25i_X20exch_X3D_X25i),
|
||||
/* K31 */ be_nested_str_weak(finish),
|
||||
/* K7 */ be_const_int(2147483647),
|
||||
/* K8 */ be_const_int(0),
|
||||
/* K9 */ be_nested_str_weak(tasmota),
|
||||
/* K10 */ be_nested_str_weak(log),
|
||||
/* K11 */ be_nested_str_weak(format),
|
||||
/* K12 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20next_chunk_X20exch_X3D_X25i),
|
||||
/* K13 */ be_nested_str_weak(get_exchangeid),
|
||||
/* K14 */ be_const_int(3),
|
||||
/* K15 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20first_chunk_X20exch_X3D_X25i),
|
||||
/* K16 */ be_nested_str_weak(to_TLV),
|
||||
/* K17 */ be_nested_str_weak(tlv2raw),
|
||||
/* K18 */ be_nested_str_weak(MAX_MESSAGE),
|
||||
/* K19 */ be_nested_str_weak(encode_frame),
|
||||
/* K20 */ be_nested_str_weak(encrypt),
|
||||
/* K21 */ be_nested_str_weak(MTR_X3A_X20_X3Csnd_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20id_X3D_X25i_X20exch_X3D_X25i_X20rack_X3D_X25s),
|
||||
/* K22 */ be_nested_str_weak(session),
|
||||
/* K23 */ be_nested_str_weak(local_session_id),
|
||||
/* K24 */ be_nested_str_weak(message_counter),
|
||||
/* K25 */ be_nested_str_weak(exchange_id),
|
||||
/* K26 */ be_nested_str_weak(ack_message_counter),
|
||||
/* K27 */ be_nested_str_weak(send_response_frame),
|
||||
/* K28 */ be_nested_str_weak(last_counter),
|
||||
/* K29 */ be_nested_str_weak(MTR_X3A_X20to_be_sent_later_X20size_X3D_X25i_X20exch_X3D_X25i),
|
||||
/* K30 */ be_nested_str_weak(finish),
|
||||
}),
|
||||
be_str_weak(send_im),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[147]) { /* code */
|
||||
( &(const binstruction[109]) { /* code */
|
||||
0xA40A0000, // 0000 IMPORT R2 K0
|
||||
0x880C0101, // 0001 GETMBR R3 R0 K1
|
||||
0x740E0001, // 0002 JMPT R3 #0005
|
||||
@ -583,144 +582,106 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */
|
||||
0x88100103, // 0006 GETMBR R4 R0 K3
|
||||
0x88140904, // 0007 GETMBR R5 R4 K4
|
||||
0x58180005, // 0008 LDCONST R6 K5
|
||||
0x581C0005, // 0009 LDCONST R7 K5
|
||||
0x4C1C0000, // 0009 LDNIL R7
|
||||
0x88200906, // 000A GETMBR R8 R4 K6
|
||||
0x4C240000, // 000B LDNIL R9
|
||||
0x20201009, // 000C NE R8 R8 R9
|
||||
0x78220003, // 000D JMPF R8 #0012
|
||||
0x6020000C, // 000E GETGBL R8 G12
|
||||
0x7822000D, // 000D JMPF R8 #001C
|
||||
0x40200D07, // 000E CONNECT R8 R6 K7
|
||||
0x88240906, // 000F GETMBR R9 R4 K6
|
||||
0x7C200200, // 0010 CALL R8 1
|
||||
0x70020000, // 0011 JMP #0013
|
||||
0x58200005, // 0012 LDCONST R8 K5
|
||||
0x24241105, // 0013 GT R9 R8 K5
|
||||
0x78260007, // 0014 JMPF R9 #001D
|
||||
0x88240906, // 0015 GETMBR R9 R4 K6
|
||||
0x94241305, // 0016 GETIDX R9 R9 K5
|
||||
0x8C241307, // 0017 GETMET R9 R9 K7
|
||||
0x7C240200, // 0018 CALL R9 1
|
||||
0x8C241308, // 0019 GETMET R9 R9 K8
|
||||
0x7C240200, // 001A CALL R9 1
|
||||
0x5C181200, // 001B MOVE R6 R9
|
||||
0x581C0009, // 001C LDCONST R7 K9
|
||||
0x8824010A, // 001D GETMBR R9 R0 K10
|
||||
0x14240C09, // 001E LT R9 R6 R9
|
||||
0x78260010, // 001F JMPF R9 #0031
|
||||
0x14240E08, // 0020 LT R9 R7 R8
|
||||
0x7826000E, // 0021 JMPF R9 #0031
|
||||
0x88240906, // 0022 GETMBR R9 R4 K6
|
||||
0x94241207, // 0023 GETIDX R9 R9 R7
|
||||
0x8C241307, // 0024 GETMET R9 R9 K7
|
||||
0x7C240200, // 0025 CALL R9 1
|
||||
0x8C241308, // 0026 GETMET R9 R9 K8
|
||||
0x7C240200, // 0027 CALL R9 1
|
||||
0x00280C09, // 0028 ADD R10 R6 R9
|
||||
0x882C010A, // 0029 GETMBR R11 R0 K10
|
||||
0x1428140B, // 002A LT R10 R10 R11
|
||||
0x782A0002, // 002B JMPF R10 #002F
|
||||
0x00180C09, // 002C ADD R6 R6 R9
|
||||
0x001C0F09, // 002D ADD R7 R7 K9
|
||||
0x70020000, // 002E JMP #0030
|
||||
0x70020000, // 002F JMP #0031
|
||||
0x7001FFEB, // 0030 JMP #001D
|
||||
0x60240012, // 0031 GETGBL R9 G18
|
||||
0x7C240000, // 0032 CALL R9 0
|
||||
0x88280906, // 0033 GETMBR R10 R4 K6
|
||||
0x4C2C0000, // 0034 LDNIL R11
|
||||
0x2028140B, // 0035 NE R10 R10 R11
|
||||
0x782A000D, // 0036 JMPF R10 #0045
|
||||
0x40280F0B, // 0037 CONNECT R10 R7 K11
|
||||
0x882C0906, // 0038 GETMBR R11 R4 K6
|
||||
0x9424160A, // 0039 GETIDX R9 R11 R10
|
||||
0x04300F09, // 003A SUB R12 R7 K9
|
||||
0x40320A0C, // 003B CONNECT R12 K5 R12
|
||||
0x88340906, // 003C GETMBR R13 R4 K6
|
||||
0x94301A0C, // 003D GETIDX R12 R13 R12
|
||||
0x90120C0C, // 003E SETMBR R4 K6 R12
|
||||
0x6030000C, // 003F GETGBL R12 G12
|
||||
0x5C341200, // 0040 MOVE R13 R9
|
||||
0x7C300200, // 0041 CALL R12 1
|
||||
0x24301905, // 0042 GT R12 R12 K5
|
||||
0x9012080C, // 0043 SETMBR R4 K4 R12
|
||||
0x70020001, // 0044 JMP #0047
|
||||
0x50280000, // 0045 LDBOOL R10 0 0
|
||||
0x9012080A, // 0046 SETMBR R4 K4 R10
|
||||
0x78160008, // 0047 JMPF R5 #0051
|
||||
0xB82A1800, // 0048 GETNGBL R10 K12
|
||||
0x8C28150D, // 0049 GETMET R10 R10 K13
|
||||
0x8C30050E, // 004A GETMET R12 R2 K14
|
||||
0x5838000F, // 004B LDCONST R14 K15
|
||||
0x8C3C0110, // 004C GETMET R15 R0 K16
|
||||
0x7C3C0200, // 004D CALL R15 1
|
||||
0x7C300600, // 004E CALL R12 3
|
||||
0x58340011, // 004F LDCONST R13 K17
|
||||
0x7C280600, // 0050 CALL R10 3
|
||||
0x88280904, // 0051 GETMBR R10 R4 K4
|
||||
0x782A000A, // 0052 JMPF R10 #005E
|
||||
0x5C280A00, // 0053 MOVE R10 R5
|
||||
0x742A0008, // 0054 JMPT R10 #005E
|
||||
0xB82A1800, // 0055 GETNGBL R10 K12
|
||||
0x8C28150D, // 0056 GETMET R10 R10 K13
|
||||
0x8C30050E, // 0057 GETMET R12 R2 K14
|
||||
0x58380012, // 0058 LDCONST R14 K18
|
||||
0x8C3C0110, // 0059 GETMET R15 R0 K16
|
||||
0x7C3C0200, // 005A CALL R15 1
|
||||
0x7C300600, // 005B CALL R12 3
|
||||
0x58340011, // 005C LDCONST R13 K17
|
||||
0x7C280600, // 005D CALL R10 3
|
||||
0x88280103, // 005E GETMBR R10 R0 K3
|
||||
0x8C281507, // 005F GETMET R10 R10 K7
|
||||
0x7C280200, // 0060 CALL R10 1
|
||||
0x8C2C1513, // 0061 GETMET R11 R10 K19
|
||||
0x60340015, // 0062 GETGBL R13 G21
|
||||
0x8838010A, // 0063 GETMBR R14 R0 K10
|
||||
0x7C340200, // 0064 CALL R13 1
|
||||
0x7C2C0400, // 0065 CALL R11 2
|
||||
0x8C300714, // 0066 GETMET R12 R3 K20
|
||||
0x5C381600, // 0067 MOVE R14 R11
|
||||
0x7C300400, // 0068 CALL R12 2
|
||||
0x8C300715, // 0069 GETMET R12 R3 K21
|
||||
0x7C300200, // 006A CALL R12 1
|
||||
0xB8321800, // 006B GETNGBL R12 K12
|
||||
0x8C30190D, // 006C GETMET R12 R12 K13
|
||||
0x8C38050E, // 006D GETMET R14 R2 K14
|
||||
0x58400016, // 006E LDCONST R16 K22
|
||||
0x88440717, // 006F GETMBR R17 R3 K23
|
||||
0x88442318, // 0070 GETMBR R17 R17 K24
|
||||
0x88480719, // 0071 GETMBR R18 R3 K25
|
||||
0x884C071A, // 0072 GETMBR R19 R3 K26
|
||||
0x8850071B, // 0073 GETMBR R20 R3 K27
|
||||
0x7C380C00, // 0074 CALL R14 6
|
||||
0x583C0011, // 0075 LDCONST R15 K17
|
||||
0x7C300600, // 0076 CALL R12 3
|
||||
0x8C30031C, // 0077 GETMET R12 R1 K28
|
||||
0x5C380600, // 0078 MOVE R14 R3
|
||||
0x7C300400, // 0079 CALL R12 2
|
||||
0x88300719, // 007A GETMBR R12 R3 K25
|
||||
0x90023A0C, // 007B SETMBR R0 K29 R12
|
||||
0x6030000C, // 007C GETGBL R12 G12
|
||||
0x5C341200, // 007D MOVE R13 R9
|
||||
0x7C300200, // 007E CALL R12 1
|
||||
0x24301905, // 007F GT R12 R12 K5
|
||||
0x7832000E, // 0080 JMPF R12 #0090
|
||||
0x90120C09, // 0081 SETMBR R4 K6 R9
|
||||
0xB8321800, // 0082 GETNGBL R12 K12
|
||||
0x8C30190D, // 0083 GETMET R12 R12 K13
|
||||
0x8C38050E, // 0084 GETMET R14 R2 K14
|
||||
0x5840001E, // 0085 LDCONST R16 K30
|
||||
0x6044000C, // 0086 GETGBL R17 G12
|
||||
0x88480906, // 0087 GETMBR R18 R4 K6
|
||||
0x7C440200, // 0088 CALL R17 1
|
||||
0x8848071A, // 0089 GETMBR R18 R3 K26
|
||||
0x7C380800, // 008A CALL R14 4
|
||||
0x583C0011, // 008B LDCONST R15 K17
|
||||
0x7C300600, // 008C CALL R12 3
|
||||
0x50300000, // 008D LDBOOL R12 0 0
|
||||
0x9002020C, // 008E SETMBR R0 K1 R12
|
||||
0x70020001, // 008F JMP #0092
|
||||
0x50300200, // 0090 LDBOOL R12 1 0
|
||||
0x90023E0C, // 0091 SETMBR R0 K31 R12
|
||||
0x80000000, // 0092 RET 0
|
||||
0x941C1208, // 0010 GETIDX R7 R9 R8
|
||||
0x04280D05, // 0011 SUB R10 R6 K5
|
||||
0x402A100A, // 0012 CONNECT R10 K8 R10
|
||||
0x882C0906, // 0013 GETMBR R11 R4 K6
|
||||
0x9428160A, // 0014 GETIDX R10 R11 R10
|
||||
0x90120C0A, // 0015 SETMBR R4 K6 R10
|
||||
0x6028000C, // 0016 GETGBL R10 G12
|
||||
0x5C2C0E00, // 0017 MOVE R11 R7
|
||||
0x7C280200, // 0018 CALL R10 1
|
||||
0x24281508, // 0019 GT R10 R10 K8
|
||||
0x9012080A, // 001A SETMBR R4 K4 R10
|
||||
0x70020001, // 001B JMP #001E
|
||||
0x50200000, // 001C LDBOOL R8 0 0
|
||||
0x90120808, // 001D SETMBR R4 K4 R8
|
||||
0x78160008, // 001E JMPF R5 #0028
|
||||
0xB8221200, // 001F GETNGBL R8 K9
|
||||
0x8C20110A, // 0020 GETMET R8 R8 K10
|
||||
0x8C28050B, // 0021 GETMET R10 R2 K11
|
||||
0x5830000C, // 0022 LDCONST R12 K12
|
||||
0x8C34010D, // 0023 GETMET R13 R0 K13
|
||||
0x7C340200, // 0024 CALL R13 1
|
||||
0x7C280600, // 0025 CALL R10 3
|
||||
0x582C000E, // 0026 LDCONST R11 K14
|
||||
0x7C200600, // 0027 CALL R8 3
|
||||
0x88200904, // 0028 GETMBR R8 R4 K4
|
||||
0x7822000A, // 0029 JMPF R8 #0035
|
||||
0x5C200A00, // 002A MOVE R8 R5
|
||||
0x74220008, // 002B JMPT R8 #0035
|
||||
0xB8221200, // 002C GETNGBL R8 K9
|
||||
0x8C20110A, // 002D GETMET R8 R8 K10
|
||||
0x8C28050B, // 002E GETMET R10 R2 K11
|
||||
0x5830000F, // 002F LDCONST R12 K15
|
||||
0x8C34010D, // 0030 GETMET R13 R0 K13
|
||||
0x7C340200, // 0031 CALL R13 1
|
||||
0x7C280600, // 0032 CALL R10 3
|
||||
0x582C000E, // 0033 LDCONST R11 K14
|
||||
0x7C200600, // 0034 CALL R8 3
|
||||
0x88200103, // 0035 GETMBR R8 R0 K3
|
||||
0x8C201110, // 0036 GETMET R8 R8 K16
|
||||
0x7C200200, // 0037 CALL R8 1
|
||||
0x8C241111, // 0038 GETMET R9 R8 K17
|
||||
0x602C0015, // 0039 GETGBL R11 G21
|
||||
0x88300112, // 003A GETMBR R12 R0 K18
|
||||
0x7C2C0200, // 003B CALL R11 1
|
||||
0x7C240400, // 003C CALL R9 2
|
||||
0x8C280713, // 003D GETMET R10 R3 K19
|
||||
0x5C301200, // 003E MOVE R12 R9
|
||||
0x7C280400, // 003F CALL R10 2
|
||||
0x8C280714, // 0040 GETMET R10 R3 K20
|
||||
0x7C280200, // 0041 CALL R10 1
|
||||
0xB82A1200, // 0042 GETNGBL R10 K9
|
||||
0x8C28150A, // 0043 GETMET R10 R10 K10
|
||||
0x8C30050B, // 0044 GETMET R12 R2 K11
|
||||
0x58380015, // 0045 LDCONST R14 K21
|
||||
0x883C0716, // 0046 GETMBR R15 R3 K22
|
||||
0x883C1F17, // 0047 GETMBR R15 R15 K23
|
||||
0x88400718, // 0048 GETMBR R16 R3 K24
|
||||
0x88440719, // 0049 GETMBR R17 R3 K25
|
||||
0x8848071A, // 004A GETMBR R18 R3 K26
|
||||
0x7C300C00, // 004B CALL R12 6
|
||||
0x5834000E, // 004C LDCONST R13 K14
|
||||
0x7C280600, // 004D CALL R10 3
|
||||
0x8C28031B, // 004E GETMET R10 R1 K27
|
||||
0x5C300600, // 004F MOVE R12 R3
|
||||
0x7C280400, // 0050 CALL R10 2
|
||||
0x88280718, // 0051 GETMBR R10 R3 K24
|
||||
0x9002380A, // 0052 SETMBR R0 K28 R10
|
||||
0x4C280000, // 0053 LDNIL R10
|
||||
0x20280E0A, // 0054 NE R10 R7 R10
|
||||
0x782A0013, // 0055 JMPF R10 #006A
|
||||
0x6028000C, // 0056 GETGBL R10 G12
|
||||
0x5C2C0E00, // 0057 MOVE R11 R7
|
||||
0x7C280200, // 0058 CALL R10 1
|
||||
0x24281508, // 0059 GT R10 R10 K8
|
||||
0x782A000E, // 005A JMPF R10 #006A
|
||||
0x90120C07, // 005B SETMBR R4 K6 R7
|
||||
0xB82A1200, // 005C GETNGBL R10 K9
|
||||
0x8C28150A, // 005D GETMET R10 R10 K10
|
||||
0x8C30050B, // 005E GETMET R12 R2 K11
|
||||
0x5838001D, // 005F LDCONST R14 K29
|
||||
0x603C000C, // 0060 GETGBL R15 G12
|
||||
0x88400906, // 0061 GETMBR R16 R4 K6
|
||||
0x7C3C0200, // 0062 CALL R15 1
|
||||
0x88400719, // 0063 GETMBR R16 R3 K25
|
||||
0x7C300800, // 0064 CALL R12 4
|
||||
0x5834000E, // 0065 LDCONST R13 K14
|
||||
0x7C280600, // 0066 CALL R10 3
|
||||
0x50280000, // 0067 LDBOOL R10 0 0
|
||||
0x9002020A, // 0068 SETMBR R0 K1 R10
|
||||
0x70020001, // 0069 JMP #006C
|
||||
0x50280200, // 006A LDBOOL R10 1 0
|
||||
0x90023C0A, // 006B SETMBR R0 K30 R10
|
||||
0x80000000, // 006C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -0,0 +1,179 @@
|
||||
/* Solidification of Matter_Plugin_Sensor.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: pre_value
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_pre_value, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(pre_value),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80040200, // 0000 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: parse_sensors
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota_sensor_matcher),
|
||||
/* K1 */ be_nested_str_weak(pre_value),
|
||||
/* K2 */ be_nested_str_weak(match),
|
||||
/* K3 */ be_nested_str_weak(shadow_value),
|
||||
/* K4 */ be_nested_str_weak(valued_changed),
|
||||
}),
|
||||
be_str_weak(parse_sensors),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x780A0011, // 0001 JMPF R2 #0014
|
||||
0x8C080101, // 0002 GETMET R2 R0 K1
|
||||
0x6010000A, // 0003 GETGBL R4 G10
|
||||
0x88140100, // 0004 GETMBR R5 R0 K0
|
||||
0x8C140B02, // 0005 GETMET R5 R5 K2
|
||||
0x5C1C0200, // 0006 MOVE R7 R1
|
||||
0x7C140400, // 0007 CALL R5 2
|
||||
0x7C100200, // 0008 CALL R4 1
|
||||
0x7C080400, // 0009 CALL R2 2
|
||||
0x4C0C0000, // 000A LDNIL R3
|
||||
0x200C0403, // 000B NE R3 R2 R3
|
||||
0x780E0006, // 000C JMPF R3 #0014
|
||||
0x880C0103, // 000D GETMBR R3 R0 K3
|
||||
0x200C0403, // 000E NE R3 R2 R3
|
||||
0x780E0002, // 000F JMPF R3 #0013
|
||||
0x8C0C0104, // 0010 GETMET R3 R0 K4
|
||||
0x5C140400, // 0011 MOVE R5 R2
|
||||
0x7C0C0400, // 0012 CALL R3 2
|
||||
0x90020602, // 0013 SETMBR R0 K3 R2
|
||||
0x80000000, // 0014 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** 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
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_Sensor,
|
||||
3,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(7,
|
||||
( (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(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_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_str_weak(Matter_Plugin_Sensor)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Sensor_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor);
|
||||
be_setglobal(vm, "Matter_Plugin_Sensor");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -0,0 +1,220 @@
|
||||
/* Solidification of Matter_Plugin_Sensor_Humidity.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x54160404, // 0002 LDINT R5 1029
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: 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
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Humidity_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(shadow_value),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(U2),
|
||||
/* K9 */ be_nested_str_weak(NULL),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_const_int(3),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0404, // 0005 LDINT R7 1029
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E0035, // 0007 JMPF R7 #003E
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0011, // 0009 JMPF R7 #001C
|
||||
0x881C0106, // 000A GETMBR R7 R0 K6
|
||||
0x4C200000, // 000B LDNIL R8
|
||||
0x201C0E08, // 000C NE R7 R7 R8
|
||||
0x781E0007, // 000D JMPF R7 #0016
|
||||
0x8C1C0907, // 000E GETMET R7 R4 K7
|
||||
0x88240908, // 000F GETMBR R9 R4 K8
|
||||
0x60280009, // 0010 GETGBL R10 G9
|
||||
0x882C0106, // 0011 GETMBR R11 R0 K6
|
||||
0x7C280200, // 0012 CALL R10 1
|
||||
0x7C1C0600, // 0013 CALL R7 3
|
||||
0x80040E00, // 0014 RET 1 R7
|
||||
0x70020004, // 0015 JMP #001B
|
||||
0x8C1C0907, // 0016 GETMET R7 R4 K7
|
||||
0x88240909, // 0017 GETMBR R9 R4 K9
|
||||
0x4C280000, // 0018 LDNIL R10
|
||||
0x7C1C0600, // 0019 CALL R7 3
|
||||
0x80040E00, // 001A RET 1 R7
|
||||
0x70020020, // 001B JMP #003D
|
||||
0x1C1C0D0A, // 001C EQ R7 R6 K10
|
||||
0x781E0005, // 001D JMPF R7 #0024
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x88240908, // 001F GETMBR R9 R4 K8
|
||||
0x542A01F3, // 0020 LDINT R10 500
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x70020018, // 0023 JMP #003D
|
||||
0x1C1C0D0B, // 0024 EQ R7 R6 K11
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0907, // 0026 GETMET R7 R4 K7
|
||||
0x88240908, // 0027 GETMBR R9 R4 K8
|
||||
0x542A270F, // 0028 LDINT R10 10000
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020010, // 002B JMP #003D
|
||||
0x541EFFFB, // 002C LDINT R7 65532
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0907, // 002F GETMET R7 R4 K7
|
||||
0x8824090C, // 0030 GETMBR R9 R4 K12
|
||||
0x58280005, // 0031 LDCONST R10 K5
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x70020007, // 0034 JMP #003D
|
||||
0x541EFFFC, // 0035 LDINT R7 65533
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0004, // 0037 JMPF R7 #003D
|
||||
0x8C1C0907, // 0038 GETMET R7 R4 K7
|
||||
0x8824090C, // 0039 GETMBR R9 R4 K12
|
||||
0x5828000D, // 003A LDCONST R10 K13
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020007, // 003D JMP #0046
|
||||
0x601C0003, // 003E GETGBL R7 G3
|
||||
0x5C200000, // 003F MOVE R8 R0
|
||||
0x7C1C0200, // 0040 CALL R7 1
|
||||
0x8C1C0F0E, // 0041 GETMET R7 R7 K14
|
||||
0x5C240200, // 0042 MOVE R9 R1
|
||||
0x5C280400, // 0043 MOVE R10 R2
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x80000000, // 0046 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor_Humidity
|
||||
********************************************************************/
|
||||
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,
|
||||
( (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(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_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(775, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ 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(1029, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(5,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Humidity)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Sensor_Humidity_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Humidity);
|
||||
be_setglobal(vm, "Matter_Plugin_Sensor_Humidity");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -0,0 +1,219 @@
|
||||
/* Solidification of Matter_Plugin_Sensor_Light.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Light;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Light_valued_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x541603FF, // 0002 LDINT R5 1024
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: 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_nested_proto(
|
||||
12, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(shadow_value),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(I2),
|
||||
/* K9 */ be_nested_str_weak(NULL),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_const_int(3),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E03FF, // 0005 LDINT R7 1024
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E0035, // 0007 JMPF R7 #003E
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0011, // 0009 JMPF R7 #001C
|
||||
0x881C0106, // 000A GETMBR R7 R0 K6
|
||||
0x4C200000, // 000B LDNIL R8
|
||||
0x201C0E08, // 000C NE R7 R7 R8
|
||||
0x781E0007, // 000D JMPF R7 #0016
|
||||
0x8C1C0907, // 000E GETMET R7 R4 K7
|
||||
0x88240908, // 000F GETMBR R9 R4 K8
|
||||
0x60280009, // 0010 GETGBL R10 G9
|
||||
0x882C0106, // 0011 GETMBR R11 R0 K6
|
||||
0x7C280200, // 0012 CALL R10 1
|
||||
0x7C1C0600, // 0013 CALL R7 3
|
||||
0x80040E00, // 0014 RET 1 R7
|
||||
0x70020004, // 0015 JMP #001B
|
||||
0x8C1C0907, // 0016 GETMET R7 R4 K7
|
||||
0x88240909, // 0017 GETMBR R9 R4 K9
|
||||
0x4C280000, // 0018 LDNIL R10
|
||||
0x7C1C0600, // 0019 CALL R7 3
|
||||
0x80040E00, // 001A RET 1 R7
|
||||
0x70020020, // 001B JMP #003D
|
||||
0x1C1C0D0A, // 001C EQ R7 R6 K10
|
||||
0x781E0005, // 001D JMPF R7 #0024
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x88240908, // 001F GETMBR R9 R4 K8
|
||||
0x58280005, // 0020 LDCONST R10 K5
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x70020018, // 0023 JMP #003D
|
||||
0x1C1C0D0B, // 0024 EQ R7 R6 K11
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0907, // 0026 GETMET R7 R4 K7
|
||||
0x88240908, // 0027 GETMBR R9 R4 K8
|
||||
0x542A270F, // 0028 LDINT R10 10000
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020010, // 002B JMP #003D
|
||||
0x541EFFFB, // 002C LDINT R7 65532
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0907, // 002F GETMET R7 R4 K7
|
||||
0x8824090C, // 0030 GETMBR R9 R4 K12
|
||||
0x58280005, // 0031 LDCONST R10 K5
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x70020007, // 0034 JMP #003D
|
||||
0x541EFFFC, // 0035 LDINT R7 65533
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0004, // 0037 JMPF R7 #003D
|
||||
0x8C1C0907, // 0038 GETMET R7 R4 K7
|
||||
0x8824090C, // 0039 GETMBR R9 R4 K12
|
||||
0x5828000D, // 003A LDCONST R10 K13
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020007, // 003D JMP #0046
|
||||
0x601C0003, // 003E GETGBL R7 G3
|
||||
0x5C200000, // 003F MOVE R8 R0
|
||||
0x7C1C0200, // 0040 CALL R7 1
|
||||
0x8C1C0F0E, // 0041 GETMET R7 R7 K14
|
||||
0x5C240200, // 0042 MOVE R9 R1
|
||||
0x5C280400, // 0043 MOVE R10 R2
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x80000000, // 0046 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor_Light
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor;
|
||||
be_local_class(Matter_Plugin_Sensor_Light,
|
||||
0,
|
||||
&be_class_Matter_Plugin_Sensor,
|
||||
be_nested_map(5,
|
||||
( (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_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(262, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ 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(1024, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(5,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Light)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
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");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -0,0 +1,219 @@
|
||||
/* Solidification of Matter_Plugin_Sensor_Pressure.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x54160402, // 0002 LDINT R5 1027
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: 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
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Pressure_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(shadow_value),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(I2),
|
||||
/* K9 */ be_nested_str_weak(NULL),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_const_int(3),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0402, // 0005 LDINT R7 1027
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E0035, // 0007 JMPF R7 #003E
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0011, // 0009 JMPF R7 #001C
|
||||
0x881C0106, // 000A GETMBR R7 R0 K6
|
||||
0x4C200000, // 000B LDNIL R8
|
||||
0x201C0E08, // 000C NE R7 R7 R8
|
||||
0x781E0007, // 000D JMPF R7 #0016
|
||||
0x8C1C0907, // 000E GETMET R7 R4 K7
|
||||
0x88240908, // 000F GETMBR R9 R4 K8
|
||||
0x60280009, // 0010 GETGBL R10 G9
|
||||
0x882C0106, // 0011 GETMBR R11 R0 K6
|
||||
0x7C280200, // 0012 CALL R10 1
|
||||
0x7C1C0600, // 0013 CALL R7 3
|
||||
0x80040E00, // 0014 RET 1 R7
|
||||
0x70020004, // 0015 JMP #001B
|
||||
0x8C1C0907, // 0016 GETMET R7 R4 K7
|
||||
0x88240909, // 0017 GETMBR R9 R4 K9
|
||||
0x4C280000, // 0018 LDNIL R10
|
||||
0x7C1C0600, // 0019 CALL R7 3
|
||||
0x80040E00, // 001A RET 1 R7
|
||||
0x70020020, // 001B JMP #003D
|
||||
0x1C1C0D0A, // 001C EQ R7 R6 K10
|
||||
0x781E0005, // 001D JMPF R7 #0024
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x88240908, // 001F GETMBR R9 R4 K8
|
||||
0x542A01F3, // 0020 LDINT R10 500
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x70020018, // 0023 JMP #003D
|
||||
0x1C1C0D0B, // 0024 EQ R7 R6 K11
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0907, // 0026 GETMET R7 R4 K7
|
||||
0x88240908, // 0027 GETMBR R9 R4 K8
|
||||
0x542A05DB, // 0028 LDINT R10 1500
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020010, // 002B JMP #003D
|
||||
0x541EFFFB, // 002C LDINT R7 65532
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0907, // 002F GETMET R7 R4 K7
|
||||
0x8824090C, // 0030 GETMBR R9 R4 K12
|
||||
0x58280005, // 0031 LDCONST R10 K5
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x70020007, // 0034 JMP #003D
|
||||
0x541EFFFC, // 0035 LDINT R7 65533
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0004, // 0037 JMPF R7 #003D
|
||||
0x8C1C0907, // 0038 GETMET R7 R4 K7
|
||||
0x8824090C, // 0039 GETMBR R9 R4 K12
|
||||
0x5828000D, // 003A LDCONST R10 K13
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020007, // 003D JMP #0046
|
||||
0x601C0003, // 003E GETGBL R7 G3
|
||||
0x5C200000, // 003F MOVE R8 R0
|
||||
0x7C1C0200, // 0040 CALL R7 1
|
||||
0x8C1C0F0E, // 0041 GETMET R7 R7 K14
|
||||
0x5C240200, // 0042 MOVE R9 R1
|
||||
0x5C280400, // 0043 MOVE R10 R2
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x80000000, // 0046 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor_Pressure
|
||||
********************************************************************/
|
||||
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,
|
||||
( (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(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_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(773, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ 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(1027, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(5,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Pressure)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Sensor_Pressure_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Pressure);
|
||||
be_setglobal(vm, "Matter_Plugin_Sensor_Pressure");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -0,0 +1,215 @@
|
||||
/* Solidification of Matter_Plugin_Sensor_Temp.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x54160401, // 0002 LDINT R5 1026
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: 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
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Temp_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(shadow_value),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(I2),
|
||||
/* K9 */ be_nested_str_weak(NULL),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[69]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0401, // 0005 LDINT R7 1026
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E0033, // 0007 JMPF R7 #003C
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E000F, // 0009 JMPF R7 #001A
|
||||
0x881C0106, // 000A GETMBR R7 R0 K6
|
||||
0x4C200000, // 000B LDNIL R8
|
||||
0x201C0E08, // 000C NE R7 R7 R8
|
||||
0x781E0005, // 000D JMPF R7 #0014
|
||||
0x8C1C0907, // 000E GETMET R7 R4 K7
|
||||
0x88240908, // 000F GETMBR R9 R4 K8
|
||||
0x88280106, // 0010 GETMBR R10 R0 K6
|
||||
0x7C1C0600, // 0011 CALL R7 3
|
||||
0x80040E00, // 0012 RET 1 R7
|
||||
0x70020004, // 0013 JMP #0019
|
||||
0x8C1C0907, // 0014 GETMET R7 R4 K7
|
||||
0x88240909, // 0015 GETMBR R9 R4 K9
|
||||
0x4C280000, // 0016 LDNIL R10
|
||||
0x7C1C0600, // 0017 CALL R7 3
|
||||
0x80040E00, // 0018 RET 1 R7
|
||||
0x70020020, // 0019 JMP #003B
|
||||
0x1C1C0D0A, // 001A EQ R7 R6 K10
|
||||
0x781E0005, // 001B JMPF R7 #0022
|
||||
0x8C1C0907, // 001C GETMET R7 R4 K7
|
||||
0x88240908, // 001D GETMBR R9 R4 K8
|
||||
0x5429EC77, // 001E LDINT R10 -5000
|
||||
0x7C1C0600, // 001F CALL R7 3
|
||||
0x80040E00, // 0020 RET 1 R7
|
||||
0x70020018, // 0021 JMP #003B
|
||||
0x1C1C0D0B, // 0022 EQ R7 R6 K11
|
||||
0x781E0005, // 0023 JMPF R7 #002A
|
||||
0x8C1C0907, // 0024 GETMET R7 R4 K7
|
||||
0x88240908, // 0025 GETMBR R9 R4 K8
|
||||
0x542A3A97, // 0026 LDINT R10 15000
|
||||
0x7C1C0600, // 0027 CALL R7 3
|
||||
0x80040E00, // 0028 RET 1 R7
|
||||
0x70020010, // 0029 JMP #003B
|
||||
0x541EFFFB, // 002A LDINT R7 65532
|
||||
0x1C1C0C07, // 002B EQ R7 R6 R7
|
||||
0x781E0005, // 002C JMPF R7 #0033
|
||||
0x8C1C0907, // 002D GETMET R7 R4 K7
|
||||
0x8824090C, // 002E GETMBR R9 R4 K12
|
||||
0x58280005, // 002F LDCONST R10 K5
|
||||
0x7C1C0600, // 0030 CALL R7 3
|
||||
0x80040E00, // 0031 RET 1 R7
|
||||
0x70020007, // 0032 JMP #003B
|
||||
0x541EFFFC, // 0033 LDINT R7 65533
|
||||
0x1C1C0C07, // 0034 EQ R7 R6 R7
|
||||
0x781E0004, // 0035 JMPF R7 #003B
|
||||
0x8C1C0907, // 0036 GETMET R7 R4 K7
|
||||
0x8824090C, // 0037 GETMBR R9 R4 K12
|
||||
0x542A0003, // 0038 LDINT R10 4
|
||||
0x7C1C0600, // 0039 CALL R7 3
|
||||
0x80040E00, // 003A RET 1 R7
|
||||
0x70020007, // 003B JMP #0044
|
||||
0x601C0003, // 003C GETGBL R7 G3
|
||||
0x5C200000, // 003D MOVE R8 R0
|
||||
0x7C1C0200, // 003E CALL R7 1
|
||||
0x8C1C0F0D, // 003F GETMET R7 R7 K13
|
||||
0x5C240200, // 0040 MOVE R9 R1
|
||||
0x5C280400, // 0041 MOVE R10 R2
|
||||
0x7C1C0600, // 0042 CALL R7 3
|
||||
0x80040E00, // 0043 RET 1 R7
|
||||
0x80000000, // 0044 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor_Temp
|
||||
********************************************************************/
|
||||
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,
|
||||
( (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(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_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(770, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ 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,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Temp)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Sensor_Temp_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Temp);
|
||||
be_setglobal(vm, "Matter_Plugin_Sensor_Temp");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -1,295 +0,0 @@
|
||||
/* Solidification of Matter_Plugin_Temp_Sensor.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Temp_Sensor;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_temperature
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Temp_Sensor_get_temperature, /* 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(shadow_temperature),
|
||||
}),
|
||||
be_str_weak(get_temperature),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_second
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Temp_Sensor_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_temperature),
|
||||
}),
|
||||
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: parse_sensors
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Temp_Sensor_parse_sensors, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota_sensor_matcher),
|
||||
/* K1 */ be_nested_str_weak(match),
|
||||
/* K2 */ be_nested_str_weak(shadow_temperature),
|
||||
/* K3 */ be_nested_str_weak(attribute_updated),
|
||||
/* K4 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(parse_sensors),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x780A0011, // 0001 JMPF R2 #0014
|
||||
0x6008000A, // 0002 GETGBL R2 G10
|
||||
0x880C0100, // 0003 GETMBR R3 R0 K0
|
||||
0x8C0C0701, // 0004 GETMET R3 R3 K1
|
||||
0x5C140200, // 0005 MOVE R5 R1
|
||||
0x7C0C0400, // 0006 CALL R3 2
|
||||
0x7C080200, // 0007 CALL R2 1
|
||||
0x4C0C0000, // 0008 LDNIL R3
|
||||
0x200C0403, // 0009 NE R3 R2 R3
|
||||
0x780E0008, // 000A JMPF R3 #0014
|
||||
0x880C0102, // 000B GETMBR R3 R0 K2
|
||||
0x200C0403, // 000C NE R3 R2 R3
|
||||
0x780E0004, // 000D JMPF R3 #0013
|
||||
0x8C0C0103, // 000E GETMET R3 R0 K3
|
||||
0x4C140000, // 000F LDNIL R5
|
||||
0x541A0401, // 0010 LDINT R6 1026
|
||||
0x581C0004, // 0011 LDCONST R7 K4
|
||||
0x7C0C0800, // 0012 CALL R3 4
|
||||
0x90020402, // 0013 SETMBR R0 K2 R2
|
||||
0x80000000, // 0014 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Temp_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 function: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Temp_Sensor_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
13, /* 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(shadow_temperature),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(I2),
|
||||
/* K9 */ be_nested_str_weak(NULL),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[55]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0401, // 0005 LDINT R7 1026
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E0025, // 0007 JMPF R7 #002E
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0013, // 0009 JMPF R7 #001E
|
||||
0x881C0106, // 000A GETMBR R7 R0 K6
|
||||
0x4C200000, // 000B LDNIL R8
|
||||
0x201C0E08, // 000C NE R7 R7 R8
|
||||
0x781E0009, // 000D JMPF R7 #0018
|
||||
0x8C1C0907, // 000E GETMET R7 R4 K7
|
||||
0x88240908, // 000F GETMBR R9 R4 K8
|
||||
0x60280009, // 0010 GETGBL R10 G9
|
||||
0x882C0106, // 0011 GETMBR R11 R0 K6
|
||||
0x54320063, // 0012 LDINT R12 100
|
||||
0x082C160C, // 0013 MUL R11 R11 R12
|
||||
0x7C280200, // 0014 CALL R10 1
|
||||
0x7C1C0600, // 0015 CALL R7 3
|
||||
0x80040E00, // 0016 RET 1 R7
|
||||
0x70020004, // 0017 JMP #001D
|
||||
0x8C1C0907, // 0018 GETMET R7 R4 K7
|
||||
0x88240909, // 0019 GETMBR R9 R4 K9
|
||||
0x4C280000, // 001A LDNIL R10
|
||||
0x7C1C0600, // 001B CALL R7 3
|
||||
0x80040E00, // 001C RET 1 R7
|
||||
0x7002000E, // 001D JMP #002D
|
||||
0x1C1C0D0A, // 001E EQ R7 R6 K10
|
||||
0x781E0005, // 001F JMPF R7 #0026
|
||||
0x8C1C0907, // 0020 GETMET R7 R4 K7
|
||||
0x88240908, // 0021 GETMBR R9 R4 K8
|
||||
0x5429EC77, // 0022 LDINT R10 -5000
|
||||
0x7C1C0600, // 0023 CALL R7 3
|
||||
0x80040E00, // 0024 RET 1 R7
|
||||
0x70020006, // 0025 JMP #002D
|
||||
0x1C1C0D0B, // 0026 EQ R7 R6 K11
|
||||
0x781E0004, // 0027 JMPF R7 #002D
|
||||
0x8C1C0907, // 0028 GETMET R7 R4 K7
|
||||
0x88240908, // 0029 GETMBR R9 R4 K8
|
||||
0x542A3A97, // 002A LDINT R10 15000
|
||||
0x7C1C0600, // 002B CALL R7 3
|
||||
0x80040E00, // 002C RET 1 R7
|
||||
0x70020007, // 002D JMP #0036
|
||||
0x601C0003, // 002E GETGBL R7 G3
|
||||
0x5C200000, // 002F MOVE R8 R0
|
||||
0x7C1C0200, // 0030 CALL R7 1
|
||||
0x8C1C0F0C, // 0031 GETMET R7 R7 K12
|
||||
0x5C240200, // 0032 MOVE R9 R1
|
||||
0x5C280400, // 0033 MOVE R10 R2
|
||||
0x7C1C0600, // 0034 CALL R7 3
|
||||
0x80040E00, // 0035 RET 1 R7
|
||||
0x80000000, // 0036 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Temp_Sensor
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_Temp_Sensor,
|
||||
3,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(10,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ 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(770, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Temp_Sensor_read_attribute_closure) },
|
||||
{ be_const_key_weak(get_temperature, 1), be_const_closure(Matter_Plugin_Temp_Sensor_get_temperature_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Temp_Sensor_init_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, 9), 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,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(every_second, 3), be_const_closure(Matter_Plugin_Temp_Sensor_every_second_closure) },
|
||||
{ be_const_key_weak(tasmota_sensor_filter, 8), be_const_var(0) },
|
||||
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Temp_Sensor_parse_sensors_closure) },
|
||||
{ be_const_key_weak(shadow_temperature, -1), be_const_var(2) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Temp_Sensor)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Temp_Sensor_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Temp_Sensor);
|
||||
be_setglobal(vm, "Matter_Plugin_Temp_Sensor");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -1861,25 +1861,35 @@ be_local_closure(Matter_TLV_list_add_obj, /* name */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(to_TLV),
|
||||
/* K1 */ be_nested_str_weak(tag_sub),
|
||||
/* K2 */ be_nested_str_weak(val),
|
||||
/* K3 */ be_nested_str_weak(push),
|
||||
/* K0 */ be_nested_str_weak(val),
|
||||
/* K1 */ be_nested_str_weak(push),
|
||||
/* K2 */ be_nested_str_weak(to_TLV),
|
||||
/* K3 */ be_nested_str_weak(tag_sub),
|
||||
}),
|
||||
be_str_weak(add_obj),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[11]) { /* code */
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0x4C0C0000, // 0000 LDNIL R3
|
||||
0x200C0403, // 0001 NE R3 R2 R3
|
||||
0x780E0006, // 0002 JMPF R3 #000A
|
||||
0x8C0C0500, // 0003 GETMET R3 R2 K0
|
||||
0x7C0C0200, // 0004 CALL R3 1
|
||||
0x900E0201, // 0005 SETMBR R3 K1 R1
|
||||
0x88100102, // 0006 GETMBR R4 R0 K2
|
||||
0x8C100903, // 0007 GETMET R4 R4 K3
|
||||
0x5C180600, // 0008 MOVE R6 R3
|
||||
0x7C100400, // 0009 CALL R4 2
|
||||
0x80040000, // 000A RET 1 R0
|
||||
0x780E0010, // 0002 JMPF R3 #0014
|
||||
0x600C000F, // 0003 GETGBL R3 G15
|
||||
0x5C100400, // 0004 MOVE R4 R2
|
||||
0x60140015, // 0005 GETGBL R5 G21
|
||||
0x7C0C0400, // 0006 CALL R3 2
|
||||
0x780E0004, // 0007 JMPF R3 #000D
|
||||
0x880C0100, // 0008 GETMBR R3 R0 K0
|
||||
0x8C0C0701, // 0009 GETMET R3 R3 K1
|
||||
0x5C140400, // 000A MOVE R5 R2
|
||||
0x7C0C0400, // 000B CALL R3 2
|
||||
0x70020006, // 000C JMP #0014
|
||||
0x8C0C0502, // 000D GETMET R3 R2 K2
|
||||
0x7C0C0200, // 000E CALL R3 1
|
||||
0x900E0601, // 000F SETMBR R3 K3 R1
|
||||
0x88100100, // 0010 GETMBR R4 R0 K0
|
||||
0x8C100901, // 0011 GETMET R4 R4 K1
|
||||
0x5C180600, // 0012 MOVE R6 R3
|
||||
0x7C100400, // 0013 CALL R4 2
|
||||
0x80040000, // 0014 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -2516,7 +2526,7 @@ be_local_closure(Matter_TLV_list_tlv2raw, /* name */
|
||||
}),
|
||||
be_str_weak(tlv2raw),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[37]) { /* code */
|
||||
( &(const binstruction[44]) { /* code */
|
||||
0x4C080000, // 0000 LDNIL R2
|
||||
0x1C080202, // 0001 EQ R2 R1 R2
|
||||
0x780A0002, // 0002 JMPF R2 #0006
|
||||
@ -2538,22 +2548,29 @@ be_local_closure(Matter_TLV_list_tlv2raw, /* name */
|
||||
0x600C0010, // 0012 GETGBL R3 G16
|
||||
0x5C100400, // 0013 MOVE R4 R2
|
||||
0x7C0C0200, // 0014 CALL R3 1
|
||||
0xA8020005, // 0015 EXBLK 0 #001C
|
||||
0xA802000C, // 0015 EXBLK 0 #0023
|
||||
0x5C100600, // 0016 MOVE R4 R3
|
||||
0x7C100000, // 0017 CALL R4 0
|
||||
0x8C140905, // 0018 GETMET R5 R4 K5
|
||||
0x5C1C0200, // 0019 MOVE R7 R1
|
||||
0x7C140400, // 001A CALL R5 2
|
||||
0x7001FFF9, // 001B JMP #0016
|
||||
0x580C0006, // 001C LDCONST R3 K6
|
||||
0xAC0C0200, // 001D CATCH R3 1 0
|
||||
0xB0080000, // 001E RAISE 2 R0 R0
|
||||
0x8C0C0307, // 001F GETMET R3 R1 K7
|
||||
0x88140108, // 0020 GETMBR R5 R0 K8
|
||||
0x88140B09, // 0021 GETMBR R5 R5 K9
|
||||
0x5818000A, // 0022 LDCONST R6 K10
|
||||
0x7C0C0600, // 0023 CALL R3 3
|
||||
0x80040200, // 0024 RET 1 R1
|
||||
0x6014000F, // 0018 GETGBL R5 G15
|
||||
0x5C180800, // 0019 MOVE R6 R4
|
||||
0x601C0015, // 001A GETGBL R7 G21
|
||||
0x7C140400, // 001B CALL R5 2
|
||||
0x78160001, // 001C JMPF R5 #001F
|
||||
0x40140204, // 001D CONNECT R5 R1 R4
|
||||
0x70020002, // 001E JMP #0022
|
||||
0x8C140905, // 001F GETMET R5 R4 K5
|
||||
0x5C1C0200, // 0020 MOVE R7 R1
|
||||
0x7C140400, // 0021 CALL R5 2
|
||||
0x7001FFF2, // 0022 JMP #0016
|
||||
0x580C0006, // 0023 LDCONST R3 K6
|
||||
0xAC0C0200, // 0024 CATCH R3 1 0
|
||||
0xB0080000, // 0025 RAISE 2 R0 R0
|
||||
0x8C0C0307, // 0026 GETMET R3 R1 K7
|
||||
0x88140108, // 0027 GETMBR R5 R0 K8
|
||||
0x88140B09, // 0028 GETMBR R5 R5 K9
|
||||
0x5818000A, // 0029 LDCONST R6 K10
|
||||
0x7C0C0600, // 002A CALL R3 3
|
||||
0x80040200, // 002B RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user