mirror of https://github.com/arendst/Tasmota.git
Matter add support for Shutters (without Tilt) (#18509)
This commit is contained in:
parent
074831437f
commit
c8318248bb
|
@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
|
||||
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
|
||||
- Matter add UI to change endpoints configuration (#18498)
|
||||
- Matter add support for Shutters (without Tilt)
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
|
|
@ -159,6 +159,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
|
|||
#include "solidify/solidified_Matter_Plugin_Light1.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Light2.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Light3.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Shutter.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Pressure.h"
|
||||
#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
|
||||
|
@ -337,6 +338,7 @@ module matter (scope: global, strings: weak) {
|
|||
Plugin_Light1, class(be_class_Matter_Plugin_Light1) // Dimmable Light
|
||||
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
|
||||
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
|
||||
Plugin_Shutter, class(be_class_Matter_Plugin_Shutter) // Shutter
|
||||
Plugin_Sensor, class(be_class_Matter_Plugin_Sensor) // Generic Sensor
|
||||
Plugin_Sensor_Pressure, class(be_class_Matter_Plugin_Sensor_Pressure) // Pressure Sensor
|
||||
Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
|
||||
|
|
|
@ -35,6 +35,7 @@ class Matter_Device
|
|||
var message_handler # `matter.MessageHandler()` object
|
||||
var sessions # `matter.Session_Store()` objet
|
||||
var ui
|
||||
var tick # increment at each tick, avoids to repeat too frequently some actions
|
||||
# Commissioning open
|
||||
var commissioning_open # timestamp for timeout of commissioning (millis()) or `nil` if closed
|
||||
var commissioning_iterations # current PBKDF number of iterations
|
||||
|
@ -74,6 +75,7 @@ class Matter_Device
|
|||
end # abort if SetOption 151 is not set
|
||||
|
||||
self.started = false
|
||||
self.tick = 0
|
||||
self.plugins = []
|
||||
self.plugins_persist = false # plugins need to saved only when the first fabric is associated
|
||||
self.plugins_classes = {}
|
||||
|
@ -326,6 +328,12 @@ class Matter_Device
|
|||
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# ticks
|
||||
def every_50ms()
|
||||
self.tick += 1
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# dispatch every 250ms click to sub-objects that need it
|
||||
def every_250ms()
|
||||
|
@ -991,6 +999,7 @@ class Matter_Device
|
|||
#
|
||||
# Applies only if there are no plugins already configured
|
||||
def autoconf_device_map()
|
||||
import string
|
||||
import json
|
||||
var m = {}
|
||||
|
||||
|
@ -1018,15 +1027,46 @@ class Matter_Device
|
|||
end
|
||||
end
|
||||
|
||||
# handle shutters before relays (as we steal relays for shutters)
|
||||
var r_st13 = tasmota.cmd("Status 13", true) # issue `Status 13`
|
||||
var relays_reserved = [] # list of relays that are used for non-relay (shutters)
|
||||
tasmota.log("MTR: Status 13 = "+str(r_st13), 3)
|
||||
|
||||
if r_st13.contains('StatusSHT')
|
||||
r_st13 = r_st13['StatusSHT'] # skip root
|
||||
# Shutter is enabled, iterate
|
||||
var idx = 0
|
||||
while true
|
||||
var k = 'SHT' + str(idx) # SHT is zero based
|
||||
if !r_st13.contains(k) break end # no more SHTxxx
|
||||
var d = r_st13[k]
|
||||
tasmota.log(string.format("MTR: '%s' = %s", k, str(d)), 3)
|
||||
var relay1 = d.find('Relay1', 0) - 1 # relay base 0 or -1 if none
|
||||
var relay2 = d.find('Relay2', 0) - 1 # relay base 0 or -1 if none
|
||||
|
||||
if relay1 >= 0 relays_reserved.push(relay1) end # mark relay1/2 as non-relays
|
||||
if relay2 >= 0 relays_reserved.push(relay2) end
|
||||
|
||||
tasmota.log(string.format("MTR: relay1 = %s, relay2 = %s", relay1, relay2), 3)
|
||||
# add shutter to definition
|
||||
m[str(endpoint)] = {'type':'shutter','shutter':idx}
|
||||
endpoint += 1
|
||||
idx += 1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# how many relays are present
|
||||
var relay_count = size(tasmota.get_power())
|
||||
var relay_index = 0 # start at index 0
|
||||
if light_present relay_count -= 1 end # last power is taken for lights
|
||||
|
||||
while relay_index < relay_count
|
||||
m[str(endpoint)] = {'type':'relay','relay':relay_index}
|
||||
if relays_reserved.find(relay_index) == nil # if relay is actual relay
|
||||
m[str(endpoint)] = {'type':'relay','relay':relay_index}
|
||||
endpoint += 1
|
||||
end
|
||||
relay_index += 1
|
||||
endpoint += 1
|
||||
end
|
||||
|
||||
# auto-detect sensors
|
||||
|
@ -1101,8 +1141,12 @@ class Matter_Device
|
|||
# register_plugin_class
|
||||
#
|
||||
# Adds a class by name
|
||||
def register_plugin_class(name, cl)
|
||||
self.plugins_classes[name] = cl
|
||||
def register_plugin_class(cl)
|
||||
import introspect
|
||||
var typ = introspect.get(cl, 'TYPE') # make sure we don't crash if TYPE does not exist
|
||||
if typ
|
||||
self.plugins_classes[typ] = cl
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
@ -1128,16 +1172,15 @@ class Matter_Device
|
|||
#
|
||||
# Adds a class by name
|
||||
def register_native_classes(name, cl)
|
||||
self.register_plugin_class('root', matter.Plugin_Root)
|
||||
self.register_plugin_class('light0', matter.Plugin_Light0)
|
||||
self.register_plugin_class('light1', matter.Plugin_Light1)
|
||||
self.register_plugin_class('light2', matter.Plugin_Light2)
|
||||
self.register_plugin_class('light3', matter.Plugin_Light3)
|
||||
self.register_plugin_class('relay', matter.Plugin_OnOff)
|
||||
self.register_plugin_class('temperature', matter.Plugin_Sensor_Temp)
|
||||
self.register_plugin_class('humidity', matter.Plugin_Sensor_Humidity)
|
||||
self.register_plugin_class('illuminance', matter.Plugin_Sensor_Illuminance)
|
||||
self.register_plugin_class('pressure', matter.Plugin_Sensor_Pressure)
|
||||
# try to register any class that starts with 'Plugin_'
|
||||
import introspect
|
||||
import string
|
||||
for k: introspect.members(matter)
|
||||
var v = introspect.get(matter, k)
|
||||
if type(v) == 'class' && string.find(k, "Plugin_") == 0
|
||||
self.register_plugin_class(v)
|
||||
end
|
||||
end
|
||||
tasmota.log("MTR: registered classes "+str(self.k2l(self.plugins_classes)), 3)
|
||||
end
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ class Matter_MessageHandler
|
|||
return ret
|
||||
except .. as e, m
|
||||
tasmota.log("MTR: MessageHandler::msg_received exception: "+str(e)+";"+str(m))
|
||||
if self._debug_present
|
||||
if tasmota._debug_present
|
||||
import debug
|
||||
debug.traceback()
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#@ solidify:Matter_Plugin,weak
|
||||
|
||||
class Matter_Plugin
|
||||
static var TYPE = "generic" # name of the plug-in in json
|
||||
static var TYPE = "" # name of the plug-in in json
|
||||
static var NAME = "" # display name of the plug-in
|
||||
static var ARG = "" # additional argument name (or empty if none)
|
||||
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
|
||||
|
@ -33,6 +33,7 @@ class Matter_Plugin
|
|||
var device # reference to the `device` global object
|
||||
var endpoint # current endpoint
|
||||
var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
|
||||
var tick # tick value when it was last updated
|
||||
|
||||
#############################################################
|
||||
# MVC Model
|
||||
|
@ -55,15 +56,23 @@ class Matter_Plugin
|
|||
#############################################################
|
||||
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
|
||||
def update_shadow()
|
||||
self.tick = self.device.tick
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
|
||||
def update_shadow_lazy()
|
||||
if self.tick != self.device.tick
|
||||
self.update_shadow()
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# signal that an attribute has been changed
|
||||
#
|
||||
# If `endpoint` is `nil`, send to all endpoints
|
||||
def attribute_updated(endpoint, cluster, attribute, fabric_specific)
|
||||
if endpoint == nil endpoint = self.endpoint end
|
||||
self.device.attribute_updated(endpoint, cluster, attribute, fabric_specific)
|
||||
def attribute_updated(cluster, attribute, fabric_specific)
|
||||
self.device.attribute_updated(self.endpoint, cluster, attribute, fabric_specific)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
|
|
@ -27,6 +27,7 @@ class Matter_Plugin_Device : Matter_Plugin
|
|||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
||||
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
|
||||
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
|
||||
}
|
||||
static var TYPES = { 0x0000: 0 } # fake type
|
||||
|
||||
|
@ -67,6 +68,14 @@ class Matter_Plugin_Device : Matter_Plugin
|
|||
return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation"
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ==========
|
||||
if attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).read_attribute(session, ctx)
|
||||
end
|
||||
|
@ -105,6 +114,11 @@ class Matter_Plugin_Device : Matter_Plugin
|
|||
# TODO
|
||||
return true
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ==========
|
||||
# TODO
|
||||
return true
|
||||
|
||||
else
|
||||
return super(self).invoke_request(session, val, ctx)
|
||||
end
|
||||
|
|
|
@ -20,18 +20,18 @@
|
|||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin end
|
||||
class Matter_Plugin_Device end
|
||||
|
||||
#@ solidify:Matter_Plugin_Light0,weak
|
||||
|
||||
class Matter_Plugin_Light0 : Matter_Plugin
|
||||
class Matter_Plugin_Light0 : Matter_Plugin_Device
|
||||
static var TYPE = "light0" # name of the plug-in in json
|
||||
static var NAME = "Light 0 On" # display name of the plug-in
|
||||
static var CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
||||
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
|
||||
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
# 0x0004: inherited # Groups 1.3 p.21
|
||||
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
|
||||
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
|
||||
}
|
||||
static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff
|
||||
|
@ -52,7 +52,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
|
|||
import light
|
||||
var light_status = light.get()
|
||||
var pow = light_status.find('power', nil)
|
||||
if pow != self.shadow_onoff self.attribute_updated(nil, 0x0006, 0x0000) self.shadow_onoff = pow end
|
||||
if pow != self.shadow_onoff self.attribute_updated(0x0006, 0x0000) self.shadow_onoff = pow end
|
||||
super(self).update_shadow()
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
@ -65,37 +66,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
|
|||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
||||
if attribute == 0x0000 # ---------- IdentifyTime / u2 ----------
|
||||
return TLV.create_TLV(TLV.U2, 0) # no identification in progress
|
||||
elif attribute == 0x0001 # ---------- IdentifyType / enum8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # no features
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation"
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
|
||||
if attribute == 0x0000 # ---------- ----------
|
||||
return nil # TODO
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0)#
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation"
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ==========
|
||||
if attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0000 # ---------- OnOff / bool ----------
|
||||
return TLV.create_TLV(TLV.BOOL, self.shadow_onoff)
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
|
@ -121,33 +93,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
|
|||
var command = ctx.command
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
||||
|
||||
if command == 0x0000 # ---------- Identify ----------
|
||||
# ignore
|
||||
return true
|
||||
elif command == 0x0001 # ---------- IdentifyQuery ----------
|
||||
# create IdentifyQueryResponse
|
||||
# ID=1
|
||||
# 0=Certificate (octstr)
|
||||
var iqr = TLV.Matter_TLV_struct()
|
||||
iqr.add_TLV(0, TLV.U2, 0) # Timeout
|
||||
ctx.command = 0x00 # IdentifyQueryResponse
|
||||
return iqr
|
||||
elif command == 0x0040 # ---------- TriggerEffect ----------
|
||||
# ignore
|
||||
return true
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
|
||||
# TODO
|
||||
return true
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ==========
|
||||
# TODO
|
||||
return true
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
self.update_shadow_lazy()
|
||||
if command == 0x0000 # ---------- Off ----------
|
||||
light.set({'power':false})
|
||||
self.update_shadow()
|
||||
|
|
|
@ -54,8 +54,13 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
|
|||
import light
|
||||
var light_status = light.get()
|
||||
var bri = light_status.find('bri', nil)
|
||||
if bri != nil bri = tasmota.scale_uint(bri, 0, 255, 0, 254) else bri = self.shadow_bri end
|
||||
if bri != self.shadow_bri self.attribute_updated(nil, 0x0008, 0x0000) self.shadow_bri = bri end
|
||||
if bri != nil
|
||||
bri = tasmota.scale_uint(bri, 0, 255, 0, 254)
|
||||
if bri != self.shadow_bri
|
||||
self.attribute_updated(0x0008, 0x0000)
|
||||
self.shadow_bri = bri
|
||||
end
|
||||
end
|
||||
super(self).update_shadow() # superclass manages 'power'
|
||||
end
|
||||
|
||||
|
@ -70,6 +75,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
|
|||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
|
||||
return TLV.create_TLV(TLV.U1, self.shadow_bri)
|
||||
elif attribute == 0x0002 # ---------- MinLevel / u1 ----------
|
||||
|
@ -104,6 +110,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
|
|||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
|
||||
self.update_shadow_lazy()
|
||||
if command == 0x0000 # ---------- MoveToLevel ----------
|
||||
var bri_in = val.findsubval(0) # Hue 0..254
|
||||
var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255)
|
||||
|
|
|
@ -59,7 +59,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
|
|||
var light_status = light.get()
|
||||
var ct = light_status.find('ct', nil)
|
||||
if ct == nil ct = self.shadow_ct end
|
||||
if ct != self.shadow_ct self.attribute_updated(nil, 0x0300, 0x0007) self.shadow_ct = ct end
|
||||
if ct != self.shadow_ct self.attribute_updated(0x0300, 0x0007) self.shadow_ct = ct end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
@ -82,6 +82,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.create_TLV(TLV.U1, self.shadow_ct)
|
||||
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
|
||||
|
@ -117,6 +118,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
|
|||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||
self.update_shadow_lazy()
|
||||
if command == 0x000A # ---------- MoveToColorTemperature ----------
|
||||
var ct_in = val.findsubval(0) # CT
|
||||
if ct_in < self.ct_min ct_in = self.ct_min end
|
||||
|
|
|
@ -59,8 +59,8 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
|
|||
var sat = light_status.find('sat', nil)
|
||||
if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end
|
||||
if sat != nil sat = tasmota.scale_uint(sat, 0, 255, 0, 254) else sat = self.shadow_sat end
|
||||
if hue != self.shadow_hue self.attribute_updated(nil, 0x0300, 0x0000) self.shadow_hue = hue end
|
||||
if sat != self.shadow_sat self.attribute_updated(nil, 0x0300, 0x0001) self.shadow_sat = sat end
|
||||
if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end
|
||||
if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
@ -74,6 +74,7 @@ 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.create_TLV(TLV.U1, self.shadow_hue)
|
||||
elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ----------
|
||||
|
@ -117,6 +118,7 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
|
|||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
|
||||
self.update_shadow_lazy()
|
||||
if command == 0x0000 # ---------- MoveToHue ----------
|
||||
var hue_in = val.findsubval(0) # Hue 0..254
|
||||
var hue = tasmota.scale_uint(hue_in, 0, 254, 0, 360)
|
||||
|
|
|
@ -20,22 +20,21 @@
|
|||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin end
|
||||
class Matter_Plugin_Device end
|
||||
|
||||
#@ solidify:Matter_Plugin_OnOff,weak
|
||||
|
||||
class Matter_Plugin_OnOff : Matter_Plugin
|
||||
class Matter_Plugin_OnOff : Matter_Plugin_Device
|
||||
static var TYPE = "relay" # name of the plug-in in json
|
||||
static var NAME = "Relay" # display name of the plug-in
|
||||
static var ARG = "relay" # additional argument name (or empty if none)
|
||||
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
|
||||
static var CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
|
||||
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
|
||||
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
# 0x0004: inherited # Groups 1.3 p.21
|
||||
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
|
||||
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
|
||||
# 0x0008: [0,15,17,0xFFFC,0xFFFD] # Level Control 1.6 p.57
|
||||
}
|
||||
static var TYPES = { 0x010A: 2 } # On/Off Light
|
||||
|
||||
|
@ -46,32 +45,31 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
|||
# Constructor
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.get_onoff() # read actual value
|
||||
self.shadow_onoff = false
|
||||
self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#)
|
||||
if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Update shadow
|
||||
#
|
||||
def update_shadow()
|
||||
var state = tasmota.get_power(self.tasmota_relay_index)
|
||||
if state != nil
|
||||
if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
|
||||
self.attribute_updated(0x0006, 0x0000)
|
||||
end
|
||||
self.shadow_onoff = state
|
||||
end
|
||||
super(self).update_shadow()
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Model
|
||||
#
|
||||
def set_onoff(v)
|
||||
tasmota.set_power(self.tasmota_relay_index, bool(v))
|
||||
self.get_onoff()
|
||||
end
|
||||
#############################################################
|
||||
# get_onoff
|
||||
#
|
||||
# Update shadow and signal any change
|
||||
def get_onoff()
|
||||
var state = tasmota.get_power(self.tasmota_relay_index)
|
||||
if state != nil
|
||||
if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
|
||||
self.onoff_changed() # signal any change
|
||||
end
|
||||
self.shadow_onoff = state
|
||||
end
|
||||
if self.shadow_onoff == nil self.shadow_onoff = false end # avoid any `nil` value when initializing
|
||||
return self.shadow_onoff
|
||||
self.update_shadow()
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
@ -84,59 +82,16 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
|||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
||||
if attribute == 0x0000 # ---------- IdentifyTime / u2 ----------
|
||||
return TLV.create_TLV(TLV.U2, 0) # no identification in progress
|
||||
elif attribute == 0x0001 # ---------- IdentifyType / enum8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # no features
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation"
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
|
||||
if attribute == 0x0000 # ---------- ----------
|
||||
return nil # TODO
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0)#
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation"
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ==========
|
||||
if attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0000 # ---------- OnOff / bool ----------
|
||||
return TLV.create_TLV(TLV.BOOL, self.get_onoff())
|
||||
return TLV.create_TLV(TLV.BOOL, self.shadow_onoff)
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
|
||||
end
|
||||
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
|
||||
if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0x88)
|
||||
elif attribute == 0x000F # ---------- Options / map8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0x0010 # ---------- OnLevel / u1 ----------
|
||||
return TLV.create_TLV(TLV.U1, 1) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).read_attribute(session, ctx)
|
||||
end
|
||||
|
@ -153,75 +108,24 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
|||
var command = ctx.command
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
||||
|
||||
if command == 0x0000 # ---------- Identify ----------
|
||||
# ignore
|
||||
return true
|
||||
elif command == 0x0001 # ---------- IdentifyQuery ----------
|
||||
# create IdentifyQueryResponse
|
||||
# ID=1
|
||||
# 0=Certificate (octstr)
|
||||
var iqr = TLV.Matter_TLV_struct()
|
||||
iqr.add_TLV(0, TLV.U2, 0) # Timeout
|
||||
ctx.command = 0x00 # IdentifyQueryResponse
|
||||
return iqr
|
||||
elif command == 0x0040 # ---------- TriggerEffect ----------
|
||||
# ignore
|
||||
return true
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
|
||||
# TODO
|
||||
return true
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ==========
|
||||
# TODO
|
||||
return true
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||
self.update_shadow_lazy()
|
||||
if command == 0x0000 # ---------- Off ----------
|
||||
self.set_onoff(false)
|
||||
self.update_shadow()
|
||||
return true
|
||||
elif command == 0x0001 # ---------- On ----------
|
||||
self.set_onoff(true)
|
||||
self.update_shadow()
|
||||
return true
|
||||
elif command == 0x0002 # ---------- Toggle ----------
|
||||
self.set_onoff(!self.get_onoff())
|
||||
return true
|
||||
end
|
||||
# ====================================================================================================
|
||||
elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
|
||||
if command == 0x0000 # ---------- MoveToLevel ----------
|
||||
return true
|
||||
elif command == 0x0001 # ---------- Move ----------
|
||||
return true
|
||||
elif command == 0x0002 # ---------- Step ----------
|
||||
return true
|
||||
elif command == 0x0003 # ---------- Stop ----------
|
||||
return true
|
||||
elif command == 0x0004 # ---------- MoveToLevelWithOnOff ----------
|
||||
return true
|
||||
elif command == 0x0005 # ---------- MoveWithOnOff ----------
|
||||
return true
|
||||
elif command == 0x0006 # ---------- StepWithOnOff ----------
|
||||
return true
|
||||
elif command == 0x0007 # ---------- StopWithOnOff ----------
|
||||
self.set_onoff(!self.shadow_onoff)
|
||||
self.update_shadow()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Signal that onoff attribute changed
|
||||
def onoff_changed()
|
||||
self.attribute_updated(nil, 0x0006, 0x0000) # send to all endpoints
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# every_second
|
||||
def every_second()
|
||||
self.get_onoff() # force reading value and sending subscriptions
|
||||
end
|
||||
end
|
||||
matter.Plugin_OnOff = Matter_Plugin_OnOff
|
||||
|
|
|
@ -616,7 +616,7 @@ class Matter_Plugin_Root : Matter_Plugin
|
|||
if attribute == 0x0000 # ---------- Breadcrumb ----------
|
||||
if type(write_data) == 'int' || isinstance(write_data, int64)
|
||||
session._breadcrumb = write_data
|
||||
self.attribute_updated(ctx.endpoint, ctx.cluster, ctx.attribute) # TODO should we have a more generalized way each time a write_attribute is triggered, declare the attribute as changed?
|
||||
self.attribute_updated(ctx.cluster, ctx.attribute) # TODO should we have a more generalized way each time a write_attribute is triggered, declare the attribute as changed?
|
||||
return true
|
||||
else
|
||||
ctx.status = matter.CONSTRAINT_ERROR
|
||||
|
|
|
@ -50,7 +50,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
|
|||
var val = self.pre_value(real(self.tasmota_sensor_matcher.match(payload)))
|
||||
if val != nil
|
||||
if val != self.shadow_value
|
||||
self.valued_changed(val)
|
||||
self.value_changed(val)
|
||||
end
|
||||
self.shadow_value = val
|
||||
end
|
||||
|
@ -61,9 +61,9 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
|
|||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
# self.attribute_updated(nil, 0x0402, 0x0000)
|
||||
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
|
||||
def value_changed(val)
|
||||
# self.attribute_updated(0x0402, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
|
|
@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
|
|||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0405, 0x0000)
|
||||
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
|
||||
def value_changed(val)
|
||||
self.attribute_updated(0x0405, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
|
|
@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
|
|||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0400, 0x0000)
|
||||
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
|
||||
def value_changed(val)
|
||||
self.attribute_updated(0x0400, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
|
|
@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
|
|||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0403, 0x0000)
|
||||
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
|
||||
def value_changed(val)
|
||||
self.attribute_updated(0x0403, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
|
|
@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
|
|||
# Called when the value changed compared to shadow value
|
||||
#
|
||||
# This must be overriden.
|
||||
# This is where you call `self.attribute_updated(nil, <cluster>, <attribute>)`
|
||||
def valued_changed(val)
|
||||
self.attribute_updated(nil, 0x0402, 0x0000)
|
||||
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
|
||||
def value_changed(val)
|
||||
self.attribute_updated(0x0402, 0x0000)
|
||||
end
|
||||
|
||||
#############################################################
|
||||
|
|
|
@ -0,0 +1,220 @@
|
|||
#
|
||||
# Matter_Plugin_Shutter.be - implements the behavior for shutters
|
||||
#
|
||||
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Matter plug-in for core behavior
|
||||
|
||||
# dummy declaration for solidification
|
||||
class Matter_Plugin_Device end
|
||||
|
||||
#@ solidify:Matter_Plugin_Shutter,weak
|
||||
|
||||
class Matter_Plugin_Shutter : Matter_Plugin_Device
|
||||
static var TYPE = "shutter" # name of the plug-in in json
|
||||
static var NAME = "Shutter" # display name of the plug-in
|
||||
static var ARG = "shutter" # additional argument name (or empty if none)
|
||||
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
|
||||
static var CLUSTERS = {
|
||||
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
|
||||
# 0x0003: inherited # Identify 1.2 p.16
|
||||
# 0x0004: inherited # Groups 1.3 p.21
|
||||
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
|
||||
0x0102: [0,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,0x17,0xFFFC,0xFFFD], # Window Covering 5.3 p.289
|
||||
}
|
||||
static var TYPES = { 0x0202: 2 } # New data model format and notation
|
||||
|
||||
var tasmota_shutter_index # Shutter number in Tasmota (zero based)
|
||||
var shadow_shutter_pos
|
||||
var shadow_shutter_target
|
||||
var shadow_shutter_tilt
|
||||
var shadow_shutter_direction # 1=opening -1=closing 0=not moving TODO
|
||||
|
||||
#############################################################
|
||||
# Constructor
|
||||
def init(device, endpoint, arguments)
|
||||
super(self).init(device, endpoint, arguments)
|
||||
self.tasmota_shutter_index = arguments.find(self.ARG #-'relay'-#)
|
||||
if self.tasmota_shutter_index == nil self.tasmota_shutter_index = 0 end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Update shadow
|
||||
#
|
||||
def update_shadow()
|
||||
var sp = tasmota.cmd("ShutterPosition" + str(self.tasmota_shutter_index + 1), true)
|
||||
if sp
|
||||
self.parse_sensors(sp)
|
||||
end
|
||||
super(self).update_shadow()
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# read an attribute
|
||||
#
|
||||
def read_attribute(session, ctx)
|
||||
import string
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var attribute = ctx.attribute
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0102 # ========== Window Covering 5.3 p.289 ==========
|
||||
self.update_shadow_lazy()
|
||||
if attribute == 0x0000 # ---------- Type / enum8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0xFF) # 0xFF = unknown type of shutter
|
||||
elif attribute == 0x0005 # ---------- NumberOfActuationsLift / u16 ----------
|
||||
return TLV.create_TLV(TLV.U2, 0)
|
||||
elif attribute == 0x0006 # ---------- NumberOfActuationsTilt / u16 ----------
|
||||
return TLV.create_TLV(TLV.U2, 0)
|
||||
elif attribute == 0x0007 # ---------- ConfigStatus / u8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 1 + 8 + 16) # Operational + Lift Position Aware + Tilt Position Aware
|
||||
elif attribute == 0x000D # ---------- EndProductType / u8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0xFF) # 0xFF = unknown type of shutter
|
||||
|
||||
elif attribute == 0x0008 # ---------- CurrentPositionLiftPercentage / u8 ----------
|
||||
return TLV.create_TLV(TLV.U2, 100 - self.shadow_shutter_pos)
|
||||
elif attribute == 0x000E # ---------- CurrentPositionLiftPercent100ths / u16 ----------
|
||||
return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_pos) * 100)
|
||||
elif attribute == 0x0009 # ---------- CurrentPositionTiltPercentage / u8 ----------
|
||||
return TLV.create_TLV(TLV.U2, 100 - self.shadow_shutter_tilt)
|
||||
elif attribute == 0x000F # ---------- CurrentPositionTiltPercent100ths / u8 ----------
|
||||
return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_tilt) * 100)
|
||||
elif attribute == 0x000A # ---------- OperationalStatus / u8 ----------
|
||||
var op = self.shadow_shutter_direction == 0 ? 0 : (self.shadow_shutter_direction > 0 ? 1 : 2)
|
||||
return TLV.create_TLV(TLV.U1, op) # TODO from sensors
|
||||
elif attribute == 0x000B # ---------- TargetPositionLiftPercent100ths / u16 ----------
|
||||
return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_target) * 100)
|
||||
elif attribute == 0x000C # ---------- TargetPositionTiltPercent100ths / u16 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0) # TODO
|
||||
|
||||
elif attribute == 0x0017 # ---------- Mode / u8 ----------
|
||||
return TLV.create_TLV(TLV.U1, 0) # normal mode
|
||||
|
||||
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
|
||||
return TLV.create_TLV(TLV.U4, 3 + 4 + 16) # Lift + Tilt + PA_LF + PA_TL
|
||||
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
|
||||
return TLV.create_TLV(TLV.U4, 5) # New data model format and notation
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).read_attribute(session, ctx)
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# Invoke a command
|
||||
#
|
||||
# returns a TLV object if successful, contains the response
|
||||
# or an `int` to indicate a status
|
||||
def invoke_request(session, val, ctx)
|
||||
import light
|
||||
var TLV = matter.TLV
|
||||
var cluster = ctx.cluster
|
||||
var command = ctx.command
|
||||
|
||||
# ====================================================================================================
|
||||
if cluster == 0x0102 # ========== Window Covering 5.3 p.289 ==========
|
||||
self.update_shadow_lazy()
|
||||
if command == 0x0000 # ---------- UpOrOpen ----------
|
||||
tasmota.cmd("ShutterStopOpen"+str(self.tasmota_shutter_index+1), true)
|
||||
self.update_shadow()
|
||||
return true
|
||||
elif command == 0x0001 # ---------- DownOrClose ----------
|
||||
tasmota.cmd("ShutterStopClose"+str(self.tasmota_shutter_index+1), true)
|
||||
self.update_shadow()
|
||||
return true
|
||||
elif command == 0x0002 # ---------- StopMotion ----------
|
||||
tasmota.cmd("ShutterStop"+str(self.tasmota_shutter_index+1), true)
|
||||
self.update_shadow()
|
||||
return true
|
||||
elif command == 0x0005 # ---------- GoToLiftPercentage ----------
|
||||
tasmota.log("MTR: Tilt = "+str(val), 2)
|
||||
var pos_100 = val.findsubval(0)
|
||||
if pos_100 != nil
|
||||
pos_100 = pos_100 / 100
|
||||
tasmota.cmd("ShutterStopPosition"+str(self.tasmota_shutter_index+1) + " " + str(100 - pos_100), true)
|
||||
ctx.log = "pos%:"+str(pos_100)
|
||||
self.update_shadow()
|
||||
end
|
||||
return true
|
||||
elif command == 0x0008 # ---------- GoToTiltPercentage ----------
|
||||
var tilt = val.findsubval(0)
|
||||
if tilt != nil
|
||||
tilt = tilt / 10
|
||||
ctx.log = "tilt%:"+str(tilt)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
else
|
||||
return super(self).invoke_request(session, val, ctx)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#############################################################
|
||||
# parse sensor
|
||||
#
|
||||
# The device calls regularly `tasmota.read_sensors()` and converts
|
||||
# it to json.
|
||||
def parse_sensors(payload)
|
||||
import string
|
||||
var k = "Shutter" + str(self.tasmota_shutter_index + 1)
|
||||
if payload.contains(k)
|
||||
var v = payload[k]
|
||||
# tasmota.log(string.format("MTR: getting shutter values(%i): %s", self.endpoint, str(v)), 2)
|
||||
# Position
|
||||
var val_pos = v.find("Position")
|
||||
if val_pos != nil
|
||||
if val_pos != self.shadow_shutter_pos
|
||||
# self.attribute_updated(0x0102, 0x0008) # CurrentPositionLiftPercentage
|
||||
self.attribute_updated(0x0102, 0x000E) # CurrentPositionLiftPercent100ths
|
||||
end
|
||||
self.shadow_shutter_pos = val_pos
|
||||
end
|
||||
# Tilt
|
||||
var val_tilt = v.find("Tilt")
|
||||
if val_tilt != nil
|
||||
if val_tilt != self.shadow_shutter_tilt
|
||||
# self.attribute_updated(0x0102, 0x0009) # CurrentPositionTiltPercentage
|
||||
self.attribute_updated(0x0102, 0x000F) # CurrentPositionTiltPercent100ths
|
||||
end
|
||||
self.shadow_shutter_tilt = val_tilt
|
||||
end
|
||||
# Direction
|
||||
var val_dir = v.find("Direction")
|
||||
if val_dir != nil
|
||||
if val_dir != self.shadow_shutter_direction
|
||||
self.attribute_updated(0x0102, 0x000A) # OperationalStatus
|
||||
end
|
||||
self.shadow_shutter_direction = val_dir
|
||||
end
|
||||
# Target
|
||||
var val_target = v.find("Target")
|
||||
if val_target != nil
|
||||
if val_target != self.shadow_shutter_target
|
||||
self.attribute_updated(0x0102, 0x000B) # TargetPositionLiftPercent100ths
|
||||
end
|
||||
self.shadow_shutter_target = val_target
|
||||
end
|
||||
#
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
matter.Plugin_Shutter = Matter_Plugin_Shutter
|
|
@ -32,7 +32,8 @@ import matter
|
|||
# WebUI for the partition manager
|
||||
#################################################################################
|
||||
class Matter_UI
|
||||
static var _CLASSES_TYPES = "root|relay|light0|light1|light2|light3"
|
||||
static var _ROOT_TYPES = "root"
|
||||
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter"
|
||||
"|temperature|pressure|illuminance|humidity"
|
||||
var device
|
||||
|
||||
|
@ -179,7 +180,7 @@ class Matter_UI
|
|||
import string
|
||||
|
||||
webserver.content_send("<fieldset><legend><b> Fabrics </b></legend><p></p>")
|
||||
webserver.content_send("<p>Existing fabrics:</p>")
|
||||
webserver.content_send("<p>Associated fabrics:</p>")
|
||||
|
||||
if size(self.device.sessions.sessions) == 0
|
||||
webserver.content_send("<p><b>None</b></p>")
|
||||
|
@ -233,11 +234,27 @@ class Matter_UI
|
|||
# display one line per plug-in
|
||||
var endpoints = self.device.k2l_num(self.device.plugins_config)
|
||||
var i = 0
|
||||
|
||||
# special case for root node
|
||||
if endpoints[0] == 0
|
||||
var ep = endpoints[i]
|
||||
var conf = self.device.plugins_config[str(ep)]
|
||||
var typ = conf.find('type')
|
||||
|
||||
webserver.content_send(string.format("<tr><td><input type='text' name='ep%03i' maxlength='4' size='3' value='0' readonly></td>", i))
|
||||
webserver.content_send(string.format("<td><select name='pi%03i'>", i))
|
||||
self.plugin_option(conf.find('type', ''), self._ROOT_TYPES)
|
||||
webserver.content_send(string.format("</select></td>"))
|
||||
webserver.content_send("<td><font size='-1'> </font></td>")
|
||||
|
||||
i += 1
|
||||
end
|
||||
|
||||
while i < size(endpoints)
|
||||
var ep = endpoints[i]
|
||||
var conf = self.device.plugins_config[str(ep)]
|
||||
var typ = conf.find('type')
|
||||
if !typ continue end
|
||||
if !typ i += 1 continue end
|
||||
|
||||
var arg_name = self.device.get_plugin_class_arg(typ)
|
||||
var arg = arg_name ? str(conf.find(arg_name, '')) : ''
|
||||
|
@ -245,7 +262,7 @@ class Matter_UI
|
|||
webserver.content_send(string.format("<tr><td><input type='text' name='ep%03i' maxlength='4' size='3' pattern='[0-9]{1,4}' value='%i'></td>", i, ep))
|
||||
|
||||
webserver.content_send(string.format("<td><select name='pi%03i'>", i))
|
||||
self.plugin_option(conf.find('type', ''))
|
||||
self.plugin_option(conf.find('type', ''), self._CLASSES_TYPES)
|
||||
webserver.content_send(string.format("</select></td>"))
|
||||
webserver.content_send(string.format("<td><font size='-1'><input type='text' name='arg%03i' minlength='0' size='8' value='%s'></font></td>",
|
||||
i, webserver.html_escape(arg)))
|
||||
|
@ -256,7 +273,7 @@ class Matter_UI
|
|||
# add an empty line for adding a configuration
|
||||
webserver.content_send(string.format("<tr><td><input type='text' name='ep%03i' maxlength='4' size='3' pattern='[0-9]{1,4}' value=''></td>", i))
|
||||
webserver.content_send(string.format("<td><select name='pi%03i'>", i))
|
||||
self.plugin_option('')
|
||||
self.plugin_option('', self._CLASSES_TYPES)
|
||||
webserver.content_send(string.format("</select></td>"))
|
||||
webserver.content_send(string.format("<td><font size='-1'><input type='text' name='arg%03i' minlength='0' size='8' value=''></font></td>", i))
|
||||
|
||||
|
@ -270,17 +287,20 @@ class Matter_UI
|
|||
#- ---------------------------------------------------------------------- -#
|
||||
#- Show all possible classes for plugin
|
||||
#- ---------------------------------------------------------------------- -#
|
||||
def plugin_option(cur)
|
||||
def plugin_option(cur, class_list)
|
||||
import webserver
|
||||
import string
|
||||
var class_types = string.split(self._CLASSES_TYPES, '|')
|
||||
var class_types = class_list ? string.split(class_list, '|') : []
|
||||
|
||||
var i = 0
|
||||
webserver.content_send("<option value=''></option>")
|
||||
while i < size(class_types)
|
||||
var typ = class_types[i]
|
||||
var nam = self.device.get_plugin_class_displayname(typ)
|
||||
webserver.content_send(string.format("<option value='%s'%s>%s</option>", typ, (typ == cur) ? " selected" : "", nam))
|
||||
if typ == ''
|
||||
webserver.content_send("<option value=''></option>")
|
||||
else
|
||||
var nam = self.device.get_plugin_class_displayname(typ)
|
||||
webserver.content_send(string.format("<option value='%s'%s>%s</option>", typ, (typ == cur) ? " selected" : "", nam))
|
||||
end
|
||||
i += 1
|
||||
end
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -300,7 +300,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
|
|||
}),
|
||||
be_str_weak(msg_received),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[390]) { /* code */
|
||||
( &(const binstruction[391]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0x50140000, // 0001 LDBOOL R5 0 0
|
||||
0xA802016A, // 0002 EXBLK 0 #016E
|
||||
|
@ -666,9 +666,9 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
|
|||
0xA8040001, // 016A EXBLK 1 1
|
||||
0x80040A00, // 016B RET 1 R5
|
||||
0xA8040001, // 016C EXBLK 1 1
|
||||
0x70020016, // 016D JMP #0185
|
||||
0x70020017, // 016D JMP #0186
|
||||
0xAC180002, // 016E CATCH R6 0 2
|
||||
0x70020013, // 016F JMP #0184
|
||||
0x70020014, // 016F JMP #0185
|
||||
0xB8220A00, // 0170 GETNGBL R8 K5
|
||||
0x8C201106, // 0171 GETMET R8 R8 K6
|
||||
0x60280008, // 0172 GETGBL R10 G8
|
||||
|
@ -681,16 +681,17 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
|
|||
0x7C2C0200, // 0179 CALL R11 1
|
||||
0x0028140B, // 017A ADD R10 R10 R11
|
||||
0x7C200400, // 017B CALL R8 2
|
||||
0x88200148, // 017C GETMBR R8 R0 K72
|
||||
0x78220002, // 017D JMPF R8 #0181
|
||||
0xA4229200, // 017E IMPORT R8 K73
|
||||
0x8C24114A, // 017F GETMET R9 R8 K74
|
||||
0x7C240200, // 0180 CALL R9 1
|
||||
0x50200000, // 0181 LDBOOL R8 0 0
|
||||
0x80041000, // 0182 RET 1 R8
|
||||
0x70020000, // 0183 JMP #0185
|
||||
0xB0080000, // 0184 RAISE 2 R0 R0
|
||||
0x80000000, // 0185 RET 0
|
||||
0xB8220A00, // 017C GETNGBL R8 K5
|
||||
0x88201148, // 017D GETMBR R8 R8 K72
|
||||
0x78220002, // 017E JMPF R8 #0182
|
||||
0xA4229200, // 017F IMPORT R8 K73
|
||||
0x8C24114A, // 0180 GETMET R9 R8 K74
|
||||
0x7C240200, // 0181 CALL R9 1
|
||||
0x50200000, // 0182 LDBOOL R8 0 0
|
||||
0x80041000, // 0183 RET 1 R8
|
||||
0x70020000, // 0184 JMP #0186
|
||||
0xB0080000, // 0185 RAISE 2 R0 R0
|
||||
0x80000000, // 0186 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,100 +7,9 @@
|
|||
extern const bclass be_class_Matter_Plugin;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: attribute_updated
|
||||
** Solidified function: read_event
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_attribute_updated, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
/* K1 */ be_nested_str_weak(device),
|
||||
/* K2 */ be_nested_str_weak(attribute_updated),
|
||||
}),
|
||||
be_str_weak(attribute_updated),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x4C140000, // 0000 LDNIL R5
|
||||
0x1C140205, // 0001 EQ R5 R1 R5
|
||||
0x78160000, // 0002 JMPF R5 #0004
|
||||
0x88040100, // 0003 GETMBR R1 R0 K0
|
||||
0x88140101, // 0004 GETMBR R5 R0 K1
|
||||
0x8C140B02, // 0005 GETMET R5 R5 K2
|
||||
0x5C1C0200, // 0006 MOVE R7 R1
|
||||
0x5C200400, // 0007 MOVE R8 R2
|
||||
0x5C240600, // 0008 MOVE R9 R3
|
||||
0x5C280800, // 0009 MOVE R10 R4
|
||||
0x7C140A00, // 000A CALL R5 5
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: timed_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_timed_request, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(timed_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_endpoint
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_get_endpoint, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
}),
|
||||
be_str_weak(get_endpoint),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: subscribe_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
||||
be_local_closure(Matter_Plugin_read_event, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
|
@ -111,7 +20,7 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
|||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(subscribe_attribute),
|
||||
be_str_weak(read_event),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C140000, // 0000 LDNIL R5
|
||||
|
@ -122,40 +31,6 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
|||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_init, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(device),
|
||||
/* K1 */ be_nested_str_weak(endpoint),
|
||||
/* K2 */ be_nested_str_weak(clusters),
|
||||
/* K3 */ be_nested_str_weak(consolidate_clusters),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x8C100103, // 0002 GETMET R4 R0 K3
|
||||
0x7C100200, // 0003 CALL R4 1
|
||||
0x90020404, // 0004 SETMBR R0 K2 R4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: write_attribute
|
||||
********************************************************************/
|
||||
|
@ -182,12 +57,47 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: has
|
||||
** Solidified function: attribute_updated
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_has, /* name */
|
||||
be_local_closure(Matter_Plugin_attribute_updated, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
3, /* argc */
|
||||
10, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(device),
|
||||
/* K1 */ be_nested_str_weak(attribute_updated),
|
||||
/* K2 */ be_nested_str_weak(endpoint),
|
||||
}),
|
||||
be_str_weak(attribute_updated),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 8]) { /* code */
|
||||
0x88100100, // 0000 GETMBR R4 R0 K0
|
||||
0x8C100901, // 0001 GETMET R4 R4 K1
|
||||
0x88180102, // 0002 GETMBR R6 R0 K2
|
||||
0x5C1C0200, // 0003 MOVE R7 R1
|
||||
0x5C200400, // 0004 MOVE R8 R2
|
||||
0x5C240600, // 0005 MOVE R9 R3
|
||||
0x7C100A00, // 0006 CALL R4 5
|
||||
0x80000000, // 0007 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_cluster_list
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_get_cluster_list, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
|
@ -196,53 +106,31 @@ be_local_closure(Matter_Plugin_has, /* name */
|
|||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(clusters),
|
||||
/* K1 */ be_nested_str_weak(contains),
|
||||
/* K2 */ be_nested_str_weak(endpoints),
|
||||
/* K3 */ be_nested_str_weak(find),
|
||||
/* K1 */ be_nested_str_weak(keys),
|
||||
/* K2 */ be_nested_str_weak(push),
|
||||
/* K3 */ be_nested_str_weak(stop_iteration),
|
||||
}),
|
||||
be_str_weak(has),
|
||||
be_str_weak(get_cluster_list),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x880C0100, // 0000 GETMBR R3 R0 K0
|
||||
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
||||
0x5C140200, // 0002 MOVE R5 R1
|
||||
0x7C0C0400, // 0003 CALL R3 2
|
||||
0x780E0006, // 0004 JMPF R3 #000C
|
||||
0x880C0102, // 0005 GETMBR R3 R0 K2
|
||||
0x8C0C0703, // 0006 GETMET R3 R3 K3
|
||||
0x5C140400, // 0007 MOVE R5 R2
|
||||
0x7C0C0400, // 0008 CALL R3 2
|
||||
0x4C100000, // 0009 LDNIL R4
|
||||
0x200C0604, // 000A NE R3 R3 R4
|
||||
0x740E0000, // 000B JMPT R3 #000D
|
||||
0x500C0001, // 000C LDBOOL R3 0 1
|
||||
0x500C0200, // 000D LDBOOL R3 1 0
|
||||
0x80040600, // 000E RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60080012, // 0000 GETGBL R2 G18
|
||||
0x7C080000, // 0001 CALL R2 0
|
||||
0x600C0010, // 0002 GETGBL R3 G16
|
||||
0x88100100, // 0003 GETMBR R4 R0 K0
|
||||
0x8C100901, // 0004 GETMET R4 R4 K1
|
||||
0x7C100200, // 0005 CALL R4 1
|
||||
0x7C0C0200, // 0006 CALL R3 1
|
||||
0xA8020005, // 0007 EXBLK 0 #000E
|
||||
0x5C100600, // 0008 MOVE R4 R3
|
||||
0x7C100000, // 0009 CALL R4 0
|
||||
0x8C140502, // 000A GETMET R5 R2 K2
|
||||
0x5C1C0800, // 000B MOVE R7 R4
|
||||
0x7C140400, // 000C CALL R5 2
|
||||
0x7001FFF9, // 000D JMP #0008
|
||||
0x580C0003, // 000E LDCONST R3 K3
|
||||
0xAC0C0200, // 000F CATCH R3 1 0
|
||||
0xB0080000, // 0010 RAISE 2 R0 R0
|
||||
0x80040400, // 0011 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -254,31 +142,7 @@ be_local_closure(Matter_Plugin_invoke_request, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_update_shadow, /* name */
|
||||
be_nested_proto(
|
||||
1, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80000000, // 0000 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_second
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_every_second, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -286,15 +150,17 @@ be_local_closure(Matter_Plugin_every_second, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(update_shadow),
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tick),
|
||||
/* K1 */ be_nested_str_weak(device),
|
||||
}),
|
||||
be_str_weak(every_second),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x80000000, // 0002 RET 0
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x88040101, // 0000 GETMBR R1 R0 K1
|
||||
0x88040300, // 0001 GETMBR R1 R1 K0
|
||||
0x90020001, // 0002 SETMBR R0 K0 R1
|
||||
0x80000000, // 0003 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -539,33 +405,6 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
|
|||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: <lambda>
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(_X3Clambda_X3E),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x60040008, // 0000 GETGBL R1 G8
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_attribute_list
|
||||
********************************************************************/
|
||||
|
@ -600,12 +439,12 @@ be_local_closure(Matter_Plugin_get_attribute_list, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_event
|
||||
** Solidified function: timed_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_read_event, /* name */
|
||||
be_local_closure(Matter_Plugin_timed_request, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
|
@ -613,11 +452,11 @@ be_local_closure(Matter_Plugin_read_event, /* name */
|
|||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(read_event),
|
||||
be_str_weak(timed_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C140000, // 0000 LDNIL R5
|
||||
0x80040A00, // 0001 RET 1 R5
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -649,12 +488,213 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_cluster_list
|
||||
** Solidified function: update_shadow_lazy
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_get_cluster_list, /* name */
|
||||
be_local_closure(Matter_Plugin_update_shadow_lazy, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
2, /* argc */
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tick),
|
||||
/* K1 */ be_nested_str_weak(device),
|
||||
/* K2 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(update_shadow_lazy),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 8]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||
0x88080500, // 0002 GETMBR R2 R2 K0
|
||||
0x20040202, // 0003 NE R1 R1 R2
|
||||
0x78060001, // 0004 JMPF R1 #0007
|
||||
0x8C040102, // 0005 GETMET R1 R0 K2
|
||||
0x7C040200, // 0006 CALL R1 1
|
||||
0x80000000, // 0007 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: <lambda>
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(_X3Clambda_X3E),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x60040008, // 0000 GETGBL R1 G8
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_endpoint
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_get_endpoint, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(endpoint),
|
||||
}),
|
||||
be_str_weak(get_endpoint),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x80040200, // 0001 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: subscribe_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(subscribe_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C140000, // 0000 LDNIL R5
|
||||
0x80040A00, // 0001 RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_second
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_every_second, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(every_second),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x4C100000, // 0000 LDNIL R4
|
||||
0x80040800, // 0001 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_init, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(device),
|
||||
/* K1 */ be_nested_str_weak(endpoint),
|
||||
/* K2 */ be_nested_str_weak(clusters),
|
||||
/* K3 */ be_nested_str_weak(consolidate_clusters),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x8C100103, // 0002 GETMET R4 R0 K3
|
||||
0x7C100200, // 0003 CALL R4 1
|
||||
0x90020404, // 0004 SETMBR R0 K2 R4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: has
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_has, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
|
@ -663,31 +703,28 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
|
|||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(clusters),
|
||||
/* K1 */ be_nested_str_weak(keys),
|
||||
/* K2 */ be_nested_str_weak(push),
|
||||
/* K3 */ be_nested_str_weak(stop_iteration),
|
||||
/* K1 */ be_nested_str_weak(contains),
|
||||
/* K2 */ be_nested_str_weak(endpoints),
|
||||
/* K3 */ be_nested_str_weak(find),
|
||||
}),
|
||||
be_str_weak(get_cluster_list),
|
||||
be_str_weak(has),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60080012, // 0000 GETGBL R2 G18
|
||||
0x7C080000, // 0001 CALL R2 0
|
||||
0x600C0010, // 0002 GETGBL R3 G16
|
||||
0x88100100, // 0003 GETMBR R4 R0 K0
|
||||
0x8C100901, // 0004 GETMET R4 R4 K1
|
||||
0x7C100200, // 0005 CALL R4 1
|
||||
0x7C0C0200, // 0006 CALL R3 1
|
||||
0xA8020005, // 0007 EXBLK 0 #000E
|
||||
0x5C100600, // 0008 MOVE R4 R3
|
||||
0x7C100000, // 0009 CALL R4 0
|
||||
0x8C140502, // 000A GETMET R5 R2 K2
|
||||
0x5C1C0800, // 000B MOVE R7 R4
|
||||
0x7C140400, // 000C CALL R5 2
|
||||
0x7001FFF9, // 000D JMP #0008
|
||||
0x580C0003, // 000E LDCONST R3 K3
|
||||
0xAC0C0200, // 000F CATCH R3 1 0
|
||||
0xB0080000, // 0010 RAISE 2 R0 R0
|
||||
0x80040400, // 0011 RET 1 R2
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x880C0100, // 0000 GETMBR R3 R0 K0
|
||||
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
||||
0x5C140200, // 0002 MOVE R5 R1
|
||||
0x7C0C0400, // 0003 CALL R3 2
|
||||
0x780E0006, // 0004 JMPF R3 #000C
|
||||
0x880C0102, // 0005 GETMBR R3 R0 K2
|
||||
0x8C0C0703, // 0006 GETMET R3 R3 K3
|
||||
0x5C140400, // 0007 MOVE R5 R2
|
||||
0x7C0C0400, // 0008 CALL R3 2
|
||||
0x4C100000, // 0009 LDNIL R4
|
||||
0x200C0604, // 000A NE R3 R3 R4
|
||||
0x740E0000, // 000B JMPT R3 #000D
|
||||
0x500C0001, // 000C LDBOOL R3 0 1
|
||||
0x500C0200, // 000D LDBOOL R3 1 0
|
||||
0x80040600, // 000E RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -723,13 +760,18 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */
|
|||
** Solidified class: Matter_Plugin
|
||||
********************************************************************/
|
||||
be_local_class(Matter_Plugin,
|
||||
3,
|
||||
4,
|
||||
NULL,
|
||||
be_nested_map(25,
|
||||
be_nested_map(27,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) },
|
||||
{ be_const_key_weak(timed_request, 7), be_const_closure(Matter_Plugin_timed_request_closure) },
|
||||
{ be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
|
||||
{ be_const_key_weak(read_event, 6), be_const_closure(Matter_Plugin_read_event_closure) },
|
||||
{ be_const_key_weak(TYPE, 18), be_nested_str_weak() },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
|
||||
{ be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
|
||||
{ be_const_key_weak(tick, -1), be_const_var(3) },
|
||||
{ be_const_key_weak(ARG, -1), be_nested_str_weak() },
|
||||
{ be_const_key_weak(get_cluster_list, 2), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
|
@ -744,27 +786,24 @@ be_local_class(Matter_Plugin,
|
|||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
|
||||
{ be_const_key_weak(subscribe_event, 18), be_const_closure(Matter_Plugin_subscribe_event_closure) },
|
||||
{ be_const_key_weak(clusters, -1), be_const_var(2) },
|
||||
{ be_const_key_weak(endpoint, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
|
||||
{ be_const_key_weak(write_attribute, 23), be_const_closure(Matter_Plugin_write_attribute_closure) },
|
||||
{ be_const_key_weak(device, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_invoke_request_closure) },
|
||||
{ be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) },
|
||||
{ be_const_key_weak(TYPE, 9), be_nested_str_weak(generic) },
|
||||
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
|
||||
{ be_const_key_weak(get_attribute_list, 17), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
|
||||
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
|
||||
{ be_const_key_weak(ARG, 16), be_nested_str_weak() },
|
||||
{ be_const_key_weak(consolidate_clusters, 13), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
|
||||
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
|
||||
{ be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
|
||||
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
|
||||
{ be_const_key_weak(clusters, -1), be_const_var(2) },
|
||||
{ be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
|
||||
{ be_const_key_weak(NAME, 3), be_nested_str_weak() },
|
||||
{ be_const_key_weak(subscribe_attribute, 20), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
|
||||
{ be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
|
||||
{ be_const_key_weak(read_attribute, 9), be_const_closure(Matter_Plugin_read_attribute_closure) },
|
||||
{ be_const_key_weak(write_attribute, 13), be_const_closure(Matter_Plugin_write_attribute_closure) },
|
||||
{ be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) },
|
||||
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
|
||||
{ be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
|
||||
{ be_const_key_weak(endpoint, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
|
||||
{ be_const_key_weak(attribute_updated, 8), be_const_closure(Matter_Plugin_attribute_updated_closure) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
|
||||
{ be_const_key_weak(device, 4), be_const_var(0) },
|
||||
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
|
||||
{ be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin)
|
||||
);
|
||||
|
|
|
@ -36,7 +36,7 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
|
|||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[76]) { /* code */
|
||||
( &(const binstruction[97]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
|
@ -77,7 +77,7 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
|
|||
0x542A0003, // 0025 LDINT R10 4
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020021, // 0028 JMP #004B
|
||||
0x70020036, // 0028 JMP #0060
|
||||
0x541E0003, // 0029 LDINT R7 4
|
||||
0x1C1C0A07, // 002A EQ R7 R5 R7
|
||||
0x781E0016, // 002B JMPF R7 #0043
|
||||
|
@ -103,16 +103,37 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
|
|||
0x542A0003, // 003F LDINT R10 4
|
||||
0x7C1C0600, // 0040 CALL R7 3
|
||||
0x80040E00, // 0041 RET 1 R7
|
||||
0x70020007, // 0042 JMP #004B
|
||||
0x601C0003, // 0043 GETGBL R7 G3
|
||||
0x5C200000, // 0044 MOVE R8 R0
|
||||
0x7C1C0200, // 0045 CALL R7 1
|
||||
0x8C1C0F0C, // 0046 GETMET R7 R7 K12
|
||||
0x5C240200, // 0047 MOVE R9 R1
|
||||
0x5C280400, // 0048 MOVE R10 R2
|
||||
0x7C1C0600, // 0049 CALL R7 3
|
||||
0x80040E00, // 004A RET 1 R7
|
||||
0x80000000, // 004B RET 0
|
||||
0x7002001C, // 0042 JMP #0060
|
||||
0x541E0004, // 0043 LDINT R7 5
|
||||
0x1C1C0A07, // 0044 EQ R7 R5 R7
|
||||
0x781E0011, // 0045 JMPF R7 #0058
|
||||
0x541EFFFB, // 0046 LDINT R7 65532
|
||||
0x1C1C0C07, // 0047 EQ R7 R6 R7
|
||||
0x781E0005, // 0048 JMPF R7 #004F
|
||||
0x8C1C0907, // 0049 GETMET R7 R4 K7
|
||||
0x8824090B, // 004A GETMBR R9 R4 K11
|
||||
0x58280006, // 004B LDCONST R10 K6
|
||||
0x7C1C0600, // 004C CALL R7 3
|
||||
0x80040E00, // 004D RET 1 R7
|
||||
0x70020007, // 004E JMP #0057
|
||||
0x541EFFFC, // 004F LDINT R7 65533
|
||||
0x1C1C0C07, // 0050 EQ R7 R6 R7
|
||||
0x781E0004, // 0051 JMPF R7 #0057
|
||||
0x8C1C0907, // 0052 GETMET R7 R4 K7
|
||||
0x8824090B, // 0053 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0054 LDINT R10 4
|
||||
0x7C1C0600, // 0055 CALL R7 3
|
||||
0x80040E00, // 0056 RET 1 R7
|
||||
0x70020007, // 0057 JMP #0060
|
||||
0x601C0003, // 0058 GETGBL R7 G3
|
||||
0x5C200000, // 0059 MOVE R8 R0
|
||||
0x7C1C0200, // 005A CALL R7 1
|
||||
0x8C1C0F0C, // 005B GETMET R7 R7 K12
|
||||
0x5C240200, // 005C MOVE R9 R1
|
||||
0x5C280400, // 005D MOVE R10 R2
|
||||
0x7C1C0600, // 005E CALL R7 3
|
||||
0x80040E00, // 005F RET 1 R7
|
||||
0x80000000, // 0060 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -147,7 +168,7 @@ be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
|
|||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[45]) { /* code */
|
||||
( &(const binstruction[51]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140702, // 0002 GETMBR R5 R3 K2
|
||||
|
@ -176,23 +197,29 @@ be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
|
|||
0x781E0001, // 0019 JMPF R7 #001C
|
||||
0x501C0200, // 001A LDBOOL R7 1 0
|
||||
0x80040E00, // 001B RET 1 R7
|
||||
0x7002000E, // 001C JMP #002C
|
||||
0x70020014, // 001C JMP #0032
|
||||
0x541E0003, // 001D LDINT R7 4
|
||||
0x1C1C0A07, // 001E EQ R7 R5 R7
|
||||
0x781E0002, // 001F JMPF R7 #0023
|
||||
0x501C0200, // 0020 LDBOOL R7 1 0
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020008, // 0022 JMP #002C
|
||||
0x601C0003, // 0023 GETGBL R7 G3
|
||||
0x5C200000, // 0024 MOVE R8 R0
|
||||
0x7C1C0200, // 0025 CALL R7 1
|
||||
0x8C1C0F0A, // 0026 GETMET R7 R7 K10
|
||||
0x5C240200, // 0027 MOVE R9 R1
|
||||
0x5C280400, // 0028 MOVE R10 R2
|
||||
0x5C2C0600, // 0029 MOVE R11 R3
|
||||
0x7C1C0800, // 002A CALL R7 4
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x80000000, // 002C RET 0
|
||||
0x7002000E, // 0022 JMP #0032
|
||||
0x541E0004, // 0023 LDINT R7 5
|
||||
0x1C1C0A07, // 0024 EQ R7 R5 R7
|
||||
0x781E0002, // 0025 JMPF R7 #0029
|
||||
0x501C0200, // 0026 LDBOOL R7 1 0
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020008, // 0028 JMP #0032
|
||||
0x601C0003, // 0029 GETGBL R7 G3
|
||||
0x5C200000, // 002A MOVE R8 R0
|
||||
0x7C1C0200, // 002B CALL R7 1
|
||||
0x8C1C0F0A, // 002C GETMET R7 R7 K10
|
||||
0x5C240200, // 002D MOVE R9 R1
|
||||
0x5C280400, // 002E MOVE R10 R2
|
||||
0x5C2C0600, // 002F MOVE R11 R3
|
||||
0x7C1C0800, // 0030 CALL R7 4
|
||||
0x80040E00, // 0031 RET 1 R7
|
||||
0x80000000, // 0032 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -209,8 +236,16 @@ be_local_class(Matter_Plugin_Device,
|
|||
be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(2,
|
||||
be_const_map( * be_nested_map(3,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(4,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(3,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
|
@ -218,11 +253,15 @@ be_local_class(Matter_Plugin_Device,
|
|||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(4,
|
||||
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(8,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(4),
|
||||
be_const_int(5),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
|
|
|
@ -11,7 +11,7 @@ extern const bclass be_class_Matter_Plugin_Light0;
|
|||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -19,114 +19,76 @@ be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_const_int(3),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_const_int(1),
|
||||
/* K8 */ be_nested_str_weak(Matter_TLV_struct),
|
||||
/* K9 */ be_nested_str_weak(add_TLV),
|
||||
/* K10 */ be_nested_str_weak(U2),
|
||||
/* K11 */ be_nested_str_weak(set),
|
||||
/* K12 */ be_nested_str_weak(power),
|
||||
/* K13 */ be_nested_str_weak(update_shadow),
|
||||
/* K14 */ be_const_int(2),
|
||||
/* K15 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K7 */ be_nested_str_weak(set),
|
||||
/* K8 */ be_nested_str_weak(power),
|
||||
/* K9 */ be_nested_str_weak(update_shadow),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(shadow_onoff),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[87]) { /* code */
|
||||
( &(const binstruction[52]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x1C200D05, // 0005 EQ R8 R6 K5
|
||||
0x78220016, // 0006 JMPF R8 #001E
|
||||
0x1C200F06, // 0007 EQ R8 R7 K6
|
||||
0x78220002, // 0008 JMPF R8 #000C
|
||||
0x50200200, // 0009 LDBOOL R8 1 0
|
||||
0x80041000, // 000A RET 1 R8
|
||||
0x70020010, // 000B JMP #001D
|
||||
0x1C200F07, // 000C EQ R8 R7 K7
|
||||
0x78220009, // 000D JMPF R8 #0018
|
||||
0x8C200B08, // 000E GETMET R8 R5 K8
|
||||
0x7C200200, // 000F CALL R8 1
|
||||
0x8C241109, // 0010 GETMET R9 R8 K9
|
||||
0x582C0006, // 0011 LDCONST R11 K6
|
||||
0x88300B0A, // 0012 GETMBR R12 R5 K10
|
||||
0x58340006, // 0013 LDCONST R13 K6
|
||||
0x7C240800, // 0014 CALL R9 4
|
||||
0x900E0906, // 0015 SETMBR R3 K4 K6
|
||||
0x80041000, // 0016 RET 1 R8
|
||||
0x70020004, // 0017 JMP #001D
|
||||
0x5422003F, // 0018 LDINT R8 64
|
||||
0x1C200E08, // 0019 EQ R8 R7 R8
|
||||
0x78220001, // 001A JMPF R8 #001D
|
||||
0x50200200, // 001B LDBOOL R8 1 0
|
||||
0x80041000, // 001C RET 1 R8
|
||||
0x70020037, // 001D JMP #0056
|
||||
0x54220003, // 001E LDINT R8 4
|
||||
0x1C200C08, // 001F EQ R8 R6 R8
|
||||
0x78220002, // 0020 JMPF R8 #0024
|
||||
0x54220005, // 0005 LDINT R8 6
|
||||
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||
0x7822002A, // 0007 JMPF R8 #0033
|
||||
0x8C200105, // 0008 GETMET R8 R0 K5
|
||||
0x7C200200, // 0009 CALL R8 1
|
||||
0x1C200F06, // 000A EQ R8 R7 K6
|
||||
0x7822000A, // 000B JMPF R8 #0017
|
||||
0x8C200907, // 000C GETMET R8 R4 K7
|
||||
0x60280013, // 000D GETGBL R10 G19
|
||||
0x7C280000, // 000E CALL R10 0
|
||||
0x502C0000, // 000F LDBOOL R11 0 0
|
||||
0x982A100B, // 0010 SETIDX R10 K8 R11
|
||||
0x7C200400, // 0011 CALL R8 2
|
||||
0x8C200109, // 0012 GETMET R8 R0 K9
|
||||
0x7C200200, // 0013 CALL R8 1
|
||||
0x50200200, // 0014 LDBOOL R8 1 0
|
||||
0x80041000, // 0015 RET 1 R8
|
||||
0x7002001B, // 0016 JMP #0033
|
||||
0x1C200F0A, // 0017 EQ R8 R7 K10
|
||||
0x7822000A, // 0018 JMPF R8 #0024
|
||||
0x8C200907, // 0019 GETMET R8 R4 K7
|
||||
0x60280013, // 001A GETGBL R10 G19
|
||||
0x7C280000, // 001B CALL R10 0
|
||||
0x502C0200, // 001C LDBOOL R11 1 0
|
||||
0x982A100B, // 001D SETIDX R10 K8 R11
|
||||
0x7C200400, // 001E CALL R8 2
|
||||
0x8C200109, // 001F GETMET R8 R0 K9
|
||||
0x7C200200, // 0020 CALL R8 1
|
||||
0x50200200, // 0021 LDBOOL R8 1 0
|
||||
0x80041000, // 0022 RET 1 R8
|
||||
0x70020031, // 0023 JMP #0056
|
||||
0x54220004, // 0024 LDINT R8 5
|
||||
0x1C200C08, // 0025 EQ R8 R6 R8
|
||||
0x78220002, // 0026 JMPF R8 #002A
|
||||
0x50200200, // 0027 LDBOOL R8 1 0
|
||||
0x80041000, // 0028 RET 1 R8
|
||||
0x7002002B, // 0029 JMP #0056
|
||||
0x54220005, // 002A LDINT R8 6
|
||||
0x1C200C08, // 002B EQ R8 R6 R8
|
||||
0x78220028, // 002C JMPF R8 #0056
|
||||
0x1C200F06, // 002D EQ R8 R7 K6
|
||||
0x7822000A, // 002E JMPF R8 #003A
|
||||
0x8C20090B, // 002F GETMET R8 R4 K11
|
||||
0x60280013, // 0030 GETGBL R10 G19
|
||||
0x7C280000, // 0031 CALL R10 0
|
||||
0x502C0000, // 0032 LDBOOL R11 0 0
|
||||
0x982A180B, // 0033 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0034 CALL R8 2
|
||||
0x8C20010D, // 0035 GETMET R8 R0 K13
|
||||
0x7C200200, // 0036 CALL R8 1
|
||||
0x50200200, // 0037 LDBOOL R8 1 0
|
||||
0x80041000, // 0038 RET 1 R8
|
||||
0x7002001B, // 0039 JMP #0056
|
||||
0x1C200F07, // 003A EQ R8 R7 K7
|
||||
0x7822000A, // 003B JMPF R8 #0047
|
||||
0x8C20090B, // 003C GETMET R8 R4 K11
|
||||
0x60280013, // 003D GETGBL R10 G19
|
||||
0x7C280000, // 003E CALL R10 0
|
||||
0x502C0200, // 003F LDBOOL R11 1 0
|
||||
0x982A180B, // 0040 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0041 CALL R8 2
|
||||
0x8C20010D, // 0042 GETMET R8 R0 K13
|
||||
0x7C200200, // 0043 CALL R8 1
|
||||
0x50200200, // 0044 LDBOOL R8 1 0
|
||||
0x80041000, // 0045 RET 1 R8
|
||||
0x7002000E, // 0046 JMP #0056
|
||||
0x1C200F0E, // 0047 EQ R8 R7 K14
|
||||
0x7822000C, // 0048 JMPF R8 #0056
|
||||
0x8C20090B, // 0049 GETMET R8 R4 K11
|
||||
0x60280013, // 004A GETGBL R10 G19
|
||||
0x7C280000, // 004B CALL R10 0
|
||||
0x882C010F, // 004C GETMBR R11 R0 K15
|
||||
0x782E0000, // 004D JMPF R11 #004F
|
||||
0x502C0001, // 004E LDBOOL R11 0 1
|
||||
0x502C0200, // 004F LDBOOL R11 1 0
|
||||
0x982A180B, // 0050 SETIDX R10 K12 R11
|
||||
0x7C200400, // 0051 CALL R8 2
|
||||
0x8C20010D, // 0052 GETMET R8 R0 K13
|
||||
0x7C200200, // 0053 CALL R8 1
|
||||
0x50200200, // 0054 LDBOOL R8 1 0
|
||||
0x80041000, // 0055 RET 1 R8
|
||||
0x80000000, // 0056 RET 0
|
||||
0x7002000E, // 0023 JMP #0033
|
||||
0x1C200F0B, // 0024 EQ R8 R7 K11
|
||||
0x7822000C, // 0025 JMPF R8 #0033
|
||||
0x8C200907, // 0026 GETMET R8 R4 K7
|
||||
0x60280013, // 0027 GETGBL R10 G19
|
||||
0x7C280000, // 0028 CALL R10 0
|
||||
0x882C010C, // 0029 GETMBR R11 R0 K12
|
||||
0x782E0000, // 002A JMPF R11 #002C
|
||||
0x502C0001, // 002B LDBOOL R11 0 1
|
||||
0x502C0200, // 002C LDBOOL R11 1 0
|
||||
0x982A100B, // 002D SETIDX R10 K8 R11
|
||||
0x7C200400, // 002E CALL R8 2
|
||||
0x8C200109, // 002F GETMET R8 R0 K9
|
||||
0x7C200200, // 0030 CALL R8 1
|
||||
0x50200200, // 0031 LDBOOL R8 1 0
|
||||
0x80041000, // 0032 RET 1 R8
|
||||
0x80000000, // 0033 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -146,152 +108,68 @@ be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(3),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(U2),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str_weak(U1),
|
||||
/* K11 */ be_nested_str_weak(U4),
|
||||
/* K12 */ be_nested_str_weak(BOOL),
|
||||
/* K13 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
/* K8 */ be_nested_str_weak(BOOL),
|
||||
/* K9 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K10 */ be_nested_str_weak(U4),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[126]) { /* code */
|
||||
( &(const binstruction[45]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x1C1C0B05, // 0005 EQ R7 R5 K5
|
||||
0x781E0021, // 0006 JMPF R7 #0029
|
||||
0x1C1C0D06, // 0007 EQ R7 R6 K6
|
||||
0x781E0005, // 0008 JMPF R7 #000F
|
||||
0x8C1C0907, // 0009 GETMET R7 R4 K7
|
||||
0x88240908, // 000A GETMBR R9 R4 K8
|
||||
0x58280006, // 000B LDCONST R10 K6
|
||||
0x7C1C0600, // 000C CALL R7 3
|
||||
0x80040E00, // 000D RET 1 R7
|
||||
0x70020018, // 000E JMP #0028
|
||||
0x1C1C0D09, // 000F EQ R7 R6 K9
|
||||
0x781E0005, // 0010 JMPF R7 #0017
|
||||
0x8C1C0907, // 0011 GETMET R7 R4 K7
|
||||
0x8824090A, // 0012 GETMBR R9 R4 K10
|
||||
0x58280006, // 0013 LDCONST R10 K6
|
||||
0x7C1C0600, // 0014 CALL R7 3
|
||||
0x80040E00, // 0015 RET 1 R7
|
||||
0x70020010, // 0016 JMP #0028
|
||||
0x541EFFFB, // 0017 LDINT R7 65532
|
||||
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
||||
0x781E0005, // 0019 JMPF R7 #0020
|
||||
0x8C1C0907, // 001A GETMET R7 R4 K7
|
||||
0x8824090B, // 001B GETMBR R9 R4 K11
|
||||
0x58280006, // 001C LDCONST R10 K6
|
||||
0x7C1C0600, // 001D CALL R7 3
|
||||
0x80040E00, // 001E RET 1 R7
|
||||
0x70020007, // 001F JMP #0028
|
||||
0x541EFFFC, // 0020 LDINT R7 65533
|
||||
0x1C1C0C07, // 0021 EQ R7 R6 R7
|
||||
0x781E0004, // 0022 JMPF R7 #0028
|
||||
0x8C1C0907, // 0023 GETMET R7 R4 K7
|
||||
0x8824090B, // 0024 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0025 LDINT R10 4
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020053, // 0028 JMP #007D
|
||||
0x541E0003, // 0029 LDINT R7 4
|
||||
0x1C1C0A07, // 002A EQ R7 R5 R7
|
||||
0x781E0016, // 002B JMPF R7 #0043
|
||||
0x1C1C0D06, // 002C EQ R7 R6 K6
|
||||
0x781E0002, // 002D JMPF R7 #0031
|
||||
0x4C1C0000, // 002E LDNIL R7
|
||||
0x80040E00, // 002F RET 1 R7
|
||||
0x70020010, // 0030 JMP #0042
|
||||
0x541EFFFB, // 0031 LDINT R7 65532
|
||||
0x1C1C0C07, // 0032 EQ R7 R6 R7
|
||||
0x781E0005, // 0033 JMPF R7 #003A
|
||||
0x8C1C0907, // 0034 GETMET R7 R4 K7
|
||||
0x8824090B, // 0035 GETMBR R9 R4 K11
|
||||
0x58280006, // 0036 LDCONST R10 K6
|
||||
0x7C1C0600, // 0037 CALL R7 3
|
||||
0x80040E00, // 0038 RET 1 R7
|
||||
0x70020007, // 0039 JMP #0042
|
||||
0x541EFFFC, // 003A LDINT R7 65533
|
||||
0x1C1C0C07, // 003B EQ R7 R6 R7
|
||||
0x781E0004, // 003C JMPF R7 #0042
|
||||
0x8C1C0907, // 003D GETMET R7 R4 K7
|
||||
0x8824090B, // 003E GETMBR R9 R4 K11
|
||||
0x542A0003, // 003F LDINT R10 4
|
||||
0x7C1C0600, // 0040 CALL R7 3
|
||||
0x80040E00, // 0041 RET 1 R7
|
||||
0x70020039, // 0042 JMP #007D
|
||||
0x541E0004, // 0043 LDINT R7 5
|
||||
0x1C1C0A07, // 0044 EQ R7 R5 R7
|
||||
0x781E0011, // 0045 JMPF R7 #0058
|
||||
0x541EFFFB, // 0046 LDINT R7 65532
|
||||
0x1C1C0C07, // 0047 EQ R7 R6 R7
|
||||
0x781E0005, // 0048 JMPF R7 #004F
|
||||
0x8C1C0907, // 0049 GETMET R7 R4 K7
|
||||
0x8824090B, // 004A GETMBR R9 R4 K11
|
||||
0x58280006, // 004B LDCONST R10 K6
|
||||
0x7C1C0600, // 004C CALL R7 3
|
||||
0x80040E00, // 004D RET 1 R7
|
||||
0x70020007, // 004E JMP #0057
|
||||
0x541EFFFC, // 004F LDINT R7 65533
|
||||
0x1C1C0C07, // 0050 EQ R7 R6 R7
|
||||
0x781E0004, // 0051 JMPF R7 #0057
|
||||
0x8C1C0907, // 0052 GETMET R7 R4 K7
|
||||
0x8824090B, // 0053 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0054 LDINT R10 4
|
||||
0x7C1C0600, // 0055 CALL R7 3
|
||||
0x80040E00, // 0056 RET 1 R7
|
||||
0x70020024, // 0057 JMP #007D
|
||||
0x541E0005, // 0058 LDINT R7 6
|
||||
0x1C1C0A07, // 0059 EQ R7 R5 R7
|
||||
0x781E0019, // 005A JMPF R7 #0075
|
||||
0x1C1C0D06, // 005B EQ R7 R6 K6
|
||||
0x781E0005, // 005C JMPF R7 #0063
|
||||
0x8C1C0907, // 005D GETMET R7 R4 K7
|
||||
0x8824090C, // 005E GETMBR R9 R4 K12
|
||||
0x8828010D, // 005F GETMBR R10 R0 K13
|
||||
0x7C1C0600, // 0060 CALL R7 3
|
||||
0x80040E00, // 0061 RET 1 R7
|
||||
0x70020010, // 0062 JMP #0074
|
||||
0x541EFFFB, // 0063 LDINT R7 65532
|
||||
0x1C1C0C07, // 0064 EQ R7 R6 R7
|
||||
0x781E0005, // 0065 JMPF R7 #006C
|
||||
0x8C1C0907, // 0066 GETMET R7 R4 K7
|
||||
0x8824090B, // 0067 GETMBR R9 R4 K11
|
||||
0x58280006, // 0068 LDCONST R10 K6
|
||||
0x7C1C0600, // 0069 CALL R7 3
|
||||
0x80040E00, // 006A RET 1 R7
|
||||
0x70020007, // 006B JMP #0074
|
||||
0x541EFFFC, // 006C LDINT R7 65533
|
||||
0x1C1C0C07, // 006D EQ R7 R6 R7
|
||||
0x781E0004, // 006E JMPF R7 #0074
|
||||
0x8C1C0907, // 006F GETMET R7 R4 K7
|
||||
0x8824090B, // 0070 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0071 LDINT R10 4
|
||||
0x7C1C0600, // 0072 CALL R7 3
|
||||
0x80040E00, // 0073 RET 1 R7
|
||||
0x70020007, // 0074 JMP #007D
|
||||
0x601C0003, // 0075 GETGBL R7 G3
|
||||
0x5C200000, // 0076 MOVE R8 R0
|
||||
0x7C1C0200, // 0077 CALL R7 1
|
||||
0x8C1C0F0E, // 0078 GETMET R7 R7 K14
|
||||
0x5C240200, // 0079 MOVE R9 R1
|
||||
0x5C280400, // 007A MOVE R10 R2
|
||||
0x7C1C0600, // 007B CALL R7 3
|
||||
0x80040E00, // 007C RET 1 R7
|
||||
0x80000000, // 007D RET 0
|
||||
0x541E0005, // 0005 LDINT R7 6
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E001B, // 0007 JMPF R7 #0024
|
||||
0x8C1C0105, // 0008 GETMET R7 R0 K5
|
||||
0x7C1C0200, // 0009 CALL R7 1
|
||||
0x1C1C0D06, // 000A EQ R7 R6 K6
|
||||
0x781E0005, // 000B JMPF R7 #0012
|
||||
0x8C1C0907, // 000C GETMET R7 R4 K7
|
||||
0x88240908, // 000D GETMBR R9 R4 K8
|
||||
0x88280109, // 000E GETMBR R10 R0 K9
|
||||
0x7C1C0600, // 000F CALL R7 3
|
||||
0x80040E00, // 0010 RET 1 R7
|
||||
0x70020010, // 0011 JMP #0023
|
||||
0x541EFFFB, // 0012 LDINT R7 65532
|
||||
0x1C1C0C07, // 0013 EQ R7 R6 R7
|
||||
0x781E0005, // 0014 JMPF R7 #001B
|
||||
0x8C1C0907, // 0015 GETMET R7 R4 K7
|
||||
0x8824090A, // 0016 GETMBR R9 R4 K10
|
||||
0x58280006, // 0017 LDCONST R10 K6
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x70020007, // 001A JMP #0023
|
||||
0x541EFFFC, // 001B LDINT R7 65533
|
||||
0x1C1C0C07, // 001C EQ R7 R6 R7
|
||||
0x781E0004, // 001D JMPF R7 #0023
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x8824090A, // 001F GETMBR R9 R4 K10
|
||||
0x542A0003, // 0020 LDINT R10 4
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x70020007, // 0023 JMP #002C
|
||||
0x601C0003, // 0024 GETGBL R7 G3
|
||||
0x5C200000, // 0025 MOVE R8 R0
|
||||
0x7C1C0200, // 0026 CALL R7 1
|
||||
0x8C1C0F0B, // 0027 GETMET R7 R7 K11
|
||||
0x5C240200, // 0028 MOVE R9 R1
|
||||
0x5C280400, // 0029 MOVE R10 R2
|
||||
0x7C1C0600, // 002A CALL R7 3
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x80000000, // 002C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -303,7 +181,7 @@ be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
8, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -311,7 +189,7 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(get),
|
||||
/* K2 */ be_nested_str_weak(find),
|
||||
|
@ -319,10 +197,11 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
|
|||
/* K4 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K5 */ be_nested_str_weak(attribute_updated),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
|
@ -332,14 +211,18 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
|
|||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x88100104, // 0007 GETMBR R4 R0 K4
|
||||
0x20100604, // 0008 NE R4 R3 R4
|
||||
0x78120005, // 0009 JMPF R4 #0010
|
||||
0x78120004, // 0009 JMPF R4 #000F
|
||||
0x8C100105, // 000A GETMET R4 R0 K5
|
||||
0x4C180000, // 000B LDNIL R6
|
||||
0x541E0005, // 000C LDINT R7 6
|
||||
0x58200006, // 000D LDCONST R8 K6
|
||||
0x7C100800, // 000E CALL R4 4
|
||||
0x90020803, // 000F SETMBR R0 K4 R3
|
||||
0x80000000, // 0010 RET 0
|
||||
0x541A0005, // 000B LDINT R6 6
|
||||
0x581C0006, // 000C LDCONST R7 K6
|
||||
0x7C100600, // 000D CALL R4 3
|
||||
0x90020803, // 000E SETMBR R0 K4 R3
|
||||
0x60100003, // 000F GETGBL R4 G3
|
||||
0x5C140000, // 0010 MOVE R5 R0
|
||||
0x7C100200, // 0011 CALL R4 1
|
||||
0x8C100907, // 0012 GETMET R4 R4 K7
|
||||
0x7C100200, // 0013 CALL R4 1
|
||||
0x80000000, // 0014 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -386,10 +269,10 @@ be_local_closure(Matter_Plugin_Light0_init, /* name */
|
|||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Light0
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin;
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_Light0,
|
||||
1,
|
||||
&be_class_Matter_Plugin,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(9,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
|
||||
|
@ -401,41 +284,14 @@ be_local_class(Matter_Plugin_Light0,
|
|||
})) ) } )) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(4,
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(3,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(8,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(4),
|
||||
be_const_int(5),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(3,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(4,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
|
||||
|
|
|
@ -33,7 +33,7 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
|
|||
}),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[36]) { /* code */
|
||||
( &(const binstruction[33]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
|
@ -43,7 +43,7 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
|
|||
0x7C0C0600, // 0006 CALL R3 3
|
||||
0x4C100000, // 0007 LDNIL R4
|
||||
0x20100604, // 0008 NE R4 R3 R4
|
||||
0x78120009, // 0009 JMPF R4 #0014
|
||||
0x78120010, // 0009 JMPF R4 #001B
|
||||
0xB8120800, // 000A GETNGBL R4 K4
|
||||
0x8C100905, // 000B GETMET R4 R4 K5
|
||||
0x5C180600, // 000C MOVE R6 R3
|
||||
|
@ -53,23 +53,20 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
|
|||
0x542A00FD, // 0010 LDINT R10 254
|
||||
0x7C100C00, // 0011 CALL R4 6
|
||||
0x5C0C0800, // 0012 MOVE R3 R4
|
||||
0x70020000, // 0013 JMP #0015
|
||||
0x880C0107, // 0014 GETMBR R3 R0 K7
|
||||
0x88100107, // 0015 GETMBR R4 R0 K7
|
||||
0x20100604, // 0016 NE R4 R3 R4
|
||||
0x78120005, // 0017 JMPF R4 #001E
|
||||
0x8C100108, // 0018 GETMET R4 R0 K8
|
||||
0x4C180000, // 0019 LDNIL R6
|
||||
0x541E0007, // 001A LDINT R7 8
|
||||
0x58200006, // 001B LDCONST R8 K6
|
||||
0x7C100800, // 001C CALL R4 4
|
||||
0x90020E03, // 001D SETMBR R0 K7 R3
|
||||
0x60100003, // 001E GETGBL R4 G3
|
||||
0x5C140000, // 001F MOVE R5 R0
|
||||
0x7C100200, // 0020 CALL R4 1
|
||||
0x8C100909, // 0021 GETMET R4 R4 K9
|
||||
0x7C100200, // 0022 CALL R4 1
|
||||
0x80000000, // 0023 RET 0
|
||||
0x88100107, // 0013 GETMBR R4 R0 K7
|
||||
0x20100604, // 0014 NE R4 R3 R4
|
||||
0x78120004, // 0015 JMPF R4 #001B
|
||||
0x8C100108, // 0016 GETMET R4 R0 K8
|
||||
0x541A0007, // 0017 LDINT R6 8
|
||||
0x581C0006, // 0018 LDCONST R7 K6
|
||||
0x7C100600, // 0019 CALL R4 3
|
||||
0x90020E03, // 001A SETMBR R0 K7 R3
|
||||
0x60100003, // 001B GETGBL R4 G3
|
||||
0x5C140000, // 001C MOVE R5 R0
|
||||
0x7C100200, // 001D CALL R4 1
|
||||
0x8C100909, // 001E GETMET R4 R4 K9
|
||||
0x7C100200, // 001F CALL R4 1
|
||||
0x80000000, // 0020 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -89,30 +86,31 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[19]) { /* constants */
|
||||
( &(const bvalue[20]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(findsubval),
|
||||
/* K7 */ be_nested_str_weak(tasmota),
|
||||
/* K8 */ be_nested_str_weak(scale_uint),
|
||||
/* K9 */ be_nested_str_weak(set),
|
||||
/* K10 */ be_nested_str_weak(bri),
|
||||
/* K11 */ be_nested_str_weak(update_shadow),
|
||||
/* K12 */ be_nested_str_weak(log),
|
||||
/* K13 */ be_nested_str_weak(bri_X3A),
|
||||
/* K14 */ be_const_int(1),
|
||||
/* K15 */ be_const_int(2),
|
||||
/* K16 */ be_const_int(3),
|
||||
/* K17 */ be_nested_str_weak(power),
|
||||
/* K18 */ be_nested_str_weak(invoke_request),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(findsubval),
|
||||
/* K8 */ be_nested_str_weak(tasmota),
|
||||
/* K9 */ be_nested_str_weak(scale_uint),
|
||||
/* K10 */ be_nested_str_weak(set),
|
||||
/* K11 */ be_nested_str_weak(bri),
|
||||
/* K12 */ be_nested_str_weak(update_shadow),
|
||||
/* K13 */ be_nested_str_weak(log),
|
||||
/* K14 */ be_nested_str_weak(bri_X3A),
|
||||
/* K15 */ be_const_int(1),
|
||||
/* K16 */ be_const_int(2),
|
||||
/* K17 */ be_const_int(3),
|
||||
/* K18 */ be_nested_str_weak(power),
|
||||
/* K19 */ be_nested_str_weak(invoke_request),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[110]) { /* code */
|
||||
( &(const binstruction[112]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
|
@ -120,109 +118,111 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
|
|||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x54220007, // 0005 LDINT R8 8
|
||||
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||
0x7822005B, // 0007 JMPF R8 #0064
|
||||
0x1C200F05, // 0008 EQ R8 R7 K5
|
||||
0x78220019, // 0009 JMPF R8 #0024
|
||||
0x8C200506, // 000A GETMET R8 R2 K6
|
||||
0x58280005, // 000B LDCONST R10 K5
|
||||
0x7C200400, // 000C CALL R8 2
|
||||
0xB8260E00, // 000D GETNGBL R9 K7
|
||||
0x8C241308, // 000E GETMET R9 R9 K8
|
||||
0x5C2C1000, // 000F MOVE R11 R8
|
||||
0x58300005, // 0010 LDCONST R12 K5
|
||||
0x543600FD, // 0011 LDINT R13 254
|
||||
0x58380005, // 0012 LDCONST R14 K5
|
||||
0x543E00FE, // 0013 LDINT R15 255
|
||||
0x7C240C00, // 0014 CALL R9 6
|
||||
0x8C280909, // 0015 GETMET R10 R4 K9
|
||||
0x60300013, // 0016 GETGBL R12 G19
|
||||
0x7C300000, // 0017 CALL R12 0
|
||||
0x98321409, // 0018 SETIDX R12 K10 R9
|
||||
0x7C280400, // 0019 CALL R10 2
|
||||
0x8C28010B, // 001A GETMET R10 R0 K11
|
||||
0x7C280200, // 001B CALL R10 1
|
||||
0x60280008, // 001C GETGBL R10 G8
|
||||
0x5C2C1000, // 001D MOVE R11 R8
|
||||
0x7C280200, // 001E CALL R10 1
|
||||
0x002A1A0A, // 001F ADD R10 K13 R10
|
||||
0x900E180A, // 0020 SETMBR R3 K12 R10
|
||||
0x50280200, // 0021 LDBOOL R10 1 0
|
||||
0x80041400, // 0022 RET 1 R10
|
||||
0x7002003E, // 0023 JMP #0063
|
||||
0x1C200F0E, // 0024 EQ R8 R7 K14
|
||||
0x78220002, // 0025 JMPF R8 #0029
|
||||
0x50200200, // 0026 LDBOOL R8 1 0
|
||||
0x80041000, // 0027 RET 1 R8
|
||||
0x70020039, // 0028 JMP #0063
|
||||
0x1C200F0F, // 0029 EQ R8 R7 K15
|
||||
0x78220002, // 002A JMPF R8 #002E
|
||||
0x50200200, // 002B LDBOOL R8 1 0
|
||||
0x80041000, // 002C RET 1 R8
|
||||
0x70020034, // 002D JMP #0063
|
||||
0x1C200F10, // 002E EQ R8 R7 K16
|
||||
0x78220002, // 002F JMPF R8 #0033
|
||||
0x50200200, // 0030 LDBOOL R8 1 0
|
||||
0x80041000, // 0031 RET 1 R8
|
||||
0x7002002F, // 0032 JMP #0063
|
||||
0x54220003, // 0033 LDINT R8 4
|
||||
0x1C200E08, // 0034 EQ R8 R7 R8
|
||||
0x7822001B, // 0035 JMPF R8 #0052
|
||||
0x8C200506, // 0036 GETMET R8 R2 K6
|
||||
0x58280005, // 0037 LDCONST R10 K5
|
||||
0x7C200400, // 0038 CALL R8 2
|
||||
0xB8260E00, // 0039 GETNGBL R9 K7
|
||||
0x8C241308, // 003A GETMET R9 R9 K8
|
||||
0x5C2C1000, // 003B MOVE R11 R8
|
||||
0x58300005, // 003C LDCONST R12 K5
|
||||
0x543600FD, // 003D LDINT R13 254
|
||||
0x58380005, // 003E LDCONST R14 K5
|
||||
0x543E00FE, // 003F LDINT R15 255
|
||||
0x7C240C00, // 0040 CALL R9 6
|
||||
0x24281305, // 0041 GT R10 R9 K5
|
||||
0x8C2C0909, // 0042 GETMET R11 R4 K9
|
||||
0x60340013, // 0043 GETGBL R13 G19
|
||||
0x7C340000, // 0044 CALL R13 0
|
||||
0x98361409, // 0045 SETIDX R13 K10 R9
|
||||
0x9836220A, // 0046 SETIDX R13 K17 R10
|
||||
0x7C2C0400, // 0047 CALL R11 2
|
||||
0x8C2C010B, // 0048 GETMET R11 R0 K11
|
||||
0x7C2C0200, // 0049 CALL R11 1
|
||||
0x602C0008, // 004A GETGBL R11 G8
|
||||
0x5C301000, // 004B MOVE R12 R8
|
||||
0x7C2C0200, // 004C CALL R11 1
|
||||
0x002E1A0B, // 004D ADD R11 K13 R11
|
||||
0x900E180B, // 004E SETMBR R3 K12 R11
|
||||
0x502C0200, // 004F LDBOOL R11 1 0
|
||||
0x80041600, // 0050 RET 1 R11
|
||||
0x70020010, // 0051 JMP #0063
|
||||
0x54220004, // 0052 LDINT R8 5
|
||||
0x1C200E08, // 0053 EQ R8 R7 R8
|
||||
0x78220002, // 0054 JMPF R8 #0058
|
||||
0x50200200, // 0055 LDBOOL R8 1 0
|
||||
0x80041000, // 0056 RET 1 R8
|
||||
0x7002000A, // 0057 JMP #0063
|
||||
0x54220005, // 0058 LDINT R8 6
|
||||
0x1C200E08, // 0059 EQ R8 R7 R8
|
||||
0x78220002, // 005A JMPF R8 #005E
|
||||
0x50200200, // 005B LDBOOL R8 1 0
|
||||
0x80041000, // 005C RET 1 R8
|
||||
0x70020004, // 005D JMP #0063
|
||||
0x54220006, // 005E LDINT R8 7
|
||||
0x1C200E08, // 005F EQ R8 R7 R8
|
||||
0x78220001, // 0060 JMPF R8 #0063
|
||||
0x50200200, // 0061 LDBOOL R8 1 0
|
||||
0x80041000, // 0062 RET 1 R8
|
||||
0x70020008, // 0063 JMP #006D
|
||||
0x60200003, // 0064 GETGBL R8 G3
|
||||
0x5C240000, // 0065 MOVE R9 R0
|
||||
0x7C200200, // 0066 CALL R8 1
|
||||
0x8C201112, // 0067 GETMET R8 R8 K18
|
||||
0x5C280200, // 0068 MOVE R10 R1
|
||||
0x5C2C0400, // 0069 MOVE R11 R2
|
||||
0x5C300600, // 006A MOVE R12 R3
|
||||
0x7C200800, // 006B CALL R8 4
|
||||
0x80041000, // 006C RET 1 R8
|
||||
0x80000000, // 006D RET 0
|
||||
0x7822005D, // 0007 JMPF R8 #0066
|
||||
0x8C200105, // 0008 GETMET R8 R0 K5
|
||||
0x7C200200, // 0009 CALL R8 1
|
||||
0x1C200F06, // 000A EQ R8 R7 K6
|
||||
0x78220019, // 000B JMPF R8 #0026
|
||||
0x8C200507, // 000C GETMET R8 R2 K7
|
||||
0x58280006, // 000D LDCONST R10 K6
|
||||
0x7C200400, // 000E CALL R8 2
|
||||
0xB8261000, // 000F GETNGBL R9 K8
|
||||
0x8C241309, // 0010 GETMET R9 R9 K9
|
||||
0x5C2C1000, // 0011 MOVE R11 R8
|
||||
0x58300006, // 0012 LDCONST R12 K6
|
||||
0x543600FD, // 0013 LDINT R13 254
|
||||
0x58380006, // 0014 LDCONST R14 K6
|
||||
0x543E00FE, // 0015 LDINT R15 255
|
||||
0x7C240C00, // 0016 CALL R9 6
|
||||
0x8C28090A, // 0017 GETMET R10 R4 K10
|
||||
0x60300013, // 0018 GETGBL R12 G19
|
||||
0x7C300000, // 0019 CALL R12 0
|
||||
0x98321609, // 001A SETIDX R12 K11 R9
|
||||
0x7C280400, // 001B CALL R10 2
|
||||
0x8C28010C, // 001C GETMET R10 R0 K12
|
||||
0x7C280200, // 001D CALL R10 1
|
||||
0x60280008, // 001E GETGBL R10 G8
|
||||
0x5C2C1000, // 001F MOVE R11 R8
|
||||
0x7C280200, // 0020 CALL R10 1
|
||||
0x002A1C0A, // 0021 ADD R10 K14 R10
|
||||
0x900E1A0A, // 0022 SETMBR R3 K13 R10
|
||||
0x50280200, // 0023 LDBOOL R10 1 0
|
||||
0x80041400, // 0024 RET 1 R10
|
||||
0x7002003E, // 0025 JMP #0065
|
||||
0x1C200F0F, // 0026 EQ R8 R7 K15
|
||||
0x78220002, // 0027 JMPF R8 #002B
|
||||
0x50200200, // 0028 LDBOOL R8 1 0
|
||||
0x80041000, // 0029 RET 1 R8
|
||||
0x70020039, // 002A JMP #0065
|
||||
0x1C200F10, // 002B EQ R8 R7 K16
|
||||
0x78220002, // 002C JMPF R8 #0030
|
||||
0x50200200, // 002D LDBOOL R8 1 0
|
||||
0x80041000, // 002E RET 1 R8
|
||||
0x70020034, // 002F JMP #0065
|
||||
0x1C200F11, // 0030 EQ R8 R7 K17
|
||||
0x78220002, // 0031 JMPF R8 #0035
|
||||
0x50200200, // 0032 LDBOOL R8 1 0
|
||||
0x80041000, // 0033 RET 1 R8
|
||||
0x7002002F, // 0034 JMP #0065
|
||||
0x54220003, // 0035 LDINT R8 4
|
||||
0x1C200E08, // 0036 EQ R8 R7 R8
|
||||
0x7822001B, // 0037 JMPF R8 #0054
|
||||
0x8C200507, // 0038 GETMET R8 R2 K7
|
||||
0x58280006, // 0039 LDCONST R10 K6
|
||||
0x7C200400, // 003A CALL R8 2
|
||||
0xB8261000, // 003B GETNGBL R9 K8
|
||||
0x8C241309, // 003C GETMET R9 R9 K9
|
||||
0x5C2C1000, // 003D MOVE R11 R8
|
||||
0x58300006, // 003E LDCONST R12 K6
|
||||
0x543600FD, // 003F LDINT R13 254
|
||||
0x58380006, // 0040 LDCONST R14 K6
|
||||
0x543E00FE, // 0041 LDINT R15 255
|
||||
0x7C240C00, // 0042 CALL R9 6
|
||||
0x24281306, // 0043 GT R10 R9 K6
|
||||
0x8C2C090A, // 0044 GETMET R11 R4 K10
|
||||
0x60340013, // 0045 GETGBL R13 G19
|
||||
0x7C340000, // 0046 CALL R13 0
|
||||
0x98361609, // 0047 SETIDX R13 K11 R9
|
||||
0x9836240A, // 0048 SETIDX R13 K18 R10
|
||||
0x7C2C0400, // 0049 CALL R11 2
|
||||
0x8C2C010C, // 004A GETMET R11 R0 K12
|
||||
0x7C2C0200, // 004B CALL R11 1
|
||||
0x602C0008, // 004C GETGBL R11 G8
|
||||
0x5C301000, // 004D MOVE R12 R8
|
||||
0x7C2C0200, // 004E CALL R11 1
|
||||
0x002E1C0B, // 004F ADD R11 K14 R11
|
||||
0x900E1A0B, // 0050 SETMBR R3 K13 R11
|
||||
0x502C0200, // 0051 LDBOOL R11 1 0
|
||||
0x80041600, // 0052 RET 1 R11
|
||||
0x70020010, // 0053 JMP #0065
|
||||
0x54220004, // 0054 LDINT R8 5
|
||||
0x1C200E08, // 0055 EQ R8 R7 R8
|
||||
0x78220002, // 0056 JMPF R8 #005A
|
||||
0x50200200, // 0057 LDBOOL R8 1 0
|
||||
0x80041000, // 0058 RET 1 R8
|
||||
0x7002000A, // 0059 JMP #0065
|
||||
0x54220005, // 005A LDINT R8 6
|
||||
0x1C200E08, // 005B EQ R8 R7 R8
|
||||
0x78220002, // 005C JMPF R8 #0060
|
||||
0x50200200, // 005D LDBOOL R8 1 0
|
||||
0x80041000, // 005E RET 1 R8
|
||||
0x70020004, // 005F JMP #0065
|
||||
0x54220006, // 0060 LDINT R8 7
|
||||
0x1C200E08, // 0061 EQ R8 R7 R8
|
||||
0x78220001, // 0062 JMPF R8 #0065
|
||||
0x50200200, // 0063 LDBOOL R8 1 0
|
||||
0x80041000, // 0064 RET 1 R8
|
||||
0x70020008, // 0065 JMP #006F
|
||||
0x60200003, // 0066 GETGBL R8 G3
|
||||
0x5C240000, // 0067 MOVE R9 R0
|
||||
0x7C200200, // 0068 CALL R8 1
|
||||
0x8C201113, // 0069 GETMET R8 R8 K19
|
||||
0x5C280200, // 006A MOVE R10 R1
|
||||
0x5C2C0400, // 006B MOVE R11 R2
|
||||
0x5C300600, // 006C MOVE R12 R3
|
||||
0x7C200800, // 006D CALL R8 4
|
||||
0x80041000, // 006E RET 1 R8
|
||||
0x80000000, // 006F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -242,25 +242,26 @@ be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(create_TLV),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(shadow_bri),
|
||||
/* K9 */ be_const_int(2),
|
||||
/* K10 */ be_const_int(3),
|
||||
/* K11 */ be_nested_str_weak(U4),
|
||||
/* K12 */ be_const_int(1),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(U1),
|
||||
/* K9 */ be_nested_str_weak(shadow_bri),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_const_int(3),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_const_int(1),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[77]) { /* code */
|
||||
( &(const binstruction[79]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
|
@ -268,76 +269,78 @@ be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
|
|||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0007, // 0005 LDINT R7 8
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E003B, // 0007 JMPF R7 #0044
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0005, // 0009 JMPF R7 #0010
|
||||
0x8C1C0906, // 000A GETMET R7 R4 K6
|
||||
0x88240907, // 000B GETMBR R9 R4 K7
|
||||
0x88280108, // 000C GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 000D CALL R7 3
|
||||
0x80040E00, // 000E RET 1 R7
|
||||
0x70020032, // 000F JMP #0043
|
||||
0x1C1C0D09, // 0010 EQ R7 R6 K9
|
||||
0x781E0005, // 0011 JMPF R7 #0018
|
||||
0x8C1C0906, // 0012 GETMET R7 R4 K6
|
||||
0x88240907, // 0013 GETMBR R9 R4 K7
|
||||
0x58280005, // 0014 LDCONST R10 K5
|
||||
0x7C1C0600, // 0015 CALL R7 3
|
||||
0x80040E00, // 0016 RET 1 R7
|
||||
0x7002002A, // 0017 JMP #0043
|
||||
0x1C1C0D0A, // 0018 EQ R7 R6 K10
|
||||
0x781E0005, // 0019 JMPF R7 #0020
|
||||
0x8C1C0906, // 001A GETMET R7 R4 K6
|
||||
0x88240907, // 001B GETMBR R9 R4 K7
|
||||
0x542A00FD, // 001C LDINT R10 254
|
||||
0x7C1C0600, // 001D CALL R7 3
|
||||
0x80040E00, // 001E RET 1 R7
|
||||
0x70020022, // 001F JMP #0043
|
||||
0x541E000E, // 0020 LDINT R7 15
|
||||
0x1C1C0C07, // 0021 EQ R7 R6 R7
|
||||
0x781E0005, // 0022 JMPF R7 #0029
|
||||
0x8C1C0906, // 0023 GETMET R7 R4 K6
|
||||
0x88240907, // 0024 GETMBR R9 R4 K7
|
||||
0x58280005, // 0025 LDCONST R10 K5
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020019, // 0028 JMP #0043
|
||||
0x541E0010, // 0029 LDINT R7 17
|
||||
0x1C1C0C07, // 002A EQ R7 R6 R7
|
||||
0x781E0005, // 002B JMPF R7 #0032
|
||||
0x8C1C0906, // 002C GETMET R7 R4 K6
|
||||
0x88240907, // 002D GETMBR R9 R4 K7
|
||||
0x88280108, // 002E GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 002F CALL R7 3
|
||||
0x80040E00, // 0030 RET 1 R7
|
||||
0x70020010, // 0031 JMP #0043
|
||||
0x541EFFFB, // 0032 LDINT R7 65532
|
||||
0x1C1C0C07, // 0033 EQ R7 R6 R7
|
||||
0x781E0005, // 0034 JMPF R7 #003B
|
||||
0x8C1C0906, // 0035 GETMET R7 R4 K6
|
||||
0x8824090B, // 0036 GETMBR R9 R4 K11
|
||||
0x5828000C, // 0037 LDCONST R10 K12
|
||||
0x7C1C0600, // 0038 CALL R7 3
|
||||
0x80040E00, // 0039 RET 1 R7
|
||||
0x70020007, // 003A JMP #0043
|
||||
0x541EFFFC, // 003B LDINT R7 65533
|
||||
0x1C1C0C07, // 003C EQ R7 R6 R7
|
||||
0x781E0004, // 003D JMPF R7 #0043
|
||||
0x8C1C0906, // 003E GETMET R7 R4 K6
|
||||
0x8824090B, // 003F GETMBR R9 R4 K11
|
||||
0x542A0004, // 0040 LDINT R10 5
|
||||
0x7C1C0600, // 0041 CALL R7 3
|
||||
0x80040E00, // 0042 RET 1 R7
|
||||
0x70020007, // 0043 JMP #004C
|
||||
0x601C0003, // 0044 GETGBL R7 G3
|
||||
0x5C200000, // 0045 MOVE R8 R0
|
||||
0x7C1C0200, // 0046 CALL R7 1
|
||||
0x8C1C0F0D, // 0047 GETMET R7 R7 K13
|
||||
0x5C240200, // 0048 MOVE R9 R1
|
||||
0x5C280400, // 0049 MOVE R10 R2
|
||||
0x7C1C0600, // 004A CALL R7 3
|
||||
0x80040E00, // 004B RET 1 R7
|
||||
0x80000000, // 004C RET 0
|
||||
0x781E003D, // 0007 JMPF R7 #0046
|
||||
0x8C1C0105, // 0008 GETMET R7 R0 K5
|
||||
0x7C1C0200, // 0009 CALL R7 1
|
||||
0x1C1C0D06, // 000A EQ R7 R6 K6
|
||||
0x781E0005, // 000B JMPF R7 #0012
|
||||
0x8C1C0907, // 000C GETMET R7 R4 K7
|
||||
0x88240908, // 000D GETMBR R9 R4 K8
|
||||
0x88280109, // 000E GETMBR R10 R0 K9
|
||||
0x7C1C0600, // 000F CALL R7 3
|
||||
0x80040E00, // 0010 RET 1 R7
|
||||
0x70020032, // 0011 JMP #0045
|
||||
0x1C1C0D0A, // 0012 EQ R7 R6 K10
|
||||
0x781E0005, // 0013 JMPF R7 #001A
|
||||
0x8C1C0907, // 0014 GETMET R7 R4 K7
|
||||
0x88240908, // 0015 GETMBR R9 R4 K8
|
||||
0x58280006, // 0016 LDCONST R10 K6
|
||||
0x7C1C0600, // 0017 CALL R7 3
|
||||
0x80040E00, // 0018 RET 1 R7
|
||||
0x7002002A, // 0019 JMP #0045
|
||||
0x1C1C0D0B, // 001A EQ R7 R6 K11
|
||||
0x781E0005, // 001B JMPF R7 #0022
|
||||
0x8C1C0907, // 001C GETMET R7 R4 K7
|
||||
0x88240908, // 001D GETMBR R9 R4 K8
|
||||
0x542A00FD, // 001E LDINT R10 254
|
||||
0x7C1C0600, // 001F CALL R7 3
|
||||
0x80040E00, // 0020 RET 1 R7
|
||||
0x70020022, // 0021 JMP #0045
|
||||
0x541E000E, // 0022 LDINT R7 15
|
||||
0x1C1C0C07, // 0023 EQ R7 R6 R7
|
||||
0x781E0005, // 0024 JMPF R7 #002B
|
||||
0x8C1C0907, // 0025 GETMET R7 R4 K7
|
||||
0x88240908, // 0026 GETMBR R9 R4 K8
|
||||
0x58280006, // 0027 LDCONST R10 K6
|
||||
0x7C1C0600, // 0028 CALL R7 3
|
||||
0x80040E00, // 0029 RET 1 R7
|
||||
0x70020019, // 002A JMP #0045
|
||||
0x541E0010, // 002B LDINT R7 17
|
||||
0x1C1C0C07, // 002C EQ R7 R6 R7
|
||||
0x781E0005, // 002D JMPF R7 #0034
|
||||
0x8C1C0907, // 002E GETMET R7 R4 K7
|
||||
0x88240908, // 002F GETMBR R9 R4 K8
|
||||
0x88280109, // 0030 GETMBR R10 R0 K9
|
||||
0x7C1C0600, // 0031 CALL R7 3
|
||||
0x80040E00, // 0032 RET 1 R7
|
||||
0x70020010, // 0033 JMP #0045
|
||||
0x541EFFFB, // 0034 LDINT R7 65532
|
||||
0x1C1C0C07, // 0035 EQ R7 R6 R7
|
||||
0x781E0005, // 0036 JMPF R7 #003D
|
||||
0x8C1C0907, // 0037 GETMET R7 R4 K7
|
||||
0x8824090C, // 0038 GETMBR R9 R4 K12
|
||||
0x5828000D, // 0039 LDCONST R10 K13
|
||||
0x7C1C0600, // 003A CALL R7 3
|
||||
0x80040E00, // 003B RET 1 R7
|
||||
0x70020007, // 003C JMP #0045
|
||||
0x541EFFFC, // 003D LDINT R7 65533
|
||||
0x1C1C0C07, // 003E EQ R7 R6 R7
|
||||
0x781E0004, // 003F JMPF R7 #0045
|
||||
0x8C1C0907, // 0040 GETMET R7 R4 K7
|
||||
0x8824090C, // 0041 GETMBR R9 R4 K12
|
||||
0x542A0004, // 0042 LDINT R10 5
|
||||
0x7C1C0600, // 0043 CALL R7 3
|
||||
0x80040E00, // 0044 RET 1 R7
|
||||
0x70020007, // 0045 JMP #004E
|
||||
0x601C0003, // 0046 GETGBL R7 G3
|
||||
0x5C200000, // 0047 MOVE R8 R0
|
||||
0x7C1C0200, // 0048 CALL R7 1
|
||||
0x8C1C0F0E, // 0049 GETMET R7 R7 K14
|
||||
0x5C240200, // 004A MOVE R9 R1
|
||||
0x5C280400, // 004B MOVE R10 R2
|
||||
0x7C1C0600, // 004C CALL R7 3
|
||||
0x80040E00, // 004D RET 1 R7
|
||||
0x80000000, // 004E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -19,25 +19,26 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_nested_str_weak(create_TLV),
|
||||
/* K6 */ be_nested_str_weak(U1),
|
||||
/* K7 */ be_nested_str_weak(shadow_ct),
|
||||
/* K8 */ be_const_int(2),
|
||||
/* K9 */ be_const_int(0),
|
||||
/* K10 */ be_nested_str_weak(ct_min),
|
||||
/* K11 */ be_nested_str_weak(ct_max),
|
||||
/* K12 */ be_nested_str_weak(U4),
|
||||
/* K13 */ be_nested_str_weak(read_attribute),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_nested_str_weak(create_TLV),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(shadow_ct),
|
||||
/* 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[80]) { /* code */
|
||||
( &(const binstruction[82]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
|
@ -45,79 +46,81 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
|
|||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E02FF, // 0005 LDINT R7 768
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E003E, // 0007 JMPF R7 #0047
|
||||
0x541E0006, // 0008 LDINT R7 7
|
||||
0x1C1C0C07, // 0009 EQ R7 R6 R7
|
||||
0x781E0005, // 000A JMPF R7 #0011
|
||||
0x8C1C0905, // 000B GETMET R7 R4 K5
|
||||
0x88240906, // 000C GETMBR R9 R4 K6
|
||||
0x88280107, // 000D GETMBR R10 R0 K7
|
||||
0x7C1C0600, // 000E CALL R7 3
|
||||
0x80040E00, // 000F RET 1 R7
|
||||
0x70020034, // 0010 JMP #0046
|
||||
0x541E0007, // 0011 LDINT R7 8
|
||||
0x1C1C0C07, // 0012 EQ R7 R6 R7
|
||||
0x781E0005, // 0013 JMPF R7 #001A
|
||||
0x8C1C0905, // 0014 GETMET R7 R4 K5
|
||||
0x88240906, // 0015 GETMBR R9 R4 K6
|
||||
0x58280008, // 0016 LDCONST R10 K8
|
||||
0x7C1C0600, // 0017 CALL R7 3
|
||||
0x80040E00, // 0018 RET 1 R7
|
||||
0x7002002B, // 0019 JMP #0046
|
||||
0x541E000E, // 001A LDINT R7 15
|
||||
0x1C1C0C07, // 001B EQ R7 R6 R7
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0905, // 001D GETMET R7 R4 K5
|
||||
0x88240906, // 001E GETMBR R9 R4 K6
|
||||
0x58280009, // 001F LDCONST R10 K9
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020022, // 0022 JMP #0046
|
||||
0x541E400A, // 0023 LDINT R7 16395
|
||||
0x1C1C0C07, // 0024 EQ R7 R6 R7
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0905, // 0026 GETMET R7 R4 K5
|
||||
0x88240906, // 0027 GETMBR R9 R4 K6
|
||||
0x8828010A, // 0028 GETMBR R10 R0 K10
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020019, // 002B JMP #0046
|
||||
0x541E400B, // 002C LDINT R7 16396
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0905, // 002F GETMET R7 R4 K5
|
||||
0x88240906, // 0030 GETMBR R9 R4 K6
|
||||
0x8828010B, // 0031 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x70020010, // 0034 JMP #0046
|
||||
0x541EFFFB, // 0035 LDINT R7 65532
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0005, // 0037 JMPF R7 #003E
|
||||
0x8C1C0905, // 0038 GETMET R7 R4 K5
|
||||
0x8824090C, // 0039 GETMBR R9 R4 K12
|
||||
0x542A000F, // 003A LDINT R10 16
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020007, // 003D JMP #0046
|
||||
0x541EFFFC, // 003E LDINT R7 65533
|
||||
0x1C1C0C07, // 003F EQ R7 R6 R7
|
||||
0x781E0004, // 0040 JMPF R7 #0046
|
||||
0x8C1C0905, // 0041 GETMET R7 R4 K5
|
||||
0x8824090C, // 0042 GETMBR R9 R4 K12
|
||||
0x542A0004, // 0043 LDINT R10 5
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x70020007, // 0046 JMP #004F
|
||||
0x601C0003, // 0047 GETGBL R7 G3
|
||||
0x5C200000, // 0048 MOVE R8 R0
|
||||
0x7C1C0200, // 0049 CALL R7 1
|
||||
0x8C1C0F0D, // 004A GETMET R7 R7 K13
|
||||
0x5C240200, // 004B MOVE R9 R1
|
||||
0x5C280400, // 004C MOVE R10 R2
|
||||
0x7C1C0600, // 004D CALL R7 3
|
||||
0x80040E00, // 004E RET 1 R7
|
||||
0x80000000, // 004F RET 0
|
||||
0x781E0040, // 0007 JMPF R7 #0049
|
||||
0x8C1C0105, // 0008 GETMET R7 R0 K5
|
||||
0x7C1C0200, // 0009 CALL R7 1
|
||||
0x541E0006, // 000A LDINT R7 7
|
||||
0x1C1C0C07, // 000B EQ R7 R6 R7
|
||||
0x781E0005, // 000C JMPF R7 #0013
|
||||
0x8C1C0906, // 000D GETMET R7 R4 K6
|
||||
0x88240907, // 000E GETMBR R9 R4 K7
|
||||
0x88280108, // 000F GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 0010 CALL R7 3
|
||||
0x80040E00, // 0011 RET 1 R7
|
||||
0x70020034, // 0012 JMP #0048
|
||||
0x541E0007, // 0013 LDINT R7 8
|
||||
0x1C1C0C07, // 0014 EQ R7 R6 R7
|
||||
0x781E0005, // 0015 JMPF R7 #001C
|
||||
0x8C1C0906, // 0016 GETMET R7 R4 K6
|
||||
0x88240907, // 0017 GETMBR R9 R4 K7
|
||||
0x58280009, // 0018 LDCONST R10 K9
|
||||
0x7C1C0600, // 0019 CALL R7 3
|
||||
0x80040E00, // 001A RET 1 R7
|
||||
0x7002002B, // 001B JMP #0048
|
||||
0x541E000E, // 001C LDINT R7 15
|
||||
0x1C1C0C07, // 001D EQ R7 R6 R7
|
||||
0x781E0005, // 001E JMPF R7 #0025
|
||||
0x8C1C0906, // 001F GETMET R7 R4 K6
|
||||
0x88240907, // 0020 GETMBR R9 R4 K7
|
||||
0x5828000A, // 0021 LDCONST R10 K10
|
||||
0x7C1C0600, // 0022 CALL R7 3
|
||||
0x80040E00, // 0023 RET 1 R7
|
||||
0x70020022, // 0024 JMP #0048
|
||||
0x541E400A, // 0025 LDINT R7 16395
|
||||
0x1C1C0C07, // 0026 EQ R7 R6 R7
|
||||
0x781E0005, // 0027 JMPF R7 #002E
|
||||
0x8C1C0906, // 0028 GETMET R7 R4 K6
|
||||
0x88240907, // 0029 GETMBR R9 R4 K7
|
||||
0x8828010B, // 002A GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 002B CALL R7 3
|
||||
0x80040E00, // 002C RET 1 R7
|
||||
0x70020019, // 002D JMP #0048
|
||||
0x541E400B, // 002E LDINT R7 16396
|
||||
0x1C1C0C07, // 002F EQ R7 R6 R7
|
||||
0x781E0005, // 0030 JMPF R7 #0037
|
||||
0x8C1C0906, // 0031 GETMET R7 R4 K6
|
||||
0x88240907, // 0032 GETMBR R9 R4 K7
|
||||
0x8828010C, // 0033 GETMBR R10 R0 K12
|
||||
0x7C1C0600, // 0034 CALL R7 3
|
||||
0x80040E00, // 0035 RET 1 R7
|
||||
0x70020010, // 0036 JMP #0048
|
||||
0x541EFFFB, // 0037 LDINT R7 65532
|
||||
0x1C1C0C07, // 0038 EQ R7 R6 R7
|
||||
0x781E0005, // 0039 JMPF R7 #0040
|
||||
0x8C1C0906, // 003A GETMET R7 R4 K6
|
||||
0x8824090D, // 003B GETMBR R9 R4 K13
|
||||
0x542A000F, // 003C LDINT R10 16
|
||||
0x7C1C0600, // 003D CALL R7 3
|
||||
0x80040E00, // 003E RET 1 R7
|
||||
0x70020007, // 003F JMP #0048
|
||||
0x541EFFFC, // 0040 LDINT R7 65533
|
||||
0x1C1C0C07, // 0041 EQ R7 R6 R7
|
||||
0x781E0004, // 0042 JMPF R7 #0048
|
||||
0x8C1C0906, // 0043 GETMET R7 R4 K6
|
||||
0x8824090D, // 0044 GETMBR R9 R4 K13
|
||||
0x542A0004, // 0045 LDINT R10 5
|
||||
0x7C1C0600, // 0046 CALL R7 3
|
||||
0x80040E00, // 0047 RET 1 R7
|
||||
0x70020007, // 0048 JMP #0051
|
||||
0x601C0003, // 0049 GETGBL R7 G3
|
||||
0x5C200000, // 004A MOVE R8 R0
|
||||
0x7C1C0200, // 004B CALL R7 1
|
||||
0x8C1C0F0E, // 004C GETMET R7 R7 K14
|
||||
0x5C240200, // 004D MOVE R9 R1
|
||||
0x5C280400, // 004E MOVE R10 R2
|
||||
0x7C1C0600, // 004F CALL R7 3
|
||||
0x80040E00, // 0050 RET 1 R7
|
||||
0x80000000, // 0051 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -129,7 +132,7 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
8, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -149,7 +152,7 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
|
|||
}),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[28]) { /* code */
|
||||
( &(const binstruction[27]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080101, // 0001 GETMET R2 R0 K1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
|
@ -170,14 +173,13 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
|
|||
0x880C0106, // 0011 GETMBR R3 R0 K6
|
||||
0x88100106, // 0012 GETMBR R4 R0 K6
|
||||
0x20100604, // 0013 NE R4 R3 R4
|
||||
0x78120005, // 0014 JMPF R4 #001B
|
||||
0x78120004, // 0014 JMPF R4 #001A
|
||||
0x8C100107, // 0015 GETMET R4 R0 K7
|
||||
0x4C180000, // 0016 LDNIL R6
|
||||
0x541E02FF, // 0017 LDINT R7 768
|
||||
0x54220006, // 0018 LDINT R8 7
|
||||
0x7C100800, // 0019 CALL R4 4
|
||||
0x90020C03, // 001A SETMBR R0 K6 R3
|
||||
0x80000000, // 001B RET 0
|
||||
0x541A02FF, // 0016 LDINT R6 768
|
||||
0x541E0006, // 0017 LDINT R7 7
|
||||
0x7C100600, // 0018 CALL R4 3
|
||||
0x90020C03, // 0019 SETMBR R0 K6 R3
|
||||
0x80000000, // 001A RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -280,26 +282,27 @@ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_nested_str_weak(findsubval),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(ct_min),
|
||||
/* K8 */ be_nested_str_weak(ct_max),
|
||||
/* K9 */ be_nested_str_weak(set),
|
||||
/* K10 */ be_nested_str_weak(ct),
|
||||
/* K11 */ be_nested_str_weak(update_shadow),
|
||||
/* K12 */ be_nested_str_weak(log),
|
||||
/* K13 */ be_nested_str_weak(ct_X3A),
|
||||
/* K14 */ be_nested_str_weak(invoke_request),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_nested_str_weak(findsubval),
|
||||
/* K7 */ be_const_int(0),
|
||||
/* K8 */ be_nested_str_weak(ct_min),
|
||||
/* K9 */ be_nested_str_weak(ct_max),
|
||||
/* K10 */ be_nested_str_weak(set),
|
||||
/* K11 */ be_nested_str_weak(ct),
|
||||
/* K12 */ be_nested_str_weak(update_shadow),
|
||||
/* K13 */ be_nested_str_weak(log),
|
||||
/* K14 */ be_nested_str_weak(ct_X3A),
|
||||
/* K15 */ be_nested_str_weak(invoke_request),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[65]) { /* code */
|
||||
( &(const binstruction[67]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
|
@ -307,64 +310,66 @@ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
|
|||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x542202FF, // 0005 LDINT R8 768
|
||||
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||
0x7822002E, // 0007 JMPF R8 #0037
|
||||
0x54220009, // 0008 LDINT R8 10
|
||||
0x1C200E08, // 0009 EQ R8 R7 R8
|
||||
0x78220019, // 000A JMPF R8 #0025
|
||||
0x8C200505, // 000B GETMET R8 R2 K5
|
||||
0x58280006, // 000C LDCONST R10 K6
|
||||
0x7C200400, // 000D CALL R8 2
|
||||
0x88240107, // 000E GETMBR R9 R0 K7
|
||||
0x14241009, // 000F LT R9 R8 R9
|
||||
0x78260000, // 0010 JMPF R9 #0012
|
||||
0x88200107, // 0011 GETMBR R8 R0 K7
|
||||
0x88240108, // 0012 GETMBR R9 R0 K8
|
||||
0x24241009, // 0013 GT R9 R8 R9
|
||||
0x78260000, // 0014 JMPF R9 #0016
|
||||
0x88200108, // 0015 GETMBR R8 R0 K8
|
||||
0x8C240909, // 0016 GETMET R9 R4 K9
|
||||
0x602C0013, // 0017 GETGBL R11 G19
|
||||
0x7C2C0000, // 0018 CALL R11 0
|
||||
0x982E1408, // 0019 SETIDX R11 K10 R8
|
||||
0x7C240400, // 001A CALL R9 2
|
||||
0x8C24010B, // 001B GETMET R9 R0 K11
|
||||
0x7C240200, // 001C CALL R9 1
|
||||
0x60240008, // 001D GETGBL R9 G8
|
||||
0x5C281000, // 001E MOVE R10 R8
|
||||
0x7C240200, // 001F CALL R9 1
|
||||
0x00261A09, // 0020 ADD R9 K13 R9
|
||||
0x900E1809, // 0021 SETMBR R3 K12 R9
|
||||
0x50240200, // 0022 LDBOOL R9 1 0
|
||||
0x80041200, // 0023 RET 1 R9
|
||||
0x70020010, // 0024 JMP #0036
|
||||
0x54220046, // 0025 LDINT R8 71
|
||||
0x1C200E08, // 0026 EQ R8 R7 R8
|
||||
0x78220002, // 0027 JMPF R8 #002B
|
||||
0x50200200, // 0028 LDBOOL R8 1 0
|
||||
0x80041000, // 0029 RET 1 R8
|
||||
0x7002000A, // 002A JMP #0036
|
||||
0x5422004A, // 002B LDINT R8 75
|
||||
0x1C200E08, // 002C EQ R8 R7 R8
|
||||
0x78220002, // 002D JMPF R8 #0031
|
||||
0x50200200, // 002E LDBOOL R8 1 0
|
||||
0x80041000, // 002F RET 1 R8
|
||||
0x70020004, // 0030 JMP #0036
|
||||
0x5422004B, // 0031 LDINT R8 76
|
||||
0x1C200E08, // 0032 EQ R8 R7 R8
|
||||
0x78220001, // 0033 JMPF R8 #0036
|
||||
0x50200200, // 0034 LDBOOL R8 1 0
|
||||
0x80041000, // 0035 RET 1 R8
|
||||
0x70020008, // 0036 JMP #0040
|
||||
0x60200003, // 0037 GETGBL R8 G3
|
||||
0x5C240000, // 0038 MOVE R9 R0
|
||||
0x7C200200, // 0039 CALL R8 1
|
||||
0x8C20110E, // 003A GETMET R8 R8 K14
|
||||
0x5C280200, // 003B MOVE R10 R1
|
||||
0x5C2C0400, // 003C MOVE R11 R2
|
||||
0x5C300600, // 003D MOVE R12 R3
|
||||
0x7C200800, // 003E CALL R8 4
|
||||
0x80041000, // 003F RET 1 R8
|
||||
0x80000000, // 0040 RET 0
|
||||
0x78220030, // 0007 JMPF R8 #0039
|
||||
0x8C200105, // 0008 GETMET R8 R0 K5
|
||||
0x7C200200, // 0009 CALL R8 1
|
||||
0x54220009, // 000A LDINT R8 10
|
||||
0x1C200E08, // 000B EQ R8 R7 R8
|
||||
0x78220019, // 000C JMPF R8 #0027
|
||||
0x8C200506, // 000D GETMET R8 R2 K6
|
||||
0x58280007, // 000E LDCONST R10 K7
|
||||
0x7C200400, // 000F CALL R8 2
|
||||
0x88240108, // 0010 GETMBR R9 R0 K8
|
||||
0x14241009, // 0011 LT R9 R8 R9
|
||||
0x78260000, // 0012 JMPF R9 #0014
|
||||
0x88200108, // 0013 GETMBR R8 R0 K8
|
||||
0x88240109, // 0014 GETMBR R9 R0 K9
|
||||
0x24241009, // 0015 GT R9 R8 R9
|
||||
0x78260000, // 0016 JMPF R9 #0018
|
||||
0x88200109, // 0017 GETMBR R8 R0 K9
|
||||
0x8C24090A, // 0018 GETMET R9 R4 K10
|
||||
0x602C0013, // 0019 GETGBL R11 G19
|
||||
0x7C2C0000, // 001A CALL R11 0
|
||||
0x982E1608, // 001B SETIDX R11 K11 R8
|
||||
0x7C240400, // 001C CALL R9 2
|
||||
0x8C24010C, // 001D GETMET R9 R0 K12
|
||||
0x7C240200, // 001E CALL R9 1
|
||||
0x60240008, // 001F GETGBL R9 G8
|
||||
0x5C281000, // 0020 MOVE R10 R8
|
||||
0x7C240200, // 0021 CALL R9 1
|
||||
0x00261C09, // 0022 ADD R9 K14 R9
|
||||
0x900E1A09, // 0023 SETMBR R3 K13 R9
|
||||
0x50240200, // 0024 LDBOOL R9 1 0
|
||||
0x80041200, // 0025 RET 1 R9
|
||||
0x70020010, // 0026 JMP #0038
|
||||
0x54220046, // 0027 LDINT R8 71
|
||||
0x1C200E08, // 0028 EQ R8 R7 R8
|
||||
0x78220002, // 0029 JMPF R8 #002D
|
||||
0x50200200, // 002A LDBOOL R8 1 0
|
||||
0x80041000, // 002B RET 1 R8
|
||||
0x7002000A, // 002C JMP #0038
|
||||
0x5422004A, // 002D LDINT R8 75
|
||||
0x1C200E08, // 002E EQ R8 R7 R8
|
||||
0x78220002, // 002F JMPF R8 #0033
|
||||
0x50200200, // 0030 LDBOOL R8 1 0
|
||||
0x80041000, // 0031 RET 1 R8
|
||||
0x70020004, // 0032 JMP #0038
|
||||
0x5422004B, // 0033 LDINT R8 76
|
||||
0x1C200E08, // 0034 EQ R8 R7 R8
|
||||
0x78220001, // 0035 JMPF R8 #0038
|
||||
0x50200200, // 0036 LDBOOL R8 1 0
|
||||
0x80041000, // 0037 RET 1 R8
|
||||
0x70020008, // 0038 JMP #0042
|
||||
0x60200003, // 0039 GETGBL R8 G3
|
||||
0x5C240000, // 003A MOVE R9 R0
|
||||
0x7C200200, // 003B CALL R8 1
|
||||
0x8C20110F, // 003C GETMET R8 R8 K15
|
||||
0x5C280200, // 003D MOVE R10 R1
|
||||
0x5C2C0400, // 003E MOVE R11 R2
|
||||
0x5C300600, // 003F MOVE R12 R3
|
||||
0x7C200800, // 0040 CALL R8 4
|
||||
0x80041000, // 0041 RET 1 R8
|
||||
0x80000000, // 0042 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -36,7 +36,7 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
|
|||
}),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[63]) { /* code */
|
||||
( &(const binstruction[61]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x60080003, // 0001 GETGBL R2 G3
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
|
@ -83,23 +83,21 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
|
|||
0x8810010A, // 002B GETMBR R4 R0 K10
|
||||
0x88140109, // 002C GETMBR R5 R0 K9
|
||||
0x20140605, // 002D NE R5 R3 R5
|
||||
0x78160005, // 002E JMPF R5 #0035
|
||||
0x78160004, // 002E JMPF R5 #0034
|
||||
0x8C14010B, // 002F GETMET R5 R0 K11
|
||||
0x4C1C0000, // 0030 LDNIL R7
|
||||
0x542202FF, // 0031 LDINT R8 768
|
||||
0x58240008, // 0032 LDCONST R9 K8
|
||||
0x7C140800, // 0033 CALL R5 4
|
||||
0x90021203, // 0034 SETMBR R0 K9 R3
|
||||
0x8814010A, // 0035 GETMBR R5 R0 K10
|
||||
0x20140805, // 0036 NE R5 R4 R5
|
||||
0x78160005, // 0037 JMPF R5 #003E
|
||||
0x8C14010B, // 0038 GETMET R5 R0 K11
|
||||
0x4C1C0000, // 0039 LDNIL R7
|
||||
0x542202FF, // 003A LDINT R8 768
|
||||
0x5824000C, // 003B LDCONST R9 K12
|
||||
0x7C140800, // 003C CALL R5 4
|
||||
0x90021404, // 003D SETMBR R0 K10 R4
|
||||
0x80000000, // 003E RET 0
|
||||
0x541E02FF, // 0030 LDINT R7 768
|
||||
0x58200008, // 0031 LDCONST R8 K8
|
||||
0x7C140600, // 0032 CALL R5 3
|
||||
0x90021203, // 0033 SETMBR R0 K9 R3
|
||||
0x8814010A, // 0034 GETMBR R5 R0 K10
|
||||
0x20140805, // 0035 NE R5 R4 R5
|
||||
0x78160004, // 0036 JMPF R5 #003C
|
||||
0x8C14010B, // 0037 GETMET R5 R0 K11
|
||||
0x541E02FF, // 0038 LDINT R7 768
|
||||
0x5820000C, // 0039 LDCONST R8 K12
|
||||
0x7C140600, // 003A CALL R5 3
|
||||
0x90021404, // 003B SETMBR R0 K10 R4
|
||||
0x80000000, // 003C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -119,24 +117,25 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(create_TLV),
|
||||
/* K7 */ be_nested_str_weak(U1),
|
||||
/* K8 */ be_nested_str_weak(shadow_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),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(U1),
|
||||
/* K9 */ be_nested_str_weak(shadow_hue),
|
||||
/* 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[105]) { /* code */
|
||||
( &(const binstruction[107]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
|
@ -144,104 +143,106 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
|
|||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E02FF, // 0005 LDINT R7 768
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E0057, // 0007 JMPF R7 #0060
|
||||
0x1C1C0D05, // 0008 EQ R7 R6 K5
|
||||
0x781E0005, // 0009 JMPF R7 #0010
|
||||
0x8C1C0906, // 000A GETMET R7 R4 K6
|
||||
0x88240907, // 000B GETMBR R9 R4 K7
|
||||
0x88280108, // 000C GETMBR R10 R0 K8
|
||||
0x7C1C0600, // 000D CALL R7 3
|
||||
0x80040E00, // 000E RET 1 R7
|
||||
0x7002004E, // 000F JMP #005F
|
||||
0x1C1C0D09, // 0010 EQ R7 R6 K9
|
||||
0x781E0005, // 0011 JMPF R7 #0018
|
||||
0x8C1C0906, // 0012 GETMET R7 R4 K6
|
||||
0x88240907, // 0013 GETMBR R9 R4 K7
|
||||
0x8828010A, // 0014 GETMBR R10 R0 K10
|
||||
0x7C1C0600, // 0015 CALL R7 3
|
||||
0x80040E00, // 0016 RET 1 R7
|
||||
0x70020046, // 0017 JMP #005F
|
||||
0x541E0006, // 0018 LDINT R7 7
|
||||
0x1C1C0C07, // 0019 EQ R7 R6 R7
|
||||
0x781E0005, // 001A JMPF R7 #0021
|
||||
0x8C1C0906, // 001B GETMET R7 R4 K6
|
||||
0x88240907, // 001C GETMBR R9 R4 K7
|
||||
0x58280005, // 001D LDCONST R10 K5
|
||||
0x7C1C0600, // 001E CALL R7 3
|
||||
0x80040E00, // 001F RET 1 R7
|
||||
0x7002003D, // 0020 JMP #005F
|
||||
0x541E0007, // 0021 LDINT R7 8
|
||||
0x1C1C0C07, // 0022 EQ R7 R6 R7
|
||||
0x781E0005, // 0023 JMPF R7 #002A
|
||||
0x8C1C0906, // 0024 GETMET R7 R4 K6
|
||||
0x88240907, // 0025 GETMBR R9 R4 K7
|
||||
0x58280005, // 0026 LDCONST R10 K5
|
||||
0x7C1C0600, // 0027 CALL R7 3
|
||||
0x80040E00, // 0028 RET 1 R7
|
||||
0x70020034, // 0029 JMP #005F
|
||||
0x541E000E, // 002A LDINT R7 15
|
||||
0x1C1C0C07, // 002B EQ R7 R6 R7
|
||||
0x781E0005, // 002C JMPF R7 #0033
|
||||
0x8C1C0906, // 002D GETMET R7 R4 K6
|
||||
0x88240907, // 002E GETMBR R9 R4 K7
|
||||
0x58280005, // 002F LDCONST R10 K5
|
||||
0x7C1C0600, // 0030 CALL R7 3
|
||||
0x80040E00, // 0031 RET 1 R7
|
||||
0x7002002B, // 0032 JMP #005F
|
||||
0x541E4000, // 0033 LDINT R7 16385
|
||||
0x1C1C0C07, // 0034 EQ R7 R6 R7
|
||||
0x781E0005, // 0035 JMPF R7 #003C
|
||||
0x8C1C0906, // 0036 GETMET R7 R4 K6
|
||||
0x88240907, // 0037 GETMBR R9 R4 K7
|
||||
0x58280005, // 0038 LDCONST R10 K5
|
||||
0x7C1C0600, // 0039 CALL R7 3
|
||||
0x80040E00, // 003A RET 1 R7
|
||||
0x70020022, // 003B JMP #005F
|
||||
0x541E4009, // 003C LDINT R7 16394
|
||||
0x1C1C0C07, // 003D EQ R7 R6 R7
|
||||
0x781E0005, // 003E JMPF R7 #0045
|
||||
0x8C1C0906, // 003F GETMET R7 R4 K6
|
||||
0x88240907, // 0040 GETMBR R9 R4 K7
|
||||
0x58280005, // 0041 LDCONST R10 K5
|
||||
0x7C1C0600, // 0042 CALL R7 3
|
||||
0x80040E00, // 0043 RET 1 R7
|
||||
0x70020019, // 0044 JMP #005F
|
||||
0x541E000F, // 0045 LDINT R7 16
|
||||
0x1C1C0C07, // 0046 EQ R7 R6 R7
|
||||
0x781E0005, // 0047 JMPF R7 #004E
|
||||
0x8C1C0906, // 0048 GETMET R7 R4 K6
|
||||
0x88240907, // 0049 GETMBR R9 R4 K7
|
||||
0x58280005, // 004A LDCONST R10 K5
|
||||
0x7C1C0600, // 004B CALL R7 3
|
||||
0x80040E00, // 004C RET 1 R7
|
||||
0x70020010, // 004D JMP #005F
|
||||
0x541EFFFB, // 004E LDINT R7 65532
|
||||
0x1C1C0C07, // 004F EQ R7 R6 R7
|
||||
0x781E0005, // 0050 JMPF R7 #0057
|
||||
0x8C1C0906, // 0051 GETMET R7 R4 K6
|
||||
0x8824090B, // 0052 GETMBR R9 R4 K11
|
||||
0x58280009, // 0053 LDCONST R10 K9
|
||||
0x7C1C0600, // 0054 CALL R7 3
|
||||
0x80040E00, // 0055 RET 1 R7
|
||||
0x70020007, // 0056 JMP #005F
|
||||
0x541EFFFC, // 0057 LDINT R7 65533
|
||||
0x1C1C0C07, // 0058 EQ R7 R6 R7
|
||||
0x781E0004, // 0059 JMPF R7 #005F
|
||||
0x8C1C0906, // 005A GETMET R7 R4 K6
|
||||
0x8824090B, // 005B GETMBR R9 R4 K11
|
||||
0x542A0004, // 005C LDINT R10 5
|
||||
0x7C1C0600, // 005D CALL R7 3
|
||||
0x80040E00, // 005E RET 1 R7
|
||||
0x70020007, // 005F JMP #0068
|
||||
0x601C0003, // 0060 GETGBL R7 G3
|
||||
0x5C200000, // 0061 MOVE R8 R0
|
||||
0x7C1C0200, // 0062 CALL R7 1
|
||||
0x8C1C0F0C, // 0063 GETMET R7 R7 K12
|
||||
0x5C240200, // 0064 MOVE R9 R1
|
||||
0x5C280400, // 0065 MOVE R10 R2
|
||||
0x7C1C0600, // 0066 CALL R7 3
|
||||
0x80040E00, // 0067 RET 1 R7
|
||||
0x80000000, // 0068 RET 0
|
||||
0x781E0059, // 0007 JMPF R7 #0062
|
||||
0x8C1C0105, // 0008 GETMET R7 R0 K5
|
||||
0x7C1C0200, // 0009 CALL R7 1
|
||||
0x1C1C0D06, // 000A EQ R7 R6 K6
|
||||
0x781E0005, // 000B JMPF R7 #0012
|
||||
0x8C1C0907, // 000C GETMET R7 R4 K7
|
||||
0x88240908, // 000D GETMBR R9 R4 K8
|
||||
0x88280109, // 000E GETMBR R10 R0 K9
|
||||
0x7C1C0600, // 000F CALL R7 3
|
||||
0x80040E00, // 0010 RET 1 R7
|
||||
0x7002004E, // 0011 JMP #0061
|
||||
0x1C1C0D0A, // 0012 EQ R7 R6 K10
|
||||
0x781E0005, // 0013 JMPF R7 #001A
|
||||
0x8C1C0907, // 0014 GETMET R7 R4 K7
|
||||
0x88240908, // 0015 GETMBR R9 R4 K8
|
||||
0x8828010B, // 0016 GETMBR R10 R0 K11
|
||||
0x7C1C0600, // 0017 CALL R7 3
|
||||
0x80040E00, // 0018 RET 1 R7
|
||||
0x70020046, // 0019 JMP #0061
|
||||
0x541E0006, // 001A LDINT R7 7
|
||||
0x1C1C0C07, // 001B EQ R7 R6 R7
|
||||
0x781E0005, // 001C JMPF R7 #0023
|
||||
0x8C1C0907, // 001D GETMET R7 R4 K7
|
||||
0x88240908, // 001E GETMBR R9 R4 K8
|
||||
0x58280006, // 001F LDCONST R10 K6
|
||||
0x7C1C0600, // 0020 CALL R7 3
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x7002003D, // 0022 JMP #0061
|
||||
0x541E0007, // 0023 LDINT R7 8
|
||||
0x1C1C0C07, // 0024 EQ R7 R6 R7
|
||||
0x781E0005, // 0025 JMPF R7 #002C
|
||||
0x8C1C0907, // 0026 GETMET R7 R4 K7
|
||||
0x88240908, // 0027 GETMBR R9 R4 K8
|
||||
0x58280006, // 0028 LDCONST R10 K6
|
||||
0x7C1C0600, // 0029 CALL R7 3
|
||||
0x80040E00, // 002A RET 1 R7
|
||||
0x70020034, // 002B JMP #0061
|
||||
0x541E000E, // 002C LDINT R7 15
|
||||
0x1C1C0C07, // 002D EQ R7 R6 R7
|
||||
0x781E0005, // 002E JMPF R7 #0035
|
||||
0x8C1C0907, // 002F GETMET R7 R4 K7
|
||||
0x88240908, // 0030 GETMBR R9 R4 K8
|
||||
0x58280006, // 0031 LDCONST R10 K6
|
||||
0x7C1C0600, // 0032 CALL R7 3
|
||||
0x80040E00, // 0033 RET 1 R7
|
||||
0x7002002B, // 0034 JMP #0061
|
||||
0x541E4000, // 0035 LDINT R7 16385
|
||||
0x1C1C0C07, // 0036 EQ R7 R6 R7
|
||||
0x781E0005, // 0037 JMPF R7 #003E
|
||||
0x8C1C0907, // 0038 GETMET R7 R4 K7
|
||||
0x88240908, // 0039 GETMBR R9 R4 K8
|
||||
0x58280006, // 003A LDCONST R10 K6
|
||||
0x7C1C0600, // 003B CALL R7 3
|
||||
0x80040E00, // 003C RET 1 R7
|
||||
0x70020022, // 003D JMP #0061
|
||||
0x541E4009, // 003E LDINT R7 16394
|
||||
0x1C1C0C07, // 003F EQ R7 R6 R7
|
||||
0x781E0005, // 0040 JMPF R7 #0047
|
||||
0x8C1C0907, // 0041 GETMET R7 R4 K7
|
||||
0x88240908, // 0042 GETMBR R9 R4 K8
|
||||
0x58280006, // 0043 LDCONST R10 K6
|
||||
0x7C1C0600, // 0044 CALL R7 3
|
||||
0x80040E00, // 0045 RET 1 R7
|
||||
0x70020019, // 0046 JMP #0061
|
||||
0x541E000F, // 0047 LDINT R7 16
|
||||
0x1C1C0C07, // 0048 EQ R7 R6 R7
|
||||
0x781E0005, // 0049 JMPF R7 #0050
|
||||
0x8C1C0907, // 004A GETMET R7 R4 K7
|
||||
0x88240908, // 004B GETMBR R9 R4 K8
|
||||
0x58280006, // 004C LDCONST R10 K6
|
||||
0x7C1C0600, // 004D CALL R7 3
|
||||
0x80040E00, // 004E RET 1 R7
|
||||
0x70020010, // 004F JMP #0061
|
||||
0x541EFFFB, // 0050 LDINT R7 65532
|
||||
0x1C1C0C07, // 0051 EQ R7 R6 R7
|
||||
0x781E0005, // 0052 JMPF R7 #0059
|
||||
0x8C1C0907, // 0053 GETMET R7 R4 K7
|
||||
0x8824090C, // 0054 GETMBR R9 R4 K12
|
||||
0x5828000A, // 0055 LDCONST R10 K10
|
||||
0x7C1C0600, // 0056 CALL R7 3
|
||||
0x80040E00, // 0057 RET 1 R7
|
||||
0x70020007, // 0058 JMP #0061
|
||||
0x541EFFFC, // 0059 LDINT R7 65533
|
||||
0x1C1C0C07, // 005A EQ R7 R6 R7
|
||||
0x781E0004, // 005B JMPF R7 #0061
|
||||
0x8C1C0907, // 005C GETMET R7 R4 K7
|
||||
0x8824090C, // 005D GETMBR R9 R4 K12
|
||||
0x542A0004, // 005E LDINT R10 5
|
||||
0x7C1C0600, // 005F CALL R7 3
|
||||
0x80040E00, // 0060 RET 1 R7
|
||||
0x70020007, // 0061 JMP #006A
|
||||
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
|
||||
0x7C1C0600, // 0068 CALL R7 3
|
||||
0x80040E00, // 0069 RET 1 R7
|
||||
0x80000000, // 006A RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -300,32 +301,33 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[21]) { /* constants */
|
||||
( &(const bvalue[22]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(findsubval),
|
||||
/* K7 */ be_nested_str_weak(tasmota),
|
||||
/* K8 */ be_nested_str_weak(scale_uint),
|
||||
/* K9 */ be_nested_str_weak(set),
|
||||
/* K10 */ be_nested_str_weak(hue),
|
||||
/* K11 */ be_nested_str_weak(update_shadow),
|
||||
/* K12 */ be_nested_str_weak(log),
|
||||
/* K13 */ be_nested_str_weak(hue_X3A),
|
||||
/* K14 */ be_const_int(1),
|
||||
/* K15 */ be_const_int(2),
|
||||
/* K16 */ be_const_int(3),
|
||||
/* K17 */ be_nested_str_weak(sat),
|
||||
/* K18 */ be_nested_str_weak(sat_X3A),
|
||||
/* K19 */ be_nested_str_weak(_X20sat_X3A),
|
||||
/* K20 */ be_nested_str_weak(invoke_request),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(findsubval),
|
||||
/* K8 */ be_nested_str_weak(tasmota),
|
||||
/* K9 */ be_nested_str_weak(scale_uint),
|
||||
/* K10 */ be_nested_str_weak(set),
|
||||
/* K11 */ be_nested_str_weak(hue),
|
||||
/* K12 */ be_nested_str_weak(update_shadow),
|
||||
/* K13 */ be_nested_str_weak(log),
|
||||
/* K14 */ be_nested_str_weak(hue_X3A),
|
||||
/* K15 */ be_const_int(1),
|
||||
/* K16 */ be_const_int(2),
|
||||
/* K17 */ be_const_int(3),
|
||||
/* K18 */ be_nested_str_weak(sat),
|
||||
/* K19 */ be_nested_str_weak(sat_X3A),
|
||||
/* K20 */ be_nested_str_weak(_X20sat_X3A),
|
||||
/* K21 */ be_nested_str_weak(invoke_request),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[148]) { /* code */
|
||||
( &(const binstruction[150]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
|
@ -333,147 +335,149 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
|
|||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x542202FF, // 0005 LDINT R8 768
|
||||
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||
0x78220081, // 0007 JMPF R8 #008A
|
||||
0x1C200F05, // 0008 EQ R8 R7 K5
|
||||
0x78220019, // 0009 JMPF R8 #0024
|
||||
0x8C200506, // 000A GETMET R8 R2 K6
|
||||
0x58280005, // 000B LDCONST R10 K5
|
||||
0x7C200400, // 000C CALL R8 2
|
||||
0xB8260E00, // 000D GETNGBL R9 K7
|
||||
0x8C241308, // 000E GETMET R9 R9 K8
|
||||
0x5C2C1000, // 000F MOVE R11 R8
|
||||
0x58300005, // 0010 LDCONST R12 K5
|
||||
0x543600FD, // 0011 LDINT R13 254
|
||||
0x58380005, // 0012 LDCONST R14 K5
|
||||
0x543E0167, // 0013 LDINT R15 360
|
||||
0x7C240C00, // 0014 CALL R9 6
|
||||
0x8C280909, // 0015 GETMET R10 R4 K9
|
||||
0x60300013, // 0016 GETGBL R12 G19
|
||||
0x7C300000, // 0017 CALL R12 0
|
||||
0x98321409, // 0018 SETIDX R12 K10 R9
|
||||
0x7C280400, // 0019 CALL R10 2
|
||||
0x8C28010B, // 001A GETMET R10 R0 K11
|
||||
0x7C280200, // 001B CALL R10 1
|
||||
0x60280008, // 001C GETGBL R10 G8
|
||||
0x5C2C1000, // 001D MOVE R11 R8
|
||||
0x7C280200, // 001E CALL R10 1
|
||||
0x002A1A0A, // 001F ADD R10 K13 R10
|
||||
0x900E180A, // 0020 SETMBR R3 K12 R10
|
||||
0x50280200, // 0021 LDBOOL R10 1 0
|
||||
0x80041400, // 0022 RET 1 R10
|
||||
0x70020064, // 0023 JMP #0089
|
||||
0x1C200F0E, // 0024 EQ R8 R7 K14
|
||||
0x78220002, // 0025 JMPF R8 #0029
|
||||
0x50200200, // 0026 LDBOOL R8 1 0
|
||||
0x80041000, // 0027 RET 1 R8
|
||||
0x7002005F, // 0028 JMP #0089
|
||||
0x1C200F0F, // 0029 EQ R8 R7 K15
|
||||
0x78220002, // 002A JMPF R8 #002E
|
||||
0x50200200, // 002B LDBOOL R8 1 0
|
||||
0x80041000, // 002C RET 1 R8
|
||||
0x7002005A, // 002D JMP #0089
|
||||
0x1C200F10, // 002E EQ R8 R7 K16
|
||||
0x78220019, // 002F JMPF R8 #004A
|
||||
0x8C200506, // 0030 GETMET R8 R2 K6
|
||||
0x58280005, // 0031 LDCONST R10 K5
|
||||
0x7C200400, // 0032 CALL R8 2
|
||||
0xB8260E00, // 0033 GETNGBL R9 K7
|
||||
0x8C241308, // 0034 GETMET R9 R9 K8
|
||||
0x5C2C1000, // 0035 MOVE R11 R8
|
||||
0x58300005, // 0036 LDCONST R12 K5
|
||||
0x543600FD, // 0037 LDINT R13 254
|
||||
0x58380005, // 0038 LDCONST R14 K5
|
||||
0x543E00FE, // 0039 LDINT R15 255
|
||||
0x7C240C00, // 003A CALL R9 6
|
||||
0x8C280909, // 003B GETMET R10 R4 K9
|
||||
0x60300013, // 003C GETGBL R12 G19
|
||||
0x7C300000, // 003D CALL R12 0
|
||||
0x98322209, // 003E SETIDX R12 K17 R9
|
||||
0x7C280400, // 003F CALL R10 2
|
||||
0x8C28010B, // 0040 GETMET R10 R0 K11
|
||||
0x7C280200, // 0041 CALL R10 1
|
||||
0x60280008, // 0042 GETGBL R10 G8
|
||||
0x5C2C1000, // 0043 MOVE R11 R8
|
||||
0x7C280200, // 0044 CALL R10 1
|
||||
0x002A240A, // 0045 ADD R10 K18 R10
|
||||
0x900E180A, // 0046 SETMBR R3 K12 R10
|
||||
0x50280200, // 0047 LDBOOL R10 1 0
|
||||
0x80041400, // 0048 RET 1 R10
|
||||
0x7002003E, // 0049 JMP #0089
|
||||
0x54220003, // 004A LDINT R8 4
|
||||
0x1C200E08, // 004B EQ R8 R7 R8
|
||||
0x78220002, // 004C JMPF R8 #0050
|
||||
0x50200200, // 004D LDBOOL R8 1 0
|
||||
0x80041000, // 004E RET 1 R8
|
||||
0x70020038, // 004F JMP #0089
|
||||
0x54220004, // 0050 LDINT R8 5
|
||||
0x1C200E08, // 0051 EQ R8 R7 R8
|
||||
0x78220002, // 0052 JMPF R8 #0056
|
||||
0x50200200, // 0053 LDBOOL R8 1 0
|
||||
0x80041000, // 0054 RET 1 R8
|
||||
0x70020032, // 0055 JMP #0089
|
||||
0x54220005, // 0056 LDINT R8 6
|
||||
0x1C200E08, // 0057 EQ R8 R7 R8
|
||||
0x7822002A, // 0058 JMPF R8 #0084
|
||||
0x8C200506, // 0059 GETMET R8 R2 K6
|
||||
0x58280005, // 005A LDCONST R10 K5
|
||||
0x7C200400, // 005B CALL R8 2
|
||||
0xB8260E00, // 005C GETNGBL R9 K7
|
||||
0x8C241308, // 005D GETMET R9 R9 K8
|
||||
0x5C2C1000, // 005E MOVE R11 R8
|
||||
0x58300005, // 005F LDCONST R12 K5
|
||||
0x543600FD, // 0060 LDINT R13 254
|
||||
0x58380005, // 0061 LDCONST R14 K5
|
||||
0x543E0167, // 0062 LDINT R15 360
|
||||
0x7C240C00, // 0063 CALL R9 6
|
||||
0x8C280506, // 0064 GETMET R10 R2 K6
|
||||
0x5830000E, // 0065 LDCONST R12 K14
|
||||
0x7C280400, // 0066 CALL R10 2
|
||||
0xB82E0E00, // 0067 GETNGBL R11 K7
|
||||
0x8C2C1708, // 0068 GETMET R11 R11 K8
|
||||
0x5C341400, // 0069 MOVE R13 R10
|
||||
0x58380005, // 006A LDCONST R14 K5
|
||||
0x543E00FD, // 006B LDINT R15 254
|
||||
0x58400005, // 006C LDCONST R16 K5
|
||||
0x544600FE, // 006D LDINT R17 255
|
||||
0x7C2C0C00, // 006E CALL R11 6
|
||||
0x8C300909, // 006F GETMET R12 R4 K9
|
||||
0x60380013, // 0070 GETGBL R14 G19
|
||||
0x7C380000, // 0071 CALL R14 0
|
||||
0x983A1409, // 0072 SETIDX R14 K10 R9
|
||||
0x983A220B, // 0073 SETIDX R14 K17 R11
|
||||
0x7C300400, // 0074 CALL R12 2
|
||||
0x8C30010B, // 0075 GETMET R12 R0 K11
|
||||
0x7C300200, // 0076 CALL R12 1
|
||||
0x60300008, // 0077 GETGBL R12 G8
|
||||
0x5C341000, // 0078 MOVE R13 R8
|
||||
0x7C300200, // 0079 CALL R12 1
|
||||
0x00321A0C, // 007A ADD R12 K13 R12
|
||||
0x00301913, // 007B ADD R12 R12 K19
|
||||
0x60340008, // 007C GETGBL R13 G8
|
||||
0x5C381400, // 007D MOVE R14 R10
|
||||
0x7C340200, // 007E CALL R13 1
|
||||
0x0030180D, // 007F ADD R12 R12 R13
|
||||
0x900E180C, // 0080 SETMBR R3 K12 R12
|
||||
0x50300200, // 0081 LDBOOL R12 1 0
|
||||
0x80041800, // 0082 RET 1 R12
|
||||
0x70020004, // 0083 JMP #0089
|
||||
0x54220046, // 0084 LDINT R8 71
|
||||
0x1C200E08, // 0085 EQ R8 R7 R8
|
||||
0x78220001, // 0086 JMPF R8 #0089
|
||||
0x50200200, // 0087 LDBOOL R8 1 0
|
||||
0x80041000, // 0088 RET 1 R8
|
||||
0x70020008, // 0089 JMP #0093
|
||||
0x60200003, // 008A GETGBL R8 G3
|
||||
0x5C240000, // 008B MOVE R9 R0
|
||||
0x7C200200, // 008C CALL R8 1
|
||||
0x8C201114, // 008D GETMET R8 R8 K20
|
||||
0x5C280200, // 008E MOVE R10 R1
|
||||
0x5C2C0400, // 008F MOVE R11 R2
|
||||
0x5C300600, // 0090 MOVE R12 R3
|
||||
0x7C200800, // 0091 CALL R8 4
|
||||
0x80041000, // 0092 RET 1 R8
|
||||
0x80000000, // 0093 RET 0
|
||||
0x78220083, // 0007 JMPF R8 #008C
|
||||
0x8C200105, // 0008 GETMET R8 R0 K5
|
||||
0x7C200200, // 0009 CALL R8 1
|
||||
0x1C200F06, // 000A EQ R8 R7 K6
|
||||
0x78220019, // 000B JMPF R8 #0026
|
||||
0x8C200507, // 000C GETMET R8 R2 K7
|
||||
0x58280006, // 000D LDCONST R10 K6
|
||||
0x7C200400, // 000E CALL R8 2
|
||||
0xB8261000, // 000F GETNGBL R9 K8
|
||||
0x8C241309, // 0010 GETMET R9 R9 K9
|
||||
0x5C2C1000, // 0011 MOVE R11 R8
|
||||
0x58300006, // 0012 LDCONST R12 K6
|
||||
0x543600FD, // 0013 LDINT R13 254
|
||||
0x58380006, // 0014 LDCONST R14 K6
|
||||
0x543E0167, // 0015 LDINT R15 360
|
||||
0x7C240C00, // 0016 CALL R9 6
|
||||
0x8C28090A, // 0017 GETMET R10 R4 K10
|
||||
0x60300013, // 0018 GETGBL R12 G19
|
||||
0x7C300000, // 0019 CALL R12 0
|
||||
0x98321609, // 001A SETIDX R12 K11 R9
|
||||
0x7C280400, // 001B CALL R10 2
|
||||
0x8C28010C, // 001C GETMET R10 R0 K12
|
||||
0x7C280200, // 001D CALL R10 1
|
||||
0x60280008, // 001E GETGBL R10 G8
|
||||
0x5C2C1000, // 001F MOVE R11 R8
|
||||
0x7C280200, // 0020 CALL R10 1
|
||||
0x002A1C0A, // 0021 ADD R10 K14 R10
|
||||
0x900E1A0A, // 0022 SETMBR R3 K13 R10
|
||||
0x50280200, // 0023 LDBOOL R10 1 0
|
||||
0x80041400, // 0024 RET 1 R10
|
||||
0x70020064, // 0025 JMP #008B
|
||||
0x1C200F0F, // 0026 EQ R8 R7 K15
|
||||
0x78220002, // 0027 JMPF R8 #002B
|
||||
0x50200200, // 0028 LDBOOL R8 1 0
|
||||
0x80041000, // 0029 RET 1 R8
|
||||
0x7002005F, // 002A JMP #008B
|
||||
0x1C200F10, // 002B EQ R8 R7 K16
|
||||
0x78220002, // 002C JMPF R8 #0030
|
||||
0x50200200, // 002D LDBOOL R8 1 0
|
||||
0x80041000, // 002E RET 1 R8
|
||||
0x7002005A, // 002F JMP #008B
|
||||
0x1C200F11, // 0030 EQ R8 R7 K17
|
||||
0x78220019, // 0031 JMPF R8 #004C
|
||||
0x8C200507, // 0032 GETMET R8 R2 K7
|
||||
0x58280006, // 0033 LDCONST R10 K6
|
||||
0x7C200400, // 0034 CALL R8 2
|
||||
0xB8261000, // 0035 GETNGBL R9 K8
|
||||
0x8C241309, // 0036 GETMET R9 R9 K9
|
||||
0x5C2C1000, // 0037 MOVE R11 R8
|
||||
0x58300006, // 0038 LDCONST R12 K6
|
||||
0x543600FD, // 0039 LDINT R13 254
|
||||
0x58380006, // 003A LDCONST R14 K6
|
||||
0x543E00FE, // 003B LDINT R15 255
|
||||
0x7C240C00, // 003C CALL R9 6
|
||||
0x8C28090A, // 003D GETMET R10 R4 K10
|
||||
0x60300013, // 003E GETGBL R12 G19
|
||||
0x7C300000, // 003F CALL R12 0
|
||||
0x98322409, // 0040 SETIDX R12 K18 R9
|
||||
0x7C280400, // 0041 CALL R10 2
|
||||
0x8C28010C, // 0042 GETMET R10 R0 K12
|
||||
0x7C280200, // 0043 CALL R10 1
|
||||
0x60280008, // 0044 GETGBL R10 G8
|
||||
0x5C2C1000, // 0045 MOVE R11 R8
|
||||
0x7C280200, // 0046 CALL R10 1
|
||||
0x002A260A, // 0047 ADD R10 K19 R10
|
||||
0x900E1A0A, // 0048 SETMBR R3 K13 R10
|
||||
0x50280200, // 0049 LDBOOL R10 1 0
|
||||
0x80041400, // 004A RET 1 R10
|
||||
0x7002003E, // 004B JMP #008B
|
||||
0x54220003, // 004C LDINT R8 4
|
||||
0x1C200E08, // 004D EQ R8 R7 R8
|
||||
0x78220002, // 004E JMPF R8 #0052
|
||||
0x50200200, // 004F LDBOOL R8 1 0
|
||||
0x80041000, // 0050 RET 1 R8
|
||||
0x70020038, // 0051 JMP #008B
|
||||
0x54220004, // 0052 LDINT R8 5
|
||||
0x1C200E08, // 0053 EQ R8 R7 R8
|
||||
0x78220002, // 0054 JMPF R8 #0058
|
||||
0x50200200, // 0055 LDBOOL R8 1 0
|
||||
0x80041000, // 0056 RET 1 R8
|
||||
0x70020032, // 0057 JMP #008B
|
||||
0x54220005, // 0058 LDINT R8 6
|
||||
0x1C200E08, // 0059 EQ R8 R7 R8
|
||||
0x7822002A, // 005A JMPF R8 #0086
|
||||
0x8C200507, // 005B GETMET R8 R2 K7
|
||||
0x58280006, // 005C LDCONST R10 K6
|
||||
0x7C200400, // 005D CALL R8 2
|
||||
0xB8261000, // 005E GETNGBL R9 K8
|
||||
0x8C241309, // 005F GETMET R9 R9 K9
|
||||
0x5C2C1000, // 0060 MOVE R11 R8
|
||||
0x58300006, // 0061 LDCONST R12 K6
|
||||
0x543600FD, // 0062 LDINT R13 254
|
||||
0x58380006, // 0063 LDCONST R14 K6
|
||||
0x543E0167, // 0064 LDINT R15 360
|
||||
0x7C240C00, // 0065 CALL R9 6
|
||||
0x8C280507, // 0066 GETMET R10 R2 K7
|
||||
0x5830000F, // 0067 LDCONST R12 K15
|
||||
0x7C280400, // 0068 CALL R10 2
|
||||
0xB82E1000, // 0069 GETNGBL R11 K8
|
||||
0x8C2C1709, // 006A GETMET R11 R11 K9
|
||||
0x5C341400, // 006B MOVE R13 R10
|
||||
0x58380006, // 006C LDCONST R14 K6
|
||||
0x543E00FD, // 006D LDINT R15 254
|
||||
0x58400006, // 006E LDCONST R16 K6
|
||||
0x544600FE, // 006F LDINT R17 255
|
||||
0x7C2C0C00, // 0070 CALL R11 6
|
||||
0x8C30090A, // 0071 GETMET R12 R4 K10
|
||||
0x60380013, // 0072 GETGBL R14 G19
|
||||
0x7C380000, // 0073 CALL R14 0
|
||||
0x983A1609, // 0074 SETIDX R14 K11 R9
|
||||
0x983A240B, // 0075 SETIDX R14 K18 R11
|
||||
0x7C300400, // 0076 CALL R12 2
|
||||
0x8C30010C, // 0077 GETMET R12 R0 K12
|
||||
0x7C300200, // 0078 CALL R12 1
|
||||
0x60300008, // 0079 GETGBL R12 G8
|
||||
0x5C341000, // 007A MOVE R13 R8
|
||||
0x7C300200, // 007B CALL R12 1
|
||||
0x00321C0C, // 007C ADD R12 K14 R12
|
||||
0x00301914, // 007D ADD R12 R12 K20
|
||||
0x60340008, // 007E GETGBL R13 G8
|
||||
0x5C381400, // 007F MOVE R14 R10
|
||||
0x7C340200, // 0080 CALL R13 1
|
||||
0x0030180D, // 0081 ADD R12 R12 R13
|
||||
0x900E1A0C, // 0082 SETMBR R3 K13 R12
|
||||
0x50300200, // 0083 LDBOOL R12 1 0
|
||||
0x80041800, // 0084 RET 1 R12
|
||||
0x70020004, // 0085 JMP #008B
|
||||
0x54220046, // 0086 LDINT R8 71
|
||||
0x1C200E08, // 0087 EQ R8 R7 R8
|
||||
0x78220001, // 0088 JMPF R8 #008B
|
||||
0x50200200, // 0089 LDBOOL R8 1 0
|
||||
0x80041000, // 008A RET 1 R8
|
||||
0x70020008, // 008B JMP #0095
|
||||
0x60200003, // 008C GETGBL R8 G3
|
||||
0x5C240000, // 008D MOVE R9 R0
|
||||
0x7C200200, // 008E CALL R8 1
|
||||
0x8C201115, // 008F GETMET R8 R8 K21
|
||||
0x5C280200, // 0090 MOVE R10 R1
|
||||
0x5C2C0400, // 0091 MOVE R11 R2
|
||||
0x5C300600, // 0092 MOVE R12 R3
|
||||
0x7C200800, // 0093 CALL R8 4
|
||||
0x80041000, // 0094 RET 1 R8
|
||||
0x80000000, // 0095 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -6,250 +6,6 @@
|
|||
|
||||
extern const bclass be_class_Matter_Plugin_OnOff;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(get_onoff),
|
||||
/* K2 */ be_nested_str_weak(tasmota_relay_index),
|
||||
/* K3 */ be_nested_str_weak(find),
|
||||
/* K4 */ be_nested_str_weak(ARG),
|
||||
/* K5 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[20]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x8C100101, // 0008 GETMET R4 R0 K1
|
||||
0x7C100200, // 0009 CALL R4 1
|
||||
0x8C100703, // 000A GETMET R4 R3 K3
|
||||
0x88180104, // 000B GETMBR R6 R0 K4
|
||||
0x7C100400, // 000C CALL R4 2
|
||||
0x90020404, // 000D SETMBR R0 K2 R4
|
||||
0x88100102, // 000E GETMBR R4 R0 K2
|
||||
0x4C140000, // 000F LDNIL R5
|
||||
0x1C100805, // 0010 EQ R4 R4 R5
|
||||
0x78120000, // 0011 JMPF R4 #0013
|
||||
0x90020505, // 0012 SETMBR R0 K2 K5
|
||||
0x80000000, // 0013 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(command),
|
||||
/* K4 */ be_const_int(3),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_const_int(1),
|
||||
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
|
||||
/* K8 */ be_nested_str_weak(add_TLV),
|
||||
/* K9 */ be_nested_str_weak(U2),
|
||||
/* K10 */ be_nested_str_weak(set_onoff),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str_weak(get_onoff),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[119]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140702, // 0002 GETMBR R5 R3 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x1C1C0B04, // 0004 EQ R7 R5 K4
|
||||
0x781E0016, // 0005 JMPF R7 #001D
|
||||
0x1C1C0D05, // 0006 EQ R7 R6 K5
|
||||
0x781E0002, // 0007 JMPF R7 #000B
|
||||
0x501C0200, // 0008 LDBOOL R7 1 0
|
||||
0x80040E00, // 0009 RET 1 R7
|
||||
0x70020010, // 000A JMP #001C
|
||||
0x1C1C0D06, // 000B EQ R7 R6 K6
|
||||
0x781E0009, // 000C JMPF R7 #0017
|
||||
0x8C1C0907, // 000D GETMET R7 R4 K7
|
||||
0x7C1C0200, // 000E CALL R7 1
|
||||
0x8C200F08, // 000F GETMET R8 R7 K8
|
||||
0x58280005, // 0010 LDCONST R10 K5
|
||||
0x882C0909, // 0011 GETMBR R11 R4 K9
|
||||
0x58300005, // 0012 LDCONST R12 K5
|
||||
0x7C200800, // 0013 CALL R8 4
|
||||
0x900E0705, // 0014 SETMBR R3 K3 K5
|
||||
0x80040E00, // 0015 RET 1 R7
|
||||
0x70020004, // 0016 JMP #001C
|
||||
0x541E003F, // 0017 LDINT R7 64
|
||||
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
||||
0x781E0001, // 0019 JMPF R7 #001C
|
||||
0x501C0200, // 001A LDBOOL R7 1 0
|
||||
0x80040E00, // 001B RET 1 R7
|
||||
0x70020058, // 001C JMP #0076
|
||||
0x541E0003, // 001D LDINT R7 4
|
||||
0x1C1C0A07, // 001E EQ R7 R5 R7
|
||||
0x781E0002, // 001F JMPF R7 #0023
|
||||
0x501C0200, // 0020 LDBOOL R7 1 0
|
||||
0x80040E00, // 0021 RET 1 R7
|
||||
0x70020052, // 0022 JMP #0076
|
||||
0x541E0004, // 0023 LDINT R7 5
|
||||
0x1C1C0A07, // 0024 EQ R7 R5 R7
|
||||
0x781E0002, // 0025 JMPF R7 #0029
|
||||
0x501C0200, // 0026 LDBOOL R7 1 0
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x7002004C, // 0028 JMP #0076
|
||||
0x541E0005, // 0029 LDINT R7 6
|
||||
0x1C1C0A07, // 002A EQ R7 R5 R7
|
||||
0x781E001B, // 002B JMPF R7 #0048
|
||||
0x1C1C0D05, // 002C EQ R7 R6 K5
|
||||
0x781E0005, // 002D JMPF R7 #0034
|
||||
0x8C1C010A, // 002E GETMET R7 R0 K10
|
||||
0x50240000, // 002F LDBOOL R9 0 0
|
||||
0x7C1C0400, // 0030 CALL R7 2
|
||||
0x501C0200, // 0031 LDBOOL R7 1 0
|
||||
0x80040E00, // 0032 RET 1 R7
|
||||
0x70020012, // 0033 JMP #0047
|
||||
0x1C1C0D06, // 0034 EQ R7 R6 K6
|
||||
0x781E0005, // 0035 JMPF R7 #003C
|
||||
0x8C1C010A, // 0036 GETMET R7 R0 K10
|
||||
0x50240200, // 0037 LDBOOL R9 1 0
|
||||
0x7C1C0400, // 0038 CALL R7 2
|
||||
0x501C0200, // 0039 LDBOOL R7 1 0
|
||||
0x80040E00, // 003A RET 1 R7
|
||||
0x7002000A, // 003B JMP #0047
|
||||
0x1C1C0D0B, // 003C EQ R7 R6 K11
|
||||
0x781E0008, // 003D JMPF R7 #0047
|
||||
0x8C1C010A, // 003E GETMET R7 R0 K10
|
||||
0x8C24010C, // 003F GETMET R9 R0 K12
|
||||
0x7C240200, // 0040 CALL R9 1
|
||||
0x78260000, // 0041 JMPF R9 #0043
|
||||
0x50240001, // 0042 LDBOOL R9 0 1
|
||||
0x50240200, // 0043 LDBOOL R9 1 0
|
||||
0x7C1C0400, // 0044 CALL R7 2
|
||||
0x501C0200, // 0045 LDBOOL R7 1 0
|
||||
0x80040E00, // 0046 RET 1 R7
|
||||
0x7002002D, // 0047 JMP #0076
|
||||
0x541E0007, // 0048 LDINT R7 8
|
||||
0x1C1C0A07, // 0049 EQ R7 R5 R7
|
||||
0x781E002A, // 004A JMPF R7 #0076
|
||||
0x1C1C0D05, // 004B EQ R7 R6 K5
|
||||
0x781E0002, // 004C JMPF R7 #0050
|
||||
0x501C0200, // 004D LDBOOL R7 1 0
|
||||
0x80040E00, // 004E RET 1 R7
|
||||
0x70020025, // 004F JMP #0076
|
||||
0x1C1C0D06, // 0050 EQ R7 R6 K6
|
||||
0x781E0002, // 0051 JMPF R7 #0055
|
||||
0x501C0200, // 0052 LDBOOL R7 1 0
|
||||
0x80040E00, // 0053 RET 1 R7
|
||||
0x70020020, // 0054 JMP #0076
|
||||
0x1C1C0D0B, // 0055 EQ R7 R6 K11
|
||||
0x781E0002, // 0056 JMPF R7 #005A
|
||||
0x501C0200, // 0057 LDBOOL R7 1 0
|
||||
0x80040E00, // 0058 RET 1 R7
|
||||
0x7002001B, // 0059 JMP #0076
|
||||
0x1C1C0D04, // 005A EQ R7 R6 K4
|
||||
0x781E0002, // 005B JMPF R7 #005F
|
||||
0x501C0200, // 005C LDBOOL R7 1 0
|
||||
0x80040E00, // 005D RET 1 R7
|
||||
0x70020016, // 005E JMP #0076
|
||||
0x541E0003, // 005F LDINT R7 4
|
||||
0x1C1C0C07, // 0060 EQ R7 R6 R7
|
||||
0x781E0002, // 0061 JMPF R7 #0065
|
||||
0x501C0200, // 0062 LDBOOL R7 1 0
|
||||
0x80040E00, // 0063 RET 1 R7
|
||||
0x70020010, // 0064 JMP #0076
|
||||
0x541E0004, // 0065 LDINT R7 5
|
||||
0x1C1C0C07, // 0066 EQ R7 R6 R7
|
||||
0x781E0002, // 0067 JMPF R7 #006B
|
||||
0x501C0200, // 0068 LDBOOL R7 1 0
|
||||
0x80040E00, // 0069 RET 1 R7
|
||||
0x7002000A, // 006A JMP #0076
|
||||
0x541E0005, // 006B LDINT R7 6
|
||||
0x1C1C0C07, // 006C EQ R7 R6 R7
|
||||
0x781E0002, // 006D JMPF R7 #0071
|
||||
0x501C0200, // 006E LDBOOL R7 1 0
|
||||
0x80040E00, // 006F RET 1 R7
|
||||
0x70020004, // 0070 JMP #0076
|
||||
0x541E0006, // 0071 LDINT R7 7
|
||||
0x1C1C0C07, // 0072 EQ R7 R6 R7
|
||||
0x781E0001, // 0073 JMPF R7 #0076
|
||||
0x501C0200, // 0074 LDBOOL R7 1 0
|
||||
0x80040E00, // 0075 RET 1 R7
|
||||
0x80000000, // 0076 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_onoff
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(set_power),
|
||||
/* K2 */ be_nested_str_weak(tasmota_relay_index),
|
||||
/* K3 */ be_nested_str_weak(get_onoff),
|
||||
}),
|
||||
be_str_weak(set_onoff),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0xB80A0000, // 0000 GETNGBL R2 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x88100102, // 0002 GETMBR R4 R0 K2
|
||||
0x60140017, // 0003 GETGBL R5 G23
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x7C140200, // 0005 CALL R5 1
|
||||
0x7C080600, // 0006 CALL R2 3
|
||||
0x8C080103, // 0007 GETMET R2 R0 K3
|
||||
0x7C080200, // 0008 CALL R2 1
|
||||
0x80000000, // 0009 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: <lambda>
|
||||
********************************************************************/
|
||||
|
@ -278,11 +34,138 @@ be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_onoff
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
|
||||
be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
10, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(matter),
|
||||
/* K1 */ be_nested_str_weak(TLV),
|
||||
/* K2 */ be_nested_str_weak(cluster),
|
||||
/* K3 */ be_nested_str_weak(command),
|
||||
/* K4 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(set_onoff),
|
||||
/* K7 */ be_nested_str_weak(update_shadow),
|
||||
/* K8 */ be_const_int(1),
|
||||
/* K9 */ be_const_int(2),
|
||||
/* K10 */ be_nested_str_weak(shadow_onoff),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[42]) { /* code */
|
||||
0xB8120000, // 0000 GETNGBL R4 K0
|
||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||
0x88140702, // 0002 GETMBR R5 R3 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x541E0005, // 0004 LDINT R7 6
|
||||
0x1C1C0A07, // 0005 EQ R7 R5 R7
|
||||
0x781E0021, // 0006 JMPF R7 #0029
|
||||
0x8C1C0104, // 0007 GETMET R7 R0 K4
|
||||
0x7C1C0200, // 0008 CALL R7 1
|
||||
0x1C1C0D05, // 0009 EQ R7 R6 K5
|
||||
0x781E0007, // 000A JMPF R7 #0013
|
||||
0x8C1C0106, // 000B GETMET R7 R0 K6
|
||||
0x50240000, // 000C LDBOOL R9 0 0
|
||||
0x7C1C0400, // 000D CALL R7 2
|
||||
0x8C1C0107, // 000E GETMET R7 R0 K7
|
||||
0x7C1C0200, // 000F CALL R7 1
|
||||
0x501C0200, // 0010 LDBOOL R7 1 0
|
||||
0x80040E00, // 0011 RET 1 R7
|
||||
0x70020015, // 0012 JMP #0029
|
||||
0x1C1C0D08, // 0013 EQ R7 R6 K8
|
||||
0x781E0007, // 0014 JMPF R7 #001D
|
||||
0x8C1C0106, // 0015 GETMET R7 R0 K6
|
||||
0x50240200, // 0016 LDBOOL R9 1 0
|
||||
0x7C1C0400, // 0017 CALL R7 2
|
||||
0x8C1C0107, // 0018 GETMET R7 R0 K7
|
||||
0x7C1C0200, // 0019 CALL R7 1
|
||||
0x501C0200, // 001A LDBOOL R7 1 0
|
||||
0x80040E00, // 001B RET 1 R7
|
||||
0x7002000B, // 001C JMP #0029
|
||||
0x1C1C0D09, // 001D EQ R7 R6 K9
|
||||
0x781E0009, // 001E JMPF R7 #0029
|
||||
0x8C1C0106, // 001F GETMET R7 R0 K6
|
||||
0x8824010A, // 0020 GETMBR R9 R0 K10
|
||||
0x78260000, // 0021 JMPF R9 #0023
|
||||
0x50240001, // 0022 LDBOOL R9 0 1
|
||||
0x50240200, // 0023 LDBOOL R9 1 0
|
||||
0x7C1C0400, // 0024 CALL R7 2
|
||||
0x8C1C0107, // 0025 GETMET R7 R0 K7
|
||||
0x7C1C0200, // 0026 CALL R7 1
|
||||
0x501C0200, // 0027 LDBOOL R7 1 0
|
||||
0x80040E00, // 0028 RET 1 R7
|
||||
0x80000000, // 0029 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K2 */ be_nested_str_weak(tasmota_relay_index),
|
||||
/* K3 */ be_nested_str_weak(find),
|
||||
/* K4 */ be_nested_str_weak(ARG),
|
||||
/* K5 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[20]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x50100000, // 0008 LDBOOL R4 0 0
|
||||
0x90020204, // 0009 SETMBR R0 K1 R4
|
||||
0x8C100703, // 000A GETMET R4 R3 K3
|
||||
0x88180104, // 000B GETMBR R6 R0 K4
|
||||
0x7C100400, // 000C CALL R4 2
|
||||
0x90020404, // 000D SETMBR R0 K2 R4
|
||||
0x88100102, // 000E GETMBR R4 R0 K2
|
||||
0x4C140000, // 000F LDNIL R5
|
||||
0x1C100805, // 0010 EQ R4 R4 R5
|
||||
0x78120000, // 0011 JMPF R4 #0013
|
||||
0x90020505, // 0012 SETMBR R0 K2 K5
|
||||
0x80000000, // 0013 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: update_shadow
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -290,14 +173,16 @@ be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(get_power),
|
||||
/* K2 */ be_nested_str_weak(tasmota_relay_index),
|
||||
/* K3 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K4 */ be_nested_str_weak(onoff_changed),
|
||||
/* K4 */ be_nested_str_weak(attribute_updated),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(get_onoff),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[28]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
|
@ -306,28 +191,28 @@ be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
|
|||
0x7C040400, // 0003 CALL R1 2
|
||||
0x4C080000, // 0004 LDNIL R2
|
||||
0x20080202, // 0005 NE R2 R1 R2
|
||||
0x780A000C, // 0006 JMPF R2 #0014
|
||||
0x780A000E, // 0006 JMPF R2 #0016
|
||||
0x88080103, // 0007 GETMBR R2 R0 K3
|
||||
0x4C0C0000, // 0008 LDNIL R3
|
||||
0x20080403, // 0009 NE R2 R2 R3
|
||||
0x780A0007, // 000A JMPF R2 #0013
|
||||
0x780A0009, // 000A JMPF R2 #0015
|
||||
0x88080103, // 000B GETMBR R2 R0 K3
|
||||
0x600C0017, // 000C GETGBL R3 G23
|
||||
0x5C100200, // 000D MOVE R4 R1
|
||||
0x7C0C0200, // 000E CALL R3 1
|
||||
0x20080403, // 000F NE R2 R2 R3
|
||||
0x780A0001, // 0010 JMPF R2 #0013
|
||||
0x780A0003, // 0010 JMPF R2 #0015
|
||||
0x8C080104, // 0011 GETMET R2 R0 K4
|
||||
0x7C080200, // 0012 CALL R2 1
|
||||
0x90020601, // 0013 SETMBR R0 K3 R1
|
||||
0x88080103, // 0014 GETMBR R2 R0 K3
|
||||
0x4C0C0000, // 0015 LDNIL R3
|
||||
0x1C080403, // 0016 EQ R2 R2 R3
|
||||
0x780A0001, // 0017 JMPF R2 #001A
|
||||
0x50080000, // 0018 LDBOOL R2 0 0
|
||||
0x90020602, // 0019 SETMBR R0 K3 R2
|
||||
0x88080103, // 001A GETMBR R2 R0 K3
|
||||
0x80040400, // 001B RET 1 R2
|
||||
0x54120005, // 0012 LDINT R4 6
|
||||
0x58140005, // 0013 LDCONST R5 K5
|
||||
0x7C080600, // 0014 CALL R2 3
|
||||
0x90020601, // 0015 SETMBR R0 K3 R1
|
||||
0x60080003, // 0016 GETGBL R2 G3
|
||||
0x5C0C0000, // 0017 MOVE R3 R0
|
||||
0x7C080200, // 0018 CALL R2 1
|
||||
0x8C080506, // 0019 GETMET R2 R2 K6
|
||||
0x7C080200, // 001A CALL R2 1
|
||||
0x80000000, // 001B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -335,27 +220,37 @@ be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_second
|
||||
** Solidified function: set_onoff
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
|
||||
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(get_onoff),
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(set_power),
|
||||
/* K2 */ be_nested_str_weak(tasmota_relay_index),
|
||||
/* K3 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(every_second),
|
||||
be_str_weak(set_onoff),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x80000000, // 0002 RET 0
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0xB80A0000, // 0000 GETNGBL R2 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x88100102, // 0002 GETMBR R4 R0 K2
|
||||
0x60140017, // 0003 GETGBL R5 G23
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x7C140200, // 0005 CALL R5 1
|
||||
0x7C080600, // 0006 CALL R2 3
|
||||
0x8C080103, // 0007 GETMET R2 R0 K3
|
||||
0x7C080200, // 0008 CALL R2 1
|
||||
0x80000000, // 0009 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -367,7 +262,7 @@ be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -375,232 +270,68 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_const_int(3),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(U2),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str_weak(U1),
|
||||
/* K11 */ be_nested_str_weak(U4),
|
||||
/* K12 */ be_nested_str_weak(BOOL),
|
||||
/* K13 */ be_nested_str_weak(get_onoff),
|
||||
/* K14 */ be_nested_str_weak(read_attribute),
|
||||
/* K8 */ be_nested_str_weak(BOOL),
|
||||
/* K9 */ be_nested_str_weak(shadow_onoff),
|
||||
/* K10 */ be_nested_str_weak(U4),
|
||||
/* K11 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[174]) { /* code */
|
||||
( &(const binstruction[45]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x1C1C0B05, // 0005 EQ R7 R5 K5
|
||||
0x781E0021, // 0006 JMPF R7 #0029
|
||||
0x1C1C0D06, // 0007 EQ R7 R6 K6
|
||||
0x781E0005, // 0008 JMPF R7 #000F
|
||||
0x8C1C0907, // 0009 GETMET R7 R4 K7
|
||||
0x88240908, // 000A GETMBR R9 R4 K8
|
||||
0x58280006, // 000B LDCONST R10 K6
|
||||
0x7C1C0600, // 000C CALL R7 3
|
||||
0x80040E00, // 000D RET 1 R7
|
||||
0x70020018, // 000E JMP #0028
|
||||
0x1C1C0D09, // 000F EQ R7 R6 K9
|
||||
0x781E0005, // 0010 JMPF R7 #0017
|
||||
0x8C1C0907, // 0011 GETMET R7 R4 K7
|
||||
0x8824090A, // 0012 GETMBR R9 R4 K10
|
||||
0x58280006, // 0013 LDCONST R10 K6
|
||||
0x7C1C0600, // 0014 CALL R7 3
|
||||
0x80040E00, // 0015 RET 1 R7
|
||||
0x70020010, // 0016 JMP #0028
|
||||
0x541EFFFB, // 0017 LDINT R7 65532
|
||||
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
||||
0x781E0005, // 0019 JMPF R7 #0020
|
||||
0x8C1C0907, // 001A GETMET R7 R4 K7
|
||||
0x8824090B, // 001B GETMBR R9 R4 K11
|
||||
0x58280006, // 001C LDCONST R10 K6
|
||||
0x7C1C0600, // 001D CALL R7 3
|
||||
0x80040E00, // 001E RET 1 R7
|
||||
0x70020007, // 001F JMP #0028
|
||||
0x541EFFFC, // 0020 LDINT R7 65533
|
||||
0x1C1C0C07, // 0021 EQ R7 R6 R7
|
||||
0x781E0004, // 0022 JMPF R7 #0028
|
||||
0x8C1C0907, // 0023 GETMET R7 R4 K7
|
||||
0x8824090B, // 0024 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0025 LDINT R10 4
|
||||
0x7C1C0600, // 0026 CALL R7 3
|
||||
0x80040E00, // 0027 RET 1 R7
|
||||
0x70020083, // 0028 JMP #00AD
|
||||
0x541E0003, // 0029 LDINT R7 4
|
||||
0x1C1C0A07, // 002A EQ R7 R5 R7
|
||||
0x781E0016, // 002B JMPF R7 #0043
|
||||
0x1C1C0D06, // 002C EQ R7 R6 K6
|
||||
0x781E0002, // 002D JMPF R7 #0031
|
||||
0x4C1C0000, // 002E LDNIL R7
|
||||
0x80040E00, // 002F RET 1 R7
|
||||
0x70020010, // 0030 JMP #0042
|
||||
0x541EFFFB, // 0031 LDINT R7 65532
|
||||
0x1C1C0C07, // 0032 EQ R7 R6 R7
|
||||
0x781E0005, // 0033 JMPF R7 #003A
|
||||
0x8C1C0907, // 0034 GETMET R7 R4 K7
|
||||
0x8824090B, // 0035 GETMBR R9 R4 K11
|
||||
0x58280006, // 0036 LDCONST R10 K6
|
||||
0x7C1C0600, // 0037 CALL R7 3
|
||||
0x80040E00, // 0038 RET 1 R7
|
||||
0x70020007, // 0039 JMP #0042
|
||||
0x541EFFFC, // 003A LDINT R7 65533
|
||||
0x1C1C0C07, // 003B EQ R7 R6 R7
|
||||
0x781E0004, // 003C JMPF R7 #0042
|
||||
0x8C1C0907, // 003D GETMET R7 R4 K7
|
||||
0x8824090B, // 003E GETMBR R9 R4 K11
|
||||
0x542A0003, // 003F LDINT R10 4
|
||||
0x7C1C0600, // 0040 CALL R7 3
|
||||
0x80040E00, // 0041 RET 1 R7
|
||||
0x70020069, // 0042 JMP #00AD
|
||||
0x541E0004, // 0043 LDINT R7 5
|
||||
0x1C1C0A07, // 0044 EQ R7 R5 R7
|
||||
0x781E0011, // 0045 JMPF R7 #0058
|
||||
0x541EFFFB, // 0046 LDINT R7 65532
|
||||
0x1C1C0C07, // 0047 EQ R7 R6 R7
|
||||
0x781E0005, // 0048 JMPF R7 #004F
|
||||
0x8C1C0907, // 0049 GETMET R7 R4 K7
|
||||
0x8824090B, // 004A GETMBR R9 R4 K11
|
||||
0x58280006, // 004B LDCONST R10 K6
|
||||
0x7C1C0600, // 004C CALL R7 3
|
||||
0x80040E00, // 004D RET 1 R7
|
||||
0x70020007, // 004E JMP #0057
|
||||
0x541EFFFC, // 004F LDINT R7 65533
|
||||
0x1C1C0C07, // 0050 EQ R7 R6 R7
|
||||
0x781E0004, // 0051 JMPF R7 #0057
|
||||
0x8C1C0907, // 0052 GETMET R7 R4 K7
|
||||
0x8824090B, // 0053 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0054 LDINT R10 4
|
||||
0x7C1C0600, // 0055 CALL R7 3
|
||||
0x80040E00, // 0056 RET 1 R7
|
||||
0x70020054, // 0057 JMP #00AD
|
||||
0x541E0005, // 0058 LDINT R7 6
|
||||
0x1C1C0A07, // 0059 EQ R7 R5 R7
|
||||
0x781E001A, // 005A JMPF R7 #0076
|
||||
0x1C1C0D06, // 005B EQ R7 R6 K6
|
||||
0x781E0006, // 005C JMPF R7 #0064
|
||||
0x8C1C0907, // 005D GETMET R7 R4 K7
|
||||
0x8824090C, // 005E GETMBR R9 R4 K12
|
||||
0x8C28010D, // 005F GETMET R10 R0 K13
|
||||
0x7C280200, // 0060 CALL R10 1
|
||||
0x7C1C0600, // 0061 CALL R7 3
|
||||
0x80040E00, // 0062 RET 1 R7
|
||||
0x70020010, // 0063 JMP #0075
|
||||
0x541EFFFB, // 0064 LDINT R7 65532
|
||||
0x1C1C0C07, // 0065 EQ R7 R6 R7
|
||||
0x781E0005, // 0066 JMPF R7 #006D
|
||||
0x8C1C0907, // 0067 GETMET R7 R4 K7
|
||||
0x8824090B, // 0068 GETMBR R9 R4 K11
|
||||
0x58280006, // 0069 LDCONST R10 K6
|
||||
0x7C1C0600, // 006A CALL R7 3
|
||||
0x80040E00, // 006B RET 1 R7
|
||||
0x70020007, // 006C JMP #0075
|
||||
0x541EFFFC, // 006D LDINT R7 65533
|
||||
0x1C1C0C07, // 006E EQ R7 R6 R7
|
||||
0x781E0004, // 006F JMPF R7 #0075
|
||||
0x8C1C0907, // 0070 GETMET R7 R4 K7
|
||||
0x8824090B, // 0071 GETMBR R9 R4 K11
|
||||
0x542A0003, // 0072 LDINT R10 4
|
||||
0x7C1C0600, // 0073 CALL R7 3
|
||||
0x80040E00, // 0074 RET 1 R7
|
||||
0x70020036, // 0075 JMP #00AD
|
||||
0x541E0007, // 0076 LDINT R7 8
|
||||
0x1C1C0A07, // 0077 EQ R7 R5 R7
|
||||
0x781E002B, // 0078 JMPF R7 #00A5
|
||||
0x1C1C0D06, // 0079 EQ R7 R6 K6
|
||||
0x781E0005, // 007A JMPF R7 #0081
|
||||
0x8C1C0907, // 007B GETMET R7 R4 K7
|
||||
0x8824090A, // 007C GETMBR R9 R4 K10
|
||||
0x542A0087, // 007D LDINT R10 136
|
||||
0x7C1C0600, // 007E CALL R7 3
|
||||
0x80040E00, // 007F RET 1 R7
|
||||
0x70020022, // 0080 JMP #00A4
|
||||
0x541E000E, // 0081 LDINT R7 15
|
||||
0x1C1C0C07, // 0082 EQ R7 R6 R7
|
||||
0x781E0005, // 0083 JMPF R7 #008A
|
||||
0x8C1C0907, // 0084 GETMET R7 R4 K7
|
||||
0x8824090A, // 0085 GETMBR R9 R4 K10
|
||||
0x58280006, // 0086 LDCONST R10 K6
|
||||
0x7C1C0600, // 0087 CALL R7 3
|
||||
0x80040E00, // 0088 RET 1 R7
|
||||
0x70020019, // 0089 JMP #00A4
|
||||
0x541E000F, // 008A LDINT R7 16
|
||||
0x1C1C0C07, // 008B EQ R7 R6 R7
|
||||
0x781E0005, // 008C JMPF R7 #0093
|
||||
0x8C1C0907, // 008D GETMET R7 R4 K7
|
||||
0x8824090A, // 008E GETMBR R9 R4 K10
|
||||
0x58280009, // 008F LDCONST R10 K9
|
||||
0x7C1C0600, // 0090 CALL R7 3
|
||||
0x80040E00, // 0091 RET 1 R7
|
||||
0x70020010, // 0092 JMP #00A4
|
||||
0x541EFFFB, // 0093 LDINT R7 65532
|
||||
0x1C1C0C07, // 0094 EQ R7 R6 R7
|
||||
0x781E0005, // 0095 JMPF R7 #009C
|
||||
0x8C1C0907, // 0096 GETMET R7 R4 K7
|
||||
0x8824090B, // 0097 GETMBR R9 R4 K11
|
||||
0x58280006, // 0098 LDCONST R10 K6
|
||||
0x7C1C0600, // 0099 CALL R7 3
|
||||
0x80040E00, // 009A RET 1 R7
|
||||
0x70020007, // 009B JMP #00A4
|
||||
0x541EFFFC, // 009C LDINT R7 65533
|
||||
0x1C1C0C07, // 009D EQ R7 R6 R7
|
||||
0x781E0004, // 009E JMPF R7 #00A4
|
||||
0x8C1C0907, // 009F GETMET R7 R4 K7
|
||||
0x8824090B, // 00A0 GETMBR R9 R4 K11
|
||||
0x542A0003, // 00A1 LDINT R10 4
|
||||
0x7C1C0600, // 00A2 CALL R7 3
|
||||
0x80040E00, // 00A3 RET 1 R7
|
||||
0x70020007, // 00A4 JMP #00AD
|
||||
0x601C0003, // 00A5 GETGBL R7 G3
|
||||
0x5C200000, // 00A6 MOVE R8 R0
|
||||
0x7C1C0200, // 00A7 CALL R7 1
|
||||
0x8C1C0F0E, // 00A8 GETMET R7 R7 K14
|
||||
0x5C240200, // 00A9 MOVE R9 R1
|
||||
0x5C280400, // 00AA MOVE R10 R2
|
||||
0x7C1C0600, // 00AB CALL R7 3
|
||||
0x80040E00, // 00AC RET 1 R7
|
||||
0x80000000, // 00AD RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: onoff_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(onoff_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x4C0C0000, // 0001 LDNIL R3
|
||||
0x54120005, // 0002 LDINT R4 6
|
||||
0x58140001, // 0003 LDCONST R5 K1
|
||||
0x7C040800, // 0004 CALL R1 4
|
||||
0x80000000, // 0005 RET 0
|
||||
0x541E0005, // 0005 LDINT R7 6
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E001B, // 0007 JMPF R7 #0024
|
||||
0x8C1C0105, // 0008 GETMET R7 R0 K5
|
||||
0x7C1C0200, // 0009 CALL R7 1
|
||||
0x1C1C0D06, // 000A EQ R7 R6 K6
|
||||
0x781E0005, // 000B JMPF R7 #0012
|
||||
0x8C1C0907, // 000C GETMET R7 R4 K7
|
||||
0x88240908, // 000D GETMBR R9 R4 K8
|
||||
0x88280109, // 000E GETMBR R10 R0 K9
|
||||
0x7C1C0600, // 000F CALL R7 3
|
||||
0x80040E00, // 0010 RET 1 R7
|
||||
0x70020010, // 0011 JMP #0023
|
||||
0x541EFFFB, // 0012 LDINT R7 65532
|
||||
0x1C1C0C07, // 0013 EQ R7 R6 R7
|
||||
0x781E0005, // 0014 JMPF R7 #001B
|
||||
0x8C1C0907, // 0015 GETMET R7 R4 K7
|
||||
0x8824090A, // 0016 GETMBR R9 R4 K10
|
||||
0x58280006, // 0017 LDCONST R10 K6
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x70020007, // 001A JMP #0023
|
||||
0x541EFFFC, // 001B LDINT R7 65533
|
||||
0x1C1C0C07, // 001C EQ R7 R6 R7
|
||||
0x781E0004, // 001D JMPF R7 #0023
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x8824090A, // 001F GETMBR R9 R4 K10
|
||||
0x542A0003, // 0020 LDINT R10 4
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x70020007, // 0023 JMP #002C
|
||||
0x601C0003, // 0024 GETGBL R7 G3
|
||||
0x5C200000, // 0025 MOVE R8 R0
|
||||
0x7C1C0200, // 0026 CALL R7 1
|
||||
0x8C1C0F0B, // 0027 GETMET R7 R7 K11
|
||||
0x5C240200, // 0028 MOVE R9 R1
|
||||
0x5C280400, // 0029 MOVE R10 R2
|
||||
0x7C1C0600, // 002A CALL R7 3
|
||||
0x80040E00, // 002B RET 1 R7
|
||||
0x80000000, // 002C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -610,45 +341,25 @@ be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
|
|||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_OnOff
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin;
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_OnOff,
|
||||
2,
|
||||
&be_class_Matter_Plugin,
|
||||
be_nested_map(15,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(13,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(init, 8), be_const_closure(Matter_Plugin_OnOff_init_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(ARG, 4), be_nested_str_weak(relay) },
|
||||
{ be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
|
||||
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
|
||||
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(266, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
|
||||
{ be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
|
||||
{ be_const_key_weak(ARG_TYPE, 7), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
|
||||
{ be_const_key_weak(tasmota_relay_index, 1), be_const_var(0) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
|
||||
{ be_const_key_weak(CLUSTERS, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(3,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(8,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(2),
|
||||
be_const_int(3),
|
||||
be_const_int(4),
|
||||
be_const_int(5),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(3,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
|
@ -656,22 +367,13 @@ be_local_class(Matter_Plugin_OnOff,
|
|||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(4,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(1),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(set_onoff, 8), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(266, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
|
||||
{ be_const_key_weak(ARG, 11), be_nested_str_weak(relay) },
|
||||
{ be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
|
||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
|
||||
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_OnOff)
|
||||
);
|
||||
|
|
|
@ -45,7 +45,7 @@ be_local_closure(Matter_Plugin_Root_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
12, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -53,7 +53,7 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
|
@ -64,15 +64,14 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
|
|||
/* K7 */ be_nested_str_weak(int64),
|
||||
/* K8 */ be_nested_str_weak(_breadcrumb),
|
||||
/* K9 */ be_nested_str_weak(attribute_updated),
|
||||
/* K10 */ be_nested_str_weak(endpoint),
|
||||
/* K11 */ be_nested_str_weak(status),
|
||||
/* K12 */ be_nested_str_weak(CONSTRAINT_ERROR),
|
||||
/* K13 */ be_const_int(1),
|
||||
/* K14 */ be_nested_str_weak(INVALID_ACTION),
|
||||
/* K10 */ be_nested_str_weak(status),
|
||||
/* K11 */ be_nested_str_weak(CONSTRAINT_ERROR),
|
||||
/* K12 */ be_const_int(1),
|
||||
/* K13 */ be_nested_str_weak(INVALID_ACTION),
|
||||
}),
|
||||
be_str_weak(write_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[102]) { /* code */
|
||||
( &(const binstruction[101]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
|
@ -80,9 +79,9 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
|
|||
0x881C0504, // 0004 GETMBR R7 R2 K4
|
||||
0x5422002F, // 0005 LDINT R8 48
|
||||
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||
0x7822001A, // 0007 JMPF R8 #0023
|
||||
0x78220019, // 0007 JMPF R8 #0022
|
||||
0x1C200F05, // 0008 EQ R8 R7 K5
|
||||
0x78220017, // 0009 JMPF R8 #0022
|
||||
0x78220016, // 0009 JMPF R8 #0021
|
||||
0x60200004, // 000A GETGBL R8 G4
|
||||
0x5C240600, // 000B MOVE R9 R3
|
||||
0x7C200200, // 000C CALL R8 1
|
||||
|
@ -92,89 +91,88 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
|
|||
0x5C240600, // 0010 MOVE R9 R3
|
||||
0xB82A0E00, // 0011 GETNGBL R10 K7
|
||||
0x7C200400, // 0012 CALL R8 2
|
||||
0x78220008, // 0013 JMPF R8 #001D
|
||||
0x78220007, // 0013 JMPF R8 #001C
|
||||
0x90061003, // 0014 SETMBR R1 K8 R3
|
||||
0x8C200109, // 0015 GETMET R8 R0 K9
|
||||
0x8828050A, // 0016 GETMBR R10 R2 K10
|
||||
0x882C0503, // 0017 GETMBR R11 R2 K3
|
||||
0x88300504, // 0018 GETMBR R12 R2 K4
|
||||
0x7C200800, // 0019 CALL R8 4
|
||||
0x50200200, // 001A LDBOOL R8 1 0
|
||||
0x80041000, // 001B RET 1 R8
|
||||
0x70020004, // 001C JMP #0022
|
||||
0xB8220200, // 001D GETNGBL R8 K1
|
||||
0x8820110C, // 001E GETMBR R8 R8 K12
|
||||
0x900A1608, // 001F SETMBR R2 K11 R8
|
||||
0x50200000, // 0020 LDBOOL R8 0 0
|
||||
0x80041000, // 0021 RET 1 R8
|
||||
0x70020041, // 0022 JMP #0065
|
||||
0x5422001E, // 0023 LDINT R8 31
|
||||
0x1C200C08, // 0024 EQ R8 R6 R8
|
||||
0x78220004, // 0025 JMPF R8 #002B
|
||||
0x1C200F05, // 0026 EQ R8 R7 K5
|
||||
0x78220001, // 0027 JMPF R8 #002A
|
||||
0x50200200, // 0028 LDBOOL R8 1 0
|
||||
0x80041000, // 0029 RET 1 R8
|
||||
0x70020039, // 002A JMP #0065
|
||||
0x54220027, // 002B LDINT R8 40
|
||||
0x1C200C08, // 002C EQ R8 R6 R8
|
||||
0x7822000B, // 002D JMPF R8 #003A
|
||||
0x54220004, // 002E LDINT R8 5
|
||||
0x1C200E08, // 002F EQ R8 R7 R8
|
||||
0x78220002, // 0030 JMPF R8 #0034
|
||||
0x50200200, // 0031 LDBOOL R8 1 0
|
||||
0x80041000, // 0032 RET 1 R8
|
||||
0x70020004, // 0033 JMP #0039
|
||||
0x54220005, // 0034 LDINT R8 6
|
||||
0x1C200E08, // 0035 EQ R8 R7 R8
|
||||
0x78220001, // 0036 JMPF R8 #0039
|
||||
0x50200200, // 0037 LDBOOL R8 1 0
|
||||
0x80041000, // 0038 RET 1 R8
|
||||
0x7002002A, // 0039 JMP #0065
|
||||
0x54220029, // 003A LDINT R8 42
|
||||
0x1C200C08, // 003B EQ R8 R6 R8
|
||||
0x78220004, // 003C JMPF R8 #0042
|
||||
0x1C200F05, // 003D EQ R8 R7 K5
|
||||
0x78220001, // 003E JMPF R8 #0041
|
||||
0x50200200, // 003F LDBOOL R8 1 0
|
||||
0x80041000, // 0040 RET 1 R8
|
||||
0x70020022, // 0041 JMP #0065
|
||||
0x5422002A, // 0042 LDINT R8 43
|
||||
0x1C200C08, // 0043 EQ R8 R6 R8
|
||||
0x78220007, // 0044 JMPF R8 #004D
|
||||
0x1C200F05, // 0045 EQ R8 R7 K5
|
||||
0x78220004, // 0046 JMPF R8 #004C
|
||||
0xB8220200, // 0047 GETNGBL R8 K1
|
||||
0x8820110C, // 0048 GETMBR R8 R8 K12
|
||||
0x900A1608, // 0049 SETMBR R2 K11 R8
|
||||
0x50200000, // 004A LDBOOL R8 0 0
|
||||
0x80041000, // 004B RET 1 R8
|
||||
0x70020017, // 004C JMP #0065
|
||||
0x5422002B, // 004D LDINT R8 44
|
||||
0x1C200C08, // 004E EQ R8 R6 R8
|
||||
0x78220009, // 004F JMPF R8 #005A
|
||||
0x1C200F05, // 0050 EQ R8 R7 K5
|
||||
0x78220002, // 0051 JMPF R8 #0055
|
||||
0x50200200, // 0052 LDBOOL R8 1 0
|
||||
0x80041000, // 0053 RET 1 R8
|
||||
0x70020003, // 0054 JMP #0059
|
||||
0x1C200F0D, // 0055 EQ R8 R7 K13
|
||||
0x78220001, // 0056 JMPF R8 #0059
|
||||
0x50200200, // 0057 LDBOOL R8 1 0
|
||||
0x80041000, // 0058 RET 1 R8
|
||||
0x7002000A, // 0059 JMP #0065
|
||||
0x54220030, // 005A LDINT R8 49
|
||||
0x1C200C08, // 005B EQ R8 R6 R8
|
||||
0x78220007, // 005C JMPF R8 #0065
|
||||
0x54220003, // 005D LDINT R8 4
|
||||
0x1C200E08, // 005E EQ R8 R7 R8
|
||||
0x78220004, // 005F JMPF R8 #0065
|
||||
0xB8220200, // 0060 GETNGBL R8 K1
|
||||
0x8820110E, // 0061 GETMBR R8 R8 K14
|
||||
0x900A1608, // 0062 SETMBR R2 K11 R8
|
||||
0x50200000, // 0063 LDBOOL R8 0 0
|
||||
0x80041000, // 0064 RET 1 R8
|
||||
0x80000000, // 0065 RET 0
|
||||
0x88280503, // 0016 GETMBR R10 R2 K3
|
||||
0x882C0504, // 0017 GETMBR R11 R2 K4
|
||||
0x7C200600, // 0018 CALL R8 3
|
||||
0x50200200, // 0019 LDBOOL R8 1 0
|
||||
0x80041000, // 001A RET 1 R8
|
||||
0x70020004, // 001B JMP #0021
|
||||
0xB8220200, // 001C GETNGBL R8 K1
|
||||
0x8820110B, // 001D GETMBR R8 R8 K11
|
||||
0x900A1408, // 001E SETMBR R2 K10 R8
|
||||
0x50200000, // 001F LDBOOL R8 0 0
|
||||
0x80041000, // 0020 RET 1 R8
|
||||
0x70020041, // 0021 JMP #0064
|
||||
0x5422001E, // 0022 LDINT R8 31
|
||||
0x1C200C08, // 0023 EQ R8 R6 R8
|
||||
0x78220004, // 0024 JMPF R8 #002A
|
||||
0x1C200F05, // 0025 EQ R8 R7 K5
|
||||
0x78220001, // 0026 JMPF R8 #0029
|
||||
0x50200200, // 0027 LDBOOL R8 1 0
|
||||
0x80041000, // 0028 RET 1 R8
|
||||
0x70020039, // 0029 JMP #0064
|
||||
0x54220027, // 002A LDINT R8 40
|
||||
0x1C200C08, // 002B EQ R8 R6 R8
|
||||
0x7822000B, // 002C JMPF R8 #0039
|
||||
0x54220004, // 002D LDINT R8 5
|
||||
0x1C200E08, // 002E EQ R8 R7 R8
|
||||
0x78220002, // 002F JMPF R8 #0033
|
||||
0x50200200, // 0030 LDBOOL R8 1 0
|
||||
0x80041000, // 0031 RET 1 R8
|
||||
0x70020004, // 0032 JMP #0038
|
||||
0x54220005, // 0033 LDINT R8 6
|
||||
0x1C200E08, // 0034 EQ R8 R7 R8
|
||||
0x78220001, // 0035 JMPF R8 #0038
|
||||
0x50200200, // 0036 LDBOOL R8 1 0
|
||||
0x80041000, // 0037 RET 1 R8
|
||||
0x7002002A, // 0038 JMP #0064
|
||||
0x54220029, // 0039 LDINT R8 42
|
||||
0x1C200C08, // 003A EQ R8 R6 R8
|
||||
0x78220004, // 003B JMPF R8 #0041
|
||||
0x1C200F05, // 003C EQ R8 R7 K5
|
||||
0x78220001, // 003D JMPF R8 #0040
|
||||
0x50200200, // 003E LDBOOL R8 1 0
|
||||
0x80041000, // 003F RET 1 R8
|
||||
0x70020022, // 0040 JMP #0064
|
||||
0x5422002A, // 0041 LDINT R8 43
|
||||
0x1C200C08, // 0042 EQ R8 R6 R8
|
||||
0x78220007, // 0043 JMPF R8 #004C
|
||||
0x1C200F05, // 0044 EQ R8 R7 K5
|
||||
0x78220004, // 0045 JMPF R8 #004B
|
||||
0xB8220200, // 0046 GETNGBL R8 K1
|
||||
0x8820110B, // 0047 GETMBR R8 R8 K11
|
||||
0x900A1408, // 0048 SETMBR R2 K10 R8
|
||||
0x50200000, // 0049 LDBOOL R8 0 0
|
||||
0x80041000, // 004A RET 1 R8
|
||||
0x70020017, // 004B JMP #0064
|
||||
0x5422002B, // 004C LDINT R8 44
|
||||
0x1C200C08, // 004D EQ R8 R6 R8
|
||||
0x78220009, // 004E JMPF R8 #0059
|
||||
0x1C200F05, // 004F EQ R8 R7 K5
|
||||
0x78220002, // 0050 JMPF R8 #0054
|
||||
0x50200200, // 0051 LDBOOL R8 1 0
|
||||
0x80041000, // 0052 RET 1 R8
|
||||
0x70020003, // 0053 JMP #0058
|
||||
0x1C200F0C, // 0054 EQ R8 R7 K12
|
||||
0x78220001, // 0055 JMPF R8 #0058
|
||||
0x50200200, // 0056 LDBOOL R8 1 0
|
||||
0x80041000, // 0057 RET 1 R8
|
||||
0x7002000A, // 0058 JMP #0064
|
||||
0x54220030, // 0059 LDINT R8 49
|
||||
0x1C200C08, // 005A EQ R8 R6 R8
|
||||
0x78220007, // 005B JMPF R8 #0064
|
||||
0x54220003, // 005C LDINT R8 4
|
||||
0x1C200E08, // 005D EQ R8 R7 R8
|
||||
0x78220004, // 005E JMPF R8 #0064
|
||||
0xB8220200, // 005F GETNGBL R8 K1
|
||||
0x8820110D, // 0060 GETMBR R8 R8 K13
|
||||
0x900A1408, // 0061 SETMBR R2 K10 R8
|
||||
0x50200000, // 0062 LDBOOL R8 0 0
|
||||
0x80041000, // 0063 RET 1 R8
|
||||
0x80000000, // 0064 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -101,7 +101,7 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
|
|||
/* K1 */ be_nested_str_weak(pre_value),
|
||||
/* K2 */ be_nested_str_weak(match),
|
||||
/* K3 */ be_nested_str_weak(shadow_value),
|
||||
/* K4 */ be_nested_str_weak(valued_changed),
|
||||
/* K4 */ be_nested_str_weak(value_changed),
|
||||
}),
|
||||
be_str_weak(parse_sensors),
|
||||
&be_const_str_solidified,
|
||||
|
@ -134,9 +134,9 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
** Solidified function: value_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_value_changed, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
|
@ -147,7 +147,7 @@ be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
|
|||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(valued_changed),
|
||||
be_str_weak(value_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80000000, // 0000 RET 0
|
||||
|
@ -171,7 +171,7 @@ be_local_class(Matter_Plugin_Sensor,
|
|||
{ be_const_key_weak(tasmota_sensor_matcher, 6), be_const_var(1) },
|
||||
{ be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
|
||||
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
|
||||
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
|
||||
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_value_changed_closure) },
|
||||
{ be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
|
||||
})),
|
||||
|
|
|
@ -145,11 +145,11 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
** Solidified function: value_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_Humidity_value_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -161,15 +161,14 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
|
|||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
be_str_weak(value_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x54160404, // 0002 LDINT R5 1029
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
0x54120404, // 0001 LDINT R4 1029
|
||||
0x58140001, // 0002 LDCONST R5 K1
|
||||
0x7C080600, // 0003 CALL R2 3
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -186,7 +185,7 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
|
|||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
|
||||
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
|
||||
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
|
@ -200,14 +199,14 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
|
|||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(humidity) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
|
||||
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_value_changed_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(775, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
|
||||
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Humidity)
|
||||
);
|
||||
|
|
|
@ -144,11 +144,11 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
** Solidified function: value_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_Illuminance_value_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -160,15 +160,14 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
|
|||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
be_str_weak(value_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x541603FF, // 0002 LDINT R5 1024
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
0x541203FF, // 0001 LDINT R4 1024
|
||||
0x58140001, // 0002 LDCONST R5 K1
|
||||
0x7C080600, // 0003 CALL R2 3
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -185,7 +184,7 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
|
|||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
|
||||
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
|
||||
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
|
@ -199,14 +198,14 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
|
|||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(illuminance) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
|
||||
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_value_changed_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(262, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
|
||||
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Illuminance)
|
||||
);
|
||||
|
|
|
@ -144,11 +144,11 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
** Solidified function: value_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_Pressure_value_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -160,15 +160,14 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
|
|||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
be_str_weak(value_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x54160402, // 0002 LDINT R5 1027
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
0x54120402, // 0001 LDINT R4 1027
|
||||
0x58140001, // 0002 LDCONST R5 K1
|
||||
0x7C080600, // 0003 CALL R2 3
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -185,7 +184,7 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
|
|||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
|
||||
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
|
||||
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
|
@ -199,14 +198,14 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
|
|||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(pressure) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
|
||||
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_value_changed_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(773, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
|
||||
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Pressure)
|
||||
);
|
||||
|
|
|
@ -142,11 +142,11 @@ be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
|
|||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: valued_changed
|
||||
** Solidified function: value_changed
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
|
||||
be_local_closure(Matter_Plugin_Sensor_Temp_value_changed, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -158,15 +158,14 @@ be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
|
|||
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(valued_changed),
|
||||
be_str_weak(value_changed),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x4C100000, // 0001 LDNIL R4
|
||||
0x54160401, // 0002 LDINT R5 1026
|
||||
0x58180001, // 0003 LDCONST R6 K1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
0x54120401, // 0001 LDINT R4 1026
|
||||
0x58140001, // 0002 LDCONST R5 K1
|
||||
0x7C080600, // 0003 CALL R2 3
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -183,7 +182,7 @@ be_local_class(Matter_Plugin_Sensor_Temp,
|
|||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
|
||||
{ be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
|
||||
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
|
||||
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
|
@ -197,14 +196,14 @@ be_local_class(Matter_Plugin_Sensor_Temp,
|
|||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(temperature) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
|
||||
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_value_changed_closure) },
|
||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(770, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) },
|
||||
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
|
||||
{ be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Sensor_Temp)
|
||||
);
|
||||
|
|
|
@ -0,0 +1,710 @@
|
|||
/* Solidification of Matter_Plugin_Shutter.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
extern const bclass be_class_Matter_Plugin_Shutter;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: <lambda>
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Shutter__X3Clambda_X3E, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(_X3Clambda_X3E),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x60040009, // 0000 GETGBL R1 G9
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_attribute
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[19]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(attribute),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(create_TLV),
|
||||
/* K8 */ be_nested_str_weak(U1),
|
||||
/* K9 */ be_nested_str_weak(U2),
|
||||
/* K10 */ be_const_int(1),
|
||||
/* K11 */ be_nested_str_weak(shadow_shutter_pos),
|
||||
/* K12 */ be_nested_str_weak(shadow_shutter_tilt),
|
||||
/* K13 */ be_nested_str_weak(shadow_shutter_direction),
|
||||
/* K14 */ be_const_int(2),
|
||||
/* K15 */ be_nested_str_weak(shadow_shutter_target),
|
||||
/* K16 */ be_nested_str_weak(U4),
|
||||
/* K17 */ be_const_int(3),
|
||||
/* K18 */ be_nested_str_weak(read_attribute),
|
||||
}),
|
||||
be_str_weak(read_attribute),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[186]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0xB8120200, // 0001 GETNGBL R4 K1
|
||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
||||
0x88140503, // 0003 GETMBR R5 R2 K3
|
||||
0x88180504, // 0004 GETMBR R6 R2 K4
|
||||
0x541E0101, // 0005 LDINT R7 258
|
||||
0x1C1C0A07, // 0006 EQ R7 R5 R7
|
||||
0x781E00A8, // 0007 JMPF R7 #00B1
|
||||
0x8C1C0105, // 0008 GETMET R7 R0 K5
|
||||
0x7C1C0200, // 0009 CALL R7 1
|
||||
0x1C1C0D06, // 000A EQ R7 R6 K6
|
||||
0x781E0005, // 000B JMPF R7 #0012
|
||||
0x8C1C0907, // 000C GETMET R7 R4 K7
|
||||
0x88240908, // 000D GETMBR R9 R4 K8
|
||||
0x542A00FE, // 000E LDINT R10 255
|
||||
0x7C1C0600, // 000F CALL R7 3
|
||||
0x80040E00, // 0010 RET 1 R7
|
||||
0x7002009D, // 0011 JMP #00B0
|
||||
0x541E0004, // 0012 LDINT R7 5
|
||||
0x1C1C0C07, // 0013 EQ R7 R6 R7
|
||||
0x781E0005, // 0014 JMPF R7 #001B
|
||||
0x8C1C0907, // 0015 GETMET R7 R4 K7
|
||||
0x88240909, // 0016 GETMBR R9 R4 K9
|
||||
0x58280006, // 0017 LDCONST R10 K6
|
||||
0x7C1C0600, // 0018 CALL R7 3
|
||||
0x80040E00, // 0019 RET 1 R7
|
||||
0x70020094, // 001A JMP #00B0
|
||||
0x541E0005, // 001B LDINT R7 6
|
||||
0x1C1C0C07, // 001C EQ R7 R6 R7
|
||||
0x781E0005, // 001D JMPF R7 #0024
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x88240909, // 001F GETMBR R9 R4 K9
|
||||
0x58280006, // 0020 LDCONST R10 K6
|
||||
0x7C1C0600, // 0021 CALL R7 3
|
||||
0x80040E00, // 0022 RET 1 R7
|
||||
0x7002008B, // 0023 JMP #00B0
|
||||
0x541E0006, // 0024 LDINT R7 7
|
||||
0x1C1C0C07, // 0025 EQ R7 R6 R7
|
||||
0x781E0008, // 0026 JMPF R7 #0030
|
||||
0x8C1C0907, // 0027 GETMET R7 R4 K7
|
||||
0x88240908, // 0028 GETMBR R9 R4 K8
|
||||
0x542A0007, // 0029 LDINT R10 8
|
||||
0x002A140A, // 002A ADD R10 K10 R10
|
||||
0x542E000F, // 002B LDINT R11 16
|
||||
0x0028140B, // 002C ADD R10 R10 R11
|
||||
0x7C1C0600, // 002D CALL R7 3
|
||||
0x80040E00, // 002E RET 1 R7
|
||||
0x7002007F, // 002F JMP #00B0
|
||||
0x541E000C, // 0030 LDINT R7 13
|
||||
0x1C1C0C07, // 0031 EQ R7 R6 R7
|
||||
0x781E0005, // 0032 JMPF R7 #0039
|
||||
0x8C1C0907, // 0033 GETMET R7 R4 K7
|
||||
0x88240908, // 0034 GETMBR R9 R4 K8
|
||||
0x542A00FE, // 0035 LDINT R10 255
|
||||
0x7C1C0600, // 0036 CALL R7 3
|
||||
0x80040E00, // 0037 RET 1 R7
|
||||
0x70020076, // 0038 JMP #00B0
|
||||
0x541E0007, // 0039 LDINT R7 8
|
||||
0x1C1C0C07, // 003A EQ R7 R6 R7
|
||||
0x781E0007, // 003B JMPF R7 #0044
|
||||
0x8C1C0907, // 003C GETMET R7 R4 K7
|
||||
0x88240909, // 003D GETMBR R9 R4 K9
|
||||
0x542A0063, // 003E LDINT R10 100
|
||||
0x882C010B, // 003F GETMBR R11 R0 K11
|
||||
0x0428140B, // 0040 SUB R10 R10 R11
|
||||
0x7C1C0600, // 0041 CALL R7 3
|
||||
0x80040E00, // 0042 RET 1 R7
|
||||
0x7002006B, // 0043 JMP #00B0
|
||||
0x541E000D, // 0044 LDINT R7 14
|
||||
0x1C1C0C07, // 0045 EQ R7 R6 R7
|
||||
0x781E0009, // 0046 JMPF R7 #0051
|
||||
0x8C1C0907, // 0047 GETMET R7 R4 K7
|
||||
0x88240909, // 0048 GETMBR R9 R4 K9
|
||||
0x542A0063, // 0049 LDINT R10 100
|
||||
0x882C010B, // 004A GETMBR R11 R0 K11
|
||||
0x0428140B, // 004B SUB R10 R10 R11
|
||||
0x542E0063, // 004C LDINT R11 100
|
||||
0x0828140B, // 004D MUL R10 R10 R11
|
||||
0x7C1C0600, // 004E CALL R7 3
|
||||
0x80040E00, // 004F RET 1 R7
|
||||
0x7002005E, // 0050 JMP #00B0
|
||||
0x541E0008, // 0051 LDINT R7 9
|
||||
0x1C1C0C07, // 0052 EQ R7 R6 R7
|
||||
0x781E0007, // 0053 JMPF R7 #005C
|
||||
0x8C1C0907, // 0054 GETMET R7 R4 K7
|
||||
0x88240909, // 0055 GETMBR R9 R4 K9
|
||||
0x542A0063, // 0056 LDINT R10 100
|
||||
0x882C010C, // 0057 GETMBR R11 R0 K12
|
||||
0x0428140B, // 0058 SUB R10 R10 R11
|
||||
0x7C1C0600, // 0059 CALL R7 3
|
||||
0x80040E00, // 005A RET 1 R7
|
||||
0x70020053, // 005B JMP #00B0
|
||||
0x541E000E, // 005C LDINT R7 15
|
||||
0x1C1C0C07, // 005D EQ R7 R6 R7
|
||||
0x781E0009, // 005E JMPF R7 #0069
|
||||
0x8C1C0907, // 005F GETMET R7 R4 K7
|
||||
0x88240909, // 0060 GETMBR R9 R4 K9
|
||||
0x542A0063, // 0061 LDINT R10 100
|
||||
0x882C010C, // 0062 GETMBR R11 R0 K12
|
||||
0x0428140B, // 0063 SUB R10 R10 R11
|
||||
0x542E0063, // 0064 LDINT R11 100
|
||||
0x0828140B, // 0065 MUL R10 R10 R11
|
||||
0x7C1C0600, // 0066 CALL R7 3
|
||||
0x80040E00, // 0067 RET 1 R7
|
||||
0x70020046, // 0068 JMP #00B0
|
||||
0x541E0009, // 0069 LDINT R7 10
|
||||
0x1C1C0C07, // 006A EQ R7 R6 R7
|
||||
0x781E0010, // 006B JMPF R7 #007D
|
||||
0x881C010D, // 006C GETMBR R7 R0 K13
|
||||
0x1C1C0F06, // 006D EQ R7 R7 K6
|
||||
0x781E0001, // 006E JMPF R7 #0071
|
||||
0x581C0006, // 006F LDCONST R7 K6
|
||||
0x70020005, // 0070 JMP #0077
|
||||
0x881C010D, // 0071 GETMBR R7 R0 K13
|
||||
0x241C0F06, // 0072 GT R7 R7 K6
|
||||
0x781E0001, // 0073 JMPF R7 #0076
|
||||
0x581C000A, // 0074 LDCONST R7 K10
|
||||
0x70020000, // 0075 JMP #0077
|
||||
0x581C000E, // 0076 LDCONST R7 K14
|
||||
0x8C200907, // 0077 GETMET R8 R4 K7
|
||||
0x88280908, // 0078 GETMBR R10 R4 K8
|
||||
0x5C2C0E00, // 0079 MOVE R11 R7
|
||||
0x7C200600, // 007A CALL R8 3
|
||||
0x80041000, // 007B RET 1 R8
|
||||
0x70020032, // 007C JMP #00B0
|
||||
0x541E000A, // 007D LDINT R7 11
|
||||
0x1C1C0C07, // 007E EQ R7 R6 R7
|
||||
0x781E0009, // 007F JMPF R7 #008A
|
||||
0x8C1C0907, // 0080 GETMET R7 R4 K7
|
||||
0x88240909, // 0081 GETMBR R9 R4 K9
|
||||
0x542A0063, // 0082 LDINT R10 100
|
||||
0x882C010F, // 0083 GETMBR R11 R0 K15
|
||||
0x0428140B, // 0084 SUB R10 R10 R11
|
||||
0x542E0063, // 0085 LDINT R11 100
|
||||
0x0828140B, // 0086 MUL R10 R10 R11
|
||||
0x7C1C0600, // 0087 CALL R7 3
|
||||
0x80040E00, // 0088 RET 1 R7
|
||||
0x70020025, // 0089 JMP #00B0
|
||||
0x541E000B, // 008A LDINT R7 12
|
||||
0x1C1C0C07, // 008B EQ R7 R6 R7
|
||||
0x781E0005, // 008C JMPF R7 #0093
|
||||
0x8C1C0907, // 008D GETMET R7 R4 K7
|
||||
0x88240908, // 008E GETMBR R9 R4 K8
|
||||
0x58280006, // 008F LDCONST R10 K6
|
||||
0x7C1C0600, // 0090 CALL R7 3
|
||||
0x80040E00, // 0091 RET 1 R7
|
||||
0x7002001C, // 0092 JMP #00B0
|
||||
0x541E0016, // 0093 LDINT R7 23
|
||||
0x1C1C0C07, // 0094 EQ R7 R6 R7
|
||||
0x781E0005, // 0095 JMPF R7 #009C
|
||||
0x8C1C0907, // 0096 GETMET R7 R4 K7
|
||||
0x88240908, // 0097 GETMBR R9 R4 K8
|
||||
0x58280006, // 0098 LDCONST R10 K6
|
||||
0x7C1C0600, // 0099 CALL R7 3
|
||||
0x80040E00, // 009A RET 1 R7
|
||||
0x70020013, // 009B JMP #00B0
|
||||
0x541EFFFB, // 009C LDINT R7 65532
|
||||
0x1C1C0C07, // 009D EQ R7 R6 R7
|
||||
0x781E0008, // 009E JMPF R7 #00A8
|
||||
0x8C1C0907, // 009F GETMET R7 R4 K7
|
||||
0x88240910, // 00A0 GETMBR R9 R4 K16
|
||||
0x542A0003, // 00A1 LDINT R10 4
|
||||
0x002A220A, // 00A2 ADD R10 K17 R10
|
||||
0x542E000F, // 00A3 LDINT R11 16
|
||||
0x0028140B, // 00A4 ADD R10 R10 R11
|
||||
0x7C1C0600, // 00A5 CALL R7 3
|
||||
0x80040E00, // 00A6 RET 1 R7
|
||||
0x70020007, // 00A7 JMP #00B0
|
||||
0x541EFFFC, // 00A8 LDINT R7 65533
|
||||
0x1C1C0C07, // 00A9 EQ R7 R6 R7
|
||||
0x781E0004, // 00AA JMPF R7 #00B0
|
||||
0x8C1C0907, // 00AB GETMET R7 R4 K7
|
||||
0x88240910, // 00AC GETMBR R9 R4 K16
|
||||
0x542A0004, // 00AD LDINT R10 5
|
||||
0x7C1C0600, // 00AE CALL R7 3
|
||||
0x80040E00, // 00AF RET 1 R7
|
||||
0x70020007, // 00B0 JMP #00B9
|
||||
0x601C0003, // 00B1 GETGBL R7 G3
|
||||
0x5C200000, // 00B2 MOVE R8 R0
|
||||
0x7C1C0200, // 00B3 CALL R7 1
|
||||
0x8C1C0F12, // 00B4 GETMET R7 R7 K18
|
||||
0x5C240200, // 00B5 MOVE R9 R1
|
||||
0x5C280400, // 00B6 MOVE R10 R2
|
||||
0x7C1C0600, // 00B7 CALL R7 3
|
||||
0x80040E00, // 00B8 RET 1 R7
|
||||
0x80000000, // 00B9 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Shutter_init, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(tasmota_shutter_index),
|
||||
/* K2 */ be_nested_str_weak(find),
|
||||
/* K3 */ be_nested_str_weak(ARG),
|
||||
/* K4 */ be_const_int(0),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60100003, // 0000 GETGBL R4 G3
|
||||
0x5C140000, // 0001 MOVE R5 R0
|
||||
0x7C100200, // 0002 CALL R4 1
|
||||
0x8C100900, // 0003 GETMET R4 R4 K0
|
||||
0x5C180200, // 0004 MOVE R6 R1
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x5C200600, // 0006 MOVE R8 R3
|
||||
0x7C100800, // 0007 CALL R4 4
|
||||
0x8C100702, // 0008 GETMET R4 R3 K2
|
||||
0x88180103, // 0009 GETMBR R6 R0 K3
|
||||
0x7C100400, // 000A CALL R4 2
|
||||
0x90020204, // 000B SETMBR R0 K1 R4
|
||||
0x88100101, // 000C GETMBR R4 R0 K1
|
||||
0x4C140000, // 000D LDNIL R5
|
||||
0x1C100805, // 000E EQ R4 R4 R5
|
||||
0x78120000, // 000F JMPF R4 #0011
|
||||
0x90020304, // 0010 SETMBR R0 K1 K4
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: update_shadow
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Shutter_update_shadow, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(cmd),
|
||||
/* K2 */ be_nested_str_weak(ShutterPosition),
|
||||
/* K3 */ be_nested_str_weak(tasmota_shutter_index),
|
||||
/* K4 */ be_const_int(1),
|
||||
/* K5 */ be_nested_str_weak(parse_sensors),
|
||||
/* K6 */ be_nested_str_weak(update_shadow),
|
||||
}),
|
||||
be_str_weak(update_shadow),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x600C0008, // 0002 GETGBL R3 G8
|
||||
0x88100103, // 0003 GETMBR R4 R0 K3
|
||||
0x00100904, // 0004 ADD R4 R4 K4
|
||||
0x7C0C0200, // 0005 CALL R3 1
|
||||
0x000E0403, // 0006 ADD R3 K2 R3
|
||||
0x50100200, // 0007 LDBOOL R4 1 0
|
||||
0x7C040600, // 0008 CALL R1 3
|
||||
0x78060002, // 0009 JMPF R1 #000D
|
||||
0x8C080105, // 000A GETMET R2 R0 K5
|
||||
0x5C100200, // 000B MOVE R4 R1
|
||||
0x7C080400, // 000C CALL R2 2
|
||||
0x60080003, // 000D GETGBL R2 G3
|
||||
0x5C0C0000, // 000E MOVE R3 R0
|
||||
0x7C080200, // 000F CALL R2 1
|
||||
0x8C080506, // 0010 GETMET R2 R2 K6
|
||||
0x7C080200, // 0011 CALL R2 1
|
||||
0x80000000, // 0012 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: invoke_request
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[24]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(light),
|
||||
/* K1 */ be_nested_str_weak(matter),
|
||||
/* K2 */ be_nested_str_weak(TLV),
|
||||
/* K3 */ be_nested_str_weak(cluster),
|
||||
/* K4 */ be_nested_str_weak(command),
|
||||
/* K5 */ be_nested_str_weak(update_shadow_lazy),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(tasmota),
|
||||
/* K8 */ be_nested_str_weak(cmd),
|
||||
/* K9 */ be_nested_str_weak(ShutterStopOpen),
|
||||
/* K10 */ be_nested_str_weak(tasmota_shutter_index),
|
||||
/* K11 */ be_const_int(1),
|
||||
/* K12 */ be_nested_str_weak(update_shadow),
|
||||
/* K13 */ be_nested_str_weak(ShutterStopClose),
|
||||
/* K14 */ be_const_int(2),
|
||||
/* K15 */ be_nested_str_weak(ShutterStop),
|
||||
/* K16 */ be_nested_str_weak(log),
|
||||
/* K17 */ be_nested_str_weak(MTR_X3A_X20Tilt_X20_X3D_X20),
|
||||
/* K18 */ be_nested_str_weak(findsubval),
|
||||
/* K19 */ be_nested_str_weak(ShutterStopPosition),
|
||||
/* K20 */ be_nested_str_weak(_X20),
|
||||
/* K21 */ be_nested_str_weak(pos_X25_X3A),
|
||||
/* K22 */ be_nested_str_weak(tilt_X25_X3A),
|
||||
/* K23 */ be_nested_str_weak(invoke_request),
|
||||
}),
|
||||
be_str_weak(invoke_request),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[131]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0xB8160200, // 0001 GETNGBL R5 K1
|
||||
0x88140B02, // 0002 GETMBR R5 R5 K2
|
||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||
0x881C0704, // 0004 GETMBR R7 R3 K4
|
||||
0x54220101, // 0005 LDINT R8 258
|
||||
0x1C200C08, // 0006 EQ R8 R6 R8
|
||||
0x78220070, // 0007 JMPF R8 #0079
|
||||
0x8C200105, // 0008 GETMET R8 R0 K5
|
||||
0x7C200200, // 0009 CALL R8 1
|
||||
0x1C200F06, // 000A EQ R8 R7 K6
|
||||
0x7822000D, // 000B JMPF R8 #001A
|
||||
0xB8220E00, // 000C GETNGBL R8 K7
|
||||
0x8C201108, // 000D GETMET R8 R8 K8
|
||||
0x60280008, // 000E GETGBL R10 G8
|
||||
0x882C010A, // 000F GETMBR R11 R0 K10
|
||||
0x002C170B, // 0010 ADD R11 R11 K11
|
||||
0x7C280200, // 0011 CALL R10 1
|
||||
0x002A120A, // 0012 ADD R10 K9 R10
|
||||
0x502C0200, // 0013 LDBOOL R11 1 0
|
||||
0x7C200600, // 0014 CALL R8 3
|
||||
0x8C20010C, // 0015 GETMET R8 R0 K12
|
||||
0x7C200200, // 0016 CALL R8 1
|
||||
0x50200200, // 0017 LDBOOL R8 1 0
|
||||
0x80041000, // 0018 RET 1 R8
|
||||
0x7002005D, // 0019 JMP #0078
|
||||
0x1C200F0B, // 001A EQ R8 R7 K11
|
||||
0x7822000D, // 001B JMPF R8 #002A
|
||||
0xB8220E00, // 001C GETNGBL R8 K7
|
||||
0x8C201108, // 001D GETMET R8 R8 K8
|
||||
0x60280008, // 001E GETGBL R10 G8
|
||||
0x882C010A, // 001F GETMBR R11 R0 K10
|
||||
0x002C170B, // 0020 ADD R11 R11 K11
|
||||
0x7C280200, // 0021 CALL R10 1
|
||||
0x002A1A0A, // 0022 ADD R10 K13 R10
|
||||
0x502C0200, // 0023 LDBOOL R11 1 0
|
||||
0x7C200600, // 0024 CALL R8 3
|
||||
0x8C20010C, // 0025 GETMET R8 R0 K12
|
||||
0x7C200200, // 0026 CALL R8 1
|
||||
0x50200200, // 0027 LDBOOL R8 1 0
|
||||
0x80041000, // 0028 RET 1 R8
|
||||
0x7002004D, // 0029 JMP #0078
|
||||
0x1C200F0E, // 002A EQ R8 R7 K14
|
||||
0x7822000D, // 002B JMPF R8 #003A
|
||||
0xB8220E00, // 002C GETNGBL R8 K7
|
||||
0x8C201108, // 002D GETMET R8 R8 K8
|
||||
0x60280008, // 002E GETGBL R10 G8
|
||||
0x882C010A, // 002F GETMBR R11 R0 K10
|
||||
0x002C170B, // 0030 ADD R11 R11 K11
|
||||
0x7C280200, // 0031 CALL R10 1
|
||||
0x002A1E0A, // 0032 ADD R10 K15 R10
|
||||
0x502C0200, // 0033 LDBOOL R11 1 0
|
||||
0x7C200600, // 0034 CALL R8 3
|
||||
0x8C20010C, // 0035 GETMET R8 R0 K12
|
||||
0x7C200200, // 0036 CALL R8 1
|
||||
0x50200200, // 0037 LDBOOL R8 1 0
|
||||
0x80041000, // 0038 RET 1 R8
|
||||
0x7002003D, // 0039 JMP #0078
|
||||
0x54220004, // 003A LDINT R8 5
|
||||
0x1C200E08, // 003B EQ R8 R7 R8
|
||||
0x78220028, // 003C JMPF R8 #0066
|
||||
0xB8220E00, // 003D GETNGBL R8 K7
|
||||
0x8C201110, // 003E GETMET R8 R8 K16
|
||||
0x60280008, // 003F GETGBL R10 G8
|
||||
0x5C2C0400, // 0040 MOVE R11 R2
|
||||
0x7C280200, // 0041 CALL R10 1
|
||||
0x002A220A, // 0042 ADD R10 K17 R10
|
||||
0x582C000E, // 0043 LDCONST R11 K14
|
||||
0x7C200600, // 0044 CALL R8 3
|
||||
0x8C200512, // 0045 GETMET R8 R2 K18
|
||||
0x58280006, // 0046 LDCONST R10 K6
|
||||
0x7C200400, // 0047 CALL R8 2
|
||||
0x4C240000, // 0048 LDNIL R9
|
||||
0x20241009, // 0049 NE R9 R8 R9
|
||||
0x78260017, // 004A JMPF R9 #0063
|
||||
0x54260063, // 004B LDINT R9 100
|
||||
0x0C201009, // 004C DIV R8 R8 R9
|
||||
0xB8260E00, // 004D GETNGBL R9 K7
|
||||
0x8C241308, // 004E GETMET R9 R9 K8
|
||||
0x602C0008, // 004F GETGBL R11 G8
|
||||
0x8830010A, // 0050 GETMBR R12 R0 K10
|
||||
0x0030190B, // 0051 ADD R12 R12 K11
|
||||
0x7C2C0200, // 0052 CALL R11 1
|
||||
0x002E260B, // 0053 ADD R11 K19 R11
|
||||
0x002C1714, // 0054 ADD R11 R11 K20
|
||||
0x60300008, // 0055 GETGBL R12 G8
|
||||
0x54360063, // 0056 LDINT R13 100
|
||||
0x04341A08, // 0057 SUB R13 R13 R8
|
||||
0x7C300200, // 0058 CALL R12 1
|
||||
0x002C160C, // 0059 ADD R11 R11 R12
|
||||
0x50300200, // 005A LDBOOL R12 1 0
|
||||
0x7C240600, // 005B CALL R9 3
|
||||
0x60240008, // 005C GETGBL R9 G8
|
||||
0x5C281000, // 005D MOVE R10 R8
|
||||
0x7C240200, // 005E CALL R9 1
|
||||
0x00262A09, // 005F ADD R9 K21 R9
|
||||
0x900E2009, // 0060 SETMBR R3 K16 R9
|
||||
0x8C24010C, // 0061 GETMET R9 R0 K12
|
||||
0x7C240200, // 0062 CALL R9 1
|
||||
0x50240200, // 0063 LDBOOL R9 1 0
|
||||
0x80041200, // 0064 RET 1 R9
|
||||
0x70020011, // 0065 JMP #0078
|
||||
0x54220007, // 0066 LDINT R8 8
|
||||
0x1C200E08, // 0067 EQ R8 R7 R8
|
||||
0x7822000E, // 0068 JMPF R8 #0078
|
||||
0x8C200512, // 0069 GETMET R8 R2 K18
|
||||
0x58280006, // 006A LDCONST R10 K6
|
||||
0x7C200400, // 006B CALL R8 2
|
||||
0x4C240000, // 006C LDNIL R9
|
||||
0x20241009, // 006D NE R9 R8 R9
|
||||
0x78260006, // 006E JMPF R9 #0076
|
||||
0x54260009, // 006F LDINT R9 10
|
||||
0x0C201009, // 0070 DIV R8 R8 R9
|
||||
0x60240008, // 0071 GETGBL R9 G8
|
||||
0x5C281000, // 0072 MOVE R10 R8
|
||||
0x7C240200, // 0073 CALL R9 1
|
||||
0x00262C09, // 0074 ADD R9 K22 R9
|
||||
0x900E2009, // 0075 SETMBR R3 K16 R9
|
||||
0x50240200, // 0076 LDBOOL R9 1 0
|
||||
0x80041200, // 0077 RET 1 R9
|
||||
0x70020008, // 0078 JMP #0082
|
||||
0x60200003, // 0079 GETGBL R8 G3
|
||||
0x5C240000, // 007A MOVE R9 R0
|
||||
0x7C200200, // 007B CALL R8 1
|
||||
0x8C201117, // 007C GETMET R8 R8 K23
|
||||
0x5C280200, // 007D MOVE R10 R1
|
||||
0x5C2C0400, // 007E MOVE R11 R2
|
||||
0x5C300600, // 007F MOVE R12 R3
|
||||
0x7C200800, // 0080 CALL R8 4
|
||||
0x80041000, // 0081 RET 1 R8
|
||||
0x80000000, // 0082 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: parse_sensors
|
||||
********************************************************************/
|
||||
be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(Shutter),
|
||||
/* K2 */ be_nested_str_weak(tasmota_shutter_index),
|
||||
/* K3 */ be_const_int(1),
|
||||
/* K4 */ be_nested_str_weak(contains),
|
||||
/* K5 */ be_nested_str_weak(find),
|
||||
/* K6 */ be_nested_str_weak(Position),
|
||||
/* K7 */ be_nested_str_weak(shadow_shutter_pos),
|
||||
/* K8 */ be_nested_str_weak(attribute_updated),
|
||||
/* K9 */ be_nested_str_weak(Tilt),
|
||||
/* K10 */ be_nested_str_weak(shadow_shutter_tilt),
|
||||
/* K11 */ be_nested_str_weak(Direction),
|
||||
/* K12 */ be_nested_str_weak(shadow_shutter_direction),
|
||||
/* K13 */ be_nested_str_weak(Target),
|
||||
/* K14 */ be_nested_str_weak(shadow_shutter_target),
|
||||
}),
|
||||
be_str_weak(parse_sensors),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[68]) { /* code */
|
||||
0xA40A0000, // 0000 IMPORT R2 K0
|
||||
0x600C0008, // 0001 GETGBL R3 G8
|
||||
0x88100102, // 0002 GETMBR R4 R0 K2
|
||||
0x00100903, // 0003 ADD R4 R4 K3
|
||||
0x7C0C0200, // 0004 CALL R3 1
|
||||
0x000E0203, // 0005 ADD R3 K1 R3
|
||||
0x8C100304, // 0006 GETMET R4 R1 K4
|
||||
0x5C180600, // 0007 MOVE R6 R3
|
||||
0x7C100400, // 0008 CALL R4 2
|
||||
0x78120038, // 0009 JMPF R4 #0043
|
||||
0x94100203, // 000A GETIDX R4 R1 R3
|
||||
0x8C140905, // 000B GETMET R5 R4 K5
|
||||
0x581C0006, // 000C LDCONST R7 K6
|
||||
0x7C140400, // 000D CALL R5 2
|
||||
0x4C180000, // 000E LDNIL R6
|
||||
0x20180A06, // 000F NE R6 R5 R6
|
||||
0x781A0007, // 0010 JMPF R6 #0019
|
||||
0x88180107, // 0011 GETMBR R6 R0 K7
|
||||
0x20180A06, // 0012 NE R6 R5 R6
|
||||
0x781A0003, // 0013 JMPF R6 #0018
|
||||
0x8C180108, // 0014 GETMET R6 R0 K8
|
||||
0x54220101, // 0015 LDINT R8 258
|
||||
0x5426000D, // 0016 LDINT R9 14
|
||||
0x7C180600, // 0017 CALL R6 3
|
||||
0x90020E05, // 0018 SETMBR R0 K7 R5
|
||||
0x8C180905, // 0019 GETMET R6 R4 K5
|
||||
0x58200009, // 001A LDCONST R8 K9
|
||||
0x7C180400, // 001B CALL R6 2
|
||||
0x4C1C0000, // 001C LDNIL R7
|
||||
0x201C0C07, // 001D NE R7 R6 R7
|
||||
0x781E0007, // 001E JMPF R7 #0027
|
||||
0x881C010A, // 001F GETMBR R7 R0 K10
|
||||
0x201C0C07, // 0020 NE R7 R6 R7
|
||||
0x781E0003, // 0021 JMPF R7 #0026
|
||||
0x8C1C0108, // 0022 GETMET R7 R0 K8
|
||||
0x54260101, // 0023 LDINT R9 258
|
||||
0x542A000E, // 0024 LDINT R10 15
|
||||
0x7C1C0600, // 0025 CALL R7 3
|
||||
0x90021406, // 0026 SETMBR R0 K10 R6
|
||||
0x8C1C0905, // 0027 GETMET R7 R4 K5
|
||||
0x5824000B, // 0028 LDCONST R9 K11
|
||||
0x7C1C0400, // 0029 CALL R7 2
|
||||
0x4C200000, // 002A LDNIL R8
|
||||
0x20200E08, // 002B NE R8 R7 R8
|
||||
0x78220007, // 002C JMPF R8 #0035
|
||||
0x8820010C, // 002D GETMBR R8 R0 K12
|
||||
0x20200E08, // 002E NE R8 R7 R8
|
||||
0x78220003, // 002F JMPF R8 #0034
|
||||
0x8C200108, // 0030 GETMET R8 R0 K8
|
||||
0x542A0101, // 0031 LDINT R10 258
|
||||
0x542E0009, // 0032 LDINT R11 10
|
||||
0x7C200600, // 0033 CALL R8 3
|
||||
0x90021807, // 0034 SETMBR R0 K12 R7
|
||||
0x8C200905, // 0035 GETMET R8 R4 K5
|
||||
0x5828000D, // 0036 LDCONST R10 K13
|
||||
0x7C200400, // 0037 CALL R8 2
|
||||
0x4C240000, // 0038 LDNIL R9
|
||||
0x20241009, // 0039 NE R9 R8 R9
|
||||
0x78260007, // 003A JMPF R9 #0043
|
||||
0x8824010E, // 003B GETMBR R9 R0 K14
|
||||
0x20241009, // 003C NE R9 R8 R9
|
||||
0x78260003, // 003D JMPF R9 #0042
|
||||
0x8C240108, // 003E GETMET R9 R0 K8
|
||||
0x542E0101, // 003F LDINT R11 258
|
||||
0x5432000A, // 0040 LDINT R12 11
|
||||
0x7C240600, // 0041 CALL R9 3
|
||||
0x90021C08, // 0042 SETMBR R0 K14 R8
|
||||
0x80000000, // 0043 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Matter_Plugin_Shutter
|
||||
********************************************************************/
|
||||
extern const bclass be_class_Matter_Plugin_Device;
|
||||
be_local_class(Matter_Plugin_Shutter,
|
||||
5,
|
||||
&be_class_Matter_Plugin_Device,
|
||||
be_nested_map(16,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Shutter__X3Clambda_X3E_closure) },
|
||||
{ be_const_key_weak(shadow_shutter_pos, -1), be_const_var(1) },
|
||||
{ be_const_key_weak(CLUSTERS, 14), 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(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||
be_const_list( * be_nested_list(15,
|
||||
( (struct bvalue*) &(const bvalue[]) {
|
||||
be_const_int(0),
|
||||
be_const_int(5),
|
||||
be_const_int(6),
|
||||
be_const_int(7),
|
||||
be_const_int(8),
|
||||
be_const_int(9),
|
||||
be_const_int(10),
|
||||
be_const_int(11),
|
||||
be_const_int(12),
|
||||
be_const_int(13),
|
||||
be_const_int(14),
|
||||
be_const_int(15),
|
||||
be_const_int(23),
|
||||
be_const_int(65532),
|
||||
be_const_int(65533),
|
||||
})) ) } )) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Shutter_init_closure) },
|
||||
{ be_const_key_weak(shadow_shutter_direction, -1), be_const_var(4) },
|
||||
{ be_const_key_weak(shadow_shutter_target, 15), be_const_var(2) },
|
||||
{ be_const_key_weak(NAME, 1), be_nested_str_weak(Shutter) },
|
||||
{ be_const_key_weak(ARG, -1), be_nested_str_weak(shutter) },
|
||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Shutter_invoke_request_closure) },
|
||||
{ be_const_key_weak(tasmota_shutter_index, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Shutter_read_attribute_closure) },
|
||||
{ be_const_key_weak(shadow_shutter_tilt, 8), be_const_var(3) },
|
||||
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Shutter_parse_sensors_closure) },
|
||||
{ be_const_key_weak(TYPE, 4), be_nested_str_weak(shutter) },
|
||||
{ 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(514, -1), be_const_int(2) },
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Shutter_update_shadow_closure) },
|
||||
})),
|
||||
be_str_weak(Matter_Plugin_Shutter)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Matter_Plugin_Shutter_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Matter_Plugin_Shutter);
|
||||
be_setglobal(vm, "Matter_Plugin_Shutter");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue