mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-16 07:16:30 +00:00
Matter support for Air Quality sensors (#21559)
This commit is contained in:
parent
a51c511d52
commit
4f732477dd
@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
|
||||
## [14.1.0.1]
|
||||
### Added
|
||||
- Berry solidification of `bytes` instances
|
||||
- Matter support for Air Quality sensors
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
@ -229,6 +229,8 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
|
||||
#include "solidify/solidified_Matter_Plugin_1_Device.h"
|
||||
#include "solidify/solidified_Matter_Plugin_2_OnOff.h"
|
||||
#include "solidify/solidified_Matter_Plugin_9_Virt_OnOff.h"
|
||||
#include "solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h"
|
||||
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h"
|
||||
#include "solidify/solidified_Matter_Plugin_3_Light0.h"
|
||||
#include "solidify/solidified_Matter_Plugin_9_Virt_Light0.h"
|
||||
#include "solidify/solidified_Matter_Plugin_2_Light1.h"
|
||||
@ -271,6 +273,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
|
||||
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h"
|
||||
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h"
|
||||
#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h"
|
||||
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h"
|
||||
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h"
|
||||
#include "solidify/solidified_Matter_Plugin_z_All.h"
|
||||
#include "solidify/solidified_Matter_zz_Device.h"
|
||||
|
@ -830,7 +830,7 @@ class Matter_IM
|
||||
tasmota.log(format("MTR: >Subscribe (%6i) %s (min=%i, max=%i, keep=%i) sub=%i fabric_filtered=%s",
|
||||
msg.session.local_session_id, attr_req.concat(" "), sub.min_interval, sub.max_interval, query.keep_subscriptions ? 1 : 0, sub.subscription_id, query.fabric_filtered), 3)
|
||||
if query.event_requests != nil && size(query.event_requests) > 0
|
||||
tasmota.log(f"MTR: >Subscribe (%6i) event_requests_size={size(query.event_requests)}", 3)
|
||||
tasmota.log(f"MTR: >Subscribe ({msg.session.local_session_id:6i}) event_requests_size={size(query.event_requests)}", 3)
|
||||
end
|
||||
|
||||
var ret = self._inner_process_read_request(msg.session, query, msg, true #-no_log-#)
|
||||
|
@ -480,10 +480,38 @@ class Matter_Plugin
|
||||
# The map is pre-cleaned and contains only keys declared in
|
||||
# `self.UPDATE_COMMANDS` with the adequate case
|
||||
# (no need to handle case-insensitive)
|
||||
def update_virtual(payload_json)
|
||||
def update_virtual(payload)
|
||||
# pass
|
||||
end
|
||||
|
||||
#######################################################################
|
||||
# _parse_update_virtual: parse a single value out of MtrUpdate JSON
|
||||
#
|
||||
# Used internally by `update_virtual`
|
||||
#
|
||||
# Args
|
||||
# payload: the native payload (converted from JSON) from MtrUpdate
|
||||
# key: key name in the JSON payload to read from, do nothing if key does not exist or content is `null`
|
||||
# old_val: previous value, used to detect a change or return the value unchanged
|
||||
# type_func: type enforcer for value, typically `int`, `bool`, `str`, `number`, `real`
|
||||
# cluster/attribute: in case the value has change, publish a change to cluster/attribute
|
||||
#
|
||||
# Returns:
|
||||
# `old_val` if key does not exist, JSON value is `null`, or value is unchanged
|
||||
# or new value from JSON (which is the new shadow value)
|
||||
#
|
||||
def _parse_update_virtual(payload, key, old_val, type_func, cluster, attribute)
|
||||
var val = payload.find(key)
|
||||
if (val != nil)
|
||||
val = type_func(val)
|
||||
if (val != old_val)
|
||||
self.attribute_updated(cluster, attribute)
|
||||
end
|
||||
return val
|
||||
end
|
||||
return old_val
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
matter.Plugin = Matter_Plugin
|
||||
|
@ -200,9 +200,46 @@ class Matter_Plugin_Device : Matter_Plugin
|
||||
# sensors
|
||||
_stats_json_inner("shadow_contact", "Contact")
|
||||
_stats_json_inner("shadow_occupancy", "Occupancy")
|
||||
|
||||
# air quality
|
||||
_stats_json_inner("shadow_air_quality", "AirQuality")
|
||||
_stats_json_inner("shadow_co2", "CO2")
|
||||
_stats_json_inner("shadow_pm1", "PM1")
|
||||
_stats_json_inner("shadow_pm2_5", "PM2.5")
|
||||
_stats_json_inner("shadow_pm10", "PM10")
|
||||
_stats_json_inner("shadow_tvoc", "TVOC")
|
||||
|
||||
# print(ret)
|
||||
return ret
|
||||
end
|
||||
|
||||
#######################################################################
|
||||
# _parse_sensor_entry: internal helper function
|
||||
#
|
||||
# Used internally by `update_virtual`
|
||||
#
|
||||
# Args
|
||||
# payload: the native payload (converted from JSON) from MtrUpdate
|
||||
# key: key name in the JSON payload to read from, do nothing if key does not exist or content is `null`
|
||||
# type_func: type enforcer for value, typically `int`, `bool`, `str`, `number`, `real`
|
||||
# old_val: previous value, used to detect a change or return the value unchanged
|
||||
# cluster/attribute: in case the value has change, publish a change to cluster/attribute
|
||||
#
|
||||
# Returns:
|
||||
# `old_val` if key does not exist, JSON value is `null`, or value is unchanged
|
||||
# or new value from JSON (which is the new shadow value)
|
||||
#
|
||||
def _parse_sensor_entry(payload, key, old_val, type_func, cluster, attribute)
|
||||
var val = payload.find(key)
|
||||
if (val != nil)
|
||||
val = type_func(val)
|
||||
if val != old_val
|
||||
self.attribute_updated(cluster, attribute) # CurrentPositionTiltPercent100ths
|
||||
end
|
||||
return val
|
||||
end
|
||||
return old_val
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Device = Matter_Plugin_Device
|
||||
|
@ -230,16 +230,16 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val_onoff = payload_json.find("Power")
|
||||
var val_bri = payload_json.find("Bri")
|
||||
def update_virtual(payload)
|
||||
var val_onoff = payload.find("Power")
|
||||
var val_bri = payload.find("Bri")
|
||||
if val_bri != nil
|
||||
self.set_bri(int(val_bri), val_onoff)
|
||||
return # don't call super() because we already handeld 'Power'
|
||||
elif val_onoff != nil
|
||||
self.set_onoff(bool(val_onoff))
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -149,12 +149,12 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val_onoff = payload_json.find("Power")
|
||||
def update_virtual(payload)
|
||||
var val_onoff = payload.find("Power")
|
||||
if val_onoff != nil
|
||||
self.set_onoff(bool(val_onoff))
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -93,8 +93,8 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val = payload_json.find(self.JSON_NAME)
|
||||
def update_virtual(payload)
|
||||
var val = payload.find(self.JSON_NAME)
|
||||
if val != nil
|
||||
if type(val) == 'bool' val = int(val) end
|
||||
|
||||
@ -103,7 +103,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
|
||||
self.shadow_value = val
|
||||
end
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -0,0 +1,219 @@
|
||||
#
|
||||
# Matter_Plugin_Sensor_Air_Quality.be - implements the behavior for a Air_Quality 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/>.
|
||||
#
|
||||
|
||||
import matter
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
#@ solidify:Matter_Plugin_Sensor_Air_Quality,weak
|
||||
|
||||
class Matter_Plugin_Sensor_Air_Quality : Matter_Plugin_Device
|
||||
static var TYPE = "airquality" # name of the plug-in in json
|
||||
static var DISPLAY_NAME = "Air Quality" # display name of the plug-in
|
||||
static var ARG = "airquality" # additional argument name (or empty if none)
|
||||
static var ARG_HINT = "Device key (ex: SCD40)"
|
||||
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
|
||||
static var JSON_NAME = "AirQuality" # Name of the sensor attribute in JSON payloads
|
||||
static var UPDATE_TIME = 30000 # update every 30 s
|
||||
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "AirQuality", "CO2", "PM1", "PM2.5", "PM10", "TVOC", "NO2")
|
||||
static var CLUSTERS = matter.consolidate_clusters(_class, {
|
||||
0x005B: [0], # Air Quality - no writable
|
||||
0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement
|
||||
0x042C: [0,1,2,8,9], # PM1 Concentration Measurement
|
||||
0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement
|
||||
0x042D: [0,1,2,8,9], # PM10 Concentration Measurement
|
||||
0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement
|
||||
0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement
|
||||
})
|
||||
|
||||
static var TYPES = { 0x002C: 1 } # Air Quality, rev 1
|
||||
|
||||
var prefix # key prefix in JSON
|
||||
var shadow_air_quality # Human readable air quality index
|
||||
# 0: Unknown
|
||||
# 1: Good
|
||||
# 4: Poor
|
||||
# var shadow_pb0_3
|
||||
# var shadow_pb0_5
|
||||
# var shadow_pb1
|
||||
# var shadow_pb2_5
|
||||
# var shadow_pb5
|
||||
# var shadow_pb10
|
||||
var shadow_pm1
|
||||
var shadow_pm2_5
|
||||
# var shadow_pm5
|
||||
var shadow_pm10
|
||||
var shadow_co2
|
||||
# var shadow_eco2
|
||||
var shadow_no2
|
||||
var shadow_tvoc
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, config)
|
||||
super(self).init(device, endpoint, config)
|
||||
self.shadow_air_quality = false
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# parse_configuration
|
||||
#
|
||||
# Parse configuration map
|
||||
def parse_configuration(config)
|
||||
self.prefix = str(config.find(self.ARG))
|
||||
end
|
||||
|
||||
|
||||
#############################################################
|
||||
# parse sensor
|
||||
#
|
||||
# parse the output from `ShutterPosition`
|
||||
# Ex: `{"Shutter1":{"Position":50,"Direction":0,"Target":50,"Tilt":30}}`
|
||||
def _parse_sensor_entry(v, key, old_val, cluster, attribute)
|
||||
var val = v.find(key)
|
||||
if (val != nil)
|
||||
if val != old_val
|
||||
self.attribute_updated(cluster, attribute) # CurrentPositionTiltPercent100ths
|
||||
end
|
||||
return val
|
||||
end
|
||||
return old_val
|
||||
end
|
||||
#
|
||||
def parse_sensors(payload)
|
||||
var v = payload.find(self.prefix)
|
||||
if (v != nil)
|
||||
# CO2
|
||||
self.shadow_co2 = self._parse_sensor_entry(v, "CarbonDioxide", self.shadow_co2, number, 0x040D, 0x0000)
|
||||
# PM1
|
||||
self.shadow_pm1 = self._parse_sensor_entry(v, "PM1", self.shadow_pm1, number, 0x042C, 0x0000)
|
||||
# PM2.5
|
||||
self.shadow_pm2_5 = self._parse_sensor_entry(v, "PM2.5", self.shadow_pm2_5, number, 0x042A, 0x0000)
|
||||
# PM10
|
||||
self.shadow_pm10 = self._parse_sensor_entry(v, "PM10", self.shadow_pm10, number, 0x042D, 0x0000)
|
||||
# TVOC
|
||||
self.shadow_tvoc = self._parse_sensor_entry(v, "TVOC", self.shadow_tvoc, number, 0x042E, 0x0000)
|
||||
# NO2
|
||||
self.shadow_no2 = self._parse_sensor_entry(v, "NO2", self.shadow_no2, number, 0x0413, 0x0000)
|
||||
end
|
||||
super(self).parse_sensors(payload) # parse other shutter values
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
var ret
|
||||
|
||||
# mutualize code for all values
|
||||
# Args
|
||||
# shadow_value: value of the shadow for the type
|
||||
# unit: unit of value, `0`=PPM if not specified
|
||||
#
|
||||
# Returns
|
||||
# `nil`: no attribute match
|
||||
# <qany>: TLV value
|
||||
def handle_value(shadow_value, unit)
|
||||
if (unit == nil) unit = 0 end # default unit is `0` = PPM
|
||||
if attribute == 0x0000 # ---------- Measured Value / float ----------
|
||||
if shadow_value != nil
|
||||
return tlv_solo.set(TLV.FLOAT, shadow_value)
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasured Value / float ----------
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
elif attribute == 0x0002 # ---------- MaxMeasured Value / float ----------
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
elif attribute == 0x0008 # ---------- MeasurementUnit / u8 ----------
|
||||
return tlv_solo.set(TLV.U1, unit)
|
||||
elif attribute == 0x0009 # ---------- MeasurementMedium / u8 ----------
|
||||
return tlv_solo.set(TLV.U1, 0) # 0 = Air
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return tlv_solo.set(TLV.U4, 1) # MEA = NumericMeasurement
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x005B # ========== Air Quality ==========
|
||||
if attribute == 0x0000 # ---------- AirQuality / U8 ----------
|
||||
if self.shadow_air_quality != nil
|
||||
return tlv_solo.set(TLV.U1, self.shadow_air_quality)
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
# elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
# return tlv_solo.set(TLV.U4, 0) #
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x040D # ========== Carbon Dioxide Concentration Measurement ==========
|
||||
if (ret := handle_value(self.shadow_co2))
|
||||
return ret
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x042C # ========== PM1 Concentration Measurement ==========
|
||||
if (ret := handle_value(self.shadow_pm1))
|
||||
return ret
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x042A # ========== PM2.5 Concentration Measurement ==========
|
||||
if (ret := handle_value(self.shadow_pm2_5))
|
||||
return ret
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x042D # ========== PM10 Concentration Measurement ==========
|
||||
if (ret := handle_value(self.shadow_pm10))
|
||||
return ret
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x042E # ========== TVOC ==========
|
||||
if (ret := handle_value(self.shadow_tvoc))
|
||||
return ret
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0413 # ========== NO2 ==========
|
||||
if (ret := handle_value(self.shadow_no2))
|
||||
return ret
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
|
||||
#######################################################################
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload)
|
||||
self.shadow_air_quality = self._parse_update_virtual(payload, "AirQuality", number, self.shadow_air_quality, 0x005B, 0x0000)
|
||||
self.shadow_co2 = self._parse_update_virtual(payload, "CO2", self.shadow_co2, number, 0x040D, 0x0000)
|
||||
self.shadow_pm1 = self._parse_update_virtual(payload, "PM1", self.shadow_pm1, number, 0x042C, 0x0000)
|
||||
self.shadow_pm2_5 = self._parse_update_virtual(payload, "PM2.5", self.shadow_pm2_5, number, 0x042A, 0x0000)
|
||||
self.shadow_pm10 = self._parse_update_virtual(payload, "PM10", self.shadow_pm10, number, 0x042D, 0x0000)
|
||||
self.shadow_tvoc = self._parse_update_virtual(payload, "TVOC", self.shadow_tvoc, number, 0x042E, 0x0000)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Sensor_Air_Quality = Matter_Plugin_Sensor_Air_Quality
|
@ -102,16 +102,9 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val_onoff = payload_json.find("Contact")
|
||||
if val_onoff != nil
|
||||
val_onoff = bool(val_onoff)
|
||||
if self.shadow_contact != val_onoff
|
||||
self.attribute_updated(0x0045, 0x0000)
|
||||
self.shadow_contact = val_onoff
|
||||
end
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
def update_virtual(payload)
|
||||
self.shadow_contact = self._parse_update_virtual(payload, "Contact", self.shadow_contact, bool, 0x0045, 0x0000)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -106,16 +106,9 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val_onoff = payload_json.find("Occupancy")
|
||||
if val_onoff != nil
|
||||
val_onoff = bool(val_onoff)
|
||||
if self.shadow_occupancy != val_onoff
|
||||
self.attribute_updated(0x0406, 0x0000)
|
||||
self.shadow_occupancy = val_onoff
|
||||
end
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
def update_virtual(payload)
|
||||
self.val_onoff = self._parse_update_virtual(payload, "Occupancy", self.val_onoff, bool, 0x0406, 0x0000)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -0,0 +1,112 @@
|
||||
#
|
||||
# Matter_Plugin_Bridge_Sensor_Contact.be - implements Air Quality Sensor via HTTP to Tasmota
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
import matter
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
#@ solidify:Matter_Plugin_Bridge_Sensor_Air_Quality,weak
|
||||
|
||||
class Matter_Plugin_Bridge_Sensor_Air_Quality : Matter_Plugin_Bridge_HTTP
|
||||
static var TYPE = "http_airquality" # name of the plug-in in json
|
||||
static var DISPLAY_NAME = "Air Quality" # display name of the plug-in
|
||||
static var ARG = "airquality" # additional argument name (or empty if none)
|
||||
static var ARG_HINT = "Sensor Model"
|
||||
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
|
||||
static var UPDATE_TIME = 5000 # update every 5s
|
||||
static var UPDATE_CMD = "Status 8" # command to send for updates
|
||||
|
||||
static var CLUSTERS = matter.consolidate_clusters(_class, {
|
||||
0x005B: [0], # Air Quality - no writable
|
||||
0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement
|
||||
0x042C: [0,1,2,8,9], # PM1 Concentration Measurement
|
||||
0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement
|
||||
0x042D: [0,1,2,8,9], # PM10 Concentration Measurement
|
||||
0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement
|
||||
0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement
|
||||
})
|
||||
|
||||
static var TYPES = { 0x002C: 1 } # Air Quality, rev 1
|
||||
|
||||
var prefix # key prefix in JSON
|
||||
var shadow_air_quality # Human readable air quality index
|
||||
# 0: Unknown
|
||||
# 1: Good
|
||||
# 4: Poor
|
||||
# var shadow_pb0_3
|
||||
# var shadow_pb0_5
|
||||
# var shadow_pb1
|
||||
# var shadow_pb2_5
|
||||
# var shadow_pb5
|
||||
# var shadow_pb10
|
||||
var shadow_pm1
|
||||
var shadow_pm2_5
|
||||
# var shadow_pm5
|
||||
var shadow_pm10
|
||||
var shadow_co2
|
||||
# var shadow_eco2
|
||||
var shadow_no2
|
||||
var shadow_tvoc
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.prefix = str(arguments.find(self.ARG))
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
|
||||
#
|
||||
# This call is synnchronous and blocking.
|
||||
def parse_update(data, index)
|
||||
if index == 8 # Status 8
|
||||
var values = data.find(self.prefix)
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute = matter.Plugin_Sensor_Air_Quality.read_attribute
|
||||
|
||||
#############################################################
|
||||
# web_values
|
||||
#
|
||||
# Show values of the remote device as HTML
|
||||
def web_values()
|
||||
def web_values_single(name, val)
|
||||
if val != nil
|
||||
import webserver
|
||||
webserver.content_send(f"{name} {val:i} ")
|
||||
end
|
||||
end
|
||||
|
||||
self.web_values_prefix() # display '| ' and name if present
|
||||
web_values_single("Air", self.shadow_air_quality)
|
||||
web_values_single("PM1", self.shadow_pm1)
|
||||
web_values_single("PM2.5", self.shadow_pm2_5)
|
||||
web_values_single("PM10", self.shadow_pm10)
|
||||
web_values_single("CO2", self.shadow_co2)
|
||||
web_values_single("NO2", self.shadow_no2)
|
||||
web_values_single("TVOC", self.shadow_tvoc)
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Bridge_Sensor_Air_Quality = Matter_Plugin_Bridge_Sensor_Air_Quality
|
@ -120,7 +120,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
|
||||
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
|
||||
return tlv_solo.set(TLV.U1, self.shadow_ct)
|
||||
return tlv_solo.set_or_nil(TLV.U1, self.shadow_ct) # if `nil` it is replaced with TLV.NULL
|
||||
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 2)# 2 = ColorTemperatureMireds
|
||||
elif attribute == 0x000F # ---------- Options / u1 ----------
|
||||
@ -179,12 +179,12 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val_ct = int(payload_json.find("CT")) # int or nil
|
||||
def update_virtual(payload)
|
||||
var val_ct = int(payload.find("CT")) # int or nil
|
||||
if (val_ct != nil)
|
||||
self.set_ct(val_ct)
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -127,9 +127,9 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
|
||||
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0000 # ---------- CurrentHue / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, self.shadow_hue)
|
||||
return tlv_solo.set_or_nil(TLV.U1, self.shadow_hue)
|
||||
elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ----------
|
||||
return tlv_solo.set(TLV.U1, self.shadow_sat)
|
||||
return tlv_solo.set_or_nil(TLV.U1, self.shadow_sat)
|
||||
elif attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)
|
||||
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
||||
@ -213,13 +213,13 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
|
||||
# update_virtual
|
||||
#
|
||||
# Update internal state for virtual devices
|
||||
def update_virtual(payload_json)
|
||||
var val_hue = int(payload_json.find("Hue")) # int or nil
|
||||
var val_sat = int(payload_json.find("Sat")) # int or nil
|
||||
def update_virtual(payload)
|
||||
var val_hue = int(payload.find("Hue")) # int or nil
|
||||
var val_sat = int(payload.find("Sat")) # int or nil
|
||||
if (val_hue != nil) || (val_sat != nil)
|
||||
self.set_hue_sat(val_hue, val_sat)
|
||||
end
|
||||
super(self).update_virtual(payload_json)
|
||||
super(self).update_virtual(payload)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -53,28 +53,7 @@ class Matter_Plugin_Bridge_Sensor_Flow : Matter_Plugin_Bridge_Sensor
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0404 # ========== Flow Measurement 2.1.2 p.127 ==========
|
||||
if attribute == 0x0000 # ---------- MeasuredValue / i16 ----------
|
||||
if self.shadow_value != nil
|
||||
return tlv_solo.set(TLV.U2, int(self.shadow_value)) # MeasuredValue represents 10 x flow in m3/h.
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
|
||||
return tlv_solo.set(TLV.U2, 0) # 0 m3/h
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
|
||||
return tlv_solo.set(TLV.U2, 65534) # 65534 m3/h
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
static var read_attribute = matter.Plugin_Sensor_Flow.read_attribute
|
||||
|
||||
#############################################################
|
||||
# web_values
|
||||
|
@ -53,28 +53,7 @@ class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Bridge_Sensor
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
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_solo.set(TLV.U2, int(self.shadow_value))
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / u16 ----------
|
||||
return tlv_solo.set(TLV.U2, 500) # 0%
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / u16 ----------
|
||||
return tlv_solo.set(TLV.U2, 10000) # 100%
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
def read_attribute = matter.Plugin_Sensor_Humidity.read_attribute
|
||||
|
||||
#############################################################
|
||||
# web_values
|
||||
|
@ -60,28 +60,7 @@ class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Bridge_Sensor
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
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_solo.set(TLV.U2, int(self.shadow_value))
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
|
||||
return tlv_solo.set(TLV.U2, 1) # 1 lux
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
|
||||
return tlv_solo.set(TLV.U2, 0xFFFE)
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
def read_attribute = matter.Plugin_Sensor_Illuminance.read_attribute
|
||||
|
||||
#############################################################
|
||||
# web_values
|
||||
|
@ -53,28 +53,7 @@ class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Bridge_Sensor
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
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_solo.set(TLV.I2, int(self.shadow_value))
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
|
||||
return tlv_solo.set(TLV.I2, 500) # 500 hPA
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
|
||||
return tlv_solo.set(TLV.I2, 1500) # 1500 hPA
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
def read_attribute = matter.Plugin_Sensor_Pressure.read_attribute
|
||||
|
||||
#############################################################
|
||||
# web_values
|
||||
|
@ -56,28 +56,7 @@ class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Bridge_Sensor
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0402 # ========== Temperature Measurement 2.3 p.97 ==========
|
||||
if attribute == 0x0000 # ---------- MeasuredValue / i16 (*100) ----------
|
||||
if self.shadow_value != nil
|
||||
return tlv_solo.set(TLV.I2, self.shadow_value)
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 (*100) ----------
|
||||
return tlv_solo.set(TLV.I2, -5000) # -50 °C
|
||||
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 (*100) ----------
|
||||
return tlv_solo.set(TLV.I2, 15000) # 150 °C
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
def read_attribute = matter.Plugin_Sensor_Temp.read_attribute
|
||||
|
||||
#############################################################
|
||||
# web_values
|
||||
|
@ -92,36 +92,7 @@ class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Bridge_Light1
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
|
||||
if self.shadow_ct != nil
|
||||
return tlv_solo.set(TLV.U1, self.shadow_ct)
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 2)# 2 = ColorTemperatureMireds
|
||||
elif attribute == 0x000F # ---------- Options / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)
|
||||
elif attribute == 0x400B # ---------- ColorTempPhysicalMinMireds / u2 ----------
|
||||
return tlv_solo.set(TLV.U1, self.ct_min)
|
||||
elif attribute == 0x400C # ---------- ColorTempPhysicalMaxMireds / u2 ----------
|
||||
return tlv_solo.set(TLV.U1, self.ct_max)
|
||||
|
||||
elif attribute == 0x400A # ---------- ColorCapabilities / map32 ----------
|
||||
return tlv_solo.set(TLV.U4, 0x10) # CT
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
def read_attribute = matter.Plugin_Light2.read_attribute
|
||||
|
||||
#############################################################
|
||||
# Invoke a command
|
||||
|
@ -92,45 +92,7 @@ class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Bridge_Light1
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx, tlv_solo)
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0000 # ---------- CurrentHue / u1 ----------
|
||||
if self.shadow_hue != nil
|
||||
return tlv_solo.set(TLV.U1, self.shadow_hue)
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ----------
|
||||
if self.shadow_sat != nil
|
||||
return tlv_solo.set(TLV.U1, self.shadow_sat)
|
||||
else
|
||||
return tlv_solo.set(TLV.NULL, nil)
|
||||
end
|
||||
elif attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)
|
||||
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)# 0 = CurrentHue and CurrentSaturation
|
||||
elif attribute == 0x000F # ---------- Options / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)
|
||||
elif attribute == 0x4001 # ---------- EnhancedColorMode / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)
|
||||
elif attribute == 0x400A # ---------- ColorCapabilities / map32 ----------
|
||||
return tlv_solo.set(TLV.U4, 0x01) # HS
|
||||
|
||||
# Defined Primaries Information Attribute Set
|
||||
elif attribute == 0x0010 # ---------- NumberOfPrimaries / u1 ----------
|
||||
return tlv_solo.set(TLV.U1, 0)
|
||||
end
|
||||
|
||||
end
|
||||
return super(self).read_attribute(session, ctx, tlv_solo)
|
||||
end
|
||||
def read_attribute = matter.Plugin_Light3.read_attribute
|
||||
|
||||
#############################################################
|
||||
# Invoke a command
|
||||
|
@ -0,0 +1,34 @@
|
||||
#
|
||||
# Matter_Plugin_9_Virt_Sensor_Air_Quality.be - implements the behavior for a Virtual Air Quality 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/>.
|
||||
#
|
||||
|
||||
import matter
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
#@ solidify:Matter_Plugin_Virt_Sensor_Air_Quality,weak
|
||||
|
||||
class Matter_Plugin_Virt_Sensor_Air_Quality : Matter_Plugin_Sensor_Air_Quality
|
||||
static var TYPE = "v_airquality" # name of the plug-in in json
|
||||
static var DISPLAY_NAME = "v.Air Quality" # display name of the plug-in
|
||||
static var ARG = "" # no arg for virtual device
|
||||
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
|
||||
static var VIRTUAL = true # virtual device
|
||||
|
||||
end
|
||||
matter.Plugin_Virt_Sensor_Air_Quality = Matter_Plugin_Virt_Sensor_Air_Quality
|
@ -141,6 +141,20 @@ class Matter_TLV
|
||||
return self
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# set value, equivalent to create_TLV() without allocation
|
||||
#
|
||||
# if value is `nil` replace with TLV.NULL
|
||||
def set_or_nil(t, value)
|
||||
self.reset()
|
||||
if (value == nil) t = 0x14 end # force TLV.NULL
|
||||
if value != nil || t == 0x14 #-t == matter.TLV.NULL-# # put the actual number for performance
|
||||
self.typ = t
|
||||
self.val = value
|
||||
return self
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# neutral converter
|
||||
|
@ -34,8 +34,10 @@ import matter
|
||||
class Matter_UI
|
||||
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt"
|
||||
"|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|waterleak"
|
||||
"|airquality"
|
||||
"|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3"
|
||||
"|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_waterleak"
|
||||
"|v_airquality"
|
||||
static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3"
|
||||
"|http_temperature|http_pressure|http_illuminance|http_humidity"
|
||||
"|http_occupancy|http_contact|http_flow|http_waterleak"
|
||||
|
@ -3484,13 +3484,13 @@ be_local_closure(class_Matter_IM_subscribe_request, /* name */
|
||||
/* K27 */ be_nested_str_weak(fabric_filtered),
|
||||
/* K28 */ be_const_int(3),
|
||||
/* K29 */ be_nested_str_weak(event_requests),
|
||||
/* K30 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X25_X256i_X29_X20event_requests_size_X3D_X25s),
|
||||
/* K30 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X256i_X29_X20event_requests_size_X3D_X25s),
|
||||
/* K31 */ be_nested_str_weak(_inner_process_read_request),
|
||||
/* K32 */ be_nested_str_weak(send_subscribe_response),
|
||||
}),
|
||||
be_str_weak(subscribe_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[99]) { /* code */
|
||||
( &(const binstruction[101]) { /* code */
|
||||
0xB80E0000, // 0000 GETNGBL R3 K0
|
||||
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
||||
0x7C0C0200, // 0002 CALL R3 1
|
||||
@ -3559,37 +3559,39 @@ be_local_closure(class_Matter_IM_subscribe_request, /* name */
|
||||
0x881C071D, // 0041 GETMBR R7 R3 K29
|
||||
0x4C200000, // 0042 LDNIL R8
|
||||
0x201C0E08, // 0043 NE R7 R7 R8
|
||||
0x781E000E, // 0044 JMPF R7 #0054
|
||||
0x781E0010, // 0044 JMPF R7 #0056
|
||||
0x601C000C, // 0045 GETGBL R7 G12
|
||||
0x8820071D, // 0046 GETMBR R8 R3 K29
|
||||
0x7C1C0200, // 0047 CALL R7 1
|
||||
0x241C0F19, // 0048 GT R7 R7 K25
|
||||
0x781E0009, // 0049 JMPF R7 #0054
|
||||
0x781E000B, // 0049 JMPF R7 #0056
|
||||
0xB81E2000, // 004A GETNGBL R7 K16
|
||||
0x8C1C0F11, // 004B GETMET R7 R7 K17
|
||||
0x60240018, // 004C GETGBL R9 G24
|
||||
0x5828001E, // 004D LDCONST R10 K30
|
||||
0x602C000C, // 004E GETGBL R11 G12
|
||||
0x8830071D, // 004F GETMBR R12 R3 K29
|
||||
0x7C2C0200, // 0050 CALL R11 1
|
||||
0x7C240400, // 0051 CALL R9 2
|
||||
0x5828001C, // 0052 LDCONST R10 K28
|
||||
0x7C1C0600, // 0053 CALL R7 3
|
||||
0x8C1C011F, // 0054 GETMET R7 R0 K31
|
||||
0x88240306, // 0055 GETMBR R9 R1 K6
|
||||
0x5C280600, // 0056 MOVE R10 R3
|
||||
0x5C2C0200, // 0057 MOVE R11 R1
|
||||
0x50300200, // 0058 LDBOOL R12 1 0
|
||||
0x7C1C0A00, // 0059 CALL R7 5
|
||||
0x8820091A, // 005A GETMBR R8 R4 K26
|
||||
0x901E3408, // 005B SETMBR R7 K26 R8
|
||||
0x8C200120, // 005C GETMET R8 R0 K32
|
||||
0x5C280200, // 005D MOVE R10 R1
|
||||
0x5C2C0E00, // 005E MOVE R11 R7
|
||||
0x5C300800, // 005F MOVE R12 R4
|
||||
0x7C200800, // 0060 CALL R8 4
|
||||
0x50200200, // 0061 LDBOOL R8 1 0
|
||||
0x80041000, // 0062 RET 1 R8
|
||||
0x882C0306, // 004E GETMBR R11 R1 K6
|
||||
0x882C1713, // 004F GETMBR R11 R11 K19
|
||||
0x6030000C, // 0050 GETGBL R12 G12
|
||||
0x8834071D, // 0051 GETMBR R13 R3 K29
|
||||
0x7C300200, // 0052 CALL R12 1
|
||||
0x7C240600, // 0053 CALL R9 3
|
||||
0x5828001C, // 0054 LDCONST R10 K28
|
||||
0x7C1C0600, // 0055 CALL R7 3
|
||||
0x8C1C011F, // 0056 GETMET R7 R0 K31
|
||||
0x88240306, // 0057 GETMBR R9 R1 K6
|
||||
0x5C280600, // 0058 MOVE R10 R3
|
||||
0x5C2C0200, // 0059 MOVE R11 R1
|
||||
0x50300200, // 005A LDBOOL R12 1 0
|
||||
0x7C1C0A00, // 005B CALL R7 5
|
||||
0x8820091A, // 005C GETMBR R8 R4 K26
|
||||
0x901E3408, // 005D SETMBR R7 K26 R8
|
||||
0x8C200120, // 005E GETMET R8 R0 K32
|
||||
0x5C280200, // 005F MOVE R10 R1
|
||||
0x5C2C0E00, // 0060 MOVE R11 R7
|
||||
0x5C300800, // 0061 MOVE R12 R4
|
||||
0x7C200800, // 0062 CALL R8 4
|
||||
0x50200200, // 0063 LDBOOL R8 1 0
|
||||
0x80041000, // 0064 RET 1 R8
|
||||
})
|
||||
)
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -328,7 +328,7 @@ be_local_closure(class_Matter_Plugin_Device_append_state_json, /* name */
|
||||
&be_class_Matter_Plugin_Device,
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[30]) { /* constants */
|
||||
( &(const bvalue[42]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(introspect),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_nested_str_weak(),
|
||||
@ -359,10 +359,22 @@ be_local_closure(class_Matter_Plugin_Device_append_state_json, /* name */
|
||||
/* K27 */ be_nested_str_weak(Contact),
|
||||
/* K28 */ be_nested_str_weak(shadow_occupancy),
|
||||
/* K29 */ be_nested_str_weak(Occupancy),
|
||||
/* K30 */ be_nested_str_weak(shadow_air_quality),
|
||||
/* K31 */ be_nested_str_weak(AirQuality),
|
||||
/* K32 */ be_nested_str_weak(shadow_co2),
|
||||
/* K33 */ be_nested_str_weak(CO2),
|
||||
/* K34 */ be_nested_str_weak(shadow_pm1),
|
||||
/* K35 */ be_nested_str_weak(PM1),
|
||||
/* K36 */ be_nested_str_weak(shadow_pm2_5),
|
||||
/* K37 */ be_nested_str_weak(PM2_X2E5),
|
||||
/* K38 */ be_nested_str_weak(shadow_pm10),
|
||||
/* K39 */ be_nested_str_weak(PM10),
|
||||
/* K40 */ be_nested_str_weak(shadow_tvoc),
|
||||
/* K41 */ be_nested_str_weak(TVOC),
|
||||
}),
|
||||
be_str_weak(append_state_json),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
( &(const binstruction[95]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x580C0002, // 0002 LDCONST R3 K2
|
||||
@ -432,8 +444,77 @@ be_local_closure(class_Matter_Plugin_Device_append_state_json, /* name */
|
||||
0x581C001C, // 0042 LDCONST R7 K28
|
||||
0x5820001D, // 0043 LDCONST R8 K29
|
||||
0x7C180400, // 0044 CALL R6 2
|
||||
0xA0000000, // 0045 CLOSE R0
|
||||
0x80040600, // 0046 RET 1 R3
|
||||
0x5C180800, // 0045 MOVE R6 R4
|
||||
0x581C001E, // 0046 LDCONST R7 K30
|
||||
0x5820001F, // 0047 LDCONST R8 K31
|
||||
0x7C180400, // 0048 CALL R6 2
|
||||
0x5C180800, // 0049 MOVE R6 R4
|
||||
0x581C0020, // 004A LDCONST R7 K32
|
||||
0x58200021, // 004B LDCONST R8 K33
|
||||
0x7C180400, // 004C CALL R6 2
|
||||
0x5C180800, // 004D MOVE R6 R4
|
||||
0x581C0022, // 004E LDCONST R7 K34
|
||||
0x58200023, // 004F LDCONST R8 K35
|
||||
0x7C180400, // 0050 CALL R6 2
|
||||
0x5C180800, // 0051 MOVE R6 R4
|
||||
0x581C0024, // 0052 LDCONST R7 K36
|
||||
0x58200025, // 0053 LDCONST R8 K37
|
||||
0x7C180400, // 0054 CALL R6 2
|
||||
0x5C180800, // 0055 MOVE R6 R4
|
||||
0x581C0026, // 0056 LDCONST R7 K38
|
||||
0x58200027, // 0057 LDCONST R8 K39
|
||||
0x7C180400, // 0058 CALL R6 2
|
||||
0x5C180800, // 0059 MOVE R6 R4
|
||||
0x581C0028, // 005A LDCONST R7 K40
|
||||
0x58200029, // 005B LDCONST R8 K41
|
||||
0x7C180400, // 005C CALL R6 2
|
||||
0xA0000000, // 005D CLOSE R0
|
||||
0x80040600, // 005E RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: _parse_sensor_entry
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_closure(class_Matter_Plugin_Device__parse_sensor_entry, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
7, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Device,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(attribute_updated),
|
||||
}),
|
||||
be_str_weak(_parse_sensor_entry),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x8C1C0300, // 0000 GETMET R7 R1 K0
|
||||
0x5C240400, // 0001 MOVE R9 R2
|
||||
0x7C1C0400, // 0002 CALL R7 2
|
||||
0x4C200000, // 0003 LDNIL R8
|
||||
0x20200E08, // 0004 NE R8 R7 R8
|
||||
0x7822000A, // 0005 JMPF R8 #0011
|
||||
0x5C200800, // 0006 MOVE R8 R4
|
||||
0x5C240E00, // 0007 MOVE R9 R7
|
||||
0x7C200200, // 0008 CALL R8 1
|
||||
0x5C1C1000, // 0009 MOVE R7 R8
|
||||
0x20200E03, // 000A NE R8 R7 R3
|
||||
0x78220003, // 000B JMPF R8 #0010
|
||||
0x8C200101, // 000C GETMET R8 R0 K1
|
||||
0x5C280A00, // 000D MOVE R10 R5
|
||||
0x5C2C0C00, // 000E MOVE R11 R6
|
||||
0x7C200600, // 000F CALL R8 3
|
||||
0x80040E00, // 0010 RET 1 R7
|
||||
0x80040600, // 0011 RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
@ -534,17 +615,18 @@ extern const bclass be_class_Matter_Plugin;
|
||||
be_local_class(Matter_Plugin_Device,
|
||||
0,
|
||||
&be_class_Matter_Plugin,
|
||||
be_nested_map(6,
|
||||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Device_read_attribute_closure) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Device_invoke_request_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(19, -1), be_const_int(1) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 1), be_const_closure(class_Matter_Plugin_Device_read_attribute_closure) },
|
||||
{ be_const_key_weak(invoke_request, 4), be_const_closure(class_Matter_Plugin_Device_invoke_request_closure) },
|
||||
{ be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_Device_append_state_json_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(NON_BRIDGE_VENDOR, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(2,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(4631),
|
||||
be_const_int(4993),
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(5,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
@ -617,12 +699,12 @@ be_local_class(Matter_Plugin_Device,
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(NON_BRIDGE_VENDOR, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(2,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(4631),
|
||||
be_const_int(4993),
|
||||
{ be_const_key_weak(TYPES, 6), 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(19, -1), be_const_int(1) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(_parse_sensor_entry, -1), be_const_closure(class_Matter_Plugin_Device__parse_sensor_entry_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Device)
|
||||
);
|
||||
|
@ -0,0 +1,816 @@
|
||||
/* Solidification of Matter_Plugin_2_Sensor_Air_Quality.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: _parse_sensor_entry
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Air_Quality__parse_sensor_entry, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
6, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(attribute_updated),
|
||||
}),
|
||||
be_str_weak(_parse_sensor_entry),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0x8C180300, // 0000 GETMET R6 R1 K0
|
||||
0x5C200400, // 0001 MOVE R8 R2
|
||||
0x7C180400, // 0002 CALL R6 2
|
||||
0x4C1C0000, // 0003 LDNIL R7
|
||||
0x201C0C07, // 0004 NE R7 R6 R7
|
||||
0x781E0006, // 0005 JMPF R7 #000D
|
||||
0x201C0C03, // 0006 NE R7 R6 R3
|
||||
0x781E0003, // 0007 JMPF R7 #000C
|
||||
0x8C1C0101, // 0008 GETMET R7 R0 K1
|
||||
0x5C240800, // 0009 MOVE R9 R4
|
||||
0x5C280A00, // 000A MOVE R10 R5
|
||||
0x7C1C0600, // 000B CALL R7 3
|
||||
0x80040C00, // 000C RET 1 R6
|
||||
0x80040600, // 000D RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: update_virtual
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_update_virtual, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(shadow_air_quality),
|
||||
/* K1 */ be_nested_str_weak(_parse_update_virtual),
|
||||
/* K2 */ be_nested_str_weak(AirQuality),
|
||||
/* K3 */ be_const_int(0),
|
||||
/* K4 */ be_nested_str_weak(shadow_co2),
|
||||
/* K5 */ be_nested_str_weak(CO2),
|
||||
/* K6 */ be_nested_str_weak(shadow_pm1),
|
||||
/* K7 */ be_nested_str_weak(PM1),
|
||||
/* K8 */ be_nested_str_weak(shadow_pm2_5),
|
||||
/* K9 */ be_nested_str_weak(PM2_X2E5),
|
||||
/* K10 */ be_nested_str_weak(shadow_pm10),
|
||||
/* K11 */ be_nested_str_weak(PM10),
|
||||
/* K12 */ be_nested_str_weak(shadow_tvoc),
|
||||
/* K13 */ be_nested_str_weak(TVOC),
|
||||
/* K14 */ be_nested_str_weak(update_virtual),
|
||||
}),
|
||||
be_str_weak(update_virtual),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[61]) { /* code */
|
||||
0x8C080101, // 0000 GETMET R2 R0 K1
|
||||
0x5C100200, // 0001 MOVE R4 R1
|
||||
0x58140002, // 0002 LDCONST R5 K2
|
||||
0x60180007, // 0003 GETGBL R6 G7
|
||||
0x881C0100, // 0004 GETMBR R7 R0 K0
|
||||
0x5422005A, // 0005 LDINT R8 91
|
||||
0x58240003, // 0006 LDCONST R9 K3
|
||||
0x7C080E00, // 0007 CALL R2 7
|
||||
0x90020002, // 0008 SETMBR R0 K0 R2
|
||||
0x8C080101, // 0009 GETMET R2 R0 K1
|
||||
0x5C100200, // 000A MOVE R4 R1
|
||||
0x58140005, // 000B LDCONST R5 K5
|
||||
0x88180104, // 000C GETMBR R6 R0 K4
|
||||
0x601C0007, // 000D GETGBL R7 G7
|
||||
0x5422040C, // 000E LDINT R8 1037
|
||||
0x58240003, // 000F LDCONST R9 K3
|
||||
0x7C080E00, // 0010 CALL R2 7
|
||||
0x90020802, // 0011 SETMBR R0 K4 R2
|
||||
0x8C080101, // 0012 GETMET R2 R0 K1
|
||||
0x5C100200, // 0013 MOVE R4 R1
|
||||
0x58140007, // 0014 LDCONST R5 K7
|
||||
0x88180106, // 0015 GETMBR R6 R0 K6
|
||||
0x601C0007, // 0016 GETGBL R7 G7
|
||||
0x5422042B, // 0017 LDINT R8 1068
|
||||
0x58240003, // 0018 LDCONST R9 K3
|
||||
0x7C080E00, // 0019 CALL R2 7
|
||||
0x90020C02, // 001A SETMBR R0 K6 R2
|
||||
0x8C080101, // 001B GETMET R2 R0 K1
|
||||
0x5C100200, // 001C MOVE R4 R1
|
||||
0x58140009, // 001D LDCONST R5 K9
|
||||
0x88180108, // 001E GETMBR R6 R0 K8
|
||||
0x601C0007, // 001F GETGBL R7 G7
|
||||
0x54220429, // 0020 LDINT R8 1066
|
||||
0x58240003, // 0021 LDCONST R9 K3
|
||||
0x7C080E00, // 0022 CALL R2 7
|
||||
0x90021002, // 0023 SETMBR R0 K8 R2
|
||||
0x8C080101, // 0024 GETMET R2 R0 K1
|
||||
0x5C100200, // 0025 MOVE R4 R1
|
||||
0x5814000B, // 0026 LDCONST R5 K11
|
||||
0x8818010A, // 0027 GETMBR R6 R0 K10
|
||||
0x601C0007, // 0028 GETGBL R7 G7
|
||||
0x5422042C, // 0029 LDINT R8 1069
|
||||
0x58240003, // 002A LDCONST R9 K3
|
||||
0x7C080E00, // 002B CALL R2 7
|
||||
0x90021402, // 002C SETMBR R0 K10 R2
|
||||
0x8C080101, // 002D GETMET R2 R0 K1
|
||||
0x5C100200, // 002E MOVE R4 R1
|
||||
0x5814000D, // 002F LDCONST R5 K13
|
||||
0x8818010C, // 0030 GETMBR R6 R0 K12
|
||||
0x601C0007, // 0031 GETGBL R7 G7
|
||||
0x5422042D, // 0032 LDINT R8 1070
|
||||
0x58240003, // 0033 LDCONST R9 K3
|
||||
0x7C080E00, // 0034 CALL R2 7
|
||||
0x90021802, // 0035 SETMBR R0 K12 R2
|
||||
0x60080003, // 0036 GETGBL R2 G3
|
||||
0x5C0C0000, // 0037 MOVE R3 R0
|
||||
0x7C080200, // 0038 CALL R2 1
|
||||
0x8C08050E, // 0039 GETMET R2 R2 K14
|
||||
0x5C100200, // 003A MOVE R4 R1
|
||||
0x7C080400, // 003B CALL R2 2
|
||||
0x80000000, // 003C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: parse_sensors
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_sensors, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[17]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(prefix),
|
||||
/* K2 */ be_nested_str_weak(shadow_co2),
|
||||
/* K3 */ be_nested_str_weak(_parse_sensor_entry),
|
||||
/* K4 */ be_nested_str_weak(CarbonDioxide),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(shadow_pm1),
|
||||
/* K7 */ be_nested_str_weak(PM1),
|
||||
/* K8 */ be_nested_str_weak(shadow_pm2_5),
|
||||
/* K9 */ be_nested_str_weak(PM2_X2E5),
|
||||
/* K10 */ be_nested_str_weak(shadow_pm10),
|
||||
/* K11 */ be_nested_str_weak(PM10),
|
||||
/* K12 */ be_nested_str_weak(shadow_tvoc),
|
||||
/* K13 */ be_nested_str_weak(TVOC),
|
||||
/* K14 */ be_nested_str_weak(shadow_no2),
|
||||
/* K15 */ be_nested_str_weak(NO2),
|
||||
/* K16 */ be_nested_str_weak(parse_sensors),
|
||||
}),
|
||||
be_str_weak(parse_sensors),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[67]) { /* code */
|
||||
0x8C080300, // 0000 GETMET R2 R1 K0
|
||||
0x88100101, // 0001 GETMBR R4 R0 K1
|
||||
0x7C080400, // 0002 CALL R2 2
|
||||
0x4C0C0000, // 0003 LDNIL R3
|
||||
0x200C0403, // 0004 NE R3 R2 R3
|
||||
0x780E0035, // 0005 JMPF R3 #003C
|
||||
0x8C0C0103, // 0006 GETMET R3 R0 K3
|
||||
0x5C140400, // 0007 MOVE R5 R2
|
||||
0x58180004, // 0008 LDCONST R6 K4
|
||||
0x881C0102, // 0009 GETMBR R7 R0 K2
|
||||
0x60200007, // 000A GETGBL R8 G7
|
||||
0x5426040C, // 000B LDINT R9 1037
|
||||
0x58280005, // 000C LDCONST R10 K5
|
||||
0x7C0C0E00, // 000D CALL R3 7
|
||||
0x90020403, // 000E SETMBR R0 K2 R3
|
||||
0x8C0C0103, // 000F GETMET R3 R0 K3
|
||||
0x5C140400, // 0010 MOVE R5 R2
|
||||
0x58180007, // 0011 LDCONST R6 K7
|
||||
0x881C0106, // 0012 GETMBR R7 R0 K6
|
||||
0x60200007, // 0013 GETGBL R8 G7
|
||||
0x5426042B, // 0014 LDINT R9 1068
|
||||
0x58280005, // 0015 LDCONST R10 K5
|
||||
0x7C0C0E00, // 0016 CALL R3 7
|
||||
0x90020C03, // 0017 SETMBR R0 K6 R3
|
||||
0x8C0C0103, // 0018 GETMET R3 R0 K3
|
||||
0x5C140400, // 0019 MOVE R5 R2
|
||||
0x58180009, // 001A LDCONST R6 K9
|
||||
0x881C0108, // 001B GETMBR R7 R0 K8
|
||||
0x60200007, // 001C GETGBL R8 G7
|
||||
0x54260429, // 001D LDINT R9 1066
|
||||
0x58280005, // 001E LDCONST R10 K5
|
||||
0x7C0C0E00, // 001F CALL R3 7
|
||||
0x90021003, // 0020 SETMBR R0 K8 R3
|
||||
0x8C0C0103, // 0021 GETMET R3 R0 K3
|
||||
0x5C140400, // 0022 MOVE R5 R2
|
||||
0x5818000B, // 0023 LDCONST R6 K11
|
||||
0x881C010A, // 0024 GETMBR R7 R0 K10
|
||||
0x60200007, // 0025 GETGBL R8 G7
|
||||
0x5426042C, // 0026 LDINT R9 1069
|
||||
0x58280005, // 0027 LDCONST R10 K5
|
||||
0x7C0C0E00, // 0028 CALL R3 7
|
||||
0x90021403, // 0029 SETMBR R0 K10 R3
|
||||
0x8C0C0103, // 002A GETMET R3 R0 K3
|
||||
0x5C140400, // 002B MOVE R5 R2
|
||||
0x5818000D, // 002C LDCONST R6 K13
|
||||
0x881C010C, // 002D GETMBR R7 R0 K12
|
||||
0x60200007, // 002E GETGBL R8 G7
|
||||
0x5426042D, // 002F LDINT R9 1070
|
||||
0x58280005, // 0030 LDCONST R10 K5
|
||||
0x7C0C0E00, // 0031 CALL R3 7
|
||||
0x90021803, // 0032 SETMBR R0 K12 R3
|
||||
0x8C0C0103, // 0033 GETMET R3 R0 K3
|
||||
0x5C140400, // 0034 MOVE R5 R2
|
||||
0x5818000F, // 0035 LDCONST R6 K15
|
||||
0x881C010E, // 0036 GETMBR R7 R0 K14
|
||||
0x60200007, // 0037 GETGBL R8 G7
|
||||
0x54260412, // 0038 LDINT R9 1043
|
||||
0x58280005, // 0039 LDCONST R10 K5
|
||||
0x7C0C0E00, // 003A CALL R3 7
|
||||
0x90021C03, // 003B SETMBR R0 K14 R3
|
||||
0x600C0003, // 003C GETGBL R3 G3
|
||||
0x5C100000, // 003D MOVE R4 R0
|
||||
0x7C0C0200, // 003E CALL R3 1
|
||||
0x8C0C0710, // 003F GETMET R3 R3 K16
|
||||
0x5C140200, // 0040 MOVE R5 R1
|
||||
0x7C0C0400, // 0041 CALL R3 2
|
||||
0x80000000, // 0042 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
1, /* has sup protos */
|
||||
( &(const struct bproto*[ 2]) {
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
1, /* has upvals */
|
||||
( &(const bupvaldesc[ 3]) { /* upvals */
|
||||
be_local_const_upval(1, 6),
|
||||
be_local_const_upval(1, 3),
|
||||
be_local_const_upval(1, 4),
|
||||
}),
|
||||
0, /* has sup protos */
|
||||
NULL,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_const_int(0),
|
||||
/* K1 */ be_nested_str_weak(set),
|
||||
/* K2 */ be_nested_str_weak(FLOAT),
|
||||
/* K3 */ be_nested_str_weak(NULL),
|
||||
/* K4 */ be_const_int(1),
|
||||
/* K5 */ be_const_int(2),
|
||||
/* K6 */ be_nested_str_weak(U1),
|
||||
/* K7 */ be_nested_str_weak(U4),
|
||||
}),
|
||||
be_str_weak(handle_value),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[85]) { /* code */
|
||||
0x4C080000, // 0000 LDNIL R2
|
||||
0x1C080202, // 0001 EQ R2 R1 R2
|
||||
0x780A0000, // 0002 JMPF R2 #0004
|
||||
0x58040000, // 0003 LDCONST R1 K0
|
||||
0x68080000, // 0004 GETUPV R2 U0
|
||||
0x1C080500, // 0005 EQ R2 R2 K0
|
||||
0x780A0012, // 0006 JMPF R2 #001A
|
||||
0x4C080000, // 0007 LDNIL R2
|
||||
0x20080002, // 0008 NE R2 R0 R2
|
||||
0x780A0007, // 0009 JMPF R2 #0012
|
||||
0x68080001, // 000A GETUPV R2 U1
|
||||
0x8C080501, // 000B GETMET R2 R2 K1
|
||||
0x68100002, // 000C GETUPV R4 U2
|
||||
0x88100902, // 000D GETMBR R4 R4 K2
|
||||
0x5C140000, // 000E MOVE R5 R0
|
||||
0x7C080600, // 000F CALL R2 3
|
||||
0x80040400, // 0010 RET 1 R2
|
||||
0x70020006, // 0011 JMP #0019
|
||||
0x68080001, // 0012 GETUPV R2 U1
|
||||
0x8C080501, // 0013 GETMET R2 R2 K1
|
||||
0x68100002, // 0014 GETUPV R4 U2
|
||||
0x88100903, // 0015 GETMBR R4 R4 K3
|
||||
0x4C140000, // 0016 LDNIL R5
|
||||
0x7C080600, // 0017 CALL R2 3
|
||||
0x80040400, // 0018 RET 1 R2
|
||||
0x70020038, // 0019 JMP #0053
|
||||
0x68080000, // 001A GETUPV R2 U0
|
||||
0x1C080504, // 001B EQ R2 R2 K4
|
||||
0x780A0007, // 001C JMPF R2 #0025
|
||||
0x68080001, // 001D GETUPV R2 U1
|
||||
0x8C080501, // 001E GETMET R2 R2 K1
|
||||
0x68100002, // 001F GETUPV R4 U2
|
||||
0x88100903, // 0020 GETMBR R4 R4 K3
|
||||
0x4C140000, // 0021 LDNIL R5
|
||||
0x7C080600, // 0022 CALL R2 3
|
||||
0x80040400, // 0023 RET 1 R2
|
||||
0x7002002D, // 0024 JMP #0053
|
||||
0x68080000, // 0025 GETUPV R2 U0
|
||||
0x1C080505, // 0026 EQ R2 R2 K5
|
||||
0x780A0007, // 0027 JMPF R2 #0030
|
||||
0x68080001, // 0028 GETUPV R2 U1
|
||||
0x8C080501, // 0029 GETMET R2 R2 K1
|
||||
0x68100002, // 002A GETUPV R4 U2
|
||||
0x88100903, // 002B GETMBR R4 R4 K3
|
||||
0x4C140000, // 002C LDNIL R5
|
||||
0x7C080600, // 002D CALL R2 3
|
||||
0x80040400, // 002E RET 1 R2
|
||||
0x70020022, // 002F JMP #0053
|
||||
0x68080000, // 0030 GETUPV R2 U0
|
||||
0x540E0007, // 0031 LDINT R3 8
|
||||
0x1C080403, // 0032 EQ R2 R2 R3
|
||||
0x780A0007, // 0033 JMPF R2 #003C
|
||||
0x68080001, // 0034 GETUPV R2 U1
|
||||
0x8C080501, // 0035 GETMET R2 R2 K1
|
||||
0x68100002, // 0036 GETUPV R4 U2
|
||||
0x88100906, // 0037 GETMBR R4 R4 K6
|
||||
0x5C140200, // 0038 MOVE R5 R1
|
||||
0x7C080600, // 0039 CALL R2 3
|
||||
0x80040400, // 003A RET 1 R2
|
||||
0x70020016, // 003B JMP #0053
|
||||
0x68080000, // 003C GETUPV R2 U0
|
||||
0x540E0008, // 003D LDINT R3 9
|
||||
0x1C080403, // 003E EQ R2 R2 R3
|
||||
0x780A0007, // 003F JMPF R2 #0048
|
||||
0x68080001, // 0040 GETUPV R2 U1
|
||||
0x8C080501, // 0041 GETMET R2 R2 K1
|
||||
0x68100002, // 0042 GETUPV R4 U2
|
||||
0x88100906, // 0043 GETMBR R4 R4 K6
|
||||
0x58140000, // 0044 LDCONST R5 K0
|
||||
0x7C080600, // 0045 CALL R2 3
|
||||
0x80040400, // 0046 RET 1 R2
|
||||
0x7002000A, // 0047 JMP #0053
|
||||
0x68080000, // 0048 GETUPV R2 U0
|
||||
0x540EFFFB, // 0049 LDINT R3 65532
|
||||
0x1C080403, // 004A EQ R2 R2 R3
|
||||
0x780A0006, // 004B JMPF R2 #0053
|
||||
0x68080001, // 004C GETUPV R2 U1
|
||||
0x8C080501, // 004D GETMET R2 R2 K1
|
||||
0x68100002, // 004E GETUPV R4 U2
|
||||
0x88100907, // 004F GETMBR R4 R4 K7
|
||||
0x58140004, // 0050 LDCONST R5 K4
|
||||
0x7C080600, // 0051 CALL R2 3
|
||||
0x80040400, // 0052 RET 1 R2
|
||||
0x4C080000, // 0053 LDNIL R2
|
||||
0x80040400, // 0054 RET 1 R2
|
||||
})
|
||||
),
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(shadow_air_quality),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_nested_str_weak(shadow_co2),
|
||||
/* K10 */ be_nested_str_weak(shadow_pm1),
|
||||
/* K11 */ be_nested_str_weak(shadow_pm2_5),
|
||||
/* K12 */ be_nested_str_weak(shadow_pm10),
|
||||
/* K13 */ be_nested_str_weak(shadow_tvoc),
|
||||
/* K14 */ be_nested_str_weak(shadow_no2),
|
||||
/* K15 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[104]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x4C1C0000, // 0004 LDNIL R7
|
||||
0x84200000, // 0005 CLOSURE R8 P0
|
||||
0x5426005A, // 0006 LDINT R9 91
|
||||
0x1C240A09, // 0007 EQ R9 R5 R9
|
||||
0x78260013, // 0008 JMPF R9 #001D
|
||||
0x1C240D04, // 0009 EQ R9 R6 K4
|
||||
0x78260010, // 000A JMPF R9 #001C
|
||||
0x88240105, // 000B GETMBR R9 R0 K5
|
||||
0x4C280000, // 000C LDNIL R10
|
||||
0x2024120A, // 000D NE R9 R9 R10
|
||||
0x78260006, // 000E JMPF R9 #0016
|
||||
0x8C240706, // 000F GETMET R9 R3 K6
|
||||
0x882C0907, // 0010 GETMBR R11 R4 K7
|
||||
0x88300105, // 0011 GETMBR R12 R0 K5
|
||||
0x7C240600, // 0012 CALL R9 3
|
||||
0xA0000000, // 0013 CLOSE R0
|
||||
0x80041200, // 0014 RET 1 R9
|
||||
0x70020005, // 0015 JMP #001C
|
||||
0x8C240706, // 0016 GETMET R9 R3 K6
|
||||
0x882C0908, // 0017 GETMBR R11 R4 K8
|
||||
0x4C300000, // 0018 LDNIL R12
|
||||
0x7C240600, // 0019 CALL R9 3
|
||||
0xA0000000, // 001A CLOSE R0
|
||||
0x80041200, // 001B RET 1 R9
|
||||
0x70020040, // 001C JMP #005E
|
||||
0x5426040C, // 001D LDINT R9 1037
|
||||
0x1C240A09, // 001E EQ R9 R5 R9
|
||||
0x78260007, // 001F JMPF R9 #0028
|
||||
0x5C241000, // 0020 MOVE R9 R8
|
||||
0x88280109, // 0021 GETMBR R10 R0 K9
|
||||
0x7C240200, // 0022 CALL R9 1
|
||||
0x5C1C1200, // 0023 MOVE R7 R9
|
||||
0x78260001, // 0024 JMPF R9 #0027
|
||||
0xA0000000, // 0025 CLOSE R0
|
||||
0x80040E00, // 0026 RET 1 R7
|
||||
0x70020035, // 0027 JMP #005E
|
||||
0x5426042B, // 0028 LDINT R9 1068
|
||||
0x1C240A09, // 0029 EQ R9 R5 R9
|
||||
0x78260007, // 002A JMPF R9 #0033
|
||||
0x5C241000, // 002B MOVE R9 R8
|
||||
0x8828010A, // 002C GETMBR R10 R0 K10
|
||||
0x7C240200, // 002D CALL R9 1
|
||||
0x5C1C1200, // 002E MOVE R7 R9
|
||||
0x78260001, // 002F JMPF R9 #0032
|
||||
0xA0000000, // 0030 CLOSE R0
|
||||
0x80040E00, // 0031 RET 1 R7
|
||||
0x7002002A, // 0032 JMP #005E
|
||||
0x54260429, // 0033 LDINT R9 1066
|
||||
0x1C240A09, // 0034 EQ R9 R5 R9
|
||||
0x78260007, // 0035 JMPF R9 #003E
|
||||
0x5C241000, // 0036 MOVE R9 R8
|
||||
0x8828010B, // 0037 GETMBR R10 R0 K11
|
||||
0x7C240200, // 0038 CALL R9 1
|
||||
0x5C1C1200, // 0039 MOVE R7 R9
|
||||
0x78260001, // 003A JMPF R9 #003D
|
||||
0xA0000000, // 003B CLOSE R0
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x7002001F, // 003D JMP #005E
|
||||
0x5426042C, // 003E LDINT R9 1069
|
||||
0x1C240A09, // 003F EQ R9 R5 R9
|
||||
0x78260007, // 0040 JMPF R9 #0049
|
||||
0x5C241000, // 0041 MOVE R9 R8
|
||||
0x8828010C, // 0042 GETMBR R10 R0 K12
|
||||
0x7C240200, // 0043 CALL R9 1
|
||||
0x5C1C1200, // 0044 MOVE R7 R9
|
||||
0x78260001, // 0045 JMPF R9 #0048
|
||||
0xA0000000, // 0046 CLOSE R0
|
||||
0x80040E00, // 0047 RET 1 R7
|
||||
0x70020014, // 0048 JMP #005E
|
||||
0x5426042D, // 0049 LDINT R9 1070
|
||||
0x1C240A09, // 004A EQ R9 R5 R9
|
||||
0x78260007, // 004B JMPF R9 #0054
|
||||
0x5C241000, // 004C MOVE R9 R8
|
||||
0x8828010D, // 004D GETMBR R10 R0 K13
|
||||
0x7C240200, // 004E CALL R9 1
|
||||
0x5C1C1200, // 004F MOVE R7 R9
|
||||
0x78260001, // 0050 JMPF R9 #0053
|
||||
0xA0000000, // 0051 CLOSE R0
|
||||
0x80040E00, // 0052 RET 1 R7
|
||||
0x70020009, // 0053 JMP #005E
|
||||
0x54260412, // 0054 LDINT R9 1043
|
||||
0x1C240A09, // 0055 EQ R9 R5 R9
|
||||
0x78260006, // 0056 JMPF R9 #005E
|
||||
0x5C241000, // 0057 MOVE R9 R8
|
||||
0x8828010E, // 0058 GETMBR R10 R0 K14
|
||||
0x7C240200, // 0059 CALL R9 1
|
||||
0x5C1C1200, // 005A MOVE R7 R9
|
||||
0x78260001, // 005B JMPF R9 #005E
|
||||
0xA0000000, // 005C CLOSE R0
|
||||
0x80040E00, // 005D RET 1 R7
|
||||
0x60240003, // 005E GETGBL R9 G3
|
||||
0x5C280000, // 005F MOVE R10 R0
|
||||
0x7C240200, // 0060 CALL R9 1
|
||||
0x8C24130F, // 0061 GETMET R9 R9 K15
|
||||
0x5C2C0200, // 0062 MOVE R11 R1
|
||||
0x5C300400, // 0063 MOVE R12 R2
|
||||
0x5C340600, // 0064 MOVE R13 R3
|
||||
0x7C240800, // 0065 CALL R9 4
|
||||
0xA0000000, // 0066 CLOSE R0
|
||||
0x80041200, // 0067 RET 1 R9
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: parse_configuration
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_configuration, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(prefix),
|
||||
/* K1 */ be_nested_str_weak(find),
|
||||
/* K2 */ be_nested_str_weak(ARG),
|
||||
}),
|
||||
be_str_weak(parse_configuration),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x60080008, // 0000 GETGBL R2 G8
|
||||
0x8C0C0301, // 0001 GETMET R3 R1 K1
|
||||
0x88140102, // 0002 GETMBR R5 R0 K2
|
||||
0x7C0C0400, // 0003 CALL R3 2
|
||||
0x7C080200, // 0004 CALL R2 1
|
||||
0x90020002, // 0005 SETMBR R0 K0 R2
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Air_Quality_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(shadow_air_quality),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[11]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x50100000, // 0008 LDBOOL R4 0 0
|
||||
0x90020204, // 0009 SETMBR R0 K1 R4
|
||||
0x80000000, // 000A RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Sensor_Air_Quality
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_Sensor_Air_Quality,
|
||||
8,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(23,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_update_virtual_closure) },
|
||||
{ be_const_key_weak(shadow_pm10, 0), be_const_var(4) },
|
||||
{ be_const_key_weak(ARG, 1), be_nested_str_weak(airquality) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(airquality) },
|
||||
{ be_const_key_weak(parse_configuration, 21), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_configuration_closure) },
|
||||
{ be_const_key_weak(shadow_no2, -1), be_const_var(6) },
|
||||
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(30000) },
|
||||
{ be_const_key_weak(UPDATE_COMMANDS, 13), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(7,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_nested_str_weak(AirQuality),
|
||||
be_nested_str_weak(CO2),
|
||||
be_nested_str_weak(PM1),
|
||||
be_nested_str_weak(PM2_X2E5),
|
||||
be_nested_str_weak(PM10),
|
||||
be_nested_str_weak(TVOC),
|
||||
be_nested_str_weak(NO2),
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(shadow_pm2_5, -1), be_const_var(3) },
|
||||
{ be_const_key_weak(shadow_air_quality, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute_closure) },
|
||||
{ be_const_key_weak(shadow_tvoc, -1), be_const_var(7) },
|
||||
{ be_const_key_weak(prefix, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(44, -1), be_const_int(1) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(_parse_sensor_entry, 19), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality__parse_sensor_entry_closure) },
|
||||
{ be_const_key_weak(shadow_pm1, 9), be_const_var(2) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Air_X20Quality) },
|
||||
{ be_const_key_weak(parse_sensors, 7), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_parse_sensors_closure) },
|
||||
{ be_const_key_weak(shadow_co2, -1), be_const_var(5) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_init_closure) },
|
||||
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Device_X20key_X20_X28ex_X3A_X20SCD40_X29) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(12,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(1068, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1069, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1070, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(8,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(7,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(5, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(12,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(4),
|
||||
be_const_int(5),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1037, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(91, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(7,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(29, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(10,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(12,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(3),
|
||||
be_const_int(5),
|
||||
be_const_int(10),
|
||||
be_const_int(15),
|
||||
be_const_int(17),
|
||||
be_const_int(18),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1066, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1043, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(AirQuality) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Air_Quality)
|
||||
);
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -269,7 +269,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
10, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -277,42 +277,32 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Contact,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(Contact),
|
||||
/* K2 */ be_nested_str_weak(shadow_contact),
|
||||
/* K3 */ be_nested_str_weak(attribute_updated),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(update_virtual),
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(shadow_contact),
|
||||
/* K1 */ be_nested_str_weak(_parse_update_virtual),
|
||||
/* K2 */ be_nested_str_weak(Contact),
|
||||
/* K3 */ be_const_int(0),
|
||||
/* K4 */ be_nested_str_weak(update_virtual),
|
||||
}),
|
||||
be_str_weak(update_virtual),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x8C080300, // 0000 GETMET R2 R1 K0
|
||||
0x58100001, // 0001 LDCONST R4 K1
|
||||
0x7C080400, // 0002 CALL R2 2
|
||||
0x4C0C0000, // 0003 LDNIL R3
|
||||
0x200C0403, // 0004 NE R3 R2 R3
|
||||
0x780E000B, // 0005 JMPF R3 #0012
|
||||
0x600C0017, // 0006 GETGBL R3 G23
|
||||
0x5C100400, // 0007 MOVE R4 R2
|
||||
0x7C0C0200, // 0008 CALL R3 1
|
||||
0x5C080600, // 0009 MOVE R2 R3
|
||||
0x880C0102, // 000A GETMBR R3 R0 K2
|
||||
0x200C0602, // 000B NE R3 R3 R2
|
||||
0x780E0004, // 000C JMPF R3 #0012
|
||||
0x8C0C0103, // 000D GETMET R3 R0 K3
|
||||
0x54160044, // 000E LDINT R5 69
|
||||
0x58180004, // 000F LDCONST R6 K4
|
||||
0x7C0C0600, // 0010 CALL R3 3
|
||||
0x90020402, // 0011 SETMBR R0 K2 R2
|
||||
0x600C0003, // 0012 GETGBL R3 G3
|
||||
0x5C100000, // 0013 MOVE R4 R0
|
||||
0x7C0C0200, // 0014 CALL R3 1
|
||||
0x8C0C0705, // 0015 GETMET R3 R3 K5
|
||||
0x5C140200, // 0016 MOVE R5 R1
|
||||
0x7C0C0400, // 0017 CALL R3 2
|
||||
0x80000000, // 0018 RET 0
|
||||
( &(const binstruction[16]) { /* code */
|
||||
0x8C080101, // 0000 GETMET R2 R0 K1
|
||||
0x5C100200, // 0001 MOVE R4 R1
|
||||
0x58140002, // 0002 LDCONST R5 K2
|
||||
0x88180100, // 0003 GETMBR R6 R0 K0
|
||||
0x601C0017, // 0004 GETGBL R7 G23
|
||||
0x54220044, // 0005 LDINT R8 69
|
||||
0x58240003, // 0006 LDCONST R9 K3
|
||||
0x7C080E00, // 0007 CALL R2 7
|
||||
0x90020002, // 0008 SETMBR R0 K0 R2
|
||||
0x60080003, // 0009 GETGBL R2 G3
|
||||
0x5C0C0000, // 000A MOVE R3 R0
|
||||
0x7C080200, // 000B CALL R2 1
|
||||
0x8C080504, // 000C GETMET R2 R2 K4
|
||||
0x5C100200, // 000D MOVE R4 R1
|
||||
0x7C080400, // 000E CALL R2 2
|
||||
0x80000000, // 000F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -39,7 +39,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
|
||||
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
10, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
@ -47,42 +47,32 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Sensor_Occupancy,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(Occupancy),
|
||||
/* K2 */ be_nested_str_weak(shadow_occupancy),
|
||||
/* K3 */ be_nested_str_weak(attribute_updated),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(update_virtual),
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(val_onoff),
|
||||
/* K1 */ be_nested_str_weak(_parse_update_virtual),
|
||||
/* K2 */ be_nested_str_weak(Occupancy),
|
||||
/* K3 */ be_const_int(0),
|
||||
/* K4 */ be_nested_str_weak(update_virtual),
|
||||
}),
|
||||
be_str_weak(update_virtual),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x8C080300, // 0000 GETMET R2 R1 K0
|
||||
0x58100001, // 0001 LDCONST R4 K1
|
||||
0x7C080400, // 0002 CALL R2 2
|
||||
0x4C0C0000, // 0003 LDNIL R3
|
||||
0x200C0403, // 0004 NE R3 R2 R3
|
||||
0x780E000B, // 0005 JMPF R3 #0012
|
||||
0x600C0017, // 0006 GETGBL R3 G23
|
||||
0x5C100400, // 0007 MOVE R4 R2
|
||||
0x7C0C0200, // 0008 CALL R3 1
|
||||
0x5C080600, // 0009 MOVE R2 R3
|
||||
0x880C0102, // 000A GETMBR R3 R0 K2
|
||||
0x200C0602, // 000B NE R3 R3 R2
|
||||
0x780E0004, // 000C JMPF R3 #0012
|
||||
0x8C0C0103, // 000D GETMET R3 R0 K3
|
||||
0x54160405, // 000E LDINT R5 1030
|
||||
0x58180004, // 000F LDCONST R6 K4
|
||||
0x7C0C0600, // 0010 CALL R3 3
|
||||
0x90020402, // 0011 SETMBR R0 K2 R2
|
||||
0x600C0003, // 0012 GETGBL R3 G3
|
||||
0x5C100000, // 0013 MOVE R4 R0
|
||||
0x7C0C0200, // 0014 CALL R3 1
|
||||
0x8C0C0705, // 0015 GETMET R3 R3 K5
|
||||
0x5C140200, // 0016 MOVE R5 R1
|
||||
0x7C0C0400, // 0017 CALL R3 2
|
||||
0x80000000, // 0018 RET 0
|
||||
( &(const binstruction[16]) { /* code */
|
||||
0x8C080101, // 0000 GETMET R2 R0 K1
|
||||
0x5C100200, // 0001 MOVE R4 R1
|
||||
0x58140002, // 0002 LDCONST R5 K2
|
||||
0x88180100, // 0003 GETMBR R6 R0 K0
|
||||
0x601C0017, // 0004 GETGBL R7 G23
|
||||
0x54220405, // 0005 LDINT R8 1030
|
||||
0x58240003, // 0006 LDCONST R9 K3
|
||||
0x7C080E00, // 0007 CALL R2 7
|
||||
0x90020002, // 0008 SETMBR R0 K0 R2
|
||||
0x60080003, // 0009 GETGBL R2 G3
|
||||
0x5C0C0000, // 000A MOVE R3 R0
|
||||
0x7C080200, // 000B CALL R2 1
|
||||
0x8C080504, // 000C GETMET R2 R2 K4
|
||||
0x5C100200, // 000D MOVE R4 R1
|
||||
0x7C080400, // 000E CALL R2 2
|
||||
0x80000000, // 000F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -0,0 +1,404 @@
|
||||
/* Solidification of Matter_Plugin_3_Bridge_Sensor_Air_Quality.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Air_Quality'
|
||||
extern bclosure *class_Matter_Plugin_Sensor_Air_Quality_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: web_values
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
1, /* has sup protos */
|
||||
( &(const struct bproto*[ 2]) {
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(webserver),
|
||||
/* K1 */ be_nested_str_weak(content_send),
|
||||
/* K2 */ be_nested_str_weak(_X25s_X20_X25i_X20),
|
||||
}),
|
||||
be_str_weak(web_values_single),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x4C080000, // 0000 LDNIL R2
|
||||
0x20080202, // 0001 NE R2 R1 R2
|
||||
0x780A0007, // 0002 JMPF R2 #000B
|
||||
0xA40A0000, // 0003 IMPORT R2 K0
|
||||
0x8C0C0501, // 0004 GETMET R3 R2 K1
|
||||
0x60140018, // 0005 GETGBL R5 G24
|
||||
0x58180002, // 0006 LDCONST R6 K2
|
||||
0x5C1C0000, // 0007 MOVE R7 R0
|
||||
0x5C200200, // 0008 MOVE R8 R1
|
||||
0x7C140600, // 0009 CALL R5 3
|
||||
0x7C0C0400, // 000A CALL R3 2
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
),
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Air_Quality,
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(web_values_prefix),
|
||||
/* K1 */ be_nested_str_weak(Air),
|
||||
/* K2 */ be_nested_str_weak(shadow_air_quality),
|
||||
/* K3 */ be_nested_str_weak(PM1),
|
||||
/* K4 */ be_nested_str_weak(shadow_pm1),
|
||||
/* K5 */ be_nested_str_weak(PM2_X2E5),
|
||||
/* K6 */ be_nested_str_weak(shadow_pm2_5),
|
||||
/* K7 */ be_nested_str_weak(PM10),
|
||||
/* K8 */ be_nested_str_weak(shadow_pm10),
|
||||
/* K9 */ be_nested_str_weak(CO2),
|
||||
/* K10 */ be_nested_str_weak(shadow_co2),
|
||||
/* K11 */ be_nested_str_weak(NO2),
|
||||
/* K12 */ be_nested_str_weak(shadow_no2),
|
||||
/* K13 */ be_nested_str_weak(TVOC),
|
||||
/* K14 */ be_nested_str_weak(shadow_tvoc),
|
||||
}),
|
||||
be_str_weak(web_values),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[32]) { /* code */
|
||||
0x84040000, // 0000 CLOSURE R1 P0
|
||||
0x8C080100, // 0001 GETMET R2 R0 K0
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x5C080200, // 0003 MOVE R2 R1
|
||||
0x580C0001, // 0004 LDCONST R3 K1
|
||||
0x88100102, // 0005 GETMBR R4 R0 K2
|
||||
0x7C080400, // 0006 CALL R2 2
|
||||
0x5C080200, // 0007 MOVE R2 R1
|
||||
0x580C0003, // 0008 LDCONST R3 K3
|
||||
0x88100104, // 0009 GETMBR R4 R0 K4
|
||||
0x7C080400, // 000A CALL R2 2
|
||||
0x5C080200, // 000B MOVE R2 R1
|
||||
0x580C0005, // 000C LDCONST R3 K5
|
||||
0x88100106, // 000D GETMBR R4 R0 K6
|
||||
0x7C080400, // 000E CALL R2 2
|
||||
0x5C080200, // 000F MOVE R2 R1
|
||||
0x580C0007, // 0010 LDCONST R3 K7
|
||||
0x88100108, // 0011 GETMBR R4 R0 K8
|
||||
0x7C080400, // 0012 CALL R2 2
|
||||
0x5C080200, // 0013 MOVE R2 R1
|
||||
0x580C0009, // 0014 LDCONST R3 K9
|
||||
0x8810010A, // 0015 GETMBR R4 R0 K10
|
||||
0x7C080400, // 0016 CALL R2 2
|
||||
0x5C080200, // 0017 MOVE R2 R1
|
||||
0x580C000B, // 0018 LDCONST R3 K11
|
||||
0x8810010C, // 0019 GETMBR R4 R0 K12
|
||||
0x7C080400, // 001A CALL R2 2
|
||||
0x5C080200, // 001B MOVE R2 R1
|
||||
0x580C000D, // 001C LDCONST R3 K13
|
||||
0x8810010E, // 001D GETMBR R4 R0 K14
|
||||
0x7C080400, // 001E CALL R2 2
|
||||
0x80000000, // 001F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(prefix),
|
||||
/* K2 */ be_nested_str_weak(find),
|
||||
/* K3 */ be_nested_str_weak(ARG),
|
||||
}),
|
||||
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
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x60100008, // 0008 GETGBL R4 G8
|
||||
0x8C140702, // 0009 GETMET R5 R3 K2
|
||||
0x881C0103, // 000A GETMBR R7 R0 K3
|
||||
0x7C140400, // 000B CALL R5 2
|
||||
0x7C100200, // 000C CALL R4 1
|
||||
0x90020204, // 000D SETMBR R0 K1 R4
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: parse_update
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Air_Quality,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(prefix),
|
||||
}),
|
||||
be_str_weak(parse_update),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x540E0007, // 0000 LDINT R3 8
|
||||
0x1C0C0403, // 0001 EQ R3 R2 R3
|
||||
0x780E0002, // 0002 JMPF R3 #0006
|
||||
0x8C0C0300, // 0003 GETMET R3 R1 K0
|
||||
0x88140101, // 0004 GETMBR R5 R0 K1
|
||||
0x7C0C0400, // 0005 CALL R3 2
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Bridge_Sensor_Air_Quality
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
|
||||
be_local_class(Matter_Plugin_Bridge_Sensor_Air_Quality,
|
||||
8,
|
||||
&be_class_Matter_Plugin_Bridge_HTTP,
|
||||
be_nested_map(20,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Air_X20Quality) },
|
||||
{ be_const_key_weak(shadow_tvoc, 8), be_const_var(7) },
|
||||
{ be_const_key_weak(shadow_pm10, 7), be_const_var(4) },
|
||||
{ be_const_key_weak(shadow_pm2_5, -1), be_const_var(3) },
|
||||
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Sensor_X20Model) },
|
||||
{ be_const_key_weak(shadow_co2, -1), be_const_var(5) },
|
||||
{ be_const_key_weak(parse_update, 18), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update_closure) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute_closure) },
|
||||
{ be_const_key_weak(prefix, 13), be_const_var(0) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(44, -1), be_const_int(1) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values_closure) },
|
||||
{ be_const_key_weak(shadow_pm1, 11), be_const_var(2) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_airquality) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(12,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(1068, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1069, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1070, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(8,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(7,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(5, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(12,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(4),
|
||||
be_const_int(5),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1037, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(91, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(7,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(29, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(10,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(12,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(3),
|
||||
be_const_int(5),
|
||||
be_const_int(10),
|
||||
be_const_int(15),
|
||||
be_const_int(17),
|
||||
be_const_int(18),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1066, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(1043, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(11,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(65528),
|
||||
be_const_int(65529),
|
||||
be_const_int(65530),
|
||||
be_const_int(65531),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init_closure) },
|
||||
{ be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) },
|
||||
{ be_const_key_weak(shadow_no2, 4), be_const_var(6) },
|
||||
{ be_const_key_weak(shadow_air_quality, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(ARG, 0), be_nested_str_weak(airquality) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Bridge_Sensor_Air_Quality)
|
||||
);
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
@ -340,21 +340,22 @@ be_local_closure(class_Matter_Plugin_Light2_read_attribute, /* name */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Light2,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K5 */ be_nested_str_weak(set),
|
||||
/* K5 */ be_nested_str_weak(set_or_nil),
|
||||
/* K6 */ be_nested_str_weak(U1),
|
||||
/* K7 */ be_nested_str_weak(shadow_ct),
|
||||
/* K8 */ be_const_int(2),
|
||||
/* K9 */ be_const_int(0),
|
||||
/* K10 */ be_nested_str_weak(ct_min),
|
||||
/* K11 */ be_nested_str_weak(ct_max),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
/* K8 */ be_nested_str_weak(set),
|
||||
/* K9 */ be_const_int(2),
|
||||
/* K10 */ be_const_int(0),
|
||||
/* K11 */ be_nested_str_weak(ct_min),
|
||||
/* K12 */ be_nested_str_weak(ct_max),
|
||||
/* K13 */ be_nested_str_weak(U4),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
@ -380,51 +381,51 @@ be_local_closure(class_Matter_Plugin_Light2_read_attribute, /* name */
|
||||
0x541E0007, // 0012 LDINT R7 8
|
||||
0x1C1C0C07, // 0013 EQ R7 R6 R7
|
||||
0x781E0005, // 0014 JMPF R7 #001B
|
||||
0x8C1C0705, // 0015 GETMET R7 R3 K5
|
||||
0x8C1C0708, // 0015 GETMET R7 R3 K8
|
||||
0x88240906, // 0016 GETMBR R9 R4 K6
|
||||
0x58280008, // 0017 LDCONST R10 K8
|
||||
0x58280009, // 0017 LDCONST R10 K9
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x70020022, // 001A JMP #003E
|
||||
0x541E000E, // 001B LDINT R7 15
|
||||
0x1C1C0C07, // 001C EQ R7 R6 R7
|
||||
0x781E0005, // 001D JMPF R7 #0024
|
||||
0x8C1C0705, // 001E GETMET R7 R3 K5
|
||||
0x8C1C0708, // 001E GETMET R7 R3 K8
|
||||
0x88240906, // 001F GETMBR R9 R4 K6
|
||||
0x58280009, // 0020 LDCONST R10 K9
|
||||
0x5828000A, // 0020 LDCONST R10 K10
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x70020019, // 0023 JMP #003E
|
||||
0x541E400A, // 0024 LDINT R7 16395
|
||||
0x1C1C0C07, // 0025 EQ R7 R6 R7
|
||||
0x781E0005, // 0026 JMPF R7 #002D
|
||||
0x8C1C0705, // 0027 GETMET R7 R3 K5
|
||||
0x8C1C0708, // 0027 GETMET R7 R3 K8
|
||||
0x88240906, // 0028 GETMBR R9 R4 K6
|
||||
0x8828010A, // 0029 GETMBR R10 R0 K10
|
||||
0x8828010B, // 0029 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 002A CALL R7 3
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x70020010, // 002C JMP #003E
|
||||
0x541E400B, // 002D LDINT R7 16396
|
||||
0x1C1C0C07, // 002E EQ R7 R6 R7
|
||||
0x781E0005, // 002F JMPF R7 #0036
|
||||
0x8C1C0705, // 0030 GETMET R7 R3 K5
|
||||
0x8C1C0708, // 0030 GETMET R7 R3 K8
|
||||
0x88240906, // 0031 GETMBR R9 R4 K6
|
||||
0x8828010B, // 0032 GETMBR R10 R0 K11
|
||||
0x8828010C, // 0032 GETMBR R10 R0 K12
|
||||
0x7C1C0600, // 0033 CALL R7 3
|
||||
0x80040E00, // 0034 RET 1 R7
|
||||
0x70020007, // 0035 JMP #003E
|
||||
0x541EFFFB, // 0036 LDINT R7 65532
|
||||
0x1C1C0C07, // 0037 EQ R7 R6 R7
|
||||
0x781E0004, // 0038 JMPF R7 #003E
|
||||
0x8C1C0705, // 0039 GETMET R7 R3 K5
|
||||
0x8824090C, // 003A GETMBR R9 R4 K12
|
||||
0x8C1C0708, // 0039 GETMET R7 R3 K8
|
||||
0x8824090D, // 003A GETMBR R9 R4 K13
|
||||
0x542A000F, // 003B LDINT R10 16
|
||||
0x7C1C0600, // 003C CALL R7 3
|
||||
0x80040E00, // 003D RET 1 R7
|
||||
0x601C0003, // 003E GETGBL R7 G3
|
||||
0x5C200000, // 003F MOVE R8 R0
|
||||
0x7C1C0200, // 0040 CALL R7 1
|
||||
0x8C1C0F0D, // 0041 GETMET R7 R7 K13
|
||||
0x8C1C0F0E, // 0041 GETMET R7 R7 K14
|
||||
0x5C240200, // 0042 MOVE R9 R1
|
||||
0x5C280400, // 0043 MOVE R10 R2
|
||||
0x5C2C0600, // 0044 MOVE R11 R3
|
||||
|
@ -531,20 +531,21 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Light3,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K6 */ be_nested_str_weak(set_or_nil),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(shadow_hue),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str_weak(shadow_sat),
|
||||
/* K11 */ be_nested_str_weak(U4),
|
||||
/* K12 */ be_nested_str_weak(read_attribute),
|
||||
/* K11 */ be_nested_str_weak(set),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
@ -577,7 +578,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541E0006, // 0019 LDINT R7 7
|
||||
0x1C1C0C07, // 001A EQ R7 R6 R7
|
||||
0x781E0005, // 001B JMPF R7 #0022
|
||||
0x8C1C0706, // 001C GETMET R7 R3 K6
|
||||
0x8C1C070B, // 001C GETMET R7 R3 K11
|
||||
0x88240907, // 001D GETMBR R9 R4 K7
|
||||
0x58280005, // 001E LDCONST R10 K5
|
||||
0x7C1C0600, // 001F CALL R7 3
|
||||
@ -586,7 +587,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541E0007, // 0022 LDINT R7 8
|
||||
0x1C1C0C07, // 0023 EQ R7 R6 R7
|
||||
0x781E0005, // 0024 JMPF R7 #002B
|
||||
0x8C1C0706, // 0025 GETMET R7 R3 K6
|
||||
0x8C1C070B, // 0025 GETMET R7 R3 K11
|
||||
0x88240907, // 0026 GETMBR R9 R4 K7
|
||||
0x58280005, // 0027 LDCONST R10 K5
|
||||
0x7C1C0600, // 0028 CALL R7 3
|
||||
@ -595,7 +596,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541E000E, // 002B LDINT R7 15
|
||||
0x1C1C0C07, // 002C EQ R7 R6 R7
|
||||
0x781E0005, // 002D JMPF R7 #0034
|
||||
0x8C1C0706, // 002E GETMET R7 R3 K6
|
||||
0x8C1C070B, // 002E GETMET R7 R3 K11
|
||||
0x88240907, // 002F GETMBR R9 R4 K7
|
||||
0x58280005, // 0030 LDCONST R10 K5
|
||||
0x7C1C0600, // 0031 CALL R7 3
|
||||
@ -604,7 +605,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541E4000, // 0034 LDINT R7 16385
|
||||
0x1C1C0C07, // 0035 EQ R7 R6 R7
|
||||
0x781E0005, // 0036 JMPF R7 #003D
|
||||
0x8C1C0706, // 0037 GETMET R7 R3 K6
|
||||
0x8C1C070B, // 0037 GETMET R7 R3 K11
|
||||
0x88240907, // 0038 GETMBR R9 R4 K7
|
||||
0x58280005, // 0039 LDCONST R10 K5
|
||||
0x7C1C0600, // 003A CALL R7 3
|
||||
@ -613,7 +614,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541E4009, // 003D LDINT R7 16394
|
||||
0x1C1C0C07, // 003E EQ R7 R6 R7
|
||||
0x781E0005, // 003F JMPF R7 #0046
|
||||
0x8C1C0706, // 0040 GETMET R7 R3 K6
|
||||
0x8C1C070B, // 0040 GETMET R7 R3 K11
|
||||
0x88240907, // 0041 GETMBR R9 R4 K7
|
||||
0x58280009, // 0042 LDCONST R10 K9
|
||||
0x7C1C0600, // 0043 CALL R7 3
|
||||
@ -622,7 +623,7 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541E000F, // 0046 LDINT R7 16
|
||||
0x1C1C0C07, // 0047 EQ R7 R6 R7
|
||||
0x781E0005, // 0048 JMPF R7 #004F
|
||||
0x8C1C0706, // 0049 GETMET R7 R3 K6
|
||||
0x8C1C070B, // 0049 GETMET R7 R3 K11
|
||||
0x88240907, // 004A GETMBR R9 R4 K7
|
||||
0x58280005, // 004B LDCONST R10 K5
|
||||
0x7C1C0600, // 004C CALL R7 3
|
||||
@ -631,15 +632,15 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
|
||||
0x541EFFFB, // 004F LDINT R7 65532
|
||||
0x1C1C0C07, // 0050 EQ R7 R6 R7
|
||||
0x781E0004, // 0051 JMPF R7 #0057
|
||||
0x8C1C0706, // 0052 GETMET R7 R3 K6
|
||||
0x8824090B, // 0053 GETMBR R9 R4 K11
|
||||
0x8C1C070B, // 0052 GETMET R7 R3 K11
|
||||
0x8824090C, // 0053 GETMBR R9 R4 K12
|
||||
0x58280009, // 0054 LDCONST R10 K9
|
||||
0x7C1C0600, // 0055 CALL R7 3
|
||||
0x80040E00, // 0056 RET 1 R7
|
||||
0x601C0003, // 0057 GETGBL R7 G3
|
||||
0x5C200000, // 0058 MOVE R8 R0
|
||||
0x7C1C0200, // 0059 CALL R7 1
|
||||
0x8C1C0F0C, // 005A GETMET R7 R7 K12
|
||||
0x8C1C0F0D, // 005A GETMET R7 R7 K13
|
||||
0x5C240200, // 005B MOVE R9 R1
|
||||
0x5C280400, // 005C MOVE R10 R2
|
||||
0x5C2C0600, // 005D MOVE R11 R3
|
||||
|
@ -71,94 +71,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed, /* name
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Flow,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(shadow_value),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(U2),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[51]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E0403, // 0004 LDINT R7 1028
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0022, // 0006 JMPF R7 #002A
|
||||
0x1C1C0D04, // 0007 EQ R7 R6 K4
|
||||
0x781E0011, // 0008 JMPF R7 #001B
|
||||
0x881C0105, // 0009 GETMBR R7 R0 K5
|
||||
0x4C200000, // 000A LDNIL R8
|
||||
0x201C0E08, // 000B NE R7 R7 R8
|
||||
0x781E0007, // 000C JMPF R7 #0015
|
||||
0x8C1C0706, // 000D GETMET R7 R3 K6
|
||||
0x88240907, // 000E GETMBR R9 R4 K7
|
||||
0x60280009, // 000F GETGBL R10 G9
|
||||
0x882C0105, // 0010 GETMBR R11 R0 K5
|
||||
0x7C280200, // 0011 CALL R10 1
|
||||
0x7C1C0600, // 0012 CALL R7 3
|
||||
0x80040E00, // 0013 RET 1 R7
|
||||
0x70020004, // 0014 JMP #001A
|
||||
0x8C1C0706, // 0015 GETMET R7 R3 K6
|
||||
0x88240908, // 0016 GETMBR R9 R4 K8
|
||||
0x4C280000, // 0017 LDNIL R10
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x7002000E, // 001A JMP #002A
|
||||
0x1C1C0D09, // 001B EQ R7 R6 K9
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0706, // 001D GETMET R7 R3 K6
|
||||
0x88240907, // 001E GETMBR R9 R4 K7
|
||||
0x58280004, // 001F LDCONST R10 K4
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020006, // 0022 JMP #002A
|
||||
0x1C1C0D0A, // 0023 EQ R7 R6 K10
|
||||
0x781E0004, // 0024 JMPF R7 #002A
|
||||
0x8C1C0706, // 0025 GETMET R7 R3 K6
|
||||
0x88240907, // 0026 GETMBR R9 R4 K7
|
||||
0x542AFFFD, // 0027 LDINT R10 65534
|
||||
0x7C1C0600, // 0028 CALL R7 3
|
||||
0x80040E00, // 0029 RET 1 R7
|
||||
0x601C0003, // 002A GETGBL R7 G3
|
||||
0x5C200000, // 002B MOVE R8 R0
|
||||
0x7C1C0200, // 002C CALL R7 1
|
||||
0x8C1C0F0B, // 002D GETMET R7 R7 K11
|
||||
0x5C240200, // 002E MOVE R9 R1
|
||||
0x5C280400, // 002F MOVE R10 R2
|
||||
0x5C2C0600, // 0030 MOVE R11 R3
|
||||
0x7C1C0800, // 0031 CALL R7 4
|
||||
0x80040E00, // 0032 RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Flow'
|
||||
extern bclosure *class_Matter_Plugin_Sensor_Flow_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: web_values
|
||||
@ -218,7 +132,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Flow,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(774, -1), be_const_int(1) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_static_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) },
|
||||
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed_closure) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Flow) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_flow) },
|
||||
|
@ -71,94 +71,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed, /*
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Humidity,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(shadow_value),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(U2),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[51]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E0404, // 0004 LDINT R7 1029
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0022, // 0006 JMPF R7 #002A
|
||||
0x1C1C0D04, // 0007 EQ R7 R6 K4
|
||||
0x781E0011, // 0008 JMPF R7 #001B
|
||||
0x881C0105, // 0009 GETMBR R7 R0 K5
|
||||
0x4C200000, // 000A LDNIL R8
|
||||
0x201C0E08, // 000B NE R7 R7 R8
|
||||
0x781E0007, // 000C JMPF R7 #0015
|
||||
0x8C1C0706, // 000D GETMET R7 R3 K6
|
||||
0x88240907, // 000E GETMBR R9 R4 K7
|
||||
0x60280009, // 000F GETGBL R10 G9
|
||||
0x882C0105, // 0010 GETMBR R11 R0 K5
|
||||
0x7C280200, // 0011 CALL R10 1
|
||||
0x7C1C0600, // 0012 CALL R7 3
|
||||
0x80040E00, // 0013 RET 1 R7
|
||||
0x70020004, // 0014 JMP #001A
|
||||
0x8C1C0706, // 0015 GETMET R7 R3 K6
|
||||
0x88240908, // 0016 GETMBR R9 R4 K8
|
||||
0x4C280000, // 0017 LDNIL R10
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x7002000E, // 001A JMP #002A
|
||||
0x1C1C0D09, // 001B EQ R7 R6 K9
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0706, // 001D GETMET R7 R3 K6
|
||||
0x88240907, // 001E GETMBR R9 R4 K7
|
||||
0x542A01F3, // 001F LDINT R10 500
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020006, // 0022 JMP #002A
|
||||
0x1C1C0D0A, // 0023 EQ R7 R6 K10
|
||||
0x781E0004, // 0024 JMPF R7 #002A
|
||||
0x8C1C0706, // 0025 GETMET R7 R3 K6
|
||||
0x88240907, // 0026 GETMBR R9 R4 K7
|
||||
0x542A270F, // 0027 LDINT R10 10000
|
||||
0x7C1C0600, // 0028 CALL R7 3
|
||||
0x80040E00, // 0029 RET 1 R7
|
||||
0x601C0003, // 002A GETGBL R7 G3
|
||||
0x5C200000, // 002B MOVE R8 R0
|
||||
0x7C1C0200, // 002C CALL R7 1
|
||||
0x8C1C0F0B, // 002D GETMET R7 R7 K11
|
||||
0x5C240200, // 002E MOVE R9 R1
|
||||
0x5C280400, // 002F MOVE R10 R2
|
||||
0x5C2C0600, // 0030 MOVE R11 R3
|
||||
0x7C1C0800, // 0031 CALL R7 4
|
||||
0x80040E00, // 0032 RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Humidity'
|
||||
extern bclosure *class_Matter_Plugin_Sensor_Humidity_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: web_values
|
||||
@ -226,7 +140,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Humidity,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(775, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
|
||||
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed_closure) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Humidity) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_humidity) },
|
||||
|
@ -83,94 +83,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed,
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Illuminance,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(shadow_value),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(U2),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[51]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E03FF, // 0004 LDINT R7 1024
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0022, // 0006 JMPF R7 #002A
|
||||
0x1C1C0D04, // 0007 EQ R7 R6 K4
|
||||
0x781E0011, // 0008 JMPF R7 #001B
|
||||
0x881C0105, // 0009 GETMBR R7 R0 K5
|
||||
0x4C200000, // 000A LDNIL R8
|
||||
0x201C0E08, // 000B NE R7 R7 R8
|
||||
0x781E0007, // 000C JMPF R7 #0015
|
||||
0x8C1C0706, // 000D GETMET R7 R3 K6
|
||||
0x88240907, // 000E GETMBR R9 R4 K7
|
||||
0x60280009, // 000F GETGBL R10 G9
|
||||
0x882C0105, // 0010 GETMBR R11 R0 K5
|
||||
0x7C280200, // 0011 CALL R10 1
|
||||
0x7C1C0600, // 0012 CALL R7 3
|
||||
0x80040E00, // 0013 RET 1 R7
|
||||
0x70020004, // 0014 JMP #001A
|
||||
0x8C1C0706, // 0015 GETMET R7 R3 K6
|
||||
0x88240908, // 0016 GETMBR R9 R4 K8
|
||||
0x4C280000, // 0017 LDNIL R10
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x7002000E, // 001A JMP #002A
|
||||
0x1C1C0D09, // 001B EQ R7 R6 K9
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0706, // 001D GETMET R7 R3 K6
|
||||
0x88240907, // 001E GETMBR R9 R4 K7
|
||||
0x58280009, // 001F LDCONST R10 K9
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020006, // 0022 JMP #002A
|
||||
0x1C1C0D0A, // 0023 EQ R7 R6 K10
|
||||
0x781E0004, // 0024 JMPF R7 #002A
|
||||
0x8C1C0706, // 0025 GETMET R7 R3 K6
|
||||
0x88240907, // 0026 GETMBR R9 R4 K7
|
||||
0x542AFFFD, // 0027 LDINT R10 65534
|
||||
0x7C1C0600, // 0028 CALL R7 3
|
||||
0x80040E00, // 0029 RET 1 R7
|
||||
0x601C0003, // 002A GETGBL R7 G3
|
||||
0x5C200000, // 002B MOVE R8 R0
|
||||
0x7C1C0200, // 002C CALL R7 1
|
||||
0x8C1C0F0B, // 002D GETMET R7 R7 K11
|
||||
0x5C240200, // 002E MOVE R9 R1
|
||||
0x5C280400, // 002F MOVE R10 R2
|
||||
0x5C2C0600, // 0030 MOVE R11 R3
|
||||
0x7C1C0800, // 0031 CALL R7 4
|
||||
0x80040E00, // 0032 RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Illuminance'
|
||||
extern bclosure *class_Matter_Plugin_Sensor_Illuminance_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: web_values
|
||||
@ -230,7 +144,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Illuminance,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(262, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
|
||||
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed_closure) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Illuminance) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_illuminance) },
|
||||
|
@ -70,94 +70,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed, /*
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Pressure,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(shadow_value),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(I2),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[51]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E0402, // 0004 LDINT R7 1027
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0022, // 0006 JMPF R7 #002A
|
||||
0x1C1C0D04, // 0007 EQ R7 R6 K4
|
||||
0x781E0011, // 0008 JMPF R7 #001B
|
||||
0x881C0105, // 0009 GETMBR R7 R0 K5
|
||||
0x4C200000, // 000A LDNIL R8
|
||||
0x201C0E08, // 000B NE R7 R7 R8
|
||||
0x781E0007, // 000C JMPF R7 #0015
|
||||
0x8C1C0706, // 000D GETMET R7 R3 K6
|
||||
0x88240907, // 000E GETMBR R9 R4 K7
|
||||
0x60280009, // 000F GETGBL R10 G9
|
||||
0x882C0105, // 0010 GETMBR R11 R0 K5
|
||||
0x7C280200, // 0011 CALL R10 1
|
||||
0x7C1C0600, // 0012 CALL R7 3
|
||||
0x80040E00, // 0013 RET 1 R7
|
||||
0x70020004, // 0014 JMP #001A
|
||||
0x8C1C0706, // 0015 GETMET R7 R3 K6
|
||||
0x88240908, // 0016 GETMBR R9 R4 K8
|
||||
0x4C280000, // 0017 LDNIL R10
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x7002000E, // 001A JMP #002A
|
||||
0x1C1C0D09, // 001B EQ R7 R6 K9
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0706, // 001D GETMET R7 R3 K6
|
||||
0x88240907, // 001E GETMBR R9 R4 K7
|
||||
0x542A01F3, // 001F LDINT R10 500
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020006, // 0022 JMP #002A
|
||||
0x1C1C0D0A, // 0023 EQ R7 R6 K10
|
||||
0x781E0004, // 0024 JMPF R7 #002A
|
||||
0x8C1C0706, // 0025 GETMET R7 R3 K6
|
||||
0x88240907, // 0026 GETMBR R9 R4 K7
|
||||
0x542A05DB, // 0027 LDINT R10 1500
|
||||
0x7C1C0600, // 0028 CALL R7 3
|
||||
0x80040E00, // 0029 RET 1 R7
|
||||
0x601C0003, // 002A GETGBL R7 G3
|
||||
0x5C200000, // 002B MOVE R8 R0
|
||||
0x7C1C0200, // 002C CALL R7 1
|
||||
0x8C1C0F0B, // 002D GETMET R7 R7 K11
|
||||
0x5C240200, // 002E MOVE R9 R1
|
||||
0x5C280400, // 002F MOVE R10 R2
|
||||
0x5C2C0600, // 0030 MOVE R11 R3
|
||||
0x7C1C0800, // 0031 CALL R7 4
|
||||
0x80040E00, // 0032 RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Pressure'
|
||||
extern bclosure *class_Matter_Plugin_Sensor_Pressure_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: web_values
|
||||
@ -217,7 +131,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Pressure,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(773, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
|
||||
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed_closure) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Pressure) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_pressure) },
|
||||
|
@ -83,92 +83,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed, /* name
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Sensor_Temp,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(shadow_value),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(I2),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[49]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E0401, // 0004 LDINT R7 1026
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0020, // 0006 JMPF R7 #0028
|
||||
0x1C1C0D04, // 0007 EQ R7 R6 K4
|
||||
0x781E000F, // 0008 JMPF R7 #0019
|
||||
0x881C0105, // 0009 GETMBR R7 R0 K5
|
||||
0x4C200000, // 000A LDNIL R8
|
||||
0x201C0E08, // 000B NE R7 R7 R8
|
||||
0x781E0005, // 000C JMPF R7 #0013
|
||||
0x8C1C0706, // 000D GETMET R7 R3 K6
|
||||
0x88240907, // 000E GETMBR R9 R4 K7
|
||||
0x88280105, // 000F GETMBR R10 R0 K5
|
||||
0x7C1C0600, // 0010 CALL R7 3
|
||||
0x80040E00, // 0011 RET 1 R7
|
||||
0x70020004, // 0012 JMP #0018
|
||||
0x8C1C0706, // 0013 GETMET R7 R3 K6
|
||||
0x88240908, // 0014 GETMBR R9 R4 K8
|
||||
0x4C280000, // 0015 LDNIL R10
|
||||
0x7C1C0600, // 0016 CALL R7 3
|
||||
0x80040E00, // 0017 RET 1 R7
|
||||
0x7002000E, // 0018 JMP #0028
|
||||
0x1C1C0D09, // 0019 EQ R7 R6 K9
|
||||
0x781E0005, // 001A JMPF R7 #0021
|
||||
0x8C1C0706, // 001B GETMET R7 R3 K6
|
||||
0x88240907, // 001C GETMBR R9 R4 K7
|
||||
0x5429EC77, // 001D LDINT R10 -5000
|
||||
0x7C1C0600, // 001E CALL R7 3
|
||||
0x80040E00, // 001F RET 1 R7
|
||||
0x70020006, // 0020 JMP #0028
|
||||
0x1C1C0D0A, // 0021 EQ R7 R6 K10
|
||||
0x781E0004, // 0022 JMPF R7 #0028
|
||||
0x8C1C0706, // 0023 GETMET R7 R3 K6
|
||||
0x88240907, // 0024 GETMBR R9 R4 K7
|
||||
0x542A3A97, // 0025 LDINT R10 15000
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x601C0003, // 0028 GETGBL R7 G3
|
||||
0x5C200000, // 0029 MOVE R8 R0
|
||||
0x7C1C0200, // 002A CALL R7 1
|
||||
0x8C1C0F0B, // 002B GETMET R7 R7 K11
|
||||
0x5C240200, // 002C MOVE R9 R1
|
||||
0x5C280400, // 002D MOVE R10 R2
|
||||
0x5C2C0600, // 002E MOVE R11 R3
|
||||
0x7C1C0800, // 002F CALL R7 4
|
||||
0x80040E00, // 0030 RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Temp'
|
||||
extern bclosure *class_Matter_Plugin_Sensor_Temp_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: web_values
|
||||
@ -236,7 +152,7 @@ be_local_class(Matter_Plugin_Bridge_Sensor_Temp,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(770, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) },
|
||||
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed_closure) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Temperature) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_temperature) },
|
||||
|
@ -354,127 +354,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Light2_invoke_request, /* name */
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Light2_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Light2,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K5 */ be_nested_str_weak(shadow_ct),
|
||||
/* K6 */ be_nested_str_weak(set),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(NULL),
|
||||
/* K9 */ be_const_int(2),
|
||||
/* K10 */ be_const_int(0),
|
||||
/* K11 */ be_nested_str_weak(ct_min),
|
||||
/* K12 */ be_nested_str_weak(ct_max),
|
||||
/* K13 */ be_nested_str_weak(U4),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[81]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E02FF, // 0004 LDINT R7 768
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0040, // 0006 JMPF R7 #0048
|
||||
0x8C1C0104, // 0007 GETMET R7 R0 K4
|
||||
0x7C1C0200, // 0008 CALL R7 1
|
||||
0x541E0006, // 0009 LDINT R7 7
|
||||
0x1C1C0C07, // 000A EQ R7 R6 R7
|
||||
0x781E000F, // 000B JMPF R7 #001C
|
||||
0x881C0105, // 000C GETMBR R7 R0 K5
|
||||
0x4C200000, // 000D LDNIL R8
|
||||
0x201C0E08, // 000E NE R7 R7 R8
|
||||
0x781E0005, // 000F JMPF R7 #0016
|
||||
0x8C1C0706, // 0010 GETMET R7 R3 K6
|
||||
0x88240907, // 0011 GETMBR R9 R4 K7
|
||||
0x88280105, // 0012 GETMBR R10 R0 K5
|
||||
0x7C1C0600, // 0013 CALL R7 3
|
||||
0x80040E00, // 0014 RET 1 R7
|
||||
0x70020004, // 0015 JMP #001B
|
||||
0x8C1C0706, // 0016 GETMET R7 R3 K6
|
||||
0x88240908, // 0017 GETMBR R9 R4 K8
|
||||
0x4C280000, // 0018 LDNIL R10
|
||||
0x7C1C0600, // 0019 CALL R7 3
|
||||
0x80040E00, // 001A RET 1 R7
|
||||
0x7002002B, // 001B JMP #0048
|
||||
0x541E0007, // 001C LDINT R7 8
|
||||
0x1C1C0C07, // 001D EQ R7 R6 R7
|
||||
0x781E0005, // 001E JMPF R7 #0025
|
||||
0x8C1C0706, // 001F GETMET R7 R3 K6
|
||||
0x88240907, // 0020 GETMBR R9 R4 K7
|
||||
0x58280009, // 0021 LDCONST R10 K9
|
||||
0x7C1C0600, // 0022 CALL R7 3
|
||||
0x80040E00, // 0023 RET 1 R7
|
||||
0x70020022, // 0024 JMP #0048
|
||||
0x541E000E, // 0025 LDINT R7 15
|
||||
0x1C1C0C07, // 0026 EQ R7 R6 R7
|
||||
0x781E0005, // 0027 JMPF R7 #002E
|
||||
0x8C1C0706, // 0028 GETMET R7 R3 K6
|
||||
0x88240907, // 0029 GETMBR R9 R4 K7
|
||||
0x5828000A, // 002A LDCONST R10 K10
|
||||
0x7C1C0600, // 002B CALL R7 3
|
||||
0x80040E00, // 002C RET 1 R7
|
||||
0x70020019, // 002D JMP #0048
|
||||
0x541E400A, // 002E LDINT R7 16395
|
||||
0x1C1C0C07, // 002F EQ R7 R6 R7
|
||||
0x781E0005, // 0030 JMPF R7 #0037
|
||||
0x8C1C0706, // 0031 GETMET R7 R3 K6
|
||||
0x88240907, // 0032 GETMBR R9 R4 K7
|
||||
0x8828010B, // 0033 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 0034 CALL R7 3
|
||||
0x80040E00, // 0035 RET 1 R7
|
||||
0x70020010, // 0036 JMP #0048
|
||||
0x541E400B, // 0037 LDINT R7 16396
|
||||
0x1C1C0C07, // 0038 EQ R7 R6 R7
|
||||
0x781E0005, // 0039 JMPF R7 #0040
|
||||
0x8C1C0706, // 003A GETMET R7 R3 K6
|
||||
0x88240907, // 003B GETMBR R9 R4 K7
|
||||
0x8828010C, // 003C GETMBR R10 R0 K12
|
||||
0x7C1C0600, // 003D CALL R7 3
|
||||
0x80040E00, // 003E RET 1 R7
|
||||
0x70020007, // 003F JMP #0048
|
||||
0x541E4009, // 0040 LDINT R7 16394
|
||||
0x1C1C0C07, // 0041 EQ R7 R6 R7
|
||||
0x781E0004, // 0042 JMPF R7 #0048
|
||||
0x8C1C0706, // 0043 GETMET R7 R3 K6
|
||||
0x8824090D, // 0044 GETMBR R9 R4 K13
|
||||
0x542A000F, // 0045 LDINT R10 16
|
||||
0x7C1C0600, // 0046 CALL R7 3
|
||||
0x80040E00, // 0047 RET 1 R7
|
||||
0x601C0003, // 0048 GETGBL R7 G3
|
||||
0x5C200000, // 0049 MOVE R8 R0
|
||||
0x7C1C0200, // 004A CALL R7 1
|
||||
0x8C1C0F0E, // 004B GETMET R7 R7 K14
|
||||
0x5C240200, // 004C MOVE R9 R1
|
||||
0x5C280400, // 004D MOVE R10 R2
|
||||
0x5C2C0600, // 004E MOVE R11 R3
|
||||
0x7C1C0800, // 004F CALL R7 4
|
||||
0x80040E00, // 0050 RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light2'
|
||||
extern bclosure *class_Matter_Plugin_Light2_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: update_ct_minmax
|
||||
@ -659,7 +540,7 @@ be_local_class(Matter_Plugin_Bridge_Light2,
|
||||
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_update_ct_minmax_closure) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_invoke_request_closure) },
|
||||
{ be_const_key_weak(read_attribute, 10), be_const_closure(class_Matter_Plugin_Bridge_Light2_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, 10), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) },
|
||||
{ be_const_key_weak(ct_min, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light2) },
|
||||
})),
|
||||
|
@ -298,152 +298,8 @@ be_local_closure(class_Matter_Plugin_Bridge_Light3_web_value_RGB, /* name */
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
|
||||
be_local_closure(class_Matter_Plugin_Bridge_Light3_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
&be_class_Matter_Plugin_Bridge_Light3,
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(attribute),
|
||||
/* K4 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(shadow_hue),
|
||||
/* K7 */ be_nested_str_weak(set),
|
||||
/* K8 */ be_nested_str_weak(U1),
|
||||
/* K9 */ be_nested_str_weak(NULL),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_nested_str_weak(shadow_sat),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[107]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140502, // 0002 GETMBR R5 R2 K2
|
||||
0x88180503, // 0003 GETMBR R6 R2 K3
|
||||
0x541E02FF, // 0004 LDINT R7 768
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E005A, // 0006 JMPF R7 #0062
|
||||
0x8C1C0104, // 0007 GETMET R7 R0 K4
|
||||
0x7C1C0200, // 0008 CALL R7 1
|
||||
0x1C1C0D05, // 0009 EQ R7 R6 K5
|
||||
0x781E000F, // 000A JMPF R7 #001B
|
||||
0x881C0106, // 000B GETMBR R7 R0 K6
|
||||
0x4C200000, // 000C LDNIL R8
|
||||
0x201C0E08, // 000D NE R7 R7 R8
|
||||
0x781E0005, // 000E JMPF R7 #0015
|
||||
0x8C1C0707, // 000F GETMET R7 R3 K7
|
||||
0x88240908, // 0010 GETMBR R9 R4 K8
|
||||
0x88280106, // 0011 GETMBR R10 R0 K6
|
||||
0x7C1C0600, // 0012 CALL R7 3
|
||||
0x80040E00, // 0013 RET 1 R7
|
||||
0x70020004, // 0014 JMP #001A
|
||||
0x8C1C0707, // 0015 GETMET R7 R3 K7
|
||||
0x88240909, // 0016 GETMBR R9 R4 K9
|
||||
0x4C280000, // 0017 LDNIL R10
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x70020046, // 001A JMP #0062
|
||||
0x1C1C0D0A, // 001B EQ R7 R6 K10
|
||||
0x781E000F, // 001C JMPF R7 #002D
|
||||
0x881C010B, // 001D GETMBR R7 R0 K11
|
||||
0x4C200000, // 001E LDNIL R8
|
||||
0x201C0E08, // 001F NE R7 R7 R8
|
||||
0x781E0005, // 0020 JMPF R7 #0027
|
||||
0x8C1C0707, // 0021 GETMET R7 R3 K7
|
||||
0x88240908, // 0022 GETMBR R9 R4 K8
|
||||
0x8828010B, // 0023 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 0024 CALL R7 3
|
||||
0x80040E00, // 0025 RET 1 R7
|
||||
0x70020004, // 0026 JMP #002C
|
||||
0x8C1C0707, // 0027 GETMET R7 R3 K7
|
||||
0x88240909, // 0028 GETMBR R9 R4 K9
|
||||
0x4C280000, // 0029 LDNIL R10
|
||||
0x7C1C0600, // 002A CALL R7 3
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x70020034, // 002C JMP #0062
|
||||
0x541E0006, // 002D LDINT R7 7
|
||||
0x1C1C0C07, // 002E EQ R7 R6 R7
|
||||
0x781E0005, // 002F JMPF R7 #0036
|
||||
0x8C1C0707, // 0030 GETMET R7 R3 K7
|
||||
0x88240908, // 0031 GETMBR R9 R4 K8
|
||||
0x58280005, // 0032 LDCONST R10 K5
|
||||
0x7C1C0600, // 0033 CALL R7 3
|
||||
0x80040E00, // 0034 RET 1 R7
|
||||
0x7002002B, // 0035 JMP #0062
|
||||
0x541E0007, // 0036 LDINT R7 8
|
||||
0x1C1C0C07, // 0037 EQ R7 R6 R7
|
||||
0x781E0005, // 0038 JMPF R7 #003F
|
||||
0x8C1C0707, // 0039 GETMET R7 R3 K7
|
||||
0x88240908, // 003A GETMBR R9 R4 K8
|
||||
0x58280005, // 003B LDCONST R10 K5
|
||||
0x7C1C0600, // 003C CALL R7 3
|
||||
0x80040E00, // 003D RET 1 R7
|
||||
0x70020022, // 003E JMP #0062
|
||||
0x541E000E, // 003F LDINT R7 15
|
||||
0x1C1C0C07, // 0040 EQ R7 R6 R7
|
||||
0x781E0005, // 0041 JMPF R7 #0048
|
||||
0x8C1C0707, // 0042 GETMET R7 R3 K7
|
||||
0x88240908, // 0043 GETMBR R9 R4 K8
|
||||
0x58280005, // 0044 LDCONST R10 K5
|
||||
0x7C1C0600, // 0045 CALL R7 3
|
||||
0x80040E00, // 0046 RET 1 R7
|
||||
0x70020019, // 0047 JMP #0062
|
||||
0x541E4000, // 0048 LDINT R7 16385
|
||||
0x1C1C0C07, // 0049 EQ R7 R6 R7
|
||||
0x781E0005, // 004A JMPF R7 #0051
|
||||
0x8C1C0707, // 004B GETMET R7 R3 K7
|
||||
0x88240908, // 004C GETMBR R9 R4 K8
|
||||
0x58280005, // 004D LDCONST R10 K5
|
||||
0x7C1C0600, // 004E CALL R7 3
|
||||
0x80040E00, // 004F RET 1 R7
|
||||
0x70020010, // 0050 JMP #0062
|
||||
0x541E4009, // 0051 LDINT R7 16394
|
||||
0x1C1C0C07, // 0052 EQ R7 R6 R7
|
||||
0x781E0005, // 0053 JMPF R7 #005A
|
||||
0x8C1C0707, // 0054 GETMET R7 R3 K7
|
||||
0x8824090C, // 0055 GETMBR R9 R4 K12
|
||||
0x5828000A, // 0056 LDCONST R10 K10
|
||||
0x7C1C0600, // 0057 CALL R7 3
|
||||
0x80040E00, // 0058 RET 1 R7
|
||||
0x70020007, // 0059 JMP #0062
|
||||
0x541E000F, // 005A LDINT R7 16
|
||||
0x1C1C0C07, // 005B EQ R7 R6 R7
|
||||
0x781E0004, // 005C JMPF R7 #0062
|
||||
0x8C1C0707, // 005D GETMET R7 R3 K7
|
||||
0x88240908, // 005E GETMBR R9 R4 K8
|
||||
0x58280005, // 005F LDCONST R10 K5
|
||||
0x7C1C0600, // 0060 CALL R7 3
|
||||
0x80040E00, // 0061 RET 1 R7
|
||||
0x601C0003, // 0062 GETGBL R7 G3
|
||||
0x5C200000, // 0063 MOVE R8 R0
|
||||
0x7C1C0200, // 0064 CALL R7 1
|
||||
0x8C1C0F0D, // 0065 GETMET R7 R7 K13
|
||||
0x5C240200, // 0066 MOVE R9 R1
|
||||
0x5C280400, // 0067 MOVE R10 R2
|
||||
0x5C2C0600, // 0068 MOVE R11 R3
|
||||
0x7C1C0800, // 0069 CALL R7 4
|
||||
0x80040E00, // 006A RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light3'
|
||||
extern bclosure *class_Matter_Plugin_Light3_read_attribute;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
@ -835,7 +691,7 @@ be_local_class(Matter_Plugin_Bridge_Light3,
|
||||
{ be_const_key_int(269, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_read_attribute_closure) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Bridge_Light3)
|
||||
);
|
||||
|
@ -0,0 +1,27 @@
|
||||
/* Solidification of Matter_Plugin_9_Virt_Sensor_Air_Quality.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Virt_Sensor_Air_Quality;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Virt_Sensor_Air_Quality
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality;
|
||||
be_local_class(Matter_Plugin_Virt_Sensor_Air_Quality,
|
||||
0,
|
||||
&be_class_Matter_Plugin_Sensor_Air_Quality,
|
||||
be_nested_map(5,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
|
||||
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(v_X2EAir_X20Quality) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(v_airquality) },
|
||||
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) },
|
||||
{ be_const_key_weak(ARG, 2), be_nested_str_weak() },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Virt_Sensor_Air_Quality)
|
||||
);
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
File diff suppressed because it is too large
Load Diff
@ -3419,7 +3419,7 @@ be_local_class(Matter_UI,
|
||||
{ be_const_key_weak(show_commissioning_info, -1), be_const_closure(class_Matter_UI_show_commissioning_info_closure) },
|
||||
{ be_const_key_weak(page_part_ctl, 18), be_const_closure(class_Matter_UI_page_part_ctl_closure) },
|
||||
{ be_const_key_weak(show_fabric_info, -1), be_const_closure(class_Matter_UI_show_fabric_info_closure) },
|
||||
{ be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Cwaterleak_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_waterleak) },
|
||||
{ be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Cwaterleak_X7Cairquality_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_waterleak_X7Cv_airquality) },
|
||||
{ be_const_key_weak(web_get_arg, -1), be_const_closure(class_Matter_UI_web_get_arg_closure) },
|
||||
{ be_const_key_weak(plugin_option, 5), be_const_closure(class_Matter_UI_plugin_option_closure) },
|
||||
{ be_const_key_weak(web_add_config_button, -1), be_const_closure(class_Matter_UI_web_add_config_button_closure) },
|
||||
|
@ -6284,52 +6284,55 @@ be_local_class(Matter_Device,
|
||||
{ be_const_key_weak(stop, 14), be_const_closure(class_Matter_Device_stop_closure) },
|
||||
{ be_const_key_weak(stop_basic_commissioning, 13), be_const_closure(class_Matter_Device_stop_basic_commissioning_closure) },
|
||||
{ be_const_key_weak(plugins_classes, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(44,
|
||||
be_const_map( * be_nested_map(47,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(humidity, 37), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) },
|
||||
{ be_const_key_weak(flow, -1), be_const_class(be_class_Matter_Plugin_Sensor_Flow) },
|
||||
{ be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) },
|
||||
{ be_const_key_weak(waterleak, -1), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) },
|
||||
{ be_const_key_weak(http_flow, 25), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) },
|
||||
{ be_const_key_weak(v_pressure, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) },
|
||||
{ be_const_key_weak(v_waterleak, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) },
|
||||
{ be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) },
|
||||
{ be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) },
|
||||
{ be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) },
|
||||
{ be_const_key_weak(illuminance, 22), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) },
|
||||
{ be_const_key_weak(v_light3, 33), be_const_class(be_class_Matter_Plugin_Virt_Light3) },
|
||||
{ be_const_key_weak(contact, -1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) },
|
||||
{ be_const_key_weak(v_light1, 14), be_const_class(be_class_Matter_Plugin_Virt_Light1) },
|
||||
{ be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) },
|
||||
{ be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) },
|
||||
{ be_const_key_weak(http_illuminance, 12), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) },
|
||||
{ be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) },
|
||||
{ be_const_key_weak(http_contact, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) },
|
||||
{ be_const_key_weak(light2, -1), be_const_class(be_class_Matter_Plugin_Light2) },
|
||||
{ be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) },
|
||||
{ be_const_key_weak(v_waterleak, 43), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) },
|
||||
{ be_const_key_weak(light0, -1), be_const_class(be_class_Matter_Plugin_Light0) },
|
||||
{ be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) },
|
||||
{ be_const_key_weak(waterleak, -1), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) },
|
||||
{ be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) },
|
||||
{ be_const_key_weak(humidity, 17), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) },
|
||||
{ be_const_key_weak(http_contact, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) },
|
||||
{ be_const_key_weak(http_humidity, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) },
|
||||
{ be_const_key_weak(shutter, 28), be_const_class(be_class_Matter_Plugin_Shutter) },
|
||||
{ be_const_key_weak(http_light0, 24), be_const_class(be_class_Matter_Plugin_Bridge_Light0) },
|
||||
{ be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) },
|
||||
{ be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) },
|
||||
{ be_const_key_weak(v_contact, 41), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) },
|
||||
{ be_const_key_weak(root, 7), be_const_class(be_class_Matter_Plugin_Root) },
|
||||
{ be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) },
|
||||
{ be_const_key_weak(v_illuminance, 8), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) },
|
||||
{ be_const_key_weak(v_light2, 26), be_const_class(be_class_Matter_Plugin_Virt_Light2) },
|
||||
{ be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) },
|
||||
{ be_const_key_weak(v_light0, 4), be_const_class(be_class_Matter_Plugin_Virt_Light0) },
|
||||
{ be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) },
|
||||
{ be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) },
|
||||
{ be_const_key_weak(shutter_X2Btilt, 43), be_const_class(be_class_Matter_Plugin_ShutterTilt) },
|
||||
{ be_const_key_weak(http_waterleak, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) },
|
||||
{ be_const_key_weak(http_relay, 16), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) },
|
||||
{ be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) },
|
||||
{ be_const_key_weak(relay, -1), be_const_class(be_class_Matter_Plugin_OnOff) },
|
||||
{ be_const_key_weak(light1, -1), be_const_class(be_class_Matter_Plugin_Light1) },
|
||||
{ be_const_key_weak(http_temperature, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) },
|
||||
{ be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) },
|
||||
{ be_const_key_weak(airquality, -1), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) },
|
||||
{ be_const_key_weak(http_flow, 36), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) },
|
||||
{ be_const_key_weak(v_illuminance, 24), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) },
|
||||
{ be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) },
|
||||
{ be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) },
|
||||
{ be_const_key_weak(http_light1, 26), be_const_class(be_class_Matter_Plugin_Bridge_Light1) },
|
||||
{ be_const_key_weak(http_light0, 6), be_const_class(be_class_Matter_Plugin_Bridge_Light0) },
|
||||
{ be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) },
|
||||
{ be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) },
|
||||
{ be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) },
|
||||
{ be_const_key_weak(contact, 10), be_const_class(be_class_Matter_Plugin_Sensor_Contact) },
|
||||
{ be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) },
|
||||
{ be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) },
|
||||
{ be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) },
|
||||
{ be_const_key_weak(v_light1, -1), be_const_class(be_class_Matter_Plugin_Virt_Light1) },
|
||||
{ be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) },
|
||||
{ be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) },
|
||||
{ be_const_key_weak(http_illuminance, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) },
|
||||
{ be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) },
|
||||
{ be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) },
|
||||
{ be_const_key_weak(v_contact, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) },
|
||||
{ be_const_key_weak(flow, 34), be_const_class(be_class_Matter_Plugin_Sensor_Flow) },
|
||||
{ be_const_key_weak(shutter, 5), be_const_class(be_class_Matter_Plugin_Shutter) },
|
||||
{ be_const_key_weak(v_pressure, 2), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) },
|
||||
{ be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) },
|
||||
{ be_const_key_weak(v_light2, 39), be_const_class(be_class_Matter_Plugin_Virt_Light2) },
|
||||
{ be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) },
|
||||
{ be_const_key_weak(v_airquality, 42), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) },
|
||||
{ be_const_key_weak(light2, 3), be_const_class(be_class_Matter_Plugin_Light2) },
|
||||
{ be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) },
|
||||
{ be_const_key_weak(illuminance, 40), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) },
|
||||
{ be_const_key_weak(relay, -1), be_const_class(be_class_Matter_Plugin_OnOff) },
|
||||
{ be_const_key_weak(v_light0, -1), be_const_class(be_class_Matter_Plugin_Virt_Light0) },
|
||||
{ be_const_key_weak(light1, -1), be_const_class(be_class_Matter_Plugin_Light1) },
|
||||
{ be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) },
|
||||
{ be_const_key_weak(http_waterleak, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) },
|
||||
{ be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) },
|
||||
{ be_const_key_weak(root, 29), be_const_class(be_class_Matter_Plugin_Root) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(tick, 9), be_const_var(10) },
|
||||
{ be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(17) },
|
||||
|
Loading…
x
Reference in New Issue
Block a user