Matter full support of events (#21698)

This commit is contained in:
s-hadinger 2024-06-27 00:03:34 +02:00 committed by GitHub
parent 33225bfabb
commit 97017017a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 5795 additions and 3842 deletions

View File

@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
- Matter add internal debug option (#21634)
- Matter add Fan support (virtual only) (#21637)
- Matter show event name in logs (#21649)
- Matter full support of events
### Breaking Changed

View File

@ -209,7 +209,8 @@ extern int matter_publish_command(bvm *vm);
extern const bclass be_class_Matter_TLV; // need to declare it upfront because of circular reference
#include "solidify/solidified_Matter_Path_0.h"
#include "solidify/solidified_Matter_Path_1_Generator.h"
#include "solidify/solidified_Matter_Path_1_PathGenerator.h"
#include "solidify/solidified_Matter_Path_1_EventGenerator.h"
#include "solidify/solidified_Matter_TLV.h"
#include "solidify/solidified_Matter_IM_Data.h"
#include "solidify/solidified_Matter_UDPServer.h"
@ -455,6 +456,7 @@ module matter (scope: global, strings: weak) {
// Interation Model
Path, class(be_class_Matter_Path)
PathGenerator, class(be_class_Matter_PathGenerator)
EventGenerator, class(be_class_Matter_EventGenerator)
IM_Status, class(be_class_Matter_IM_Status)
IM_InvokeResponse, class(be_class_Matter_IM_InvokeResponse)
IM_WriteResponse, class(be_class_Matter_IM_WriteResponse)

View File

@ -38,20 +38,70 @@ class Matter_EventQueued
var event_id
var is_urgent
var priority
var data0, data1, data2
var event_no
var epoch_timestamp
var raw_tlv # content encoded as full TLV
def init(event_ib)
self.endpoint = event_ib.path.endpoint
self.cluster = event_ib.path.cluster
self.event_id = event_ib.path.event
self.is_urgent = event_ib.path.is_urgent
self.priority = event_ib.priority
def init(event_no, endpoint, cluster, event_id, is_urgent, priority, data0, data1, data2)
self.event_no = event_no
self.endpoint = endpoint
self.cluster = cluster
self.event_id = event_id
self.is_urgent = is_urgent
self.priority = priority
# priority
if (self.priority < 0) self.priority = 0 end
if (self.priority > matter.EVENT_CRITICAL) self.priority = matter.EVENT_CRITICAL end
self.event_no = int64.toint64(event_ib.event_number) # int64
self.raw_tlv = event_ib.to_TLV().tlv2raw() # bytes()
# epoch_time
self.epoch_timestamp = tasmota.rtc('utc')
if (self.epoch_timestamp < 1700000000)
self.epoch_timestamp = tasmota.rtc('config_time') # no valid time, take the last config time
end
self.data0 = data0
self.data1 = data1
self.data2 = data2
end
#################################################################################
# to_raw_bytes
#
# Computes a complete EventReportIB structure as bytes()
#
# It is memoized in self.raw_tlv, but is cleaned after sending messages to
# free up some space
def to_raw_bytes()
if (self.raw_tlv == nil)
var event_report = matter.EventReportIB()
var event_ib = matter.EventDataIB()
event_report.event_data = event_ib
var event_path = matter.EventPathIB()
event_path.endpoint = self.endpoint
event_path.cluster = self.cluster
event_path.event = self.event_id
event_path.is_urgent = self.is_urgent
event_ib.path = event_path
event_ib.priority = self.priority
event_ib.event_number = self.event_no
event_ib.epoch_timestamp = self.epoch_timestamp
event_ib.data = matter.TLV.Matter_TLV_struct()
if (self.data0 != nil) event_ib.data.add_obj(0, self.data0) end
if (self.data1 != nil) event_ib.data.add_obj(1, self.data1) end
if (self.data2 != nil) event_ib.data.add_obj(2, self.data2) end
self.raw_tlv = event_report.to_TLV().tlv2raw() # bytes()
end
return self.raw_tlv
end
#################################################################################
# compact
#
# Remove the local cache of `raw_tlv` to save space (it can always be recreated)
def compact()
self.raw_tlv = nil
end
end
matter.EventQueued = Matter_EventQueued
@ -77,11 +127,16 @@ matter.EventQueued = Matter_EventQueued
# EVENT_CRITICAL=2
#################################################################################
# Matter_IM class
# Matter_EventHandler class
#
# Keep track of events in 3 queues for DEBUG/INFO/CRITICAL levels
#
# Invariants:
# All 3 queues (debug/info/critical) have events in sorted order by `event_no`
#################################################################################
class Matter_EventHandler
static var EVENT_NO_INCR = 1000 # counter increased when persisting
static var EVENT_NO_FILENAME = "_matter_event_no"
static var EVENT_NO_INCR = 1000 # counter increased when persisting, default value from Matter spec
static var EVENT_NO_KEY = "_matter_event_no"
static var EVENT_QUEUE_SIZE_MAX = 10 # each queue is 10 elements depth
# circular buffers
@ -109,22 +164,20 @@ class Matter_EventHandler
# with a predefined gap `self.EVENT_NO_INCR` (default 1000)
def load_event_no_persisted()
import persist
var event_no_str = str(persist.find(self.EVENT_NO_FILENAME, "0"))
var event_no_str = str(persist.find(self.EVENT_NO_KEY, "0"))
self.counter_event_no = int64.fromstring(event_no_str)
self.counter_event_no_persisted = self.counter_event_no.add(self.EVENT_NO_INCR)
# save back next slot
persist.setmember(self.EVENT_NO_FILENAME, self.counter_event_no_persisted.tostring())
persist.setmember(self.EVENT_NO_KEY, self.counter_event_no_persisted.tostring())
persist.save()
end
#####################################################################
# Enqueue event
#
# Takes `Matter_EventDataIB`
# Takes `EventQueued`
#####################################################################
def queue_event(ev_ib)
var ev_queued = matter.EventQueued(ev_ib)
def queue_event(ev_queued)
var cur_prio = ev_queued.priority
# we reuse the same logic as connectedhomeip
@ -183,10 +236,37 @@ class Matter_EventHandler
end
end
#############################################################
# dispatch every second click to sub-objects that need it
def every_second()
self.compact()
end
#####################################################################
# Enqueue event
#
# Remove the cached `raw_tlv` from all events in queues
# to save some space
def compact()
def compact_queue(q)
var i = 0
while i < size(q)
q[i].compact()
i += 1
end
end
compact_queue(self.queue_debug)
compact_queue(self.queue_info)
compact_queue(self.queue_critical)
end
#####################################################################
# Events handling
#####################################################################
# Get next event number
#
# Also make sure that we don't go above the persisted last number,
# in such case increase the persisted number and use the next chunk
def get_next_event_no()
self.counter_event_no = self.counter_event_no.add(1)
if self.counter_event_no >= self.counter_event_no_persisted
@ -194,7 +274,10 @@ class Matter_EventHandler
end
return self.counter_event_no
end
# Get last event number (all events sent up to now are lower or equal than this value)
def get_last_event_no()
return self.counter_event_no
end
#####################################################################
# Dump events for debugging
@ -208,6 +291,91 @@ class Matter_EventHandler
tasmota.log(f"MTR: Events by types: critical {cnt[2]}, info {cnt[1]}, debug {cnt[0]}", 2)
end
#####################################################################
# find_min_no
#
# Find the next event number just above the provided value,
# or the smallest if nil is passed
#
# Arg:
# - event_min: minimal event number (strictly above),
# or `nil` if smallest number
#
# Returns:
# - event_no (int) or `nil` of none found
#####################################################################
def find_min_no(event_min_no)
# fail fast if `event_min_no` is the same as `counter_event_no`
# meaning that we dont have any more events since last report
if (event_min_no != nil) && (event_min_no >= self.counter_event_no)
return nil
end
#####################################################################
# Find the next available event right above `event_min_no`
#
# TODO: since queues are sorted, we can abort searching when we reach
# an event below `event_min_no`
#
# Arg
# - event_smallest: the event found up to now (from previous queues)
# - q: the queue oject
# - event_min_no: minimum acceptable event number (int64) or nil if any
def find_in_queue(event_smallest, q, event_min_no)
var i = size(q) - 1
while i >= 0
var cur_event = q[i]
# fail fast: since queues are sorted, we can abort searching when we reach an event below `event_min_no`
if (event_min_no != nil) && (cur_event.event_no <= event_min_no)
return event_smallest
end
# we know that event_no is in acceptable range, is it smaller?
if (event_smallest == nil) || (cur_event.event_no < event_smallest.event_no)
event_smallest = cur_event
end
i -= 1
end
return event_smallest
end
var event
# look in debug
event = find_in_queue(event, self.queue_debug, event_min_no)
# look in info
event = find_in_queue(event, self.queue_info, event_min_no)
# look in critical
event = find_in_queue(event, self.queue_critical, event_min_no)
return event
end
#############################################################
# generate a new event
#
def publish_event(endpoint, cluster, event_id, is_urgent, priority, data0, data1, data2)
var new_event = matter.EventQueued(self.get_next_event_no(), endpoint, cluster, event_id, is_urgent, priority, data0, data1, data2)
if tasmota.loglevel(3)
var data_str = ''
if (data0 != nil) data_str = str(data0) end
if (data1 != nil) data_str += ", " + str(data1) end
if (data2 != nil) data_str += ", " + str(data2) end
if (cluster == 0x0028) && (event_id == 0x00)
# put the software version in a readable format
var val = data0.val
data_str = format("%i.%i.%i.%i", (val >> 24) & 0xFF, (val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
end
var priority_str = (priority == 2) ? "CRIT " : (priority == 1) ? "INFO " : "DEBUG "
var event_name = matter.get_event_name(cluster, event_id)
event_name = (event_name != nil) ? "(" + event_name + ") " : ""
log(f"MTR: +Add_Event ({priority_str}{new_event.event_no:8s}) [{new_event.endpoint:02X}]{new_event.cluster:04X}/{new_event.event_id:02X} {event_name}- {data_str}", 2)
end
self.queue_event(new_event)
# check if we have an subscription interested in this new event
self.device.message_handler.im.subs_shop.event_published(new_event)
end
end
matter.EventHandler = Matter_EventHandler

View File

@ -601,8 +601,9 @@ class Matter_IM
matter.profiler.log("read_request_start_pull")
var query = matter.ReadRequestMessage().from_TLV(val)
var generator_or_arr = self.process_read_or_subscribe_request_pull(query, msg)
var event_generator_or_arr = self.process_read_or_subscribe_request_event_pull(query, msg)
self.send_report_data_pull(msg, generator_or_arr) # pack into a response structure that will read attributes when expansion is triggered
self.send_queue.push(matter.IM_ReportData_Pull(msg, generator_or_arr, event_generator_or_arr))
return true
end
@ -613,15 +614,14 @@ class Matter_IM
#
# This version lazily reads attributes when building the response packets
#
# returns `true` if processed, `false` if silently ignored,
# or raises an exception
def process_read_or_subscribe_request_pull(query, msg)
if query.attributes_requests != nil
if (query.attributes_requests != nil)
var generator_or_arr # single path generator (common case) or array of generators
var node_id = (msg != nil) ? msg.get_node_id() : nil
# structure is `ReadRequestMessage` 10.6.2 p.558
if size(query.attributes_requests) > 1
# structure is `ReadRequestMessage` 10.6.2 p.558
var size_requests = (query.attributes_requests ? size(query.attributes_requests) : 0)
# log(f"MTR: process_read_or_subscribe_request_pull {size_requests=}")
if (size_requests > 1)
generator_or_arr = []
end
@ -629,7 +629,7 @@ class Matter_IM
var gen = matter.PathGenerator(self.device)
gen.start(q.endpoint, q.cluster, q.attribute, query.fabric_filtered)
if size(query.attributes_requests) > 1
if (size_requests > 1)
generator_or_arr.push(gen)
else
generator_or_arr = gen
@ -655,6 +655,88 @@ class Matter_IM
end
end
end
return generator_or_arr
end
return nil
end
#############################################################
# parse_event_filters_min_no
#
# Parse an object EventFilters and extract the minimum event
# number (as int64) or nil if none
static def parse_event_filters_min_no(event_filters, node_id)
var event_no_min = nil # do we have a filter for minimum event_no (int64 or nil)
if event_filters != nil
for filter: event_filters # filter is an instance of `EventFilterIB`
# tasmota.log(f"MTR: EventFilter {filter=} {node_id=}", 3)
var filter_node = int64.toint64(filter.node) # nil or int64
if (filter_node && node_id) # there is a filter on node-id
if filter.node.tobytes() != node_id # the node id doesn't match
tasmota.log(f"MTR: node_id filter {filter_node.tobytes().tohex()} doesn't match {node_id.tohex()}")
continue
end
end
# specified minimum value
var new_event_no_min = int64.toint64(filter.event_min)
if (event_no_min == nil) || (event_no_min < new_event_no_min)
event_no_min = new_event_no_min
end
end
end
return event_no_min
end
#############################################################
# process_read_or_subscribe_request_event_pull
#
# This version converts event request to an EventGenerator, a list of EventGenerator or nil
#
# or raises an exception
def process_read_or_subscribe_request_event_pull(query, msg)
if (query.event_requests != nil)
var generator_or_arr # single path generator (common case) or array of generators
var node_id = (msg != nil) ? msg.get_node_id() : nil
# structure is `ReadRequestMessage` 10.6.2 p.558
var size_requests = (query.event_requests ? size(query.event_requests) : 0)
# log(f"MTR: process_read_or_subscribe_request_pull {size_requests=}")
if (size_requests > 1)
generator_or_arr = []
end
# parse event requests
# scan event filters
var event_no_min = self.parse_event_filters_min_no(query.event_filters, node_id)
# scan event filters
if query.event_requests
for q : query.event_requests
var gen = matter.EventGenerator(self.device)
gen.start(q.endpoint, q.cluster, q.event, event_no_min)
if (size_requests > 1)
generator_or_arr.push(gen)
else
generator_or_arr = gen
end
if tasmota.loglevel(3)
var event_name = ""
if (q.cluster != nil) && (q.event != nil)
event_name = matter.get_event_name(q.cluster, q.event)
event_name = (event_name != nil) ? "(" + event_name + ") " : ""
end
var ep_str = (q.endpoint != nil) ? f"{q.endpoint:02X}" : "**"
var cl_str = (q.cluster != nil) ? f"{q.cluster:04X}" : "****"
var ev_str = (q.event != nil) ? f"{q.event:02X}" : "**"
var event_no_min_str = (event_no_min != nil) ? f" (>{event_no_min})" : ""
log(f"MTR: >Read_Event({msg.session.local_session_id:6i}) [{ep_str}]{cl_str}/{ev_str} {event_name}{event_no_min_str}", 3)
end
end
end
return generator_or_arr
end
return nil
@ -785,12 +867,10 @@ class Matter_IM
self.subs_shop.remove_by_session(msg.session) # if `keep_subscriptions`, kill all subscriptions from current session
end
# log("MTR: received SubscribeRequestMessage=" + str(query), 3)
var sub = self.subs_shop.new_subscription(msg.session, query)
# expand a string with all attributes requested
if tasmota.loglevel(3)
if tasmota.loglevel(3) && (query.attributes_requests != nil)
var attr_req = []
var ctx = matter.Path()
ctx.msg = msg
@ -800,15 +880,17 @@ class Matter_IM
ctx.attribute = q.attribute
attr_req.push(str(ctx))
end
log(format("MTR: >Subscribe (%6i) %s (min=%i, max=%i, keep=%i) sub=%i fabric_filtered=%s attr_req=%s event_req=%s",
log(format("MTR: >Subscribe (%6i) %s (min=%i, max=%i, keep=%i) sub=%i fabric_filtered=%s",
msg.session.local_session_id, attr_req.concat(" "), sub.min_interval, sub.max_interval, query.keep_subscriptions ? 1 : 0,
sub.subscription_id, query.fabric_filtered,
query.attributes_requests != nil ? size(query.attributes_requests) : "-",
query.event_requests != nil ? size(query.event_requests) : "-"), 3)
sub.subscription_id, query.fabric_filtered), 3)
end
var generator_or_arr = self.process_read_or_subscribe_request_pull(query, msg)
self.send_subscribe_response_pull(msg, generator_or_arr, sub) # pack into a response structure that will read attributes when expansion is triggered
var event_generator_or_arr = self.process_read_or_subscribe_request_event_pull(query, msg)
sub.set_event_generator_or_arr(event_generator_or_arr)
self.send_queue.push(matter.IM_SubscribeResponse_Pull(msg, generator_or_arr, event_generator_or_arr, sub))
return true
end
@ -881,7 +963,7 @@ class Matter_IM
end
if size(ret.invoke_responses) > 0
self.send_invoke_response(msg, ret)
self.send_queue.push(matter.IM_InvokeResponse(msg, ret))
else
return false # we don't send anything, hence the responder sends a simple packet ack
end
@ -1052,7 +1134,7 @@ class Matter_IM
generator.start(write_path.endpoint, write_path.cluster, write_path.attribute)
var direct = generator.is_direct()
var ctx
while (ctx := generator.next())
while (ctx := generator.next_attribute())
ctx.msg = msg # enrich with message
if ctx.status != nil # no match, return error because it was direct
ctx.status = nil # remove status to silence output
@ -1074,7 +1156,7 @@ class Matter_IM
# send the reponse that may need to be chunked if too large to fit in a single UDP message
if !suppress_response
self.send_write_response(msg, ret)
self.send_queue.push(matter.IM_WriteResponse(msg, ret))
end
end
return true
@ -1123,7 +1205,7 @@ class Matter_IM
var fake_read = matter.ReadRequestMessage()
fake_read.fabric_filtered = false
fake_read.attributes_requests = []
# build fake read request containing single read requests for all attributes that were changed
for ctx: sub.updates
var p1 = matter.AttributePathIB()
p1.endpoint = ctx.endpoint
@ -1136,8 +1218,9 @@ class Matter_IM
sub.is_keep_alive = false # sending an actual data update
var generator_or_arr = self.process_read_or_subscribe_request_pull(fake_read, nil #-no msg-#)
var event_generator_or_arr = sub.update_event_generator_array()
var report_data_msg = matter.IM_ReportDataSubscribed_Pull(session._message_handler, session, generator_or_arr, sub)
var report_data_msg = matter.IM_ReportDataSubscribed_Pull(session._message_handler, session, generator_or_arr, event_generator_or_arr, sub)
self.send_queue.push(report_data_msg) # push message to queue
self.send_enqueued(session._message_handler) # and send queued messages now
end
@ -1148,12 +1231,13 @@ class Matter_IM
def send_subscribe_heartbeat(sub)
var session = sub.session
log(f"MTR: <Sub_Alive ({session.local_session_id:6i}) sub={sub.subscription_id}", 3)
sub.is_keep_alive = true # sending keep-alive
if tasmota.loglevel(3)
log(f"MTR: <Sub_Alive ({session.local_session_id:6i}) sub={sub.subscription_id}", 3)
end
var report_data_msg = matter.IM_SubscribedHeartbeat(session._message_handler, session, sub)
self.send_queue.push(report_data_msg) # push message to queue
self.send_enqueued(session._message_handler) # and send queued messages now
sub.is_keep_alive = true # sending keep-alive
self.send_queue.push(matter.IM_SubscribedHeartbeat(session._message_handler, session, sub)) # push message to queue
self.send_enqueued(session._message_handler) # and send queued messages now
end
#############################################################
@ -1163,34 +1247,6 @@ class Matter_IM
self.send_queue.push(matter.IM_Status(msg, status))
end
#############################################################
# send_invoke_response
#
def send_invoke_response(msg, data)
self.send_queue.push(matter.IM_InvokeResponse(msg, data))
end
#############################################################
# send_invoke_response
#
def send_write_response(msg, data)
self.send_queue.push(matter.IM_WriteResponse(msg, data))
end
#############################################################
# send_report_data_pull
#
def send_report_data_pull(msg, ctx_generator_or_arr)
self.send_queue.push(matter.IM_ReportData_Pull(msg, ctx_generator_or_arr))
end
#############################################################
# send_subscribe_response_pull
#
def send_subscribe_response_pull(msg, data, sub)
self.send_queue.push(matter.IM_SubscribeResponse_Pull(msg, data, sub))
end
#############################################################
# placeholder, nothing to run for now
def every_second()
@ -1198,9 +1254,9 @@ class Matter_IM
end
#############################################################
# dispatch every 250ms click to sub-objects that need it
def every_250ms()
self.subs_shop.every_250ms()
# dispatch every 50ms click to sub-objects that need it
def every_50ms()
self.subs_shop.every_50ms()
end
end

View File

@ -171,12 +171,15 @@ class Matter_IM_ReportData_Pull : Matter_IM_Message
# section 4.4.4 (p. 114)
# note: `self.data` (bytes or nil) is containing any remaining responses that could not fit in previous packets
var generator_or_arr # a PathGenerator or an array of PathGenerator
var event_generator_or_arr # a EventGenerator, or array of EventGenerator, or nil
var subscription_id # if not `nil`, subscription_id in response
var suppress_response # if not `nil`, suppress_response attribute
var data_ev # left-overs of events, mirroring of data for attributes
def init(msg, ctx_generator_or_arr)
def init(msg, ctx_generator_or_arr, event_generator_or_arr)
super(self).init(msg, 0x05 #-Report Data-#, true)
self.generator_or_arr = ctx_generator_or_arr
self.event_generator_or_arr = event_generator_or_arr
end
def set_subscription_id(subscription_id)
@ -196,17 +199,20 @@ class Matter_IM_ReportData_Pull : Matter_IM_Message
self.data = nil # we remove the data that was saved for next packet
var not_full = true # marker used to exit imbricated loops
var debug = responder.device.debug
var data_ev = (self.data_ev != nil) ? self.data_ev : ((self.event_generator_or_arr != nil) ? bytes() : nil) # bytes for events or nil if no event generators
# if event_generator_or_arr != nil then data_ev contains a bytes() object
########## Attributes
while not_full && (self.generator_or_arr != nil)
# get the current generator (first element of list or single object)
var current_generator = isinstance(self.generator_or_arr, list) ? self.generator_or_arr[0] : self.generator_or_arr
# log(f">>>: ReportData_Pull send_im start {current_generator.path_in_endpoint}/{current_generator.path_in_cluster}/{current_generator.path_in_attribute}",3)
var ctx
while not_full && (ctx := current_generator.next()) # 'not_full' must be first to avoid removing an item when we don't want
while not_full && (ctx := current_generator.next_attribute()) # 'not_full' must be first to avoid removing an item when we don't want
# log(f">>>: ReportData_Pull {ctx=}", 3)
var debug = responder.device.debug
var force_log = current_generator.is_direct() || debug
var elt_bytes = responder.im.read_single_attribute_to_bytes(current_generator.get_pi(), ctx, resp.session, force_log) # TODO adapt no_log
if (elt_bytes == nil) continue end # silently ignored, iterate to next
@ -234,23 +240,75 @@ class Matter_IM_ReportData_Pull : Matter_IM_Message
end
# do we have left-overs from events, i.e. self.data_ev is non-empty bytes()
if not_full && (self.data_ev != nil) && (size(self.data_ev) > 0)
# try to add self.data_ev
if (size(data) + size(self.data_ev) > self.MAX_MESSAGE)
not_full = false # skip until next iteration
data_ev = nil # don't output any value
else
self.data_ev = nil # we could add it, so remove from left-overs
end
end
########## Events
while not_full && (self.event_generator_or_arr != nil)
# get the current generator (first element of list or single object)
var current_generator = isinstance(self.event_generator_or_arr, list) ? self.event_generator_or_arr[0] : self.event_generator_or_arr
# now events
var ev
while not_full && (ev := current_generator.next_event()) # 'not_full' must be first to avoid removing an item when we don't want
# conditional logging
if debug && tasmota.loglevel(3)
var data_str = ''
if (ev.data0 != nil) data_str = " - " + str(ev.data0) end
if (ev.data1 != nil) data_str += ", " + str(ev.data1) end
if (ev.data2 != nil) data_str += ", " + str(ev.data2) end
log(f"MTR: >Read_Event({resp.session.local_session_id:6i}|{ev.event_no:8s}) [{ev.endpoint:02X}]{ev.cluster:04X}/{ev.event_id:02X}{data_str}", 3)
end
# send bytes
var ev_bytes = ev.to_raw_bytes()
if (size(data) + size(data_ev) + size(ev_bytes) > self.MAX_MESSAGE)
self.data_ev = ev_bytes # save for next iteration
not_full = false
else
data_ev.append(ev_bytes) # append response since we have enough room
end
end
# if we are here, then we exhausted the current generator, and we need to move to the next one
if not_full
if isinstance(self.event_generator_or_arr, list)
self.event_generator_or_arr.remove(0) # remove first element
if size(self.event_generator_or_arr) == 0
self.event_generator_or_arr = nil # empty array so we put nil
end
else
self.event_generator_or_arr = nil # there was a single entry, so replace with nil
end
end
end
########## Response
# prepare the response
var ret = matter.ReportDataMessage()
ret.subscription_id = self.subscription_id
ret.suppress_response = self.suppress_response
# ret.suppress_response = true
ret.attribute_reports = [data]
ret.more_chunked_messages = (self.data != nil) # we got more data to send
if (data != nil && size(data) > 0)
ret.attribute_reports = [data]
end
if (data_ev != nil && size(data_ev) > 0)
ret.event_reports = [data_ev]
end
ret.more_chunked_messages = (self.data != nil) || (self.data_ev != nil) # we got more data to send
# print(">>>>> send elements before encode")
var raw_tlv = ret.to_TLV()
# print(">>>>> send elements before encode 2")
var encoded_tlv = raw_tlv.tlv2raw(bytes(self.MAX_MESSAGE)) # takes time
# print(">>>>> send elements before encode 3")
resp.encode_frame(encoded_tlv) # payload in cleartext, pre-allocate max buffer
# print(">>>>> send elements after encode")
resp.encrypt()
# print(">>>>> send elements after encrypt")
# log(format("MTR: <snd (%6i) id=%i exch=%i rack=%s", resp.session.local_session_id, resp.message_counter, resp.exchange_id, resp.ack_message_counter), 4)
responder.send_response_frame(resp)
self.last_counter = resp.message_counter
@ -285,12 +343,13 @@ class Matter_IM_ReportDataSubscribed_Pull : Matter_IM_ReportData_Pull
# inherited from Matter_IM_ReportData_Pull
# static var MAX_MESSAGE = 1200 # max bytes size for a single TLV worklaod
# var generator_or_arr # a PathGenerator or an array of PathGenerator
# var event_generator_or_arr # a EventGenerator, or array of EventGenerator, or nil
# var subscription_id # if not `nil`, subscription_id in response
var sub # subscription object
var report_data_phase # true during reportdata
def init(message_handler, session, ctx_generator_or_arr, sub)
super(self).init(nil, ctx_generator_or_arr) # send msg=nil to avoid creating a reponse
def init(message_handler, session, ctx_generator_or_arr, event_generator_or_arr, sub)
super(self).init(nil, ctx_generator_or_arr, event_generator_or_arr) # send msg=nil to avoid creating a reponse
# we need to initiate a new virtual response, because it's a spontaneous message
self.resp = matter.Frame.initiate_response(message_handler, session, 0x05 #-Report Data-#, true)
#
@ -345,7 +404,7 @@ class Matter_IM_ReportDataSubscribed_Pull : Matter_IM_ReportData_Pull
# log(format("MTR: ReportDataSubscribed::send_im size(self.data.attribute_reports)=%i ready=%s report_data_phase=%s", size(self.data.attribute_reports), str(self.ready), str(self.report_data_phase)), 3)
if !self.ready return false end
if (self.generator_or_arr != nil) # do we have still attributes to send
if (self.generator_or_arr != nil) || (self.event_generator_or_arr != nil) # do we have still attributes or events to send
if self.report_data_phase
super(self).send_im(responder)
# log(format("MTR: ReportDataSubscribed::send_im called super finish=%i", self.finish), 3)
@ -365,6 +424,7 @@ class Matter_IM_ReportDataSubscribed_Pull : Matter_IM_ReportData_Pull
responder.send_response_frame(resp)
self.last_counter = resp.message_counter
self.finish = true
self.sub.re_arm() # signal that we can proceed to next sub report
end
else
@ -374,6 +434,7 @@ class Matter_IM_ReportDataSubscribed_Pull : Matter_IM_ReportData_Pull
self.report_data_phase = false
else
self.finish = true
self.sub.re_arm() # signal that we can proceed to next sub report
end
end
end
@ -391,7 +452,7 @@ class Matter_IM_SubscribedHeartbeat : Matter_IM_ReportData_Pull
var sub # subscription object
def init(message_handler, session, sub)
super(self).init(nil, nil #-no ctx_generator_or_arr-#) # send msg=nil to avoid creating a reponse
super(self).init(nil, nil #-no ctx_generator_or_arr-#, nil #-no event_generator_or_arr-#) # send msg=nil to avoid creating a reponse
# we need to initiate a new virtual response, because it's a spontaneous message
self.resp = matter.Frame.initiate_response(message_handler, session, 0x05 #-Report Data-#, true)
#
@ -449,8 +510,8 @@ class Matter_IM_SubscribeResponse_Pull : Matter_IM_ReportData_Pull
var sub # subscription object
var report_data_phase # true during reportdata
def init(msg, ctx_generator_or_arr, sub)
super(self).init(msg, ctx_generator_or_arr)
def init(msg, ctx_generator_or_arr, event_generator_or_arr, sub)
super(self).init(msg, ctx_generator_or_arr, event_generator_or_arr)
self.sub = sub
self.report_data_phase = true
self.set_subscription_id(sub.subscription_id)

View File

@ -34,6 +34,7 @@ class Matter_IM_Subscription
var subscription_id # id of the subcription as known by requester
var session # the session it belongs to
var path_list # list of path subscibed to
var event_generators # list of EventGenerator filters for subscription
var min_interval # never send data more often than every `min_interval` seconds
var max_interval # always send data before `max_interal` seconds or the subscription is lost
var fabric_filtered
@ -43,8 +44,10 @@ class Matter_IM_Subscription
var wait_status # if `true` wait for Status Response before sending anything new
var is_keep_alive # was the last message sent an empty keep-alive
# updates
var updates
var updates # array of paths that will need to be updated at next window
var update_event_no # int64 or nil, contains the first event number from which we should send an update, or nil if none
#################################################################################
# req: SubscribeRequestMessage
def init(subs_shop, id, session, req)
self.subs_shop = subs_shop
@ -64,40 +67,62 @@ class Matter_IM_Subscription
self.wait_status = false
self.fabric_filtered = req.fabric_filtered
var device = subs_shop.im.device # keep a local copy of master device object
# get list of path from
# get list of attribute paths
self.path_list = []
for q: req.attributes_requests
var ctx = matter.Path()
ctx.endpoint = q.endpoint
ctx.cluster = q.cluster
ctx.attribute = q.attribute
self.path_list.push(ctx)
if (req.attributes_requests != nil)
for q: req.attributes_requests
self.path_list.push( matter.Path(q.endpoint, q.cluster, q.attribute) )
end
end
# scan event filters
var event_no_min = matter.IM.parse_event_filters_min_no(req.event_filters, nil)
# update next time interval
self.updates = []
# self.update_event_no = nil
self.clear_before_arm()
self.is_keep_alive = false
# log("MTR: new subsctiption " + matter.inspect(self), 3)
end
#################################################################################
# set the event generators
#
# Force to always be an actual array
def set_event_generator_or_arr(event_generator_or_arr)
# copy list of event paths, we will reuse each time we send events
if event_generator_or_arr == nil
self.event_generators = []
elif isinstance(event_generator_or_arr, list)
self.event_generators = event_generator_or_arr
else
self.event_generators = [ event_generator_or_arr ]
end
end
#################################################################################
# remove self from subs_shop list
def remove_self()
log("MTR: -Sub_Del ( ) sub=" + str(self.subscription_id), 3)
self.subs_shop.remove_sub(self)
end
#################################################################################
# clear log after it was sent, and re-arm next expiration
def clear_before_arm()
self.updates.clear()
self.wait_status = true
self.update_event_no = nil # rearm for next events
end
#################################################################################
# we received a complete ack for previous message, rearm
def re_arm()
if (!self.wait_status) return end # make it reentrant
self.wait_status = false
var now = tasmota.millis()
self.expiration = now + (self.max_interval - self.MAX_INTERVAL_MARGIN) * 1000
@ -107,6 +132,7 @@ class Matter_IM_Subscription
end
end
#################################################################################
# signal that an attribute was updated, to add to the list of reportable
def attribute_updated_ctx(ctx, fabric_specific)
var idx = 0
@ -123,6 +149,34 @@ class Matter_IM_Subscription
end
end
#################################################################################
# signal a new event, check if it matches any filter
#
# This is called whenever a new event is published.
# We now that the new event number is above any event previously seen, so we can optimize
#
# Hence we store only the first event number that matches this generator.
# We know that we don't need to go back in the past from this.
# And if events are published after, we already have our starting number in `update_event_no`
#
# Note: since the generator skips from the last seen event, we need to substract 1 because
# this event has not been sent in subscription updates
#
# Arg:
# - event: instance of Matter_EventQueued
def event_published(new_event)
if (self.update_event_no == nil) # if we have already an event to send updates, all events after this are potential candidates
var idx = 0
while idx < size(self.event_generators)
if self.event_generators[idx].event_is_match(new_event)
self.update_event_no = new_event.event_no.add(-1) # we need to substract 1 becaus ewe haven't parse this one yet
end
idx += 1
end
end
end
#################################################################################
# add an attribute path for an updated attribute, remove any duplicate
def _add_attribute_unique_path(ctx)
var idx = 0
@ -138,6 +192,28 @@ class Matter_IM_Subscription
self.updates.push(ctx)
end
#################################################################################
# update_event_generator_array
#
# Returns an array, or single instance of nil, with generators
def update_event_generator_array()
if size(self.event_generators) == 0
return nil # empty, return nil
elif size(self.event_generators) == 1
self.event_generators[0].restart_from(self.update_event_no)
return self.event_generators[0] # single element, return just the instance (most common case)
else
var res = []
res.resize(size(self.event_generators))
var idx = 0
while idx < size(self.event_generators)
self.event_generators[idx].restart_from(self.update_event_no)
res[idx] = self.event_generators[idx]
idx += 1
end
end
end
end
matter.IM_Subscription = Matter_IM_Subscription
@ -161,19 +237,20 @@ class Matter_IM_Subscription_Shop
# session object
# SubscribeRequestMessage request
# returns: new subscription
def new_subscription(session, req)
def new_subscription(session, req, event_generator_or_arr)
import crypto
var id = crypto.random(2).get(0,2)
while self.get_by_id(id)
id = crypto.random(2).get(0,2)
end
var sub = matter.IM_Subscription(self, id, session, req)
var sub = matter.IM_Subscription(self, id, session, req, event_generator_or_arr)
self.subs.push(sub)
return sub
end
#################################################################################
def remove_sub(sub)
var idx = 0
while idx < size(self.subs)
@ -185,6 +262,7 @@ class Matter_IM_Subscription_Shop
end
end
#################################################################################
def get_by_id(id)
var idx = 0
while idx < size(self.subs)
@ -195,6 +273,10 @@ class Matter_IM_Subscription_Shop
end
end
#################################################################################
# remove_by_session
#
# Cleaning: remove all subscriptions created by this sessions
def remove_by_session(session)
var idx = 0
while idx < size(self.subs)
@ -206,6 +288,10 @@ class Matter_IM_Subscription_Shop
end
end
#################################################################################
# remove_by_fabric
#
# Cleaning: remove all subscriptions created by this fabric
def remove_by_fabric(fabric)
for session: fabric._sessions
self.remove_by_session(session)
@ -213,15 +299,18 @@ class Matter_IM_Subscription_Shop
end
#############################################################
# dispatch every 250ms click to sub-objects that need it
def every_250ms()
# dispatch every 50ms click to sub-objects that need it
#
def every_50ms()
# any data ready to send?
var idx = 0
while idx < size(self.subs)
var sub = self.subs[idx]
if !sub.wait_status && size(sub.updates) > 0 && tasmota.time_reached(sub.not_before)
self.im.send_subscribe_update(sub)
sub.clear_before_arm()
if (!sub.wait_status && tasmota.time_reached(sub.not_before)) # is the update window open (not in progress and minimum time has passed)
if (size(sub.updates) > 0) || (sub.update_event_no != nil) # we have updated attributes, or an event was published since last update
self.im.send_subscribe_update(sub)
sub.clear_before_arm()
end
end
idx += 1
end
@ -239,6 +328,7 @@ class Matter_IM_Subscription_Shop
end
end
#################################################################################
# signal that an attribute was updated, to add to the list of reportable
def attribute_updated_ctx(ctx, fabric_specific)
# signal any relevant subscription
@ -248,6 +338,16 @@ class Matter_IM_Subscription_Shop
idx += 1
end
end
#################################################################################
# signal that a new event was published, see if any subscription is interested
def event_published(new_event)
var idx = 0
while idx < size(self.subs)
self.subs[idx].event_published(new_event)
idx += 1
end
end
end
matter.IM_Subscription_Shop = Matter_IM_Subscription_Shop

View File

@ -224,7 +224,6 @@ class Matter_Frame
raw .. payload
end
# self.debug(raw)
self.raw = raw
return raw
end

View File

@ -262,9 +262,9 @@ class Matter_MessageHandler
end
#############################################################
# dispatch every 250ms click to sub-objects that need it
def every_250ms()
self.im.every_250ms()
# dispatch every 50ms click to sub-objects that need it
def every_50ms()
self.im.every_50ms()
end
end

View File

@ -36,6 +36,12 @@ class Matter_Path
var log # any string that needs to be logged (used to show significant parameters for commands)
var msg # reference of the original message
def init(endpoint, cluster, attribute) # fast initialization
self.endpoint = endpoint
self.cluster = cluster
self.attribute = attribute
end
# copy from an aobject that has also endpoint/cluster/attribute variables
def copy(c)
self.reset()

View File

@ -0,0 +1,147 @@
#
# Matter_Path_1_EventGenerator.be - suppport for Matter event path generator from available events
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
#@ solidify:Matter_EventGenerator,weak
#################################################################################
# Matter_EventGenerator
#
# Has the same interface as PathGenerator
#
# Returns a Path that reads an event patching the current pattern
#################################################################################
class Matter_EventGenerator
var device # reference of device main object
var path_in_endpoint # input endpoint filter (nil or int)
var path_in_cluster # input cluster filter (nil or int)
var path_in_event # input event filter (nil or int)
var path_in_event_min # input event filter for minimum event requested (nil or int)
# current status
var event_no # event number of the last one returned or nil of none returned yet
# reused at each output
var finished # finished (no more events matching)
#################################################################################
# simple constructor
#
def init(device)
self.device = device
end
#################################################################################
# start generator
#
# `in_endpoint`: endpoint number filter (int or nil for all)
# `in_cluster`: cluster number filter (int or nil for all)
# `in_attribute`: attribute number filter (int or nil for all)
# `in_fabric_filtered`: is the filter fabric-filtered (nil or false or true) - currently stored but ignored
def start(in_endpoint, in_cluster, in_event, in_event_min)
self.reset()
self.path_in_endpoint = in_endpoint
self.path_in_cluster = in_cluster
self.path_in_event = in_event
self.path_in_event_min = in_event_min
self.event_no = in_event_min
self.finished = false
end
#################################################################################
# reset
#
def reset()
var n = nil
self.event_no = n
self.finished = true
end
#################################################################################
# restart_from
#
# Restart from this event number (not included)
def restart_from(event_min)
self.finished = false
self.event_no = event_min
end
################################################################################
# is_finished
#
# Returns `true` if we have exhausted the generator
def is_finished()
return self.finished
end
################################################################################
# finished
#
# not used for events
def get_pi()
return nil
end
################################################################################
# next_event
#
# Generate next concrete path
# Returns:
# - a path object (that is valid until next call)
# - if 'direct' (concrete path), ctx.status contains the appropriate error code if the path value is not supported
# - `nil` if no more objects
def next_event()
if (self.finished) return nil end
while true
var next_event = self.device.events.find_min_no(self.event_no)
if (next_event == nil) # eventually there are no events left, so the loop stops
self.reset()
return nil
end
# next_event != nil and we know that ((next_event.event_no > self.path_in_event_min) or (path_in_event_min == nil))
self.event_no = next_event.event_no # update smallest found event, even if it does not match, because we need it to find the next one matching
# check if the event matches the pattern
if self.event_is_match(next_event)
# log(f"MTR: Path generator([{self.path_in_endpoint}]{self.path_in_cluster}/{self.path_in_event}>{self.path_in_event_min}} event_no={self.event_no} event={matter.inspect(next_event)})", 3)
return next_event
end
end
end
################################################################################
# event_is_match
#
# Returns true if the event passed as argument matches the filter
# but does not check the event number, because it is filtered out before
def event_is_match(next_event)
var match = true
if (self.path_in_endpoint != nil)
match = match && (self.path_in_endpoint == next_event.endpoint)
end
if (self.path_in_cluster != nil)
match = match && (self.path_in_cluster == next_event.cluster)
end
if (self.path_in_event != nil)
match = match && (self.path_in_event == next_event.event_id)
end
return match
end
end
matter.EventGenerator = Matter_EventGenerator

View File

@ -1,5 +1,5 @@
#
# Matter_IM_Path_1.be - suppport for Matter concrete path generator
# Matter_Path_1_Generator.be - suppport for Matter concrete path generator
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@ -104,11 +104,11 @@ class Matter_PathGenerator
end
################################################################################
# default_status_error
# _default_status_error
#
# Get the default error if the read or write fails.
# This error is only reported if `direct` is true
def default_status_error()
def _default_status_error()
if self.is_direct()
if (!self.endpoint_found) return matter.UNSUPPORTED_ENDPOINT end
if (!self.cluster_found) return matter.UNSUPPORTED_CLUSTER end
@ -119,15 +119,15 @@ class Matter_PathGenerator
end
################################################################################
# finished
# is_finished
#
# Returns `true` if we have exhausted the generator
def finished()
def is_finished()
return (self.pi != false)
end
################################################################################
# finished
# get_pi
#
# Returns the endpoint object for the last context returned, or `nil` if not found or exhausted
def get_pi()
@ -135,14 +135,14 @@ class Matter_PathGenerator
end
################################################################################
# next
# next_attribute
#
# Generate next concrete path
# Returns:
# - a path object (that is valid until next call)
# - if 'direct' (concrete path), ctx.status contains the appropriate error code if the path value is not supported
# - `nil` if no more objects
def next()
def next_attribute()
if (self.pi == true) || (self.pi != nil && self.is_direct()) # if we already answered a succesful or missing context for direct request, abort on second call
self.reset()
return nil
@ -188,7 +188,7 @@ class Matter_PathGenerator
path_concrete.cluster = self.path_in_cluster
path_concrete.attribute = self.path_in_attribute
path_concrete.fabric_filtered = self.path_in_fabric_filtered
path_concrete.status = self.default_status_error()
path_concrete.status = self._default_status_error()
self.pi = true # next call will trigger Generator exhausted
# log(f">>>: PathGenerator next path_concrete:{path_concrete} direct", 3)
return path_concrete
@ -298,7 +298,7 @@ var gen = matter.PathGenerator(matter_device)
def gen_path_dump(endpoint, cluster, attribute)
gen.start(endpoint, cluster, attribute)
var cp
while (cp := gen.next())
while (cp := gen.next_attribute())
print(cp)
end
end

View File

@ -183,36 +183,12 @@ class Matter_Plugin
#############################################################
# generate a new event
#
def publish_event(cluster, event, priority, data)
var event_ib = matter.EventDataIB()
var event_path = matter.EventPathIB()
event_path.endpoint = self.endpoint
event_path.cluster = cluster
event_path.event = event
event_ib.path = event_path
event_ib.priority = priority
event_ib.event_number = self.device.events.get_next_event_no()
event_ib.epoch_timestamp = tasmota.rtc('utc')
if (event_ib.epoch_timestamp < 1700000000) event_ib.epoch_timestamp = nil end # no valid time
event_ib.data = data
if tasmota.loglevel(3)
var data_str = str(event_ib.data)
if (cluster == 0x0028) && (event == 0x00)
# put the software version in a readable format
var val = event_ib.data.val
data_str = format("%i.%i.%i.%i", (val >> 24) & 0xFF, (val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
end
var priority_str = (priority == 2) ? "CRIT " : (priority == 1) ? "INFO " : "DEBUG "
var event_name = matter.get_event_name(cluster, event)
event_name = (event_name != nil) ? "(" + event_name + ") " : ""
log(f"MTR: +Add_Event ({priority_str}{event_ib.event_number:8s}) [{event_path.endpoint:02X}]{event_path.cluster:04X}/{event_path.event:02X} {event_name}- {data_str}", 2)
end
if tasmota.loglevel(4)
log(f"MTR: Publishing event {event_ib}", 4)
end
self.device.events.queue_event(event_ib)
def publish_event(cluster, event_id, priority, data0, data1, data2)
self.device.events.publish_event(self.endpoint, cluster, event_id, true #-urgent-#, priority, data0, data1, data2)
end
# def publish_event_non_urgent(cluster, event, priority, data0, data1, data2)
# self.device.events.publish_event(self.endpoint, cluster, event, false #-non_urgent-#, priority, data0, data1, data2)
# end
#- testing
var root = matter_device.plugins[0]

View File

@ -49,7 +49,6 @@ class Matter_Plugin_Root : Matter_Plugin
# Constructor
def init(device, endpoint, config)
super(self).init(device, endpoint, config)
self.publish_event(0x0028, 0x00, matter.EVENT_CRITICAL, matter.TLV.Matter_TLV_item().set(matter.TLV.U4, tasmota.version())) # Event StartUp - Software Version
self.publish_event(0x0033, 0x03, matter.EVENT_CRITICAL, matter.TLV.Matter_TLV_item().set(matter.TLV.U1, 1)) # Event BootReason - PowerOnReboot - TODO if we need to refine
end

View File

@ -313,6 +313,7 @@ class Matter_Device
def every_second()
self.sessions.every_second()
self.message_handler.every_second()
self.events.every_second() # periodically remove bytes() representation of events
if self.commissioning_open != nil && tasmota.time_reached(self.commissioning_open) # timeout reached, close provisioning
self.commissioning_open = nil
end
@ -321,7 +322,6 @@ class Matter_Device
#############################################################
# dispatch every 250ms to all plugins
def every_250ms()
self.message_handler.every_250ms()
# call read_sensors if needed
self.read_sensors_scheduler()
# call all plugins, use a manual loop to avoid creating a new object
@ -380,9 +380,11 @@ class Matter_Device
end
#############################################################
# dispatch every 50ms
# ticks
def every_50ms()
self.tick += 1
self.message_handler.every_50ms()
end
#############################################################
@ -535,7 +537,7 @@ class Matter_Device
var direct = path_generator.is_direct()
var concrete_path
while ((concrete_path := path_generator.next()) != nil)
while ((concrete_path := path_generator.next_attribute()) != nil)
var finished = cb(path_generator.get_pi(), concrete_path) # call the callback with the plugin and the context
end
end

File diff suppressed because it is too large Load Diff

View File

@ -575,13 +575,52 @@ be_local_closure(class_Matter_IM_ReportData_Pull_set_subscription_id, /* name
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_IM_ReportData_Pull;
be_local_closure(class_Matter_IM_ReportData_Pull_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_IM_ReportData_Pull,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(generator_or_arr),
/* K2 */ be_nested_str_weak(event_generator_or_arr),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x541E0004, // 0005 LDINT R7 5
0x50200200, // 0006 LDBOOL R8 1 0
0x7C100800, // 0007 CALL R4 4
0x90020202, // 0008 SETMBR R0 K1 R2
0x90020403, // 0009 SETMBR R0 K2 R3
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: send_im
********************************************************************/
extern const bclass be_class_Matter_IM_ReportData_Pull;
be_local_closure(class_Matter_IM_ReportData_Pull_send_im, /* name */
be_nested_proto(
15, /* nstack */
19, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@ -589,41 +628,62 @@ be_local_closure(class_Matter_IM_ReportData_Pull_send_im, /* name */
0, /* has sup protos */
&be_class_Matter_IM_ReportData_Pull,
1, /* has constants */
( &(const bvalue[30]) { /* constants */
( &(const bvalue[51]) { /* constants */
/* K0 */ be_nested_str_weak(ready),
/* K1 */ be_nested_str_weak(resp),
/* K2 */ be_nested_str_weak(data),
/* K3 */ be_nested_str_weak(generator_or_arr),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(next),
/* K6 */ be_nested_str_weak(device),
/* K7 */ be_nested_str_weak(debug),
/* K8 */ be_nested_str_weak(is_direct),
/* K9 */ be_nested_str_weak(im),
/* K10 */ be_nested_str_weak(read_single_attribute_to_bytes),
/* K11 */ be_nested_str_weak(get_pi),
/* K12 */ be_nested_str_weak(session),
/* K13 */ be_nested_str_weak(MAX_MESSAGE),
/* K14 */ be_nested_str_weak(append),
/* K15 */ be_nested_str_weak(remove),
/* K16 */ be_nested_str_weak(matter),
/* K17 */ be_nested_str_weak(ReportDataMessage),
/* K18 */ be_nested_str_weak(subscription_id),
/* K19 */ be_nested_str_weak(suppress_response),
/* K20 */ be_nested_str_weak(attribute_reports),
/* K21 */ be_nested_str_weak(more_chunked_messages),
/* K22 */ be_nested_str_weak(to_TLV),
/* K23 */ be_nested_str_weak(tlv2raw),
/* K24 */ be_nested_str_weak(encode_frame),
/* K25 */ be_nested_str_weak(encrypt),
/* K26 */ be_nested_str_weak(send_response_frame),
/* K27 */ be_nested_str_weak(last_counter),
/* K28 */ be_nested_str_weak(message_counter),
/* K29 */ be_nested_str_weak(finish),
/* K3 */ be_nested_str_weak(device),
/* K4 */ be_nested_str_weak(debug),
/* K5 */ be_nested_str_weak(data_ev),
/* K6 */ be_nested_str_weak(event_generator_or_arr),
/* K7 */ be_nested_str_weak(generator_or_arr),
/* K8 */ be_const_int(0),
/* K9 */ be_nested_str_weak(next_attribute),
/* K10 */ be_nested_str_weak(is_direct),
/* K11 */ be_nested_str_weak(im),
/* K12 */ be_nested_str_weak(read_single_attribute_to_bytes),
/* K13 */ be_nested_str_weak(get_pi),
/* K14 */ be_nested_str_weak(session),
/* K15 */ be_nested_str_weak(MAX_MESSAGE),
/* K16 */ be_nested_str_weak(append),
/* K17 */ be_nested_str_weak(remove),
/* K18 */ be_nested_str_weak(next_event),
/* K19 */ be_nested_str_weak(tasmota),
/* K20 */ be_nested_str_weak(loglevel),
/* K21 */ be_const_int(3),
/* K22 */ be_nested_str_weak(),
/* K23 */ be_nested_str_weak(data0),
/* K24 */ be_nested_str_weak(_X20_X2D_X20),
/* K25 */ be_nested_str_weak(data1),
/* K26 */ be_nested_str_weak(_X2C_X20),
/* K27 */ be_nested_str_weak(data2),
/* K28 */ be_nested_str_weak(log),
/* K29 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Event_X28_X256i_X7C_X258s_X29_X20_X5B_X2502X_X5D_X2504X_X2F_X2502X_X25s),
/* K30 */ be_nested_str_weak(local_session_id),
/* K31 */ be_nested_str_weak(event_no),
/* K32 */ be_nested_str_weak(endpoint),
/* K33 */ be_nested_str_weak(cluster),
/* K34 */ be_nested_str_weak(event_id),
/* K35 */ be_nested_str_weak(to_raw_bytes),
/* K36 */ be_nested_str_weak(matter),
/* K37 */ be_nested_str_weak(ReportDataMessage),
/* K38 */ be_nested_str_weak(subscription_id),
/* K39 */ be_nested_str_weak(suppress_response),
/* K40 */ be_nested_str_weak(attribute_reports),
/* K41 */ be_nested_str_weak(event_reports),
/* K42 */ be_nested_str_weak(more_chunked_messages),
/* K43 */ be_nested_str_weak(to_TLV),
/* K44 */ be_nested_str_weak(tlv2raw),
/* K45 */ be_nested_str_weak(encode_frame),
/* K46 */ be_nested_str_weak(encrypt),
/* K47 */ be_nested_str_weak(send_response_frame),
/* K48 */ be_nested_str_weak(last_counter),
/* K49 */ be_nested_str_weak(message_counter),
/* K50 */ be_nested_str_weak(finish),
}),
be_str_weak(send_im),
&be_const_str_solidified,
( &(const binstruction[134]) { /* code */
( &(const binstruction[311]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A0001, // 0001 JMPT R2 #0004
0x50080000, // 0002 LDBOOL R2 0 0
@ -640,161 +700,301 @@ be_local_closure(class_Matter_IM_ReportData_Pull_send_im, /* name */
0x4C100000, // 000D LDNIL R4
0x90020404, // 000E SETMBR R0 K2 R4
0x50100200, // 000F LDBOOL R4 1 0
0x7812004C, // 0010 JMPF R4 #005E
0x88140103, // 0011 GETMBR R5 R0 K3
0x4C180000, // 0012 LDNIL R6
0x20140A06, // 0013 NE R5 R5 R6
0x78160048, // 0014 JMPF R5 #005E
0x6014000F, // 0015 GETGBL R5 G15
0x88180103, // 0016 GETMBR R6 R0 K3
0x601C0012, // 0017 GETGBL R7 G18
0x7C140400, // 0018 CALL R5 2
0x78160002, // 0019 JMPF R5 #001D
0x88140103, // 001A GETMBR R5 R0 K3
0x94140B04, // 001B GETIDX R5 R5 K4
0x70020000, // 001C JMP #001E
0x88140103, // 001D GETMBR R5 R0 K3
0x4C180000, // 001E LDNIL R6
0x78120028, // 001F JMPF R4 #0049
0x8C1C0B05, // 0020 GETMET R7 R5 K5
0x7C1C0200, // 0021 CALL R7 1
0x5C180E00, // 0022 MOVE R6 R7
0x781E0024, // 0023 JMPF R7 #0049
0x881C0306, // 0024 GETMBR R7 R1 K6
0x881C0F07, // 0025 GETMBR R7 R7 K7
0x8C200B08, // 0026 GETMET R8 R5 K8
0x7C200200, // 0027 CALL R8 1
0x74220001, // 0028 JMPT R8 #002B
0x741E0000, // 0029 JMPT R7 #002B
0x50200001, // 002A LDBOOL R8 0 1
0x50200200, // 002B LDBOOL R8 1 0
0x88240309, // 002C GETMBR R9 R1 K9
0x8C24130A, // 002D GETMET R9 R9 K10
0x8C2C0B0B, // 002E GETMET R11 R5 K11
0x7C2C0200, // 002F CALL R11 1
0x5C300C00, // 0030 MOVE R12 R6
0x8834050C, // 0031 GETMBR R13 R2 K12
0x5C381000, // 0032 MOVE R14 R8
0x7C240A00, // 0033 CALL R9 5
0x4C280000, // 0034 LDNIL R10
0x1C28120A, // 0035 EQ R10 R9 R10
0x782A0000, // 0036 JMPF R10 #0038
0x7001FFE6, // 0037 JMP #001F
0x6028000C, // 0038 GETGBL R10 G12
0x5C2C0600, // 0039 MOVE R11 R3
0x7C280200, // 003A CALL R10 1
0x602C000C, // 003B GETGBL R11 G12
0x5C301200, // 003C MOVE R12 R9
0x7C2C0200, // 003D CALL R11 1
0x0028140B, // 003E ADD R10 R10 R11
0x882C010D, // 003F GETMBR R11 R0 K13
0x2428140B, // 0040 GT R10 R10 R11
0x782A0002, // 0041 JMPF R10 #0045
0x90020409, // 0042 SETMBR R0 K2 R9
0x50100000, // 0043 LDBOOL R4 0 0
0x70020002, // 0044 JMP #0048
0x8C28070E, // 0045 GETMET R10 R3 K14
0x5C301200, // 0046 MOVE R12 R9
0x7C280400, // 0047 CALL R10 2
0x7001FFD5, // 0048 JMP #001F
0x78120012, // 0049 JMPF R4 #005D
0x601C000F, // 004A GETGBL R7 G15
0x88200103, // 004B GETMBR R8 R0 K3
0x60240012, // 004C GETGBL R9 G18
0x7C1C0400, // 004D CALL R7 2
0x781E000B, // 004E JMPF R7 #005B
0x881C0103, // 004F GETMBR R7 R0 K3
0x8C1C0F0F, // 0050 GETMET R7 R7 K15
0x58240004, // 0051 LDCONST R9 K4
0x7C1C0400, // 0052 CALL R7 2
0x601C000C, // 0053 GETGBL R7 G12
0x88200103, // 0054 GETMBR R8 R0 K3
0x7C1C0200, // 0055 CALL R7 1
0x1C1C0F04, // 0056 EQ R7 R7 K4
0x781E0001, // 0057 JMPF R7 #005A
0x4C1C0000, // 0058 LDNIL R7
0x90020607, // 0059 SETMBR R0 K3 R7
0x70020001, // 005A JMP #005D
0x4C1C0000, // 005B LDNIL R7
0x90020607, // 005C SETMBR R0 K3 R7
0x7001FFB1, // 005D JMP #0010
0xB8162000, // 005E GETNGBL R5 K16
0x8C140B11, // 005F GETMET R5 R5 K17
0x7C140200, // 0060 CALL R5 1
0x88180112, // 0061 GETMBR R6 R0 K18
0x90162406, // 0062 SETMBR R5 K18 R6
0x88180113, // 0063 GETMBR R6 R0 K19
0x90162606, // 0064 SETMBR R5 K19 R6
0x60180012, // 0065 GETGBL R6 G18
0x7C180000, // 0066 CALL R6 0
0x401C0C03, // 0067 CONNECT R7 R6 R3
0x90162806, // 0068 SETMBR R5 K20 R6
0x88180102, // 0069 GETMBR R6 R0 K2
0x4C1C0000, // 006A LDNIL R7
0x20180C07, // 006B NE R6 R6 R7
0x90162A06, // 006C SETMBR R5 K21 R6
0x8C180B16, // 006D GETMET R6 R5 K22
0x7C180200, // 006E CALL R6 1
0x8C1C0D17, // 006F GETMET R7 R6 K23
0x60240015, // 0070 GETGBL R9 G21
0x8828010D, // 0071 GETMBR R10 R0 K13
0x7C240200, // 0072 CALL R9 1
0x7C1C0400, // 0073 CALL R7 2
0x8C200518, // 0074 GETMET R8 R2 K24
0x5C280E00, // 0075 MOVE R10 R7
0x7C200400, // 0076 CALL R8 2
0x8C200519, // 0077 GETMET R8 R2 K25
0x7C200200, // 0078 CALL R8 1
0x8C20031A, // 0079 GETMET R8 R1 K26
0x5C280400, // 007A MOVE R10 R2
0x7C200400, // 007B CALL R8 2
0x8820051C, // 007C GETMBR R8 R2 K28
0x90023608, // 007D SETMBR R0 K27 R8
0x88200B15, // 007E GETMBR R8 R5 K21
0x78220002, // 007F JMPF R8 #0083
0x50200000, // 0080 LDBOOL R8 0 0
0x90020008, // 0081 SETMBR R0 K0 R8
0x88140303, // 0010 GETMBR R5 R1 K3
0x88140B04, // 0011 GETMBR R5 R5 K4
0x88180105, // 0012 GETMBR R6 R0 K5
0x4C1C0000, // 0013 LDNIL R7
0x20180C07, // 0014 NE R6 R6 R7
0x781A0001, // 0015 JMPF R6 #0018
0x88180105, // 0016 GETMBR R6 R0 K5
0x70020007, // 0017 JMP #0020
0x88180106, // 0018 GETMBR R6 R0 K6
0x4C1C0000, // 0019 LDNIL R7
0x20180C07, // 001A NE R6 R6 R7
0x781A0002, // 001B JMPF R6 #001F
0x60180015, // 001C GETGBL R6 G21
0x7C180000, // 001D CALL R6 0
0x70020000, // 001E JMP #0020
0x4C180000, // 001F LDNIL R6
0x7812004A, // 0020 JMPF R4 #006C
0x881C0107, // 0021 GETMBR R7 R0 K7
0x4C200000, // 0022 LDNIL R8
0x201C0E08, // 0023 NE R7 R7 R8
0x781E0046, // 0024 JMPF R7 #006C
0x601C000F, // 0025 GETGBL R7 G15
0x88200107, // 0026 GETMBR R8 R0 K7
0x60240012, // 0027 GETGBL R9 G18
0x7C1C0400, // 0028 CALL R7 2
0x781E0002, // 0029 JMPF R7 #002D
0x881C0107, // 002A GETMBR R7 R0 K7
0x941C0F08, // 002B GETIDX R7 R7 K8
0x70020000, // 002C JMP #002E
0x881C0107, // 002D GETMBR R7 R0 K7
0x4C200000, // 002E LDNIL R8
0x78120026, // 002F JMPF R4 #0057
0x8C240F09, // 0030 GETMET R9 R7 K9
0x7C240200, // 0031 CALL R9 1
0x5C201200, // 0032 MOVE R8 R9
0x78260022, // 0033 JMPF R9 #0057
0x8C240F0A, // 0034 GETMET R9 R7 K10
0x7C240200, // 0035 CALL R9 1
0x74260001, // 0036 JMPT R9 #0039
0x74160000, // 0037 JMPT R5 #0039
0x50240001, // 0038 LDBOOL R9 0 1
0x50240200, // 0039 LDBOOL R9 1 0
0x8828030B, // 003A GETMBR R10 R1 K11
0x8C28150C, // 003B GETMET R10 R10 K12
0x8C300F0D, // 003C GETMET R12 R7 K13
0x7C300200, // 003D CALL R12 1
0x5C341000, // 003E MOVE R13 R8
0x8838050E, // 003F GETMBR R14 R2 K14
0x5C3C1200, // 0040 MOVE R15 R9
0x7C280A00, // 0041 CALL R10 5
0x4C2C0000, // 0042 LDNIL R11
0x1C2C140B, // 0043 EQ R11 R10 R11
0x782E0000, // 0044 JMPF R11 #0046
0x7001FFE8, // 0045 JMP #002F
0x602C000C, // 0046 GETGBL R11 G12
0x5C300600, // 0047 MOVE R12 R3
0x7C2C0200, // 0048 CALL R11 1
0x6030000C, // 0049 GETGBL R12 G12
0x5C341400, // 004A MOVE R13 R10
0x7C300200, // 004B CALL R12 1
0x002C160C, // 004C ADD R11 R11 R12
0x8830010F, // 004D GETMBR R12 R0 K15
0x242C160C, // 004E GT R11 R11 R12
0x782E0002, // 004F JMPF R11 #0053
0x9002040A, // 0050 SETMBR R0 K2 R10
0x50100000, // 0051 LDBOOL R4 0 0
0x70020002, // 0052 JMP #0056
0x8C2C0710, // 0053 GETMET R11 R3 K16
0x5C341400, // 0054 MOVE R13 R10
0x7C2C0400, // 0055 CALL R11 2
0x7001FFD7, // 0056 JMP #002F
0x78120012, // 0057 JMPF R4 #006B
0x6024000F, // 0058 GETGBL R9 G15
0x88280107, // 0059 GETMBR R10 R0 K7
0x602C0012, // 005A GETGBL R11 G18
0x7C240400, // 005B CALL R9 2
0x7826000B, // 005C JMPF R9 #0069
0x88240107, // 005D GETMBR R9 R0 K7
0x8C241311, // 005E GETMET R9 R9 K17
0x582C0008, // 005F LDCONST R11 K8
0x7C240400, // 0060 CALL R9 2
0x6024000C, // 0061 GETGBL R9 G12
0x88280107, // 0062 GETMBR R10 R0 K7
0x7C240200, // 0063 CALL R9 1
0x1C241308, // 0064 EQ R9 R9 K8
0x78260001, // 0065 JMPF R9 #0068
0x4C240000, // 0066 LDNIL R9
0x90020E09, // 0067 SETMBR R0 K7 R9
0x70020001, // 0068 JMP #006B
0x4C240000, // 0069 LDNIL R9
0x90020E09, // 006A SETMBR R0 K7 R9
0x7001FFB3, // 006B JMP #0020
0x78120017, // 006C JMPF R4 #0085
0x881C0105, // 006D GETMBR R7 R0 K5
0x4C200000, // 006E LDNIL R8
0x201C0E08, // 006F NE R7 R7 R8
0x781E0013, // 0070 JMPF R7 #0085
0x601C000C, // 0071 GETGBL R7 G12
0x88200105, // 0072 GETMBR R8 R0 K5
0x7C1C0200, // 0073 CALL R7 1
0x241C0F08, // 0074 GT R7 R7 K8
0x781E000E, // 0075 JMPF R7 #0085
0x601C000C, // 0076 GETGBL R7 G12
0x5C200600, // 0077 MOVE R8 R3
0x7C1C0200, // 0078 CALL R7 1
0x6020000C, // 0079 GETGBL R8 G12
0x88240105, // 007A GETMBR R9 R0 K5
0x7C200200, // 007B CALL R8 1
0x001C0E08, // 007C ADD R7 R7 R8
0x8820010F, // 007D GETMBR R8 R0 K15
0x241C0E08, // 007E GT R7 R7 R8
0x781E0002, // 007F JMPF R7 #0083
0x50100000, // 0080 LDBOOL R4 0 0
0x4C180000, // 0081 LDNIL R6
0x70020001, // 0082 JMP #0085
0x50200200, // 0083 LDBOOL R8 1 0
0x90023A08, // 0084 SETMBR R0 K29 R8
0x80000000, // 0085 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_IM_ReportData_Pull;
be_local_closure(class_Matter_IM_ReportData_Pull_init, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_IM_ReportData_Pull,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(generator_or_arr),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x600C0003, // 0000 GETGBL R3 G3
0x5C100000, // 0001 MOVE R4 R0
0x7C0C0200, // 0002 CALL R3 1
0x8C0C0700, // 0003 GETMET R3 R3 K0
0x5C140200, // 0004 MOVE R5 R1
0x541A0004, // 0005 LDINT R6 5
0x501C0200, // 0006 LDBOOL R7 1 0
0x7C0C0800, // 0007 CALL R3 4
0x90020202, // 0008 SETMBR R0 K1 R2
0x80000000, // 0009 RET 0
0x4C1C0000, // 0083 LDNIL R7
0x90020A07, // 0084 SETMBR R0 K5 R7
0x7812006D, // 0085 JMPF R4 #00F4
0x881C0106, // 0086 GETMBR R7 R0 K6
0x4C200000, // 0087 LDNIL R8
0x201C0E08, // 0088 NE R7 R7 R8
0x781E0069, // 0089 JMPF R7 #00F4
0x601C000F, // 008A GETGBL R7 G15
0x88200106, // 008B GETMBR R8 R0 K6
0x60240012, // 008C GETGBL R9 G18
0x7C1C0400, // 008D CALL R7 2
0x781E0002, // 008E JMPF R7 #0092
0x881C0106, // 008F GETMBR R7 R0 K6
0x941C0F08, // 0090 GETIDX R7 R7 K8
0x70020000, // 0091 JMP #0093
0x881C0106, // 0092 GETMBR R7 R0 K6
0x4C200000, // 0093 LDNIL R8
0x78120049, // 0094 JMPF R4 #00DF
0x8C240F12, // 0095 GETMET R9 R7 K18
0x7C240200, // 0096 CALL R9 1
0x5C201200, // 0097 MOVE R8 R9
0x78260045, // 0098 JMPF R9 #00DF
0x7816002D, // 0099 JMPF R5 #00C8
0xB8262600, // 009A GETNGBL R9 K19
0x8C241314, // 009B GETMET R9 R9 K20
0x582C0015, // 009C LDCONST R11 K21
0x7C240400, // 009D CALL R9 2
0x78260028, // 009E JMPF R9 #00C8
0x58240016, // 009F LDCONST R9 K22
0x88281117, // 00A0 GETMBR R10 R8 K23
0x4C2C0000, // 00A1 LDNIL R11
0x2028140B, // 00A2 NE R10 R10 R11
0x782A0004, // 00A3 JMPF R10 #00A9
0x60280008, // 00A4 GETGBL R10 G8
0x882C1117, // 00A5 GETMBR R11 R8 K23
0x7C280200, // 00A6 CALL R10 1
0x002A300A, // 00A7 ADD R10 K24 R10
0x5C241400, // 00A8 MOVE R9 R10
0x88281119, // 00A9 GETMBR R10 R8 K25
0x4C2C0000, // 00AA LDNIL R11
0x2028140B, // 00AB NE R10 R10 R11
0x782A0004, // 00AC JMPF R10 #00B2
0x60280008, // 00AD GETGBL R10 G8
0x882C1119, // 00AE GETMBR R11 R8 K25
0x7C280200, // 00AF CALL R10 1
0x002A340A, // 00B0 ADD R10 K26 R10
0x0024120A, // 00B1 ADD R9 R9 R10
0x8828111B, // 00B2 GETMBR R10 R8 K27
0x4C2C0000, // 00B3 LDNIL R11
0x2028140B, // 00B4 NE R10 R10 R11
0x782A0004, // 00B5 JMPF R10 #00BB
0x60280008, // 00B6 GETGBL R10 G8
0x882C111B, // 00B7 GETMBR R11 R8 K27
0x7C280200, // 00B8 CALL R10 1
0x002A340A, // 00B9 ADD R10 K26 R10
0x0024120A, // 00BA ADD R9 R9 R10
0xB82A3800, // 00BB GETNGBL R10 K28
0x602C0018, // 00BC GETGBL R11 G24
0x5830001D, // 00BD LDCONST R12 K29
0x8834050E, // 00BE GETMBR R13 R2 K14
0x88341B1E, // 00BF GETMBR R13 R13 K30
0x8838111F, // 00C0 GETMBR R14 R8 K31
0x883C1120, // 00C1 GETMBR R15 R8 K32
0x88401121, // 00C2 GETMBR R16 R8 K33
0x88441122, // 00C3 GETMBR R17 R8 K34
0x5C481200, // 00C4 MOVE R18 R9
0x7C2C0E00, // 00C5 CALL R11 7
0x58300015, // 00C6 LDCONST R12 K21
0x7C280400, // 00C7 CALL R10 2
0x8C241123, // 00C8 GETMET R9 R8 K35
0x7C240200, // 00C9 CALL R9 1
0x6028000C, // 00CA GETGBL R10 G12
0x5C2C0600, // 00CB MOVE R11 R3
0x7C280200, // 00CC CALL R10 1
0x602C000C, // 00CD GETGBL R11 G12
0x5C300C00, // 00CE MOVE R12 R6
0x7C2C0200, // 00CF CALL R11 1
0x0028140B, // 00D0 ADD R10 R10 R11
0x602C000C, // 00D1 GETGBL R11 G12
0x5C301200, // 00D2 MOVE R12 R9
0x7C2C0200, // 00D3 CALL R11 1
0x0028140B, // 00D4 ADD R10 R10 R11
0x882C010F, // 00D5 GETMBR R11 R0 K15
0x2428140B, // 00D6 GT R10 R10 R11
0x782A0002, // 00D7 JMPF R10 #00DB
0x90020A09, // 00D8 SETMBR R0 K5 R9
0x50100000, // 00D9 LDBOOL R4 0 0
0x70020002, // 00DA JMP #00DE
0x8C280D10, // 00DB GETMET R10 R6 K16
0x5C301200, // 00DC MOVE R12 R9
0x7C280400, // 00DD CALL R10 2
0x7001FFB4, // 00DE JMP #0094
0x78120012, // 00DF JMPF R4 #00F3
0x6024000F, // 00E0 GETGBL R9 G15
0x88280106, // 00E1 GETMBR R10 R0 K6
0x602C0012, // 00E2 GETGBL R11 G18
0x7C240400, // 00E3 CALL R9 2
0x7826000B, // 00E4 JMPF R9 #00F1
0x88240106, // 00E5 GETMBR R9 R0 K6
0x8C241311, // 00E6 GETMET R9 R9 K17
0x582C0008, // 00E7 LDCONST R11 K8
0x7C240400, // 00E8 CALL R9 2
0x6024000C, // 00E9 GETGBL R9 G12
0x88280106, // 00EA GETMBR R10 R0 K6
0x7C240200, // 00EB CALL R9 1
0x1C241308, // 00EC EQ R9 R9 K8
0x78260001, // 00ED JMPF R9 #00F0
0x4C240000, // 00EE LDNIL R9
0x90020C09, // 00EF SETMBR R0 K6 R9
0x70020001, // 00F0 JMP #00F3
0x4C240000, // 00F1 LDNIL R9
0x90020C09, // 00F2 SETMBR R0 K6 R9
0x7001FF90, // 00F3 JMP #0085
0xB81E4800, // 00F4 GETNGBL R7 K36
0x8C1C0F25, // 00F5 GETMET R7 R7 K37
0x7C1C0200, // 00F6 CALL R7 1
0x88200126, // 00F7 GETMBR R8 R0 K38
0x901E4C08, // 00F8 SETMBR R7 K38 R8
0x88200127, // 00F9 GETMBR R8 R0 K39
0x901E4E08, // 00FA SETMBR R7 K39 R8
0x4C200000, // 00FB LDNIL R8
0x20200608, // 00FC NE R8 R3 R8
0x78220008, // 00FD JMPF R8 #0107
0x6020000C, // 00FE GETGBL R8 G12
0x5C240600, // 00FF MOVE R9 R3
0x7C200200, // 0100 CALL R8 1
0x24201108, // 0101 GT R8 R8 K8
0x78220003, // 0102 JMPF R8 #0107
0x60200012, // 0103 GETGBL R8 G18
0x7C200000, // 0104 CALL R8 0
0x40241003, // 0105 CONNECT R9 R8 R3
0x901E5008, // 0106 SETMBR R7 K40 R8
0x4C200000, // 0107 LDNIL R8
0x20200C08, // 0108 NE R8 R6 R8
0x78220008, // 0109 JMPF R8 #0113
0x6020000C, // 010A GETGBL R8 G12
0x5C240C00, // 010B MOVE R9 R6
0x7C200200, // 010C CALL R8 1
0x24201108, // 010D GT R8 R8 K8
0x78220003, // 010E JMPF R8 #0113
0x60200012, // 010F GETGBL R8 G18
0x7C200000, // 0110 CALL R8 0
0x40241006, // 0111 CONNECT R9 R8 R6
0x901E5208, // 0112 SETMBR R7 K41 R8
0x88200102, // 0113 GETMBR R8 R0 K2
0x4C240000, // 0114 LDNIL R9
0x20201009, // 0115 NE R8 R8 R9
0x74220004, // 0116 JMPT R8 #011C
0x88200105, // 0117 GETMBR R8 R0 K5
0x4C240000, // 0118 LDNIL R9
0x20201009, // 0119 NE R8 R8 R9
0x74220000, // 011A JMPT R8 #011C
0x50200001, // 011B LDBOOL R8 0 1
0x50200200, // 011C LDBOOL R8 1 0
0x901E5408, // 011D SETMBR R7 K42 R8
0x8C200F2B, // 011E GETMET R8 R7 K43
0x7C200200, // 011F CALL R8 1
0x8C24112C, // 0120 GETMET R9 R8 K44
0x602C0015, // 0121 GETGBL R11 G21
0x8830010F, // 0122 GETMBR R12 R0 K15
0x7C2C0200, // 0123 CALL R11 1
0x7C240400, // 0124 CALL R9 2
0x8C28052D, // 0125 GETMET R10 R2 K45
0x5C301200, // 0126 MOVE R12 R9
0x7C280400, // 0127 CALL R10 2
0x8C28052E, // 0128 GETMET R10 R2 K46
0x7C280200, // 0129 CALL R10 1
0x8C28032F, // 012A GETMET R10 R1 K47
0x5C300400, // 012B MOVE R12 R2
0x7C280400, // 012C CALL R10 2
0x88280531, // 012D GETMBR R10 R2 K49
0x9002600A, // 012E SETMBR R0 K48 R10
0x88280F2A, // 012F GETMBR R10 R7 K42
0x782A0002, // 0130 JMPF R10 #0134
0x50280000, // 0131 LDBOOL R10 0 0
0x9002000A, // 0132 SETMBR R0 K0 R10
0x70020001, // 0133 JMP #0136
0x50280200, // 0134 LDBOOL R10 1 0
0x9002640A, // 0135 SETMBR R0 K50 R10
0x80000000, // 0136 RET 0
})
)
);
@ -834,18 +1034,20 @@ be_local_closure(class_Matter_IM_ReportData_Pull_set_suppress_response, /* nam
********************************************************************/
extern const bclass be_class_Matter_IM_Message;
be_local_class(Matter_IM_ReportData_Pull,
3,
5,
&be_class_Matter_IM_Message,
be_nested_map(8,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(suppress_response, -1), be_const_var(2) },
{ be_const_key_weak(set_suppress_response, 2), be_const_closure(class_Matter_IM_ReportData_Pull_set_suppress_response_closure) },
{ be_const_key_weak(data_ev, -1), be_const_var(4) },
{ be_const_key_weak(event_generator_or_arr, -1), be_const_var(1) },
{ be_const_key_weak(MAX_MESSAGE, -1), be_const_int(1200) },
{ be_const_key_weak(generator_or_arr, 5), be_const_var(0) },
{ be_const_key_weak(set_subscription_id, 6), be_const_closure(class_Matter_IM_ReportData_Pull_set_subscription_id_closure) },
{ be_const_key_weak(subscription_id, -1), be_const_var(1) },
{ be_const_key_weak(send_im, -1), be_const_closure(class_Matter_IM_ReportData_Pull_send_im_closure) },
{ be_const_key_weak(subscription_id, -1), be_const_var(2) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_IM_ReportData_Pull_init_closure) },
{ be_const_key_weak(set_suppress_response, -1), be_const_closure(class_Matter_IM_ReportData_Pull_set_suppress_response_closure) },
{ be_const_key_weak(generator_or_arr, 9), be_const_var(0) },
{ be_const_key_weak(set_subscription_id, 0), be_const_closure(class_Matter_IM_ReportData_Pull_set_subscription_id_closure) },
{ be_const_key_weak(send_im, -1), be_const_closure(class_Matter_IM_ReportData_Pull_send_im_closure) },
{ be_const_key_weak(suppress_response, -1), be_const_var(3) },
})),
be_str_weak(Matter_IM_ReportData_Pull)
);
@ -916,30 +1118,33 @@ be_local_closure(class_Matter_IM_ReportDataSubscribed_Pull_send_im, /* name */
0, /* has sup protos */
&be_class_Matter_IM_ReportDataSubscribed_Pull,
1, /* has constants */
( &(const bvalue[19]) { /* constants */
( &(const bvalue[22]) { /* constants */
/* K0 */ be_nested_str_weak(ready),
/* K1 */ be_nested_str_weak(generator_or_arr),
/* K2 */ be_nested_str_weak(report_data_phase),
/* K3 */ be_nested_str_weak(send_im),
/* K4 */ be_nested_str_weak(finish),
/* K5 */ be_nested_str_weak(resp),
/* K6 */ be_nested_str_weak(build_standalone_ack),
/* K7 */ be_nested_str_weak(encode_frame),
/* K8 */ be_nested_str_weak(encrypt),
/* K9 */ be_nested_str_weak(tasmota),
/* K10 */ be_nested_str_weak(loglevel),
/* K11 */ be_nested_str_weak(log),
/* K12 */ be_nested_str_weak(MTR_X3A_X20_X3CAck_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20ack_X3D_X25i_X20id_X3D_X25i),
/* K13 */ be_nested_str_weak(session),
/* K14 */ be_nested_str_weak(local_session_id),
/* K15 */ be_nested_str_weak(ack_message_counter),
/* K16 */ be_nested_str_weak(message_counter),
/* K17 */ be_nested_str_weak(send_response_frame),
/* K18 */ be_nested_str_weak(last_counter),
/* K2 */ be_nested_str_weak(event_generator_or_arr),
/* K3 */ be_nested_str_weak(report_data_phase),
/* K4 */ be_nested_str_weak(send_im),
/* K5 */ be_nested_str_weak(finish),
/* K6 */ be_nested_str_weak(resp),
/* K7 */ be_nested_str_weak(build_standalone_ack),
/* K8 */ be_nested_str_weak(encode_frame),
/* K9 */ be_nested_str_weak(encrypt),
/* K10 */ be_nested_str_weak(tasmota),
/* K11 */ be_nested_str_weak(loglevel),
/* K12 */ be_nested_str_weak(log),
/* K13 */ be_nested_str_weak(MTR_X3A_X20_X3CAck_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20ack_X3D_X25i_X20id_X3D_X25i),
/* K14 */ be_nested_str_weak(session),
/* K15 */ be_nested_str_weak(local_session_id),
/* K16 */ be_nested_str_weak(ack_message_counter),
/* K17 */ be_nested_str_weak(message_counter),
/* K18 */ be_nested_str_weak(send_response_frame),
/* K19 */ be_nested_str_weak(last_counter),
/* K20 */ be_nested_str_weak(sub),
/* K21 */ be_nested_str_weak(re_arm),
}),
be_str_weak(send_im),
&be_const_str_solidified,
( &(const binstruction[71]) { /* code */
( &(const binstruction[81]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A0001, // 0001 JMPT R2 #0004
0x50080000, // 0002 LDBOOL R2 0 0
@ -947,70 +1152,80 @@ be_local_closure(class_Matter_IM_ReportDataSubscribed_Pull_send_im, /* name */
0x88080101, // 0004 GETMBR R2 R0 K1
0x4C0C0000, // 0005 LDNIL R3
0x20080403, // 0006 NE R2 R2 R3
0x780A0030, // 0007 JMPF R2 #0039
0x740A0003, // 0007 JMPT R2 #000C
0x88080102, // 0008 GETMBR R2 R0 K2
0x780A000F, // 0009 JMPF R2 #001A
0x60080003, // 000A GETGBL R2 G3
0x5C0C0000, // 000B MOVE R3 R0
0x7C080200, // 000C CALL R2 1
0x8C080503, // 000D GETMET R2 R2 K3
0x5C100200, // 000E MOVE R4 R1
0x7C080400, // 000F CALL R2 2
0x88080104, // 0010 GETMBR R2 R0 K4
0x740A0000, // 0011 JMPT R2 #0013
0x80000400, // 0012 RET 0
0x50080000, // 0013 LDBOOL R2 0 0
0x90020402, // 0014 SETMBR R0 K2 R2
0x50080000, // 0015 LDBOOL R2 0 0
0x90020002, // 0016 SETMBR R0 K0 R2
0x4C0C0000, // 0009 LDNIL R3
0x20080403, // 000A NE R2 R2 R3
0x780A0033, // 000B JMPF R2 #0040
0x88080103, // 000C GETMBR R2 R0 K3
0x780A000F, // 000D JMPF R2 #001E
0x60080003, // 000E GETGBL R2 G3
0x5C0C0000, // 000F MOVE R3 R0
0x7C080200, // 0010 CALL R2 1
0x8C080504, // 0011 GETMET R2 R2 K4
0x5C100200, // 0012 MOVE R4 R1
0x7C080400, // 0013 CALL R2 2
0x88080105, // 0014 GETMBR R2 R0 K5
0x740A0000, // 0015 JMPT R2 #0017
0x80000400, // 0016 RET 0
0x50080000, // 0017 LDBOOL R2 0 0
0x90020802, // 0018 SETMBR R0 K4 R2
0x7002001D, // 0019 JMP #0038
0x88080105, // 001A GETMBR R2 R0 K5
0x8C080506, // 001B GETMET R2 R2 K6
0x50100000, // 001C LDBOOL R4 0 0
0x7C080400, // 001D CALL R2 2
0x8C0C0507, // 001E GETMET R3 R2 K7
0x7C0C0200, // 001F CALL R3 1
0x8C0C0508, // 0020 GETMET R3 R2 K8
0x7C0C0200, // 0021 CALL R3 1
0xB80E1200, // 0022 GETNGBL R3 K9
0x8C0C070A, // 0023 GETMET R3 R3 K10
0x54160003, // 0024 LDINT R5 4
0x7C0C0400, // 0025 CALL R3 2
0x780E0009, // 0026 JMPF R3 #0031
0xB80E1600, // 0027 GETNGBL R3 K11
0x60100018, // 0028 GETGBL R4 G24
0x5814000C, // 0029 LDCONST R5 K12
0x8818050D, // 002A GETMBR R6 R2 K13
0x88180D0E, // 002B GETMBR R6 R6 K14
0x881C050F, // 002C GETMBR R7 R2 K15
0x88200510, // 002D GETMBR R8 R2 K16
0x7C100800, // 002E CALL R4 4
0x54160003, // 002F LDINT R5 4
0x7C0C0400, // 0030 CALL R3 2
0x8C0C0311, // 0031 GETMET R3 R1 K17
0x5C140400, // 0032 MOVE R5 R2
0x7C0C0400, // 0033 CALL R3 2
0x880C0510, // 0034 GETMBR R3 R2 K16
0x90022403, // 0035 SETMBR R0 K18 R3
0x500C0200, // 0036 LDBOOL R3 1 0
0x90020803, // 0037 SETMBR R0 K4 R3
0x7002000C, // 0038 JMP #0046
0x88080102, // 0039 GETMBR R2 R0 K2
0x780A0008, // 003A JMPF R2 #0044
0x60080003, // 003B GETGBL R2 G3
0x5C0C0000, // 003C MOVE R3 R0
0x7C080200, // 003D CALL R2 1
0x8C080503, // 003E GETMET R2 R2 K3
0x5C100200, // 003F MOVE R4 R1
0x7C080400, // 0040 CALL R2 2
0x50080000, // 0041 LDBOOL R2 0 0
0x90020402, // 0042 SETMBR R0 K2 R2
0x70020001, // 0043 JMP #0046
0x50080200, // 0044 LDBOOL R2 1 0
0x90020802, // 0045 SETMBR R0 K4 R2
0x80000000, // 0046 RET 0
0x90020602, // 0018 SETMBR R0 K3 R2
0x50080000, // 0019 LDBOOL R2 0 0
0x90020002, // 001A SETMBR R0 K0 R2
0x50080000, // 001B LDBOOL R2 0 0
0x90020A02, // 001C SETMBR R0 K5 R2
0x70020020, // 001D JMP #003F
0x88080106, // 001E GETMBR R2 R0 K6
0x8C080507, // 001F GETMET R2 R2 K7
0x50100000, // 0020 LDBOOL R4 0 0
0x7C080400, // 0021 CALL R2 2
0x8C0C0508, // 0022 GETMET R3 R2 K8
0x7C0C0200, // 0023 CALL R3 1
0x8C0C0509, // 0024 GETMET R3 R2 K9
0x7C0C0200, // 0025 CALL R3 1
0xB80E1400, // 0026 GETNGBL R3 K10
0x8C0C070B, // 0027 GETMET R3 R3 K11
0x54160003, // 0028 LDINT R5 4
0x7C0C0400, // 0029 CALL R3 2
0x780E0009, // 002A JMPF R3 #0035
0xB80E1800, // 002B GETNGBL R3 K12
0x60100018, // 002C GETGBL R4 G24
0x5814000D, // 002D LDCONST R5 K13
0x8818050E, // 002E GETMBR R6 R2 K14
0x88180D0F, // 002F GETMBR R6 R6 K15
0x881C0510, // 0030 GETMBR R7 R2 K16
0x88200511, // 0031 GETMBR R8 R2 K17
0x7C100800, // 0032 CALL R4 4
0x54160003, // 0033 LDINT R5 4
0x7C0C0400, // 0034 CALL R3 2
0x8C0C0312, // 0035 GETMET R3 R1 K18
0x5C140400, // 0036 MOVE R5 R2
0x7C0C0400, // 0037 CALL R3 2
0x880C0511, // 0038 GETMBR R3 R2 K17
0x90022603, // 0039 SETMBR R0 K19 R3
0x500C0200, // 003A LDBOOL R3 1 0
0x90020A03, // 003B SETMBR R0 K5 R3
0x880C0114, // 003C GETMBR R3 R0 K20
0x8C0C0715, // 003D GETMET R3 R3 K21
0x7C0C0200, // 003E CALL R3 1
0x7002000F, // 003F JMP #0050
0x88080103, // 0040 GETMBR R2 R0 K3
0x780A0008, // 0041 JMPF R2 #004B
0x60080003, // 0042 GETGBL R2 G3
0x5C0C0000, // 0043 MOVE R3 R0
0x7C080200, // 0044 CALL R2 1
0x8C080504, // 0045 GETMET R2 R2 K4
0x5C100200, // 0046 MOVE R4 R1
0x7C080400, // 0047 CALL R2 2
0x50080000, // 0048 LDBOOL R2 0 0
0x90020602, // 0049 SETMBR R0 K3 R2
0x70020004, // 004A JMP #0050
0x50080200, // 004B LDBOOL R2 1 0
0x90020A02, // 004C SETMBR R0 K5 R2
0x88080114, // 004D GETMBR R2 R0 K20
0x8C080515, // 004E GETMET R2 R2 K21
0x7C080200, // 004F CALL R2 1
0x80000000, // 0050 RET 0
})
)
);
@ -1023,8 +1238,8 @@ be_local_closure(class_Matter_IM_ReportDataSubscribed_Pull_send_im, /* name */
extern const bclass be_class_Matter_IM_ReportDataSubscribed_Pull;
be_local_closure(class_Matter_IM_ReportDataSubscribed_Pull_init, /* name */
be_nested_proto(
11, /* nstack */
5, /* argc */
12, /* nstack */
6, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@ -1045,33 +1260,34 @@ be_local_closure(class_Matter_IM_ReportDataSubscribed_Pull_init, /* name */
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[26]) { /* code */
0x60140003, // 0000 GETGBL R5 G3
0x5C180000, // 0001 MOVE R6 R0
0x7C140200, // 0002 CALL R5 1
0x8C140B00, // 0003 GETMET R5 R5 K0
0x4C1C0000, // 0004 LDNIL R7
0x5C200600, // 0005 MOVE R8 R3
0x7C140600, // 0006 CALL R5 3
0xB8160400, // 0007 GETNGBL R5 K2
0x88140B03, // 0008 GETMBR R5 R5 K3
0x8C140B04, // 0009 GETMET R5 R5 K4
0x5C1C0200, // 000A MOVE R7 R1
0x5C200400, // 000B MOVE R8 R2
0x54260004, // 000C LDINT R9 5
0x50280200, // 000D LDBOOL R10 1 0
0x7C140A00, // 000E CALL R5 5
0x90020205, // 000F SETMBR R0 K1 R5
0x90020A04, // 0010 SETMBR R0 K5 R4
0x50140200, // 0011 LDBOOL R5 1 0
0x90020C05, // 0012 SETMBR R0 K6 R5
0x8C140107, // 0013 GETMET R5 R0 K7
0x881C0908, // 0014 GETMBR R7 R4 K8
0x7C140400, // 0015 CALL R5 2
0x8C140109, // 0016 GETMET R5 R0 K9
0x501C0000, // 0017 LDBOOL R7 0 0
0x7C140400, // 0018 CALL R5 2
0x80000000, // 0019 RET 0
( &(const binstruction[27]) { /* code */
0x60180003, // 0000 GETGBL R6 G3
0x5C1C0000, // 0001 MOVE R7 R0
0x7C180200, // 0002 CALL R6 1
0x8C180D00, // 0003 GETMET R6 R6 K0
0x4C200000, // 0004 LDNIL R8
0x5C240600, // 0005 MOVE R9 R3
0x5C280800, // 0006 MOVE R10 R4
0x7C180800, // 0007 CALL R6 4
0xB81A0400, // 0008 GETNGBL R6 K2
0x88180D03, // 0009 GETMBR R6 R6 K3
0x8C180D04, // 000A GETMET R6 R6 K4
0x5C200200, // 000B MOVE R8 R1
0x5C240400, // 000C MOVE R9 R2
0x542A0004, // 000D LDINT R10 5
0x502C0200, // 000E LDBOOL R11 1 0
0x7C180A00, // 000F CALL R6 5
0x90020206, // 0010 SETMBR R0 K1 R6
0x90020A05, // 0011 SETMBR R0 K5 R5
0x50180200, // 0012 LDBOOL R6 1 0
0x90020C06, // 0013 SETMBR R0 K6 R6
0x8C180107, // 0014 GETMET R6 R0 K7
0x88200B08, // 0015 GETMBR R8 R5 K8
0x7C180400, // 0016 CALL R6 2
0x8C180109, // 0017 GETMET R6 R0 K9
0x50200000, // 0018 LDBOOL R8 0 0
0x7C180400, // 0019 CALL R6 2
0x80000000, // 001A RET 0
})
)
);
@ -1407,31 +1623,32 @@ be_local_closure(class_Matter_IM_SubscribedHeartbeat_init, /* name */
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[24]) { /* code */
( &(const binstruction[25]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x4C180000, // 0004 LDNIL R6
0x4C1C0000, // 0005 LDNIL R7
0x7C100600, // 0006 CALL R4 3
0xB8120400, // 0007 GETNGBL R4 K2
0x88100903, // 0008 GETMBR R4 R4 K3
0x8C100904, // 0009 GETMET R4 R4 K4
0x5C180200, // 000A MOVE R6 R1
0x5C1C0400, // 000B MOVE R7 R2
0x54220004, // 000C LDINT R8 5
0x50240200, // 000D LDBOOL R9 1 0
0x7C100A00, // 000E CALL R4 5
0x90020204, // 000F SETMBR R0 K1 R4
0x90020A03, // 0010 SETMBR R0 K5 R3
0x8C100106, // 0011 GETMET R4 R0 K6
0x88180707, // 0012 GETMBR R6 R3 K7
0x7C100400, // 0013 CALL R4 2
0x8C100108, // 0014 GETMET R4 R0 K8
0x50180200, // 0015 LDBOOL R6 1 0
0x7C100400, // 0016 CALL R4 2
0x80000000, // 0017 RET 0
0x4C200000, // 0006 LDNIL R8
0x7C100800, // 0007 CALL R4 4
0xB8120400, // 0008 GETNGBL R4 K2
0x88100903, // 0009 GETMBR R4 R4 K3
0x8C100904, // 000A GETMET R4 R4 K4
0x5C180200, // 000B MOVE R6 R1
0x5C1C0400, // 000C MOVE R7 R2
0x54220004, // 000D LDINT R8 5
0x50240200, // 000E LDBOOL R9 1 0
0x7C100A00, // 000F CALL R4 5
0x90020204, // 0010 SETMBR R0 K1 R4
0x90020A03, // 0011 SETMBR R0 K5 R3
0x8C100106, // 0012 GETMET R4 R0 K6
0x88180707, // 0013 GETMBR R6 R3 K7
0x7C100400, // 0014 CALL R4 2
0x8C100108, // 0015 GETMET R4 R0 K8
0x50180200, // 0016 LDBOOL R6 1 0
0x7C100400, // 0017 CALL R4 2
0x80000000, // 0018 RET 0
})
)
);
@ -1466,8 +1683,8 @@ extern const bclass be_class_Matter_IM_SubscribeResponse_Pull;
extern const bclass be_class_Matter_IM_SubscribeResponse_Pull;
be_local_closure(class_Matter_IM_SubscribeResponse_Pull_init, /* name */
be_nested_proto(
8, /* nstack */
4, /* argc */
10, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@ -1483,21 +1700,22 @@ be_local_closure(class_Matter_IM_SubscribeResponse_Pull_init, /* name */
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x7C100600, // 0006 CALL R4 3
0x90020203, // 0007 SETMBR R0 K1 R3
0x50100200, // 0008 LDBOOL R4 1 0
0x90020404, // 0009 SETMBR R0 K2 R4
0x8C100103, // 000A GETMET R4 R0 K3
0x88180704, // 000B GETMBR R6 R3 K4
0x7C100400, // 000C CALL R4 2
0x80000000, // 000D RET 0
( &(const binstruction[15]) { /* code */
0x60140003, // 0000 GETGBL R5 G3
0x5C180000, // 0001 MOVE R6 R0
0x7C140200, // 0002 CALL R5 1
0x8C140B00, // 0003 GETMET R5 R5 K0
0x5C1C0200, // 0004 MOVE R7 R1
0x5C200400, // 0005 MOVE R8 R2
0x5C240600, // 0006 MOVE R9 R3
0x7C140800, // 0007 CALL R5 4
0x90020204, // 0008 SETMBR R0 K1 R4
0x50140200, // 0009 LDBOOL R5 1 0
0x90020405, // 000A SETMBR R0 K2 R5
0x8C140103, // 000B GETMET R5 R0 K3
0x881C0904, // 000C GETMBR R7 R4 K4
0x7C140400, // 000D CALL R5 2
0x80000000, // 000E RET 0
})
)
);

View File

@ -695,10 +695,10 @@ be_local_closure(class_Matter_MessageHandler_send_simple_ack, /* name */
/********************************************************************
** Solidified function: every_250ms
** Solidified function: every_50ms
********************************************************************/
extern const bclass be_class_Matter_MessageHandler;
be_local_closure(class_Matter_MessageHandler_every_250ms, /* name */
be_local_closure(class_Matter_MessageHandler_every_50ms, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@ -710,9 +710,9 @@ be_local_closure(class_Matter_MessageHandler_every_250ms, /* name */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(im),
/* K1 */ be_nested_str_weak(every_250ms),
/* K1 */ be_nested_str_weak(every_50ms),
}),
be_str_weak(every_250ms),
be_str_weak(every_50ms),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
@ -775,7 +775,7 @@ be_local_class(Matter_MessageHandler,
{ be_const_key_weak(msg_received, -1), be_const_closure(class_Matter_MessageHandler_msg_received_closure) },
{ be_const_key_weak(im, 11), be_const_var(2) },
{ be_const_key_weak(every_second, -1), be_const_closure(class_Matter_MessageHandler_every_second_closure) },
{ be_const_key_weak(every_250ms, -1), be_const_closure(class_Matter_MessageHandler_every_250ms_closure) },
{ be_const_key_weak(every_50ms, -1), be_const_closure(class_Matter_MessageHandler_every_50ms_closure) },
{ be_const_key_weak(send_simple_ack, 1), be_const_closure(class_Matter_MessageHandler_send_simple_ack_closure) },
{ be_const_key_weak(send_response_frame, 6), be_const_closure(class_Matter_MessageHandler_send_response_frame_closure) },
{ be_const_key_weak(control_message, -1), be_const_var(3) },

View File

@ -6,6 +6,81 @@
extern const bclass be_class_Matter_Path;
/********************************************************************
** Solidified function: reset
********************************************************************/
extern const bclass be_class_Matter_Path;
be_local_closure(class_Matter_Path_reset, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Path,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(endpoint),
/* K1 */ be_nested_str_weak(cluster),
/* K2 */ be_nested_str_weak(attribute),
/* K3 */ be_nested_str_weak(fabric_filtered),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(status),
/* K6 */ be_nested_str_weak(log),
/* K7 */ be_nested_str_weak(msg),
}),
be_str_weak(reset),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C040000, // 0000 LDNIL R1
0x90020001, // 0001 SETMBR R0 K0 R1
0x90020201, // 0002 SETMBR R0 K1 R1
0x90020401, // 0003 SETMBR R0 K2 R1
0x90020601, // 0004 SETMBR R0 K3 R1
0x90020801, // 0005 SETMBR R0 K4 R1
0x90020A01, // 0006 SETMBR R0 K5 R1
0x90020C01, // 0007 SETMBR R0 K6 R1
0x90020E01, // 0008 SETMBR R0 K7 R1
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Path;
be_local_closure(class_Matter_Path_init, /* name */
be_nested_proto(
4, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Path,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(endpoint),
/* K1 */ be_nested_str_weak(cluster),
/* K2 */ be_nested_str_weak(attribute),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0x90020202, // 0001 SETMBR R0 K1 R2
0x90020403, // 0002 SETMBR R0 K2 R3
0x80000000, // 0003 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: tostring
********************************************************************/
@ -161,68 +236,26 @@ be_local_closure(class_Matter_Path_copy, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: reset
********************************************************************/
extern const bclass be_class_Matter_Path;
be_local_closure(class_Matter_Path_reset, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Path,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(endpoint),
/* K1 */ be_nested_str_weak(cluster),
/* K2 */ be_nested_str_weak(attribute),
/* K3 */ be_nested_str_weak(fabric_filtered),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(status),
/* K6 */ be_nested_str_weak(log),
/* K7 */ be_nested_str_weak(msg),
}),
be_str_weak(reset),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C040000, // 0000 LDNIL R1
0x90020001, // 0001 SETMBR R0 K0 R1
0x90020201, // 0002 SETMBR R0 K1 R1
0x90020401, // 0003 SETMBR R0 K2 R1
0x90020601, // 0004 SETMBR R0 K3 R1
0x90020801, // 0005 SETMBR R0 K4 R1
0x90020A01, // 0006 SETMBR R0 K5 R1
0x90020C01, // 0007 SETMBR R0 K6 R1
0x90020E01, // 0008 SETMBR R0 K7 R1
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Path
********************************************************************/
be_local_class(Matter_Path,
8,
NULL,
be_nested_map(11,
be_nested_map(12,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(command, -1), be_const_var(4) },
{ be_const_key_weak(cluster, 5), be_const_var(1) },
{ be_const_key_weak(attribute, -1), be_const_var(2) },
{ be_const_key_weak(tostring, 9), be_const_closure(class_Matter_Path_tostring_closure) },
{ be_const_key_weak(log, -1), be_const_var(6) },
{ be_const_key_weak(status, 2), be_const_var(5) },
{ be_const_key_weak(endpoint, -1), be_const_var(0) },
{ be_const_key_weak(msg, 6), be_const_var(7) },
{ be_const_key_weak(fabric_filtered, -1), be_const_var(3) },
{ be_const_key_weak(copy, -1), be_const_closure(class_Matter_Path_copy_closure) },
{ be_const_key_weak(reset, -1), be_const_closure(class_Matter_Path_reset_closure) },
{ be_const_key_weak(cluster, 5), be_const_var(1) },
{ be_const_key_weak(fabric_filtered, 6), be_const_var(3) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Path_init_closure) },
{ be_const_key_weak(endpoint, -1), be_const_var(0) },
{ be_const_key_weak(tostring, -1), be_const_closure(class_Matter_Path_tostring_closure) },
{ be_const_key_weak(command, 10), be_const_var(4) },
{ be_const_key_weak(status, -1), be_const_var(5) },
{ be_const_key_weak(copy, -1), be_const_closure(class_Matter_Path_copy_closure) },
{ be_const_key_weak(log, -1), be_const_var(6) },
{ be_const_key_weak(msg, -1), be_const_var(7) },
{ be_const_key_weak(attribute, -1), be_const_var(2) },
})),
be_str_weak(Matter_Path)
);

View File

@ -0,0 +1,351 @@
/* Solidification of Matter_Path_1_EventGenerator.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_EventGenerator;
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_init, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(device),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0x80000000, // 0001 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_pi
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_get_pi, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
0, /* has constants */
NULL, /* no const */
be_str_weak(get_pi),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C040000, // 0000 LDNIL R1
0x80040200, // 0001 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: start
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_start, /* name */
be_nested_proto(
7, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(reset),
/* K1 */ be_nested_str_weak(path_in_endpoint),
/* K2 */ be_nested_str_weak(path_in_cluster),
/* K3 */ be_nested_str_weak(path_in_event),
/* K4 */ be_nested_str_weak(path_in_event_min),
/* K5 */ be_nested_str_weak(event_no),
/* K6 */ be_nested_str_weak(finished),
}),
be_str_weak(start),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x8C140100, // 0000 GETMET R5 R0 K0
0x7C140200, // 0001 CALL R5 1
0x90020201, // 0002 SETMBR R0 K1 R1
0x90020402, // 0003 SETMBR R0 K2 R2
0x90020603, // 0004 SETMBR R0 K3 R3
0x90020804, // 0005 SETMBR R0 K4 R4
0x90020A04, // 0006 SETMBR R0 K5 R4
0x50140000, // 0007 LDBOOL R5 0 0
0x90020C05, // 0008 SETMBR R0 K6 R5
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: reset
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_reset, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(event_no),
/* K1 */ be_nested_str_weak(finished),
}),
be_str_weak(reset),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x4C040000, // 0000 LDNIL R1
0x90020001, // 0001 SETMBR R0 K0 R1
0x50080200, // 0002 LDBOOL R2 1 0
0x90020202, // 0003 SETMBR R0 K1 R2
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: is_finished
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_is_finished, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(finished),
}),
be_str_weak(is_finished),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x80040200, // 0001 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: event_is_match
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_event_is_match, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(path_in_endpoint),
/* K1 */ be_nested_str_weak(endpoint),
/* K2 */ be_nested_str_weak(path_in_cluster),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(path_in_event),
/* K5 */ be_nested_str_weak(event_id),
}),
be_str_weak(event_is_match),
&be_const_str_solidified,
( &(const binstruction[38]) { /* code */
0x50080200, // 0000 LDBOOL R2 1 0
0x880C0100, // 0001 GETMBR R3 R0 K0
0x4C100000, // 0002 LDNIL R4
0x200C0604, // 0003 NE R3 R3 R4
0x780E0007, // 0004 JMPF R3 #000D
0x780A0003, // 0005 JMPF R2 #000A
0x880C0100, // 0006 GETMBR R3 R0 K0
0x88100301, // 0007 GETMBR R4 R1 K1
0x1C0C0604, // 0008 EQ R3 R3 R4
0x740E0000, // 0009 JMPT R3 #000B
0x500C0001, // 000A LDBOOL R3 0 1
0x500C0200, // 000B LDBOOL R3 1 0
0x5C080600, // 000C MOVE R2 R3
0x880C0102, // 000D GETMBR R3 R0 K2
0x4C100000, // 000E LDNIL R4
0x200C0604, // 000F NE R3 R3 R4
0x780E0007, // 0010 JMPF R3 #0019
0x780A0003, // 0011 JMPF R2 #0016
0x880C0102, // 0012 GETMBR R3 R0 K2
0x88100303, // 0013 GETMBR R4 R1 K3
0x1C0C0604, // 0014 EQ R3 R3 R4
0x740E0000, // 0015 JMPT R3 #0017
0x500C0001, // 0016 LDBOOL R3 0 1
0x500C0200, // 0017 LDBOOL R3 1 0
0x5C080600, // 0018 MOVE R2 R3
0x880C0104, // 0019 GETMBR R3 R0 K4
0x4C100000, // 001A LDNIL R4
0x200C0604, // 001B NE R3 R3 R4
0x780E0007, // 001C JMPF R3 #0025
0x780A0003, // 001D JMPF R2 #0022
0x880C0104, // 001E GETMBR R3 R0 K4
0x88100305, // 001F GETMBR R4 R1 K5
0x1C0C0604, // 0020 EQ R3 R3 R4
0x740E0000, // 0021 JMPT R3 #0023
0x500C0001, // 0022 LDBOOL R3 0 1
0x500C0200, // 0023 LDBOOL R3 1 0
0x5C080600, // 0024 MOVE R2 R3
0x80040400, // 0025 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: next_event
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_next_event, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(finished),
/* K1 */ be_nested_str_weak(device),
/* K2 */ be_nested_str_weak(events),
/* K3 */ be_nested_str_weak(find_min_no),
/* K4 */ be_nested_str_weak(event_no),
/* K5 */ be_nested_str_weak(reset),
/* K6 */ be_nested_str_weak(event_is_match),
}),
be_str_weak(next_event),
&be_const_str_solidified,
( &(const binstruction[27]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x78060001, // 0001 JMPF R1 #0004
0x4C040000, // 0002 LDNIL R1
0x80040200, // 0003 RET 1 R1
0x50040200, // 0004 LDBOOL R1 1 0
0x78060013, // 0005 JMPF R1 #001A
0x88040101, // 0006 GETMBR R1 R0 K1
0x88040302, // 0007 GETMBR R1 R1 K2
0x8C040303, // 0008 GETMET R1 R1 K3
0x880C0104, // 0009 GETMBR R3 R0 K4
0x7C040400, // 000A CALL R1 2
0x4C080000, // 000B LDNIL R2
0x1C080202, // 000C EQ R2 R1 R2
0x780A0003, // 000D JMPF R2 #0012
0x8C080105, // 000E GETMET R2 R0 K5
0x7C080200, // 000F CALL R2 1
0x4C080000, // 0010 LDNIL R2
0x80040400, // 0011 RET 1 R2
0x88080304, // 0012 GETMBR R2 R1 K4
0x90020802, // 0013 SETMBR R0 K4 R2
0x8C080106, // 0014 GETMET R2 R0 K6
0x5C100200, // 0015 MOVE R4 R1
0x7C080400, // 0016 CALL R2 2
0x780A0000, // 0017 JMPF R2 #0019
0x80040200, // 0018 RET 1 R1
0x7001FFE9, // 0019 JMP #0004
0x80000000, // 001A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: restart_from
********************************************************************/
extern const bclass be_class_Matter_EventGenerator;
be_local_closure(class_Matter_EventGenerator_restart_from, /* name */
be_nested_proto(
3, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_EventGenerator,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(finished),
/* K1 */ be_nested_str_weak(event_no),
}),
be_str_weak(restart_from),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x50080000, // 0000 LDBOOL R2 0 0
0x90020002, // 0001 SETMBR R0 K0 R2
0x90020201, // 0002 SETMBR R0 K1 R1
0x80000000, // 0003 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_EventGenerator
********************************************************************/
be_local_class(Matter_EventGenerator,
7,
NULL,
be_nested_map(15,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_EventGenerator_init_closure) },
{ be_const_key_weak(path_in_endpoint, -1), be_const_var(1) },
{ be_const_key_weak(get_pi, -1), be_const_closure(class_Matter_EventGenerator_get_pi_closure) },
{ be_const_key_weak(path_in_event, -1), be_const_var(3) },
{ be_const_key_weak(finished, -1), be_const_var(6) },
{ be_const_key_weak(path_in_event_min, -1), be_const_var(4) },
{ be_const_key_weak(device, -1), be_const_var(0) },
{ be_const_key_weak(event_no, 9), be_const_var(5) },
{ be_const_key_weak(is_finished, -1), be_const_closure(class_Matter_EventGenerator_is_finished_closure) },
{ be_const_key_weak(restart_from, 5), be_const_closure(class_Matter_EventGenerator_restart_from_closure) },
{ be_const_key_weak(event_is_match, -1), be_const_closure(class_Matter_EventGenerator_event_is_match_closure) },
{ be_const_key_weak(start, 13), be_const_closure(class_Matter_EventGenerator_start_closure) },
{ be_const_key_weak(reset, 7), be_const_closure(class_Matter_EventGenerator_reset_closure) },
{ be_const_key_weak(next_event, -1), be_const_closure(class_Matter_EventGenerator_next_event_closure) },
{ be_const_key_weak(path_in_cluster, -1), be_const_var(2) },
})),
be_str_weak(Matter_EventGenerator)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,4 +1,4 @@
/* Solidification of Matter_Path_1_Generator.h */
/* Solidification of Matter_Path_1_PathGenerator.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
@ -119,10 +119,10 @@ be_local_closure(class_Matter_PathGenerator_is_direct, /* name */
/********************************************************************
** Solidified function: default_status_error
** Solidified function: is_finished
********************************************************************/
extern const bclass be_class_Matter_PathGenerator;
be_local_closure(class_Matter_PathGenerator_default_status_error, /* name */
be_local_closure(class_Matter_PathGenerator_is_finished, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@ -132,43 +132,16 @@ be_local_closure(class_Matter_PathGenerator_default_status_error, /* name */
0, /* has sup protos */
&be_class_Matter_PathGenerator,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(is_direct),
/* K1 */ be_nested_str_weak(endpoint_found),
/* K2 */ be_nested_str_weak(matter),
/* K3 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
/* K4 */ be_nested_str_weak(cluster_found),
/* K5 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
/* K6 */ be_nested_str_weak(attribute_found),
/* K7 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
/* K8 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(pi),
}),
be_str_weak(default_status_error),
be_str_weak(is_finished),
&be_const_str_solidified,
( &(const binstruction[23]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
0x78060011, // 0002 JMPF R1 #0015
0x88040101, // 0003 GETMBR R1 R0 K1
0x74060002, // 0004 JMPT R1 #0008
0xB8060400, // 0005 GETNGBL R1 K2
0x88040303, // 0006 GETMBR R1 R1 K3
0x80040200, // 0007 RET 1 R1
0x88040104, // 0008 GETMBR R1 R0 K4
0x74060002, // 0009 JMPT R1 #000D
0xB8060400, // 000A GETNGBL R1 K2
0x88040305, // 000B GETMBR R1 R1 K5
0x80040200, // 000C RET 1 R1
0x88040106, // 000D GETMBR R1 R0 K6
0x74060002, // 000E JMPT R1 #0012
0xB8060400, // 000F GETNGBL R1 K2
0x88040307, // 0010 GETMBR R1 R1 K7
0x80040200, // 0011 RET 1 R1
0xB8060400, // 0012 GETNGBL R1 K2
0x88040308, // 0013 GETMBR R1 R1 K8
0x80040200, // 0014 RET 1 R1
0x4C040000, // 0015 LDNIL R1
0x80040200, // 0016 RET 1 R1
( &(const binstruction[ 4]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x50080000, // 0001 LDBOOL R2 0 0
0x20040202, // 0002 NE R1 R1 R2
0x80040200, // 0003 RET 1 R1
})
)
);
@ -176,10 +149,10 @@ be_local_closure(class_Matter_PathGenerator_default_status_error, /* name */
/********************************************************************
** Solidified function: next
** Solidified function: next_attribute
********************************************************************/
extern const bclass be_class_Matter_PathGenerator;
be_local_closure(class_Matter_PathGenerator_next, /* name */
be_local_closure(class_Matter_PathGenerator_next_attribute, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
@ -210,9 +183,9 @@ be_local_closure(class_Matter_PathGenerator_next, /* name */
/* K17 */ be_nested_str_weak(path_in_endpoint),
/* K18 */ be_nested_str_weak(path_in_cluster),
/* K19 */ be_nested_str_weak(path_in_attribute),
/* K20 */ be_nested_str_weak(default_status_error),
/* K20 */ be_nested_str_weak(_default_status_error),
}),
be_str_weak(next),
be_str_weak(next_attribute),
&be_const_str_solidified,
( &(const binstruction[95]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
@ -392,10 +365,10 @@ be_local_closure(class_Matter_PathGenerator__next_cluster, /* name */
/********************************************************************
** Solidified function: finished
** Solidified function: _default_status_error
********************************************************************/
extern const bclass be_class_Matter_PathGenerator;
be_local_closure(class_Matter_PathGenerator_finished, /* name */
be_local_closure(class_Matter_PathGenerator__default_status_error, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@ -405,16 +378,43 @@ be_local_closure(class_Matter_PathGenerator_finished, /* name */
0, /* has sup protos */
&be_class_Matter_PathGenerator,
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(pi),
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(is_direct),
/* K1 */ be_nested_str_weak(endpoint_found),
/* K2 */ be_nested_str_weak(matter),
/* K3 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
/* K4 */ be_nested_str_weak(cluster_found),
/* K5 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
/* K6 */ be_nested_str_weak(attribute_found),
/* K7 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
/* K8 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
}),
be_str_weak(finished),
be_str_weak(_default_status_error),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x50080000, // 0001 LDBOOL R2 0 0
0x20040202, // 0002 NE R1 R1 R2
0x80040200, // 0003 RET 1 R1
( &(const binstruction[23]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
0x78060011, // 0002 JMPF R1 #0015
0x88040101, // 0003 GETMBR R1 R0 K1
0x74060002, // 0004 JMPT R1 #0008
0xB8060400, // 0005 GETNGBL R1 K2
0x88040303, // 0006 GETMBR R1 R1 K3
0x80040200, // 0007 RET 1 R1
0x88040104, // 0008 GETMBR R1 R0 K4
0x74060002, // 0009 JMPT R1 #000D
0xB8060400, // 000A GETNGBL R1 K2
0x88040305, // 000B GETMBR R1 R1 K5
0x80040200, // 000C RET 1 R1
0x88040106, // 000D GETMBR R1 R0 K6
0x74060002, // 000E JMPT R1 #0012
0xB8060400, // 000F GETNGBL R1 K2
0x88040307, // 0010 GETMBR R1 R1 K7
0x80040200, // 0011 RET 1 R1
0xB8060400, // 0012 GETNGBL R1 K2
0x88040308, // 0013 GETMBR R1 R1 K8
0x80040200, // 0014 RET 1 R1
0x4C040000, // 0015 LDNIL R1
0x80040200, // 0016 RET 1 R1
})
)
);
@ -699,9 +699,9 @@ be_local_class(Matter_PathGenerator,
{ be_const_key_weak(path_in_endpoint, -1), be_const_var(1) },
{ be_const_key_weak(path_in_cluster, -1), be_const_var(2) },
{ be_const_key_weak(get_pi, -1), be_const_closure(class_Matter_PathGenerator_get_pi_closure) },
{ be_const_key_weak(is_direct, 22), be_const_closure(class_Matter_PathGenerator_is_direct_closure) },
{ be_const_key_weak(default_status_error, 9), be_const_closure(class_Matter_PathGenerator_default_status_error_closure) },
{ be_const_key_weak(next, -1), be_const_closure(class_Matter_PathGenerator_next_closure) },
{ be_const_key_weak(is_direct, 9), be_const_closure(class_Matter_PathGenerator_is_direct_closure) },
{ be_const_key_weak(is_finished, -1), be_const_closure(class_Matter_PathGenerator_is_finished_closure) },
{ be_const_key_weak(next_attribute, 22), be_const_closure(class_Matter_PathGenerator_next_attribute_closure) },
{ be_const_key_weak(cluster_found, 17), be_const_var(10) },
{ be_const_key_weak(endpoint_found, 6), be_const_var(9) },
{ be_const_key_weak(_next_attribute, -1), be_const_closure(class_Matter_PathGenerator__next_attribute_closure) },
@ -711,7 +711,7 @@ be_local_class(Matter_PathGenerator,
{ be_const_key_weak(path_concrete, -1), be_const_var(12) },
{ be_const_key_weak(clusters, -1), be_const_var(8) },
{ be_const_key_weak(path_in_fabric_filtered, -1), be_const_var(4) },
{ be_const_key_weak(finished, -1), be_const_closure(class_Matter_PathGenerator_finished_closure) },
{ be_const_key_weak(_default_status_error, -1), be_const_closure(class_Matter_PathGenerator__default_status_error_closure) },
{ be_const_key_weak(attribute_found, 12), be_const_var(11) },
{ be_const_key_weak(_next_endpoint, -1), be_const_closure(class_Matter_PathGenerator__next_endpoint_closure) },
{ be_const_key_weak(path_in_attribute, -1), be_const_var(3) },

View File

@ -286,169 +286,36 @@ be_local_closure(class_Matter_Plugin_every_250ms, /* name */
extern const bclass be_class_Matter_Plugin;
be_local_closure(class_Matter_Plugin_publish_event, /* name */
be_nested_proto(
20, /* nstack */
5, /* argc */
17, /* nstack */
7, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin,
1, /* has constants */
( &(const bvalue[36]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(EventDataIB),
/* K2 */ be_nested_str_weak(EventPathIB),
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(events),
/* K2 */ be_nested_str_weak(publish_event),
/* K3 */ be_nested_str_weak(endpoint),
/* K4 */ be_nested_str_weak(cluster),
/* K5 */ be_nested_str_weak(event),
/* K6 */ be_nested_str_weak(path),
/* K7 */ be_nested_str_weak(priority),
/* K8 */ be_nested_str_weak(event_number),
/* K9 */ be_nested_str_weak(device),
/* K10 */ be_nested_str_weak(events),
/* K11 */ be_nested_str_weak(get_next_event_no),
/* K12 */ be_nested_str_weak(epoch_timestamp),
/* K13 */ be_nested_str_weak(tasmota),
/* K14 */ be_nested_str_weak(rtc),
/* K15 */ be_nested_str_weak(utc),
/* K16 */ be_const_int(1700000000),
/* K17 */ be_nested_str_weak(data),
/* K18 */ be_nested_str_weak(loglevel),
/* K19 */ be_const_int(3),
/* K20 */ be_const_int(0),
/* K21 */ be_nested_str_weak(val),
/* K22 */ be_nested_str_weak(_X25i_X2E_X25i_X2E_X25i_X2E_X25i),
/* K23 */ be_const_int(2),
/* K24 */ be_nested_str_weak(CRIT_X20_X20),
/* K25 */ be_const_int(1),
/* K26 */ be_nested_str_weak(INFO_X20_X20),
/* K27 */ be_nested_str_weak(DEBUG_X20),
/* K28 */ be_nested_str_weak(get_event_name),
/* K29 */ be_nested_str_weak(_X28),
/* K30 */ be_nested_str_weak(_X29_X20),
/* K31 */ be_nested_str_weak(),
/* K32 */ be_nested_str_weak(log),
/* K33 */ be_nested_str_weak(MTR_X3A_X20_X2BAdd_Event_X20_X28_X25s_X258s_X29_X20_X5B_X2502X_X5D_X2504X_X2F_X2502X_X20_X25s_X2D_X20_X25s),
/* K34 */ be_nested_str_weak(MTR_X3A_X20Publishing_X20event_X20_X25s),
/* K35 */ be_nested_str_weak(queue_event),
}),
be_str_weak(publish_event),
&be_const_str_solidified,
( &(const binstruction[114]) { /* code */
0xB8160000, // 0000 GETNGBL R5 K0
0x8C140B01, // 0001 GETMET R5 R5 K1
0x7C140200, // 0002 CALL R5 1
0xB81A0000, // 0003 GETNGBL R6 K0
0x8C180D02, // 0004 GETMET R6 R6 K2
0x7C180200, // 0005 CALL R6 1
0x881C0103, // 0006 GETMBR R7 R0 K3
0x901A0607, // 0007 SETMBR R6 K3 R7
0x901A0801, // 0008 SETMBR R6 K4 R1
0x901A0A02, // 0009 SETMBR R6 K5 R2
0x90160C06, // 000A SETMBR R5 K6 R6
0x90160E03, // 000B SETMBR R5 K7 R3
0x881C0109, // 000C GETMBR R7 R0 K9
0x881C0F0A, // 000D GETMBR R7 R7 K10
0x8C1C0F0B, // 000E GETMET R7 R7 K11
0x7C1C0200, // 000F CALL R7 1
0x90161007, // 0010 SETMBR R5 K8 R7
0xB81E1A00, // 0011 GETNGBL R7 K13
0x8C1C0F0E, // 0012 GETMET R7 R7 K14
0x5824000F, // 0013 LDCONST R9 K15
0x7C1C0400, // 0014 CALL R7 2
0x90161807, // 0015 SETMBR R5 K12 R7
0x881C0B0C, // 0016 GETMBR R7 R5 K12
0x141C0F10, // 0017 LT R7 R7 K16
0x781E0001, // 0018 JMPF R7 #001B
0x4C1C0000, // 0019 LDNIL R7
0x90161807, // 001A SETMBR R5 K12 R7
0x90162204, // 001B SETMBR R5 K17 R4
0xB81E1A00, // 001C GETNGBL R7 K13
0x8C1C0F12, // 001D GETMET R7 R7 K18
0x58240013, // 001E LDCONST R9 K19
0x7C1C0400, // 001F CALL R7 2
0x781E003E, // 0020 JMPF R7 #0060
0x601C0008, // 0021 GETGBL R7 G8
0x88200B11, // 0022 GETMBR R8 R5 K17
0x7C1C0200, // 0023 CALL R7 1
0x54220027, // 0024 LDINT R8 40
0x1C200208, // 0025 EQ R8 R1 R8
0x78220015, // 0026 JMPF R8 #003D
0x1C200514, // 0027 EQ R8 R2 K20
0x78220013, // 0028 JMPF R8 #003D
0x88200B11, // 0029 GETMBR R8 R5 K17
0x88201115, // 002A GETMBR R8 R8 K21
0x60240018, // 002B GETGBL R9 G24
0x58280016, // 002C LDCONST R10 K22
0x542E0017, // 002D LDINT R11 24
0x3C2C100B, // 002E SHR R11 R8 R11
0x543200FE, // 002F LDINT R12 255
0x2C2C160C, // 0030 AND R11 R11 R12
0x5432000F, // 0031 LDINT R12 16
0x3C30100C, // 0032 SHR R12 R8 R12
0x543600FE, // 0033 LDINT R13 255
0x2C30180D, // 0034 AND R12 R12 R13
0x54360007, // 0035 LDINT R13 8
0x3C34100D, // 0036 SHR R13 R8 R13
0x543A00FE, // 0037 LDINT R14 255
0x2C341A0E, // 0038 AND R13 R13 R14
0x543A00FE, // 0039 LDINT R14 255
0x2C38100E, // 003A AND R14 R8 R14
0x7C240A00, // 003B CALL R9 5
0x5C1C1200, // 003C MOVE R7 R9
0x1C200717, // 003D EQ R8 R3 K23
0x78220001, // 003E JMPF R8 #0041
0x58200018, // 003F LDCONST R8 K24
0x70020004, // 0040 JMP #0046
0x1C200719, // 0041 EQ R8 R3 K25
0x78220001, // 0042 JMPF R8 #0045
0x5820001A, // 0043 LDCONST R8 K26
0x70020000, // 0044 JMP #0046
0x5820001B, // 0045 LDCONST R8 K27
0xB8260000, // 0046 GETNGBL R9 K0
0x8C24131C, // 0047 GETMET R9 R9 K28
0x5C2C0200, // 0048 MOVE R11 R1
0x5C300400, // 0049 MOVE R12 R2
0x7C240600, // 004A CALL R9 3
0x4C280000, // 004B LDNIL R10
0x2028120A, // 004C NE R10 R9 R10
0x782A0002, // 004D JMPF R10 #0051
0x002A3A09, // 004E ADD R10 K29 R9
0x0028151E, // 004F ADD R10 R10 K30
0x70020000, // 0050 JMP #0052
0x5828001F, // 0051 LDCONST R10 K31
0x5C241400, // 0052 MOVE R9 R10
0xB82A4000, // 0053 GETNGBL R10 K32
0x602C0018, // 0054 GETGBL R11 G24
0x58300021, // 0055 LDCONST R12 K33
0x5C341000, // 0056 MOVE R13 R8
0x88380B08, // 0057 GETMBR R14 R5 K8
0x883C0D03, // 0058 GETMBR R15 R6 K3
0x88400D04, // 0059 GETMBR R16 R6 K4
0x88440D05, // 005A GETMBR R17 R6 K5
0x5C481200, // 005B MOVE R18 R9
0x5C4C0E00, // 005C MOVE R19 R7
0x7C2C1000, // 005D CALL R11 8
0x58300017, // 005E LDCONST R12 K23
0x7C280400, // 005F CALL R10 2
0xB81E1A00, // 0060 GETNGBL R7 K13
0x8C1C0F12, // 0061 GETMET R7 R7 K18
0x54260003, // 0062 LDINT R9 4
0x7C1C0400, // 0063 CALL R7 2
0x781E0006, // 0064 JMPF R7 #006C
0xB81E4000, // 0065 GETNGBL R7 K32
0x60200018, // 0066 GETGBL R8 G24
0x58240022, // 0067 LDCONST R9 K34
0x5C280A00, // 0068 MOVE R10 R5
0x7C200400, // 0069 CALL R8 2
0x54260003, // 006A LDINT R9 4
0x7C1C0400, // 006B CALL R7 2
0x881C0109, // 006C GETMBR R7 R0 K9
0x881C0F0A, // 006D GETMBR R7 R7 K10
0x8C1C0F23, // 006E GETMET R7 R7 K35
0x5C240A00, // 006F MOVE R9 R5
0x7C1C0400, // 0070 CALL R7 2
0x80000000, // 0071 RET 0
( &(const binstruction[13]) { /* code */
0x881C0100, // 0000 GETMBR R7 R0 K0
0x881C0F01, // 0001 GETMBR R7 R7 K1
0x8C1C0F02, // 0002 GETMET R7 R7 K2
0x88240103, // 0003 GETMBR R9 R0 K3
0x5C280200, // 0004 MOVE R10 R1
0x5C2C0400, // 0005 MOVE R11 R2
0x50300200, // 0006 LDBOOL R12 1 0
0x5C340600, // 0007 MOVE R13 R3
0x5C380800, // 0008 MOVE R14 R4
0x5C3C0A00, // 0009 MOVE R15 R5
0x5C400C00, // 000A MOVE R16 R6
0x7C1C1200, // 000B CALL R7 9
0x80000000, // 000C RET 0
})
)
);

View File

@ -853,7 +853,7 @@ be_local_closure(class_Matter_Device_process_attribute_expansion, /* name */
/* K4 */ be_nested_str_weak(PathGenerator),
/* K5 */ be_nested_str_weak(start),
/* K6 */ be_nested_str_weak(is_direct),
/* K7 */ be_nested_str_weak(next),
/* K7 */ be_nested_str_weak(next_attribute),
/* K8 */ be_nested_str_weak(get_pi),
}),
be_str_weak(process_attribute_expansion),
@ -907,35 +907,31 @@ be_local_closure(class_Matter_Device_every_250ms, /* name */
0, /* has sup protos */
&be_class_Matter_Device,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(message_handler),
/* K1 */ be_nested_str_weak(every_250ms),
/* K2 */ be_nested_str_weak(read_sensors_scheduler),
/* K3 */ be_const_int(0),
/* K4 */ be_nested_str_weak(plugins),
/* K5 */ be_const_int(1),
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(read_sensors_scheduler),
/* K1 */ be_const_int(0),
/* K2 */ be_nested_str_weak(plugins),
/* K3 */ be_nested_str_weak(every_250ms),
/* K4 */ be_const_int(1),
}),
be_str_weak(every_250ms),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
0x8C040102, // 0003 GETMET R1 R0 K2
0x7C040200, // 0004 CALL R1 1
0x58040003, // 0005 LDCONST R1 K3
0x6008000C, // 0006 GETGBL R2 G12
0x880C0104, // 0007 GETMBR R3 R0 K4
0x7C080200, // 0008 CALL R2 1
0x14080202, // 0009 LT R2 R1 R2
0x780A0005, // 000A JMPF R2 #0011
0x88080104, // 000B GETMBR R2 R0 K4
0x94080401, // 000C GETIDX R2 R2 R1
0x8C080501, // 000D GETMET R2 R2 K1
0x7C080200, // 000E CALL R2 1
0x00040305, // 000F ADD R1 R1 K5
0x7001FFF4, // 0010 JMP #0006
0x80000000, // 0011 RET 0
( &(const binstruction[15]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
0x58040001, // 0002 LDCONST R1 K1
0x6008000C, // 0003 GETGBL R2 G12
0x880C0102, // 0004 GETMBR R3 R0 K2
0x7C080200, // 0005 CALL R2 1
0x14080202, // 0006 LT R2 R1 R2
0x780A0005, // 0007 JMPF R2 #000E
0x88080102, // 0008 GETMBR R2 R0 K2
0x94080401, // 0009 GETIDX R2 R2 R1
0x8C080503, // 000A GETMET R2 R2 K3
0x7C080200, // 000B CALL R2 1
0x00040304, // 000C ADD R1 R1 K4
0x7001FFF4, // 000D JMP #0003
0x80000000, // 000E RET 0
})
)
);
@ -2288,7 +2284,7 @@ be_local_closure(class_Matter_Device_start, /* name */
extern const bclass be_class_Matter_Device;
be_local_closure(class_Matter_Device_every_50ms, /* name */
be_nested_proto(
2, /* nstack */
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -2296,17 +2292,22 @@ be_local_closure(class_Matter_Device_every_50ms, /* name */
0, /* has sup protos */
&be_class_Matter_Device,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(tick),
/* K1 */ be_const_int(1),
/* K2 */ be_nested_str_weak(message_handler),
/* K3 */ be_nested_str_weak(every_50ms),
}),
be_str_weak(every_50ms),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x00040301, // 0001 ADD R1 R1 K1
0x90020001, // 0002 SETMBR R0 K0 R1
0x80000000, // 0003 RET 0
0x88040102, // 0003 GETMBR R1 R0 K2
0x8C040303, // 0004 GETMET R1 R1 K3
0x7C040200, // 0005 CALL R1 1
0x80000000, // 0006 RET 0
})
)
);
@ -5093,17 +5094,18 @@ be_local_closure(class_Matter_Device_every_second, /* name */
0, /* has sup protos */
&be_class_Matter_Device,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(sessions),
/* K1 */ be_nested_str_weak(every_second),
/* K2 */ be_nested_str_weak(message_handler),
/* K3 */ be_nested_str_weak(commissioning_open),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(time_reached),
/* K3 */ be_nested_str_weak(events),
/* K4 */ be_nested_str_weak(commissioning_open),
/* K5 */ be_nested_str_weak(tasmota),
/* K6 */ be_nested_str_weak(time_reached),
}),
be_str_weak(every_second),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
( &(const binstruction[21]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
@ -5111,17 +5113,20 @@ be_local_closure(class_Matter_Device_every_second, /* name */
0x8C040301, // 0004 GETMET R1 R1 K1
0x7C040200, // 0005 CALL R1 1
0x88040103, // 0006 GETMBR R1 R0 K3
0x4C080000, // 0007 LDNIL R2
0x20040202, // 0008 NE R1 R1 R2
0x78060006, // 0009 JMPF R1 #0011
0xB8060800, // 000A GETNGBL R1 K4
0x8C040305, // 000B GETMET R1 R1 K5
0x880C0103, // 000C GETMBR R3 R0 K3
0x7C040400, // 000D CALL R1 2
0x78060001, // 000E JMPF R1 #0011
0x4C040000, // 000F LDNIL R1
0x90020601, // 0010 SETMBR R0 K3 R1
0x80000000, // 0011 RET 0
0x8C040301, // 0007 GETMET R1 R1 K1
0x7C040200, // 0008 CALL R1 1
0x88040104, // 0009 GETMBR R1 R0 K4
0x4C080000, // 000A LDNIL R2
0x20040202, // 000B NE R1 R1 R2
0x78060006, // 000C JMPF R1 #0014
0xB8060A00, // 000D GETNGBL R1 K5
0x8C040306, // 000E GETMET R1 R1 K6
0x880C0104, // 000F GETMBR R3 R0 K4
0x7C040400, // 0010 CALL R1 2
0x78060001, // 0011 JMPF R1 #0014
0x4C040000, // 0012 LDNIL R1
0x90020801, // 0013 SETMBR R0 K4 R1
0x80000000, // 0014 RET 0
})
)
);
@ -6115,23 +6120,23 @@ be_local_class(Matter_Device,
{ be_const_key_weak(v_light2, -1), be_const_class(be_class_Matter_Plugin_Virt_Light2) },
{ be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) },
{ be_const_key_weak(relay, -1), be_const_class(be_class_Matter_Plugin_OnOff) },
{ be_const_key_weak(v_illuminance, 15), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) },
{ be_const_key_weak(contact, 1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) },
{ be_const_key_weak(temperature, 27), be_const_class(be_class_Matter_Plugin_Sensor_Temp) },
{ be_const_key_weak(v_illuminance, 41), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) },
{ be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) },
{ be_const_key_weak(temperature, 29), be_const_class(be_class_Matter_Plugin_Sensor_Temp) },
{ be_const_key_weak(waterleak, -1), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) },
{ be_const_key_weak(v_fan, -1), be_const_class(be_class_Matter_Plugin_Virt_Fan) },
{ be_const_key_weak(http_occupancy, 6), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) },
{ be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) },
{ be_const_key_weak(v_airquality, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) },
{ be_const_key_weak(fan, -1), be_const_class(be_class_Matter_Plugin_Fan) },
{ be_const_key_weak(light1, -1), be_const_class(be_class_Matter_Plugin_Light1) },
{ be_const_key_weak(root, -1), be_const_class(be_class_Matter_Plugin_Root) },
{ be_const_key_weak(illuminance, -1), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) },
{ be_const_key_weak(v_temp, 41), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) },
{ be_const_key_weak(v_temp, 20), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) },
{ be_const_key_weak(v_light1, -1), be_const_class(be_class_Matter_Plugin_Virt_Light1) },
{ be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) },
{ be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) },
{ be_const_key_weak(v_waterleak, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) },
{ be_const_key_weak(light2, 29), be_const_class(be_class_Matter_Plugin_Light2) },
{ be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) },
{ be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) },
{ be_const_key_weak(light2, 27), be_const_class(be_class_Matter_Plugin_Light2) },
{ be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) },
{ be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) },
{ be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) },
@ -6142,12 +6147,12 @@ be_local_class(Matter_Device,
{ be_const_key_weak(v_rain, 43), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Rain) },
{ be_const_key_weak(http_light0, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light0) },
{ be_const_key_weak(http_waterleak, 45), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) },
{ be_const_key_weak(v_airquality, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) },
{ be_const_key_weak(contact, 1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) },
{ be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) },
{ be_const_key_weak(airquality, 35), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) },
{ be_const_key_weak(http_flow, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) },
{ be_const_key_weak(humidity, -1), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) },
{ be_const_key_weak(http_temperature, 20), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) },
{ be_const_key_weak(http_temperature, 15), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) },
{ be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) },
{ be_const_key_weak(v_humidity, 12), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) },
{ be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) },

View File

@ -183,6 +183,7 @@ extern "C" {
be_map_insert_int(vm, "local", Rtc.local_time);
be_map_insert_int(vm, "restart", Rtc.restart_time);
be_map_insert_int(vm, "timezone", Rtc.time_timezone);
be_map_insert_int(vm, "config_time", Settings->cfg_timestamp);
be_pop(vm, 1);
be_return(vm);
}