mirror of https://github.com/arendst/Tasmota.git
Matter support for subscriptions (#18017)
This commit is contained in:
parent
2827bdec22
commit
103041cd1a
|
@ -38,9 +38,11 @@ class Matter_Device
|
||||||
var hostname_eth # MAC-derived hostname for commissioning
|
var hostname_eth # MAC-derived hostname for commissioning
|
||||||
var vendorid
|
var vendorid
|
||||||
var productid
|
var productid
|
||||||
|
# saved in parameters
|
||||||
var discriminator
|
var discriminator
|
||||||
# context for PBKDF
|
|
||||||
var passcode
|
var passcode
|
||||||
|
var ipv4only # advertize only IPv4 addresses (no IPv6)
|
||||||
|
# context for PBKDF
|
||||||
var iterations
|
var iterations
|
||||||
# PBKDF information used only during PASE (freed afterwards)
|
# PBKDF information used only during PASE (freed afterwards)
|
||||||
var salt
|
var salt
|
||||||
|
@ -59,6 +61,7 @@ class Matter_Device
|
||||||
self.vendorid = self.VENDOR_ID
|
self.vendorid = self.VENDOR_ID
|
||||||
self.productid = self.PRODUCT_ID
|
self.productid = self.PRODUCT_ID
|
||||||
self.iterations = self.PBKDF_ITERATIONS
|
self.iterations = self.PBKDF_ITERATIONS
|
||||||
|
self.ipv4only = false
|
||||||
self.load_param()
|
self.load_param()
|
||||||
self.commissioning_instance_wifi = crypto.random(8).tohex() # 16 characters random hostname
|
self.commissioning_instance_wifi = crypto.random(8).tohex() # 16 characters random hostname
|
||||||
self.commissioning_instance_eth = crypto.random(8).tohex() # 16 characters random hostname
|
self.commissioning_instance_eth = crypto.random(8).tohex() # 16 characters random hostname
|
||||||
|
@ -170,6 +173,12 @@ class Matter_Device
|
||||||
self.message_handler.every_second()
|
self.message_handler.every_second()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# dispatch every 250ms click to sub-objects that need it
|
||||||
|
def every_250ms()
|
||||||
|
self.message_handler.every_250ms()
|
||||||
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
def stop()
|
def stop()
|
||||||
if self.udp_server self.udp_server.stop() end
|
if self.udp_server self.udp_server.stop() end
|
||||||
|
@ -275,6 +284,18 @@ class Matter_Device
|
||||||
return l
|
return l
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# signal that an attribute has been changed
|
||||||
|
#
|
||||||
|
def attribute_updated(endpoint, cluster, attribute, fabric_specific)
|
||||||
|
if fabric_specific == nil fabric_specific = false end
|
||||||
|
var ctx = matter.Path()
|
||||||
|
ctx.endpoint = endpoint
|
||||||
|
ctx.cluster = cluster
|
||||||
|
ctx.attribute = attribute
|
||||||
|
self.message_handler.im.subs.attribute_updated_ctx(ctx, fabric_specific)
|
||||||
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# expand attribute list based
|
# expand attribute list based
|
||||||
#
|
#
|
||||||
|
@ -344,7 +365,7 @@ class Matter_Device
|
||||||
var attr_list = pi.get_attribute_list(ep, cl)
|
var attr_list = pi.get_attribute_list(ep, cl)
|
||||||
tasmota.log(string.format("MTR: pi=%s ep=%s cl=%s at_list=%s", str(pi), str(ep), str(cl), str(attr_list)), 4)
|
tasmota.log(string.format("MTR: pi=%s ep=%s cl=%s at_list=%s", str(pi), str(ep), str(cl), str(attr_list)), 4)
|
||||||
for at: attr_list
|
for at: attr_list
|
||||||
if attribute != nil && at != attribute continue end # skip if specific attribiute and no match
|
if attribute != nil && at != attribute continue end # skip if specific attribute and no match
|
||||||
# from now on, 'at' is a good candidate
|
# from now on, 'at' is a good candidate
|
||||||
if !all[ep][cl].contains(at) all[ep][cl][at] = [] end
|
if !all[ep][cl].contains(at) all[ep][cl][at] = [] end
|
||||||
attribute_found = true
|
attribute_found = true
|
||||||
|
@ -386,11 +407,6 @@ class Matter_Device
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# def process_read_attribute(ctx)
|
|
||||||
# self.process_attribute_expansion(ctx,
|
|
||||||
# / pi, ctx, direct -> pi.read_attribute(ctx))
|
|
||||||
# end
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# get active endpoints
|
# get active endpoints
|
||||||
#
|
#
|
||||||
|
@ -416,7 +432,7 @@ class Matter_Device
|
||||||
#
|
#
|
||||||
def save_param()
|
def save_param()
|
||||||
import json
|
import json
|
||||||
var j = json.dump({'distinguish':self.discriminator, 'passcode':self.passcode})
|
var j = json.dump({'distinguish':self.discriminator, 'passcode':self.passcode, 'ipv4only':self.ipv4only})
|
||||||
try
|
try
|
||||||
import string
|
import string
|
||||||
var f = open(self.FILENAME, "w")
|
var f = open(self.FILENAME, "w")
|
||||||
|
@ -442,8 +458,9 @@ class Matter_Device
|
||||||
import json
|
import json
|
||||||
var j = json.load(s)
|
var j = json.load(s)
|
||||||
|
|
||||||
self.discriminator = j.find("distinguish")
|
self.discriminator = j.find("distinguish", self.discriminator)
|
||||||
self.passcode = j.find("passcode")
|
self.passcode = j.find("passcode", self.passcode)
|
||||||
|
self.ipv4only = bool(j.find("ipv4only", false))
|
||||||
except .. as e, m
|
except .. as e, m
|
||||||
if e != "io_error"
|
if e != "io_error"
|
||||||
tasmota.log("MTR: Session_Store::load Exception:" + str(e) + "|" + str(m), 2)
|
tasmota.log("MTR: Session_Store::load Exception:" + str(e) + "|" + str(m), 2)
|
||||||
|
@ -469,12 +486,12 @@ class Matter_Device
|
||||||
# Plugins allow to specify response to read/write attributes
|
# Plugins allow to specify response to read/write attributes
|
||||||
# and command invokes
|
# and command invokes
|
||||||
#############################################################
|
#############################################################
|
||||||
def invoke_request(msg, val, ctx)
|
def invoke_request(session, val, ctx)
|
||||||
var idx = 0
|
var idx = 0
|
||||||
while idx < size(self.plugins)
|
while idx < size(self.plugins)
|
||||||
var plugin = self.plugins[idx]
|
var plugin = self.plugins[idx]
|
||||||
|
|
||||||
var ret = plugin.invoke_request(msg, val, ctx)
|
var ret = plugin.invoke_request(session, val, ctx)
|
||||||
if ret != nil || ctx.status != matter.UNSUPPORTED_COMMAND # default value
|
if ret != nil || ctx.status != matter.UNSUPPORTED_COMMAND # default value
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
@ -533,7 +550,11 @@ class Matter_Device
|
||||||
if is_eth
|
if is_eth
|
||||||
var eth = tasmota.eth()
|
var eth = tasmota.eth()
|
||||||
self.hostname_eth = string.replace(eth.find("mac"), ':', '')
|
self.hostname_eth = string.replace(eth.find("mac"), ':', '')
|
||||||
|
if !self.ipv4only
|
||||||
mdns.add_hostname(self.hostname_eth, eth.find('ip6local',''), eth.find('ip',''), eth.find('ip6',''))
|
mdns.add_hostname(self.hostname_eth, eth.find('ip6local',''), eth.find('ip',''), eth.find('ip6',''))
|
||||||
|
else
|
||||||
|
mdns.add_hostname(self.hostname_eth, eth.find('ip',''))
|
||||||
|
end
|
||||||
mdns.add_service("_matterc", "_udp", 5540, services, self.commissioning_instance_eth, self.hostname_eth)
|
mdns.add_service("_matterc", "_udp", 5540, services, self.commissioning_instance_eth, self.hostname_eth)
|
||||||
|
|
||||||
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", is_eth ? "eth" : "wifi",
|
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", is_eth ? "eth" : "wifi",
|
||||||
|
@ -556,7 +577,11 @@ class Matter_Device
|
||||||
else
|
else
|
||||||
var wifi = tasmota.wifi()
|
var wifi = tasmota.wifi()
|
||||||
self.hostname_wifi = string.replace(wifi.find("mac"), ':', '')
|
self.hostname_wifi = string.replace(wifi.find("mac"), ':', '')
|
||||||
|
if !self.ipv4only
|
||||||
mdns.add_hostname(self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip',''), wifi.find('ip6',''))
|
mdns.add_hostname(self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip',''), wifi.find('ip6',''))
|
||||||
|
else
|
||||||
|
mdns.add_hostname(self.hostname_wifi, wifi.find('ip',''))
|
||||||
|
end
|
||||||
mdns.add_service("_matterc", "_udp", 5540, services, self.commissioning_instance_wifi, self.hostname_wifi)
|
mdns.add_service("_matterc", "_udp", 5540, services, self.commissioning_instance_wifi, self.hostname_wifi)
|
||||||
|
|
||||||
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", is_eth ? "eth" : "wifi",
|
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", is_eth ? "eth" : "wifi",
|
||||||
|
|
|
@ -111,34 +111,52 @@ class Matter_IM
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# find in send_queue by exchangeid
|
||||||
|
#
|
||||||
|
def remove_sendqueue_by_exchangeid(exchangeid)
|
||||||
|
if exchangeid == nil return end
|
||||||
|
var idx = 0
|
||||||
|
while idx < size(self.send_queue)
|
||||||
|
if self.send_queue[idx].get_exchangeid() == exchangeid
|
||||||
|
self.send_queue.remove(idx)
|
||||||
|
else
|
||||||
|
idx += 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# process IM 0x01 Status Response
|
# process IM 0x01 Status Response
|
||||||
#
|
#
|
||||||
# val is the TLV structure
|
# val is the TLV structure
|
||||||
# or raises an exception
|
# or raises an exception
|
||||||
|
# return true if we handled the response and ack, false instead
|
||||||
def process_status_response(msg, val)
|
def process_status_response(msg, val)
|
||||||
import string
|
import string
|
||||||
var status = val.findsubval(0, 0xFF)
|
var status = val.findsubval(0, 0xFF)
|
||||||
if status == matter.SUCCESS
|
|
||||||
tasmota.log("MTR: >Status", 2) # don't show 'SUCCESS' to not overflow logs with non-information
|
|
||||||
var message = self.find_sendqueue_by_exchangeid(msg.exchange_id)
|
var message = self.find_sendqueue_by_exchangeid(msg.exchange_id)
|
||||||
|
if status == matter.SUCCESS
|
||||||
|
tasmota.log("MTR: >Status_OK", 2) # don't show 'SUCCESS' to not overflow logs with non-information
|
||||||
if message
|
if message
|
||||||
message.ack_received(msg) # re-arm the sending of next packets for the same exchange
|
return message.ack_received(msg) # re-arm the sending of next packets for the same exchange
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
# error
|
||||||
tasmota.log(string.format("MTR: >Status ERROR = 0x%02X", status), 2)
|
tasmota.log(string.format("MTR: >Status ERROR = 0x%02X", status), 2)
|
||||||
|
if message
|
||||||
|
message.ack_error(msg)
|
||||||
|
self.remove_sendqueue_by_exchangeid(msg.exchange_id)
|
||||||
end
|
end
|
||||||
return false
|
end
|
||||||
|
return false # we did not ack the message, do it at higher level
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Inner code shared between read_attributes and subscribe_request
|
# Inner code shared between read_attributes and subscribe_request
|
||||||
#
|
#
|
||||||
# query: `ReadRequestMessage` or `SubscribeRequestMessage`
|
# query: `ReadRequestMessage` or `SubscribeRequestMessage`
|
||||||
def _inner_process_read_request(msg, query)
|
def _inner_process_read_request(session, query)
|
||||||
var endpoints = self.device.get_active_endpoints()
|
|
||||||
|
|
||||||
### Inner function to be iterated upon
|
### Inner function to be iterated upon
|
||||||
# ret is the ReportDataMessage list to send back
|
# ret is the ReportDataMessage list to send back
|
||||||
|
@ -154,7 +172,7 @@ class Matter_IM
|
||||||
attr_name = attr_name ? " (" + attr_name + ")" : ""
|
attr_name = attr_name ? " (" + attr_name + ")" : ""
|
||||||
# tasmota.log(string.format("MTR: Read Attribute " + str(ctx) + (attr_name ? " (" + attr_name + ")" : ""), 2)
|
# tasmota.log(string.format("MTR: Read Attribute " + str(ctx) + (attr_name ? " (" + attr_name + ")" : ""), 2)
|
||||||
# Special case to report unsupported item, if pi==nil
|
# Special case to report unsupported item, if pi==nil
|
||||||
var res = (pi != nil) ? pi.read_attribute(msg, ctx) : nil
|
var res = (pi != nil) ? pi.read_attribute(session, ctx) : nil
|
||||||
if res != nil
|
if res != nil
|
||||||
var a1 = matter.AttributeReportIB()
|
var a1 = matter.AttributeReportIB()
|
||||||
a1.attribute_data = matter.AttributeDataIB()
|
a1.attribute_data = matter.AttributeDataIB()
|
||||||
|
@ -190,6 +208,7 @@ class Matter_IM
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
var endpoints = self.device.get_active_endpoints()
|
||||||
# structure is `ReadRequestMessage` 10.6.2 p.558
|
# structure is `ReadRequestMessage` 10.6.2 p.558
|
||||||
var ctx = matter.Path()
|
var ctx = matter.Path()
|
||||||
|
|
||||||
|
@ -238,7 +257,7 @@ class Matter_IM
|
||||||
def process_read_request(msg, val)
|
def process_read_request(msg, val)
|
||||||
var query = matter.ReadRequestMessage().from_TLV(val)
|
var query = matter.ReadRequestMessage().from_TLV(val)
|
||||||
if query.attributes_requests != nil
|
if query.attributes_requests != nil
|
||||||
var ret = self._inner_process_read_request(msg, query)
|
var ret = self._inner_process_read_request(msg.session, query)
|
||||||
self.send_report_data(msg, ret)
|
self.send_report_data(msg, ret)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -258,7 +277,8 @@ class Matter_IM
|
||||||
|
|
||||||
tasmota.log("MTR: received SubscribeRequestMessage=" + str(query), 3)
|
tasmota.log("MTR: received SubscribeRequestMessage=" + str(query), 3)
|
||||||
var sub = self.subs.new_subscription(msg.session, query)
|
var sub = self.subs.new_subscription(msg.session, query)
|
||||||
var ret = self._inner_process_read_request(msg, query)
|
tasmota.log("MTR: >Subscribe sub_id=" + str(sub.subscription_id), 2)
|
||||||
|
var ret = self._inner_process_read_request(msg.session, query)
|
||||||
# ret is of type `Matter_ReportDataMessage`
|
# ret is of type `Matter_ReportDataMessage`
|
||||||
ret.subscription_id = sub.subscription_id # enrich with subscription id TODO
|
ret.subscription_id = sub.subscription_id # enrich with subscription id TODO
|
||||||
self.send_subscribe_response(msg, ret, sub)
|
self.send_subscribe_response(msg, ret, sub)
|
||||||
|
@ -292,7 +312,7 @@ class Matter_IM
|
||||||
|
|
||||||
var cmd_name = matter.get_command_name(ctx.cluster, ctx.command)
|
var cmd_name = matter.get_command_name(ctx.cluster, ctx.command)
|
||||||
tasmota.log(string.format("MTR: >Received %s %s from [%s]:%i", str(ctx), cmd_name ? cmd_name : "", msg.remote_ip, msg.remote_port), 2)
|
tasmota.log(string.format("MTR: >Received %s %s from [%s]:%i", str(ctx), cmd_name ? cmd_name : "", msg.remote_ip, msg.remote_port), 2)
|
||||||
var res = self.device.invoke_request(msg, q.command_fields, ctx)
|
var res = self.device.invoke_request(msg.session, q.command_fields, ctx)
|
||||||
var a1 = matter.InvokeResponseIB()
|
var a1 = matter.InvokeResponseIB()
|
||||||
if res == true # special case, just respond ok
|
if res == true # special case, just respond ok
|
||||||
a1.status = matter.CommandStatusIB()
|
a1.status = matter.CommandStatusIB()
|
||||||
|
@ -391,7 +411,7 @@ class Matter_IM
|
||||||
# tasmota.log(string.format("MTR: Read Attribute " + str(ctx) + (attr_name ? " (" + attr_name + ")" : ""), 2)
|
# tasmota.log(string.format("MTR: Read Attribute " + str(ctx) + (attr_name ? " (" + attr_name + ")" : ""), 2)
|
||||||
# Special case to report unsupported item, if pi==nil
|
# Special case to report unsupported item, if pi==nil
|
||||||
ctx.status = matter.UNSUPPORTED_WRITE
|
ctx.status = matter.UNSUPPORTED_WRITE
|
||||||
var res = (pi != nil) ? pi.write_attribute(msg, ctx, write_data) : nil
|
var res = (pi != nil) ? pi.write_attribute(msg.session, ctx, write_data) : nil
|
||||||
if res ctx.status = matter.SUCCESS end # if the cb returns true, the request was processed
|
if res ctx.status = matter.SUCCESS end # if the cb returns true, the request was processed
|
||||||
if ctx.status != nil
|
if ctx.status != nil
|
||||||
if direct
|
if direct
|
||||||
|
@ -507,14 +527,26 @@ class Matter_IM
|
||||||
import string
|
import string
|
||||||
var session = sub.session
|
var session = sub.session
|
||||||
|
|
||||||
var ret = matter.ReportDataMessage()
|
# create a fake read request to feed to the ReportData
|
||||||
|
var fake_read = matter.ReadRequestMessage()
|
||||||
|
fake_read.fabric_filtered = false
|
||||||
|
fake_read.attributes_requests = []
|
||||||
|
|
||||||
|
for ctx: sub.updates
|
||||||
|
var p1 = matter.AttributePathIB()
|
||||||
|
p1.endpoint = ctx.endpoint
|
||||||
|
p1.cluster = ctx.cluster
|
||||||
|
p1.attribute = ctx.attribute
|
||||||
|
fake_read.attributes_requests.push(p1)
|
||||||
|
end
|
||||||
|
|
||||||
|
tasmota.log("MTR: <Sub_ack sub_id=" + str(sub.subscription_id), 2)
|
||||||
|
var ret = self._inner_process_read_request(session, fake_read)
|
||||||
|
ret.suppress_response = (size(fake_read.attributes_requests) == 0) # ret is of class `ReportDataMessage`
|
||||||
ret.subscription_id = sub.subscription_id
|
ret.subscription_id = sub.subscription_id
|
||||||
ret.attribute_reports = []
|
|
||||||
ret.suppress_response = true # true for empy report, as per 8.6.2 p.425
|
|
||||||
|
|
||||||
self.send_queue.push(matter.IM_ReportDataSubscribed(self.device.message_handler, session, ret))
|
self.send_queue.push(matter.IM_ReportDataSubscribed(session.__message_handler, session, ret, sub))
|
||||||
|
self.send_enqueued(session.__message_handler)
|
||||||
self.send_enqueued(self.device.message_handler)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
@ -555,8 +587,14 @@ class Matter_IM
|
||||||
#############################################################
|
#############################################################
|
||||||
# placeholder, nothing to run for now
|
# placeholder, nothing to run for now
|
||||||
def every_second()
|
def every_second()
|
||||||
self.subs.every_second()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# dispatch every 250ms click to sub-objects that need it
|
||||||
|
def every_250ms()
|
||||||
|
self.subs.every_250ms()
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
matter.IM = Matter_IM
|
matter.IM = Matter_IM
|
||||||
|
|
||||||
|
|
|
@ -75,9 +75,17 @@ class Matter_IM_Message
|
||||||
end
|
end
|
||||||
|
|
||||||
# ack received for previous message, proceed to next (if any)
|
# ack received for previous message, proceed to next (if any)
|
||||||
|
# return true if we manage the ack ourselves, false if it needs to be done upper
|
||||||
def ack_received(msg)
|
def ack_received(msg)
|
||||||
|
if msg
|
||||||
self.resp = msg.build_response(self.resp.opcode, self.resp.x_flag_r, self.resp) # update packet
|
self.resp = msg.build_response(self.resp.opcode, self.resp.x_flag_r, self.resp) # update packet
|
||||||
|
end
|
||||||
self.ready = true
|
self.ready = true
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
# we received an ACK error, do any necessary cleaning
|
||||||
|
def ack_error(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
# get the exchange-id for this message
|
# get the exchange-id for this message
|
||||||
|
@ -227,12 +235,59 @@ matter.IM_ReportData = Matter_IM_ReportData
|
||||||
# Main difference is that we are the spontaneous inititor
|
# Main difference is that we are the spontaneous inititor
|
||||||
#################################################################################
|
#################################################################################
|
||||||
class Matter_IM_ReportDataSubscribed : Matter_IM_ReportData
|
class Matter_IM_ReportDataSubscribed : Matter_IM_ReportData
|
||||||
|
var sub # subscription object
|
||||||
|
var report_data_phase # true during reportdata
|
||||||
|
|
||||||
def init(message_handler, session, data)
|
def init(message_handler, session, data, sub)
|
||||||
self.resp = matter.Frame.initiate_response(message_handler, session, 0x05 #-Report Data-#, true)
|
self.resp = matter.Frame.initiate_response(message_handler, session, 0x05 #-Report Data-#, true)
|
||||||
self.data = data
|
self.data = data
|
||||||
self.ready = true # send immediately
|
self.ready = true # send immediately
|
||||||
self.expiration = tasmota.millis() + self.MSG_TIMEOUT
|
self.expiration = tasmota.millis() + self.MSG_TIMEOUT
|
||||||
|
#
|
||||||
|
self.sub = sub
|
||||||
|
self.report_data_phase = true
|
||||||
|
end
|
||||||
|
|
||||||
|
# we received an ACK error, remove subscription
|
||||||
|
def ack_error(msg)
|
||||||
|
self.sub.remove_self()
|
||||||
|
end
|
||||||
|
|
||||||
|
# ack received for previous message, proceed to next (if any)
|
||||||
|
# return true if we manage the ack ourselves, false if it needs to be done upper
|
||||||
|
def ack_received(msg)
|
||||||
|
if self.report_data_phase
|
||||||
|
return super(self).ack_received(msg)
|
||||||
|
else
|
||||||
|
super(self).ack_received(nil)
|
||||||
|
return false # let the caller to the ack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# returns true if transaction is complete (remove object from queue)
|
||||||
|
# default responder for data
|
||||||
|
def send(responder)
|
||||||
|
if size(self.data.attribute_reports) > 0
|
||||||
|
if self.report_data_phase
|
||||||
|
var ret = super(self).send(responder)
|
||||||
|
if !ret return false end # ReportData needs to continue
|
||||||
|
# ReportData is finished
|
||||||
|
self.report_data_phase = false
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
# send a simple ACK
|
||||||
|
var resp = self.resp.build_standalone_ack()
|
||||||
|
resp.encode()
|
||||||
|
resp.encrypt()
|
||||||
|
responder.send_response(resp.raw, resp.remote_ip, resp.remote_port, resp.message_counter)
|
||||||
|
return true # we received a ack(), just finish
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
# simple heartbeat ReportData
|
||||||
|
super(self).send(responder)
|
||||||
|
return true # don't expect any response
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
matter.IM_ReportDataSubscribed = Matter_IM_ReportDataSubscribed
|
matter.IM_ReportDataSubscribed = Matter_IM_ReportDataSubscribed
|
||||||
|
|
|
@ -28,7 +28,8 @@ import matter
|
||||||
# Individual subscription instance
|
# Individual subscription instance
|
||||||
#################################################################################
|
#################################################################################
|
||||||
class Matter_IM_Subscription
|
class Matter_IM_Subscription
|
||||||
static var MAX_INTERVAL_MARGIN = 10 # we always keep 10s margin
|
static var MAX_INTERVAL_MARGIN = 5 # we always keep 5s margin
|
||||||
|
var subs # pointer to sub shop
|
||||||
# parameters of the subscription
|
# parameters of the subscription
|
||||||
var subscription_id # id of the subcription as known by requester
|
var subscription_id # id of the subcription as known by requester
|
||||||
var session # the session it belongs to
|
var session # the session it belongs to
|
||||||
|
@ -37,12 +38,14 @@ class Matter_IM_Subscription
|
||||||
var max_interval # always send data before `max_interal` seconds or the subscription is lost
|
var max_interval # always send data before `max_interal` seconds or the subscription is lost
|
||||||
var fabric_filtered
|
var fabric_filtered
|
||||||
# manage time
|
# manage time
|
||||||
|
var not_before # rate-limiting
|
||||||
var expiration # expiration epoch, we need to respond before
|
var expiration # expiration epoch, we need to respond before
|
||||||
# updates
|
# updates
|
||||||
var updates
|
var updates
|
||||||
|
|
||||||
# req: SubscribeRequestMessage
|
# req: SubscribeRequestMessage
|
||||||
def init(id, session, req)
|
def init(subs, id, session, req)
|
||||||
|
self.subs = subs
|
||||||
self.subscription_id = id
|
self.subscription_id = id
|
||||||
self.session = session
|
self.session = session
|
||||||
# check values for min_interval
|
# check values for min_interval
|
||||||
|
@ -73,17 +76,24 @@ class Matter_IM_Subscription
|
||||||
self.updates = []
|
self.updates = []
|
||||||
self.clear_and_arm()
|
self.clear_and_arm()
|
||||||
|
|
||||||
tasmota.log("MTR: new subsctiption " + matter.inspect(self), 2)
|
tasmota.log("MTR: new subsctiption " + matter.inspect(self), 3)
|
||||||
|
end
|
||||||
|
|
||||||
|
# remove self from subs list
|
||||||
|
def remove_self()
|
||||||
|
self.subs.remove_sub(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
# clear log after it was sent, and re-arm next expiration
|
# clear log after it was sent, and re-arm next expiration
|
||||||
def clear_and_arm()
|
def clear_and_arm()
|
||||||
self.updates.clear()
|
self.updates.clear()
|
||||||
self.expiration = tasmota.millis() + (self.max_interval - self.MAX_INTERVAL_MARGIN) * 1000
|
var now = tasmota.millis()
|
||||||
|
self.expiration = now + (self.max_interval - self.MAX_INTERVAL_MARGIN) * 1000
|
||||||
|
self.not_before = now + self.min_interval * 1000 - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
# signal that an attribute was updated, to add to the list of reportable
|
# signal that an attribute was updated, to add to the list of reportable
|
||||||
def attribute_updated(ctx, fabric_specific)
|
def attribute_updated_ctx(ctx, fabric_specific)
|
||||||
var idx = 0
|
var idx = 0
|
||||||
while idx < size(self.path_list)
|
while idx < size(self.path_list)
|
||||||
var filter = self.path_list[idx]
|
var filter = self.path_list[idx]
|
||||||
|
@ -91,12 +101,28 @@ class Matter_IM_Subscription
|
||||||
(filter.cluster == nil || filter.cluster == ctx.cluster) &&
|
(filter.cluster == nil || filter.cluster == ctx.cluster) &&
|
||||||
(filter.attribute == nil || filter.attribute == ctx.attribute)
|
(filter.attribute == nil || filter.attribute == ctx.attribute)
|
||||||
|
|
||||||
self.updates.push(ctx)
|
# ready to push the new attribute, check that it
|
||||||
|
self._add_attribute_unique_path(ctx)
|
||||||
end
|
end
|
||||||
idx += 1
|
idx += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# add an attribute path for an updated attribute, remove any duplicate
|
||||||
|
def _add_attribute_unique_path(ctx)
|
||||||
|
var idx = 0
|
||||||
|
while idx < size(self.updates)
|
||||||
|
var path = self.updates[idx]
|
||||||
|
if path.endpoint == ctx.endpoint &&
|
||||||
|
path.cluster == ctx.cluster &&
|
||||||
|
path.attribute == ctx.attribute
|
||||||
|
return # already exists in the list, abort
|
||||||
|
end
|
||||||
|
idx += 1
|
||||||
|
end
|
||||||
|
self.updates.push(ctx)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
matter.IM_Subscription = Matter_IM_Subscription
|
matter.IM_Subscription = Matter_IM_Subscription
|
||||||
|
|
||||||
|
@ -127,12 +153,23 @@ class Matter_IM_Subscription_Shop
|
||||||
id = crypto.random(2).get(0,2)
|
id = crypto.random(2).get(0,2)
|
||||||
end
|
end
|
||||||
|
|
||||||
var sub = matter.IM_Subscription(id, session, req)
|
var sub = matter.IM_Subscription(self, id, session, req)
|
||||||
self.subs.push(sub)
|
self.subs.push(sub)
|
||||||
|
|
||||||
return sub
|
return sub
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def remove_sub(sub)
|
||||||
|
var idx = 0
|
||||||
|
while idx < size(self.subs)
|
||||||
|
if self.subs[idx] == sub
|
||||||
|
self.subs.remove(idx)
|
||||||
|
else
|
||||||
|
idx += 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def get_by_id(id)
|
def get_by_id(id)
|
||||||
var idx = 0
|
var idx = 0
|
||||||
while idx < size(self.subs)
|
while idx < size(self.subs)
|
||||||
|
@ -154,8 +191,22 @@ class Matter_IM_Subscription_Shop
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def every_second()
|
#############################################################
|
||||||
|
# dispatch every 250ms click to sub-objects that need it
|
||||||
|
def every_250ms()
|
||||||
|
# any data ready to send?
|
||||||
var idx = 0
|
var idx = 0
|
||||||
|
while idx < size(self.subs)
|
||||||
|
var sub = self.subs[idx]
|
||||||
|
if size(sub.updates) > 0 && tasmota.time_reached(sub.not_before)
|
||||||
|
self.im.send_subscribe_update(sub)
|
||||||
|
sub.clear_and_arm()
|
||||||
|
end
|
||||||
|
idx += 1
|
||||||
|
end
|
||||||
|
|
||||||
|
# any heartbeat needing to be sent
|
||||||
|
idx = 0
|
||||||
while idx < size(self.subs)
|
while idx < size(self.subs)
|
||||||
var sub = self.subs[idx]
|
var sub = self.subs[idx]
|
||||||
if tasmota.time_reached(sub.expiration)
|
if tasmota.time_reached(sub.expiration)
|
||||||
|
@ -167,11 +218,11 @@ class Matter_IM_Subscription_Shop
|
||||||
end
|
end
|
||||||
|
|
||||||
# signal that an attribute was updated, to add to the list of reportable
|
# signal that an attribute was updated, to add to the list of reportable
|
||||||
def attribute_updated(ctx, fabric_specific)
|
def attribute_updated_ctx(ctx, fabric_specific)
|
||||||
# signal any relevant subscription
|
# signal any relevant subscription
|
||||||
var idx = 0
|
var idx = 0
|
||||||
while idx < size(self.subs)
|
while idx < size(self.subs)
|
||||||
self.subs[idx].attribute_updated(ctx, fabric_specific)
|
self.subs[idx].attribute_updated_ctx(ctx, fabric_specific)
|
||||||
idx += 1
|
idx += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Matter_Frame
|
||||||
var x_flag_a
|
var x_flag_a
|
||||||
var x_flag_i
|
var x_flag_i
|
||||||
var opcode
|
var opcode
|
||||||
var exchange_id
|
var exchange_id # exchange_id is 16 bits unsigned, we set bit 16 if it's an id generated locally
|
||||||
var protocol_id
|
var protocol_id
|
||||||
var vendor_id # (opt)
|
var vendor_id # (opt)
|
||||||
var ack_message_counter # (opt)
|
var ack_message_counter # (opt)
|
||||||
|
@ -140,6 +140,7 @@ class Matter_Frame
|
||||||
|
|
||||||
self.opcode = raw.get(idx+1, 1)
|
self.opcode = raw.get(idx+1, 1)
|
||||||
self.exchange_id = raw.get(idx+2, 2)
|
self.exchange_id = raw.get(idx+2, 2)
|
||||||
|
if !self.x_flag_i self.exchange_id |= 0x10000 end # special encoding for local exchange_id
|
||||||
self.protocol_id = raw.get(idx+4, 2)
|
self.protocol_id = raw.get(idx+4, 2)
|
||||||
idx += 6
|
idx += 6
|
||||||
|
|
||||||
|
@ -210,7 +211,7 @@ class Matter_Frame
|
||||||
raw.add(self.x_flags, 1)
|
raw.add(self.x_flags, 1)
|
||||||
# opcode (mandatory)
|
# opcode (mandatory)
|
||||||
raw.add(self.opcode, 1)
|
raw.add(self.opcode, 1)
|
||||||
raw.add(self.exchange_id, 2)
|
raw.add(self.exchange_id & 0xFFFF, 2)
|
||||||
raw.add(self.protocol_id, 2)
|
raw.add(self.protocol_id, 2)
|
||||||
if self.x_flag_a raw.add(self.ack_message_counter, 4) end
|
if self.x_flag_a raw.add(self.ack_message_counter, 4) end
|
||||||
# finally payload
|
# finally payload
|
||||||
|
@ -246,7 +247,7 @@ class Matter_Frame
|
||||||
resp.message_counter = self.session.counter_snd.next()
|
resp.message_counter = self.session.counter_snd.next()
|
||||||
resp.local_session_id = self.session.initiator_session_id
|
resp.local_session_id = self.session.initiator_session_id
|
||||||
|
|
||||||
resp.x_flag_i = 0 # not sent by initiator
|
resp.x_flag_i = (self.x_flag_i ? 0 : 1) # invert the initiator flag
|
||||||
resp.opcode = 0x10 # MRP Standalone Acknowledgement
|
resp.opcode = 0x10 # MRP Standalone Acknowledgement
|
||||||
resp.exchange_id = self.exchange_id
|
resp.exchange_id = self.exchange_id
|
||||||
resp.protocol_id = 0 # PROTOCOL_ID_SECURE_CHANNEL
|
resp.protocol_id = 0 # PROTOCOL_ID_SECURE_CHANNEL
|
||||||
|
@ -290,7 +291,7 @@ class Matter_Frame
|
||||||
resp.local_session_id = 0
|
resp.local_session_id = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
resp.x_flag_i = 0 # not sent by initiator
|
resp.x_flag_i = (self.x_flag_i ? 0 : 1) # invert the initiator flag
|
||||||
resp.opcode = opcode
|
resp.opcode = opcode
|
||||||
resp.exchange_id = self.exchange_id
|
resp.exchange_id = self.exchange_id
|
||||||
resp.protocol_id = self.protocol_id
|
resp.protocol_id = self.protocol_id
|
||||||
|
@ -336,7 +337,7 @@ class Matter_Frame
|
||||||
resp.x_flag_i = 1 # we are the initiator
|
resp.x_flag_i = 1 # we are the initiator
|
||||||
resp.opcode = opcode
|
resp.opcode = opcode
|
||||||
session.__exchange_id += 1 # move to next exchange_id
|
session.__exchange_id += 1 # move to next exchange_id
|
||||||
resp.exchange_id = session.__exchange_id
|
resp.exchange_id = session.__exchange_id | 0x10000 # special encoding for local exchange_id
|
||||||
resp.protocol_id = 0x0001 # PROTOCOL_ID_INTERACTION_MODEL
|
resp.protocol_id = 0x0001 # PROTOCOL_ID_INTERACTION_MODEL
|
||||||
resp.x_flag_r = reliable ? 1 : 0
|
resp.x_flag_r = reliable ? 1 : 0
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ class Matter_MessageHandler
|
||||||
tasmota.log("MTR: find session by source_node_id = " + str(frame.source_node_id) + "session_id = " + str(session.local_session_id), 3)
|
tasmota.log("MTR: find session by source_node_id = " + str(frame.source_node_id) + "session_id = " + str(session.local_session_id), 3)
|
||||||
if addr session.__ip = addr end
|
if addr session.__ip = addr end
|
||||||
if port session.__port = port end
|
if port session.__port = port end
|
||||||
|
session.__message_handler = self
|
||||||
frame.session = session
|
frame.session = session
|
||||||
|
|
||||||
# check if it's a duplicate
|
# check if it's a duplicate
|
||||||
|
@ -94,6 +95,7 @@ class Matter_MessageHandler
|
||||||
end
|
end
|
||||||
if addr session.__ip = addr end
|
if addr session.__ip = addr end
|
||||||
if port session.__port = port end
|
if port session.__port = port end
|
||||||
|
session.__message_handler = self
|
||||||
frame.session = session # keep a pointer of the session in the message
|
frame.session = session # keep a pointer of the session in the message
|
||||||
|
|
||||||
# check if it's a duplicate
|
# check if it's a duplicate
|
||||||
|
@ -112,7 +114,7 @@ class Matter_MessageHandler
|
||||||
# continue decoding
|
# continue decoding
|
||||||
tasmota.log(string.format("MTR: idx=%i clear=%s", frame.payload_idx, frame.raw.tohex()), 3)
|
tasmota.log(string.format("MTR: idx=%i clear=%s", frame.payload_idx, frame.raw.tohex()), 3)
|
||||||
frame.decode_payload()
|
frame.decode_payload()
|
||||||
tasmota.log("MTR: decrypted message: protocol_id:"+str(frame.protocol_id)+" opcode="+str(frame.opcode)+" exchange_id="+str(frame.exchange_id), 3)
|
tasmota.log("MTR: decrypted message: protocol_id:"+str(frame.protocol_id)+" opcode="+str(frame.opcode)+" exchange_id="+str(frame.exchange_id & 0xFFFF), 3)
|
||||||
|
|
||||||
self.device.packet_ack(frame.ack_message_counter) # acknowledge packet
|
self.device.packet_ack(frame.ack_message_counter) # acknowledge packet
|
||||||
|
|
||||||
|
@ -135,9 +137,7 @@ class Matter_MessageHandler
|
||||||
var resp = frame.build_standalone_ack()
|
var resp = frame.build_standalone_ack()
|
||||||
resp.encode()
|
resp.encode()
|
||||||
resp.encrypt()
|
resp.encrypt()
|
||||||
# no ecnryption required for ACK
|
|
||||||
self.send_response(resp.raw, resp.remote_ip, resp.remote_port, resp.message_counter)
|
self.send_response(resp.raw, resp.remote_ip, resp.remote_port, resp.message_counter)
|
||||||
# send simple ack
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# -- PROTOCOL_ID_BDX is used for file transfer between devices, not used in Tasmota
|
# -- PROTOCOL_ID_BDX is used for file transfer between devices, not used in Tasmota
|
||||||
|
@ -184,5 +184,12 @@ class Matter_MessageHandler
|
||||||
self.commissioning.every_second()
|
self.commissioning.every_second()
|
||||||
self.im.every_second()
|
self.im.every_second()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# dispatch every 250ms click to sub-objects that need it
|
||||||
|
def every_250ms()
|
||||||
|
self.im.every_250ms()
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
matter.MessageHandler = Matter_MessageHandler
|
matter.MessageHandler = Matter_MessageHandler
|
||||||
|
|
|
@ -37,6 +37,12 @@ class Matter_Plugin
|
||||||
self.clusters = self.EMPTY_LIST
|
self.clusters = self.EMPTY_LIST
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# signal that an attribute has been changed
|
||||||
|
def attribute_updated(endpoint, cluster, attribute, fabric_specific)
|
||||||
|
self.device.attribute_updated(endpoint, cluster, attribute, fabric_specific)
|
||||||
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Which endpoints does it handle (list of numbers)
|
# Which endpoints does it handle (list of numbers)
|
||||||
def get_endpoints()
|
def get_endpoints()
|
||||||
|
@ -64,47 +70,47 @@ class Matter_Plugin
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# read attribute
|
# read attribute
|
||||||
def read_attribute(msg, ctx)
|
def read_attribute(session, ctx)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# read event
|
# read event
|
||||||
# TODO
|
# TODO
|
||||||
def read_event(msg, endpoint, cluster, eventid)
|
def read_event(session, endpoint, cluster, eventid)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# subscribe attribute
|
# subscribe attribute
|
||||||
# TODO
|
# TODO
|
||||||
def subscribe_attribute(msg, endpoint, cluster, attribute)
|
def subscribe_attribute(session, endpoint, cluster, attribute)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# subscribe event
|
# subscribe event
|
||||||
# TODO
|
# TODO
|
||||||
def subscribe_event(msg, endpoint, cluster, eventid)
|
def subscribe_event(session, endpoint, cluster, eventid)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# write attribute
|
# write attribute
|
||||||
def write_attribute(msg, ctx, write_data)
|
def write_attribute(session, ctx, write_data)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# invoke command
|
# invoke command
|
||||||
def invoke_request(msg, val, ctx)
|
def invoke_request(session, val, ctx)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# timed request
|
# timed request
|
||||||
# TODO - should we even support this?
|
# TODO - should we even support this?
|
||||||
def timed_request(msg, val, ctx)
|
def timed_request(session, val, ctx)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
||||||
#############################################################
|
#############################################################
|
||||||
# read an attribute
|
# read an attribute
|
||||||
#
|
#
|
||||||
def read_attribute(msg, ctx)
|
def read_attribute(session, ctx)
|
||||||
import string
|
import string
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
|
@ -105,11 +105,10 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
||||||
#
|
#
|
||||||
# returns a TLV object if successful, contains the response
|
# returns a TLV object if successful, contains the response
|
||||||
# or an `int` to indicate a status
|
# or an `int` to indicate a status
|
||||||
def invoke_request(msg, val, ctx)
|
def invoke_request(session, val, ctx)
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
var command = ctx.command
|
var command = ctx.command
|
||||||
var session = msg.session
|
|
||||||
|
|
||||||
# ====================================================================================================
|
# ====================================================================================================
|
||||||
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
|
||||||
|
@ -140,17 +139,27 @@ class Matter_Plugin_OnOff : Matter_Plugin
|
||||||
# ====================================================================================================
|
# ====================================================================================================
|
||||||
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
|
||||||
if command == 0x0000 # ---------- Off ----------
|
if command == 0x0000 # ---------- Off ----------
|
||||||
|
if self.onoff self.onoff_changed(ctx) end
|
||||||
self.onoff = false
|
self.onoff = false
|
||||||
return true
|
return true
|
||||||
elif command == 0x0001 # ---------- On ----------
|
elif command == 0x0001 # ---------- On ----------
|
||||||
|
if !self.onoff self.onoff_changed(ctx) end
|
||||||
self.onoff = true
|
self.onoff = true
|
||||||
return true
|
return true
|
||||||
elif command == 0x0002 # ---------- Toggle ----------
|
elif command == 0x0002 # ---------- Toggle ----------
|
||||||
|
self.onoff_changed(ctx)
|
||||||
self.onoff = !self.onoff
|
self.onoff = !self.onoff
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# Signal that onoff attribute changed
|
||||||
|
def onoff_changed(ctx)
|
||||||
|
self.attribute_updated(ctx.endpoint, 0x0006, 0x0000)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
matter.Plugin_OnOff = Matter_Plugin_OnOff
|
matter.Plugin_OnOff = Matter_Plugin_OnOff
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
#############################################################
|
#############################################################
|
||||||
# read an attribute
|
# read an attribute
|
||||||
#
|
#
|
||||||
def read_attribute(msg, ctx)
|
def read_attribute(session, ctx)
|
||||||
import string
|
import string
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
|
@ -65,7 +65,7 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
if cluster == 0x0030 # ========== GeneralCommissioning cluster 11.9 p.627 ==========
|
if cluster == 0x0030 # ========== GeneralCommissioning cluster 11.9 p.627 ==========
|
||||||
|
|
||||||
if attribute == 0x0000 # ---------- Breadcrumb ----------
|
if attribute == 0x0000 # ---------- Breadcrumb ----------
|
||||||
return TLV.create_TLV(TLV.U8, msg.session.__breadcrumb)
|
return TLV.create_TLV(TLV.U8, session.__breadcrumb)
|
||||||
elif attribute == 0x0001 # ---------- BasicCommissioningInfo / BasicCommissioningInfo----------
|
elif attribute == 0x0001 # ---------- BasicCommissioningInfo / BasicCommissioningInfo----------
|
||||||
var bci = TLV.Matter_TLV_struct()
|
var bci = TLV.Matter_TLV_struct()
|
||||||
bci.add_TLV(0, TLV.U2, 60) # FailSafeExpiryLengthSeconds
|
bci.add_TLV(0, TLV.U2, 60) # FailSafeExpiryLengthSeconds
|
||||||
|
@ -153,22 +153,22 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
|
|
||||||
if attribute == 0x0000 # ---------- NOCs / list[NOCStruct] ----------
|
if attribute == 0x0000 # ---------- NOCs / list[NOCStruct] ----------
|
||||||
var nocl = TLV.Matter_TLV_array() # NOCs, p.711
|
var nocl = TLV.Matter_TLV_array() # NOCs, p.711
|
||||||
for session: self.device.sessions.sessions_active()
|
for loc_session: self.device.sessions.sessions_active()
|
||||||
var nocs = nocl.add_struct(nil)
|
var nocs = nocl.add_struct(nil)
|
||||||
nocs.add_TLV(1, TLV.B2, session.noc) # NOC
|
nocs.add_TLV(1, TLV.B2, loc_session.noc) # NOC
|
||||||
nocs.add_TLV(2, TLV.B2, session.icac) # ICAC
|
nocs.add_TLV(2, TLV.B2, loc_session.icac) # ICAC
|
||||||
end
|
end
|
||||||
return nocl
|
return nocl
|
||||||
elif attribute == 0x0001 # ---------- Fabrics / list[FabricDescriptorStruct] ----------
|
elif attribute == 0x0001 # ---------- Fabrics / list[FabricDescriptorStruct] ----------
|
||||||
var fabrics = TLV.Matter_TLV_array() # Fabrics, p.711
|
var fabrics = TLV.Matter_TLV_array() # Fabrics, p.711
|
||||||
for session: self.device.sessions.sessions_active()
|
for loc_session: self.device.sessions.sessions_active()
|
||||||
var root_ca_tlv = TLV.parse(session.get_ca())
|
var root_ca_tlv = TLV.parse(loc_session.get_ca())
|
||||||
var fab = fabrics.add_struct(nil) # encoding see p.303
|
var fab = fabrics.add_struct(nil) # encoding see p.303
|
||||||
fab.add_TLV(1, TLV.B2, root_ca_tlv.findsubval(9)) # RootPublicKey
|
fab.add_TLV(1, TLV.B2, root_ca_tlv.findsubval(9)) # RootPublicKey
|
||||||
fab.add_TLV(2, TLV.U2, session.admin_vendor) # VendorID
|
fab.add_TLV(2, TLV.U2, loc_session.admin_vendor) # VendorID
|
||||||
fab.add_TLV(3, TLV.U8, session.fabric) # FabricID
|
fab.add_TLV(3, TLV.U8, loc_session.fabric) # FabricID
|
||||||
fab.add_TLV(4, TLV.U8, session.deviceid) # NodeID
|
fab.add_TLV(4, TLV.U8, loc_session.deviceid) # NodeID
|
||||||
fab.add_TLV(5, TLV.UTF1, session.fabric_label) # Label
|
fab.add_TLV(5, TLV.UTF1, loc_session.fabric_label) # Label
|
||||||
end
|
end
|
||||||
return fabrics
|
return fabrics
|
||||||
elif attribute == 0x0002 # ---------- SupportedFabrics / u1 ----------
|
elif attribute == 0x0002 # ---------- SupportedFabrics / u1 ----------
|
||||||
|
@ -180,7 +180,7 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
# TODO
|
# TODO
|
||||||
elif attribute == 0x0005 # ---------- Current FabricIndex / u1 ----------
|
elif attribute == 0x0005 # ---------- Current FabricIndex / u1 ----------
|
||||||
var sessions_active = self.device.sessions.sessions_active()
|
var sessions_active = self.device.sessions.sessions_active()
|
||||||
var fabric_index = sessions_active.find(msg.session)
|
var fabric_index = sessions_active.find(session)
|
||||||
if fabric_index == nil fabric_index = 0 end
|
if fabric_index == nil fabric_index = 0 end
|
||||||
return TLV.create_TLV(TLV.U1, fabric_index) # number of active sessions
|
return TLV.create_TLV(TLV.U1, fabric_index) # number of active sessions
|
||||||
end
|
end
|
||||||
|
@ -307,12 +307,11 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
#
|
#
|
||||||
# returns a TLV object if successful, contains the response
|
# returns a TLV object if successful, contains the response
|
||||||
# or an `int` to indicate a status
|
# or an `int` to indicate a status
|
||||||
def invoke_request(msg, val, ctx)
|
def invoke_request(session, val, ctx)
|
||||||
import crypto
|
import crypto
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
var command = ctx.command
|
var command = ctx.command
|
||||||
var session = msg.session
|
|
||||||
if cluster == 0x0030 # ========== GeneralCommissioning cluster 11.9 p.627 ==========
|
if cluster == 0x0030 # ========== GeneralCommissioning cluster 11.9 p.627 ==========
|
||||||
|
|
||||||
if command == 0x0000 # ---------- ArmFailSafe ----------
|
if command == 0x0000 # ---------- ArmFailSafe ----------
|
||||||
|
@ -516,7 +515,7 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
#############################################################
|
#############################################################
|
||||||
# write an attribute
|
# write an attribute
|
||||||
#
|
#
|
||||||
def write_attribute(msg, ctx, write_data)
|
def write_attribute(session, ctx, write_data)
|
||||||
import string
|
import string
|
||||||
var TLV = matter.TLV
|
var TLV = matter.TLV
|
||||||
var cluster = ctx.cluster
|
var cluster = ctx.cluster
|
||||||
|
@ -534,7 +533,8 @@ class Matter_Plugin_Root : Matter_Plugin
|
||||||
|
|
||||||
if attribute == 0x0000 # ---------- Breadcrumb ----------
|
if attribute == 0x0000 # ---------- Breadcrumb ----------
|
||||||
if type(write_data) == 'int' || isinstance(write_data, int64)
|
if type(write_data) == 'int' || isinstance(write_data, int64)
|
||||||
msg.session.__breadcrumb = write_data
|
session.__breadcrumb = write_data
|
||||||
|
self.attribute_updated(ctx.endpoint, ctx.cluster, ctx.attribute) # TODO should we have a more generalized way each time a write_attribute is triggered, declare the attribute as changed?
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
ctx.status = matter.CONSTRAINT_ERROR
|
ctx.status = matter.CONSTRAINT_ERROR
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Matter_Session
|
||||||
var counter_snd # counter for outgoing messages
|
var counter_snd # counter for outgoing messages
|
||||||
var __exchange_id # exchange id for locally initiated transaction, non-persistent
|
var __exchange_id # exchange id for locally initiated transaction, non-persistent
|
||||||
# keep track of last known IP/Port of the fabric
|
# keep track of last known IP/Port of the fabric
|
||||||
var __ip
|
var __ip # IP of the last received packet
|
||||||
var __port
|
var __port # port of the last received packet
|
||||||
|
var __message_handler # pointer to the message handler for this session
|
||||||
# non-session counters
|
# non-session counters
|
||||||
var _counter_insecure_rcv # counter for incoming messages
|
var _counter_insecure_rcv # counter for incoming messages
|
||||||
var _counter_insecure_snd # counter for outgoing messages
|
var _counter_insecure_snd # counter for outgoing messages
|
||||||
|
|
|
@ -33,13 +33,11 @@ import matter
|
||||||
# A packet that needs to be resent if not acknowledged by the other party
|
# A packet that needs to be resent if not acknowledged by the other party
|
||||||
#################################################################################
|
#################################################################################
|
||||||
class Matter_UDPPacket_sent
|
class Matter_UDPPacket_sent
|
||||||
static var RETRY_MS = 500 # retry every 500 ms
|
|
||||||
static var RETRIES = 4 # retry every 500 ms
|
|
||||||
var raw # bytes() to be sent
|
var raw # bytes() to be sent
|
||||||
var addr # ip_address (string)
|
var addr # ip_address (string)
|
||||||
var port # port (int)
|
var port # port (int)
|
||||||
var msg_id # (int) message identifier that needs to be acknowledged
|
var msg_id # (int) message identifier that needs to be acknowledged
|
||||||
var retries # how many retries are allowed, when `0` drop and log
|
var retries # 0 in first attempts, goes up to RETRIES
|
||||||
var next_try # timestamp (millis) when to try again
|
var next_try # timestamp (millis) when to try again
|
||||||
|
|
||||||
def init(raw, addr, port, id)
|
def init(raw, addr, port, id)
|
||||||
|
@ -47,8 +45,8 @@ class Matter_UDPPacket_sent
|
||||||
self.addr = addr
|
self.addr = addr
|
||||||
self.port = port
|
self.port = port
|
||||||
self.msg_id = id
|
self.msg_id = id
|
||||||
self.retries = self.RETRIES
|
self.retries = 0
|
||||||
self.next_try = tasmota.millis() + self.RETRY_MS
|
self.next_try = tasmota.millis() + self.backoff_time(self.retries)
|
||||||
end
|
end
|
||||||
|
|
||||||
def send(udp_socket)
|
def send(udp_socket)
|
||||||
|
@ -60,6 +58,26 @@ class Matter_UDPPacket_sent
|
||||||
tasmota.log(string.format("MTR: error sending packet to '[%s]:%i'", self.addr, self.port), 3)
|
tasmota.log(string.format("MTR: error sending packet to '[%s]:%i'", self.addr, self.port), 3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# Compute exponential backoff as per 4.11.2.1 p.137
|
||||||
|
def backoff_time(n)
|
||||||
|
def power_int(v, n)
|
||||||
|
var r = 1
|
||||||
|
while n > 0
|
||||||
|
r *= v
|
||||||
|
n -= 1
|
||||||
|
end
|
||||||
|
return r
|
||||||
|
end
|
||||||
|
|
||||||
|
import math
|
||||||
|
var i = 300 # SLEEPY_ACTIVE_INTERVAL
|
||||||
|
var rand = real(math.rand() & 0xFF) / 255 # 0..1 with reasonable granularity
|
||||||
|
var n_power = n > 0 ? n - 1 : 0
|
||||||
|
var mrpBackoffTime = i * power_int(1.6, n_power) * (1.0 + rand * 0.25 )
|
||||||
|
return int(mrpBackoffTime)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
matter.UDPPacket_sent = Matter_UDPPacket_sent
|
matter.UDPPacket_sent = Matter_UDPPacket_sent
|
||||||
|
|
||||||
|
@ -68,6 +86,7 @@ matter.UDPPacket_sent = Matter_UDPPacket_sent
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
class Matter_UDPServer
|
class Matter_UDPServer
|
||||||
|
static var RETRIES = 4 # 5 transmissions max (4 retries) `MRP_MAX_TRANSMISSIONS` 4.11.8 p.146
|
||||||
static var MAX_PACKETS_READ = 4 # read at most 4 packets per tick
|
static var MAX_PACKETS_READ = 4 # read at most 4 packets per tick
|
||||||
var address, port # local address and port
|
var address, port # local address and port
|
||||||
var listening # true if active
|
var listening # true if active
|
||||||
|
@ -140,15 +159,15 @@ class Matter_UDPServer
|
||||||
def resend_packets()
|
def resend_packets()
|
||||||
for packet:self.packets_sent
|
for packet:self.packets_sent
|
||||||
if tasmota.time_reached(packet.next_try)
|
if tasmota.time_reached(packet.next_try)
|
||||||
|
if packet.retries <= self.RETRIES
|
||||||
tasmota.log("MTR: resending packet id=" + str(packet.msg_id), 3)
|
tasmota.log("MTR: resending packet id=" + str(packet.msg_id), 3)
|
||||||
packet.send(self.udp_socket) # resend
|
packet.send(self.udp_socket) # resend
|
||||||
packet.retries -= 1
|
packet.next_try = tasmota.millis() + packet.backoff_time(packet.retries)
|
||||||
if packet.retries <= 0
|
packet.retries += 1
|
||||||
|
else
|
||||||
import string
|
import string
|
||||||
self.packets_sent.remove(packet.msg_id)
|
self.packets_sent.remove(packet.msg_id)
|
||||||
tasmota.log(string.format("MTR: non-acked packet to '[%s]:%i'", packet.addr, packet.port), 3)
|
tasmota.log(string.format("MTR: target unreachable '[%s]:%i'", packet.addr, packet.port), 2)
|
||||||
else
|
|
||||||
packet.next_try = tasmota.millis() + packet.RETRY_MS
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -98,6 +98,7 @@ class Matter_UI
|
||||||
webserver.content_send(string.format("<input type='number' min='1' max='99999998' name='passcode' value='%i'>", self.device.passcode))
|
webserver.content_send(string.format("<input type='number' min='1' max='99999998' name='passcode' value='%i'>", self.device.passcode))
|
||||||
webserver.content_send("<p>Distinguish id:</p>")
|
webserver.content_send("<p>Distinguish id:</p>")
|
||||||
webserver.content_send(string.format("<input type='number' min='0' max='2047' name='discriminator' value='%i'>", self.device.discriminator))
|
webserver.content_send(string.format("<input type='number' min='0' max='2047' name='discriminator' value='%i'>", self.device.discriminator))
|
||||||
|
webserver.content_send(string.format("<p><input type='checkbox' name='ipv4'%s>IPv4 only</p>", self.device.ipv4only ? " checked" : ""))
|
||||||
webserver.content_send("<p></p><button name='passcode' class='button bgrn'>Change</button></form></p>")
|
webserver.content_send("<p></p><button name='passcode' class='button bgrn'>Change</button></form></p>")
|
||||||
|
|
||||||
|
|
||||||
|
@ -205,6 +206,7 @@ class Matter_UI
|
||||||
if webserver.has_arg("discriminator")
|
if webserver.has_arg("discriminator")
|
||||||
self.device.discriminator = int(webserver.arg("discriminator"))
|
self.device.discriminator = int(webserver.arg("discriminator"))
|
||||||
end
|
end
|
||||||
|
self.device.ipv4only = webserver.arg("ipv4") == 'on'
|
||||||
self.device.save_param()
|
self.device.save_param()
|
||||||
|
|
||||||
#- and force restart -#
|
#- and force restart -#
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -147,6 +147,136 @@ void be_load_Matter_Path_class(bvm *vm) {
|
||||||
|
|
||||||
extern const bclass be_class_Matter_IM_Message;
|
extern const bclass be_class_Matter_IM_Message;
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: ack_received
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Message_ack_received, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
7, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 5]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(resp),
|
||||||
|
/* K1 */ be_nested_str_weak(build_response),
|
||||||
|
/* K2 */ be_nested_str_weak(opcode),
|
||||||
|
/* K3 */ be_nested_str_weak(x_flag_r),
|
||||||
|
/* K4 */ be_nested_str_weak(ready),
|
||||||
|
}),
|
||||||
|
be_str_weak(ack_received),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[13]) { /* code */
|
||||||
|
0x78060007, // 0000 JMPF R1 #0009
|
||||||
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
|
0x88100100, // 0002 GETMBR R4 R0 K0
|
||||||
|
0x88100902, // 0003 GETMBR R4 R4 K2
|
||||||
|
0x88140100, // 0004 GETMBR R5 R0 K0
|
||||||
|
0x88140B03, // 0005 GETMBR R5 R5 K3
|
||||||
|
0x88180100, // 0006 GETMBR R6 R0 K0
|
||||||
|
0x7C080800, // 0007 CALL R2 4
|
||||||
|
0x90020002, // 0008 SETMBR R0 K0 R2
|
||||||
|
0x50080200, // 0009 LDBOOL R2 1 0
|
||||||
|
0x90020802, // 000A SETMBR R0 K4 R2
|
||||||
|
0x50080200, // 000B LDBOOL R2 1 0
|
||||||
|
0x80040400, // 000C RET 1 R2
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: ack_error
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Message_ack_error, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
2, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
0, /* has constants */
|
||||||
|
NULL, /* no const */
|
||||||
|
be_str_weak(ack_error),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 1]) { /* code */
|
||||||
|
0x80000000, // 0000 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: init
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Message_init, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
8, /* nstack */
|
||||||
|
4, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 3]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(resp),
|
||||||
|
/* K1 */ be_nested_str_weak(build_response),
|
||||||
|
/* K2 */ be_nested_str_weak(ready),
|
||||||
|
}),
|
||||||
|
be_str_weak(init),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 8]) { /* code */
|
||||||
|
0x8C100301, // 0000 GETMET R4 R1 K1
|
||||||
|
0x5C180400, // 0001 MOVE R6 R2
|
||||||
|
0x5C1C0600, // 0002 MOVE R7 R3
|
||||||
|
0x7C100600, // 0003 CALL R4 3
|
||||||
|
0x90020004, // 0004 SETMBR R0 K0 R4
|
||||||
|
0x50100200, // 0005 LDBOOL R4 1 0
|
||||||
|
0x90020404, // 0006 SETMBR R0 K2 R4
|
||||||
|
0x80000000, // 0007 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: get_exchangeid
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Message_get_exchangeid, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
2, /* nstack */
|
||||||
|
1, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(resp),
|
||||||
|
/* K1 */ be_nested_str_weak(exchange_id),
|
||||||
|
}),
|
||||||
|
be_str_weak(get_exchangeid),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 3]) { /* code */
|
||||||
|
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||||
|
0x88040301, // 0001 GETMBR R1 R1 K1
|
||||||
|
0x80040200, // 0002 RET 1 R1
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: send
|
** Solidified function: send
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -199,125 +329,22 @@ be_local_closure(Matter_IM_Message_send, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: ack_received
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_IM_Message_ack_received, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
7, /* nstack */
|
|
||||||
2, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 5]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(resp),
|
|
||||||
/* K1 */ be_nested_str_weak(build_response),
|
|
||||||
/* K2 */ be_nested_str_weak(opcode),
|
|
||||||
/* K3 */ be_nested_str_weak(x_flag_r),
|
|
||||||
/* K4 */ be_nested_str_weak(ready),
|
|
||||||
}),
|
|
||||||
be_str_weak(ack_received),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[11]) { /* code */
|
|
||||||
0x8C080301, // 0000 GETMET R2 R1 K1
|
|
||||||
0x88100100, // 0001 GETMBR R4 R0 K0
|
|
||||||
0x88100902, // 0002 GETMBR R4 R4 K2
|
|
||||||
0x88140100, // 0003 GETMBR R5 R0 K0
|
|
||||||
0x88140B03, // 0004 GETMBR R5 R5 K3
|
|
||||||
0x88180100, // 0005 GETMBR R6 R0 K0
|
|
||||||
0x7C080800, // 0006 CALL R2 4
|
|
||||||
0x90020002, // 0007 SETMBR R0 K0 R2
|
|
||||||
0x50080200, // 0008 LDBOOL R2 1 0
|
|
||||||
0x90020802, // 0009 SETMBR R0 K4 R2
|
|
||||||
0x80000000, // 000A RET 0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: get_exchangeid
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_IM_Message_get_exchangeid, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
2, /* nstack */
|
|
||||||
1, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 2]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(resp),
|
|
||||||
/* K1 */ be_nested_str_weak(exchange_id),
|
|
||||||
}),
|
|
||||||
be_str_weak(get_exchangeid),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 3]) { /* code */
|
|
||||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
|
||||||
0x88040301, // 0001 GETMBR R1 R1 K1
|
|
||||||
0x80040200, // 0002 RET 1 R1
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: init
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_IM_Message_init, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
8, /* nstack */
|
|
||||||
4, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 3]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(resp),
|
|
||||||
/* K1 */ be_nested_str_weak(build_response),
|
|
||||||
/* K2 */ be_nested_str_weak(ready),
|
|
||||||
}),
|
|
||||||
be_str_weak(init),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 8]) { /* code */
|
|
||||||
0x8C100301, // 0000 GETMET R4 R1 K1
|
|
||||||
0x5C180400, // 0001 MOVE R6 R2
|
|
||||||
0x5C1C0600, // 0002 MOVE R7 R3
|
|
||||||
0x7C100600, // 0003 CALL R4 3
|
|
||||||
0x90020004, // 0004 SETMBR R0 K0 R4
|
|
||||||
0x50100200, // 0005 LDBOOL R4 1 0
|
|
||||||
0x90020404, // 0006 SETMBR R0 K2 R4
|
|
||||||
0x80000000, // 0007 RET 0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: Matter_IM_Message
|
** Solidified class: Matter_IM_Message
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_class(Matter_IM_Message,
|
be_local_class(Matter_IM_Message,
|
||||||
3,
|
3,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(7,
|
be_nested_map(8,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(resp, -1), be_const_var(0) },
|
{ be_const_key_weak(ack_received, 2), be_const_closure(Matter_IM_Message_ack_received_closure) },
|
||||||
{ be_const_key_weak(ready, 6), be_const_var(1) },
|
|
||||||
{ be_const_key_weak(send, -1), be_const_closure(Matter_IM_Message_send_closure) },
|
{ be_const_key_weak(send, -1), be_const_closure(Matter_IM_Message_send_closure) },
|
||||||
{ be_const_key_weak(ack_received, -1), be_const_closure(Matter_IM_Message_ack_received_closure) },
|
|
||||||
{ be_const_key_weak(get_exchangeid, -1), be_const_closure(Matter_IM_Message_get_exchangeid_closure) },
|
{ be_const_key_weak(get_exchangeid, -1), be_const_closure(Matter_IM_Message_get_exchangeid_closure) },
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_Message_init_closure) },
|
{ be_const_key_weak(resp, 6), be_const_var(0) },
|
||||||
|
{ be_const_key_weak(ready, -1), be_const_var(1) },
|
||||||
{ be_const_key_weak(data, -1), be_const_var(2) },
|
{ be_const_key_weak(data, -1), be_const_var(2) },
|
||||||
|
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_Message_init_closure) },
|
||||||
|
{ be_const_key_weak(ack_error, 1), be_const_closure(Matter_IM_Message_ack_error_closure) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_IM_Message)
|
be_str_weak(Matter_IM_Message)
|
||||||
);
|
);
|
||||||
|
@ -796,19 +823,180 @@ void be_load_Matter_IM_ReportData_class(bvm *vm) {
|
||||||
extern const bclass be_class_Matter_IM_ReportDataSubscribed;
|
extern const bclass be_class_Matter_IM_ReportDataSubscribed;
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: init
|
** Solidified function: ack_error
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_IM_ReportDataSubscribed_init, /* name */
|
be_local_closure(Matter_IM_ReportDataSubscribed_ack_error, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
10, /* nstack */
|
4, /* nstack */
|
||||||
4, /* argc */
|
2, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[10]) { /* constants */
|
( &(const bvalue[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(sub),
|
||||||
|
/* K1 */ be_nested_str_weak(remove_self),
|
||||||
|
}),
|
||||||
|
be_str_weak(ack_error),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 4]) { /* code */
|
||||||
|
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||||
|
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||||
|
0x7C080200, // 0002 CALL R2 1
|
||||||
|
0x80000000, // 0003 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: send
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_ReportDataSubscribed_send, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
9, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[14]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(data),
|
||||||
|
/* K1 */ be_nested_str_weak(attribute_reports),
|
||||||
|
/* K2 */ be_const_int(0),
|
||||||
|
/* K3 */ be_nested_str_weak(report_data_phase),
|
||||||
|
/* K4 */ be_nested_str_weak(send),
|
||||||
|
/* K5 */ be_nested_str_weak(resp),
|
||||||
|
/* K6 */ be_nested_str_weak(build_standalone_ack),
|
||||||
|
/* K7 */ be_nested_str_weak(encode),
|
||||||
|
/* K8 */ be_nested_str_weak(encrypt),
|
||||||
|
/* K9 */ be_nested_str_weak(send_response),
|
||||||
|
/* K10 */ be_nested_str_weak(raw),
|
||||||
|
/* K11 */ be_nested_str_weak(remote_ip),
|
||||||
|
/* K12 */ be_nested_str_weak(remote_port),
|
||||||
|
/* K13 */ be_nested_str_weak(message_counter),
|
||||||
|
}),
|
||||||
|
be_str_weak(send),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[48]) { /* code */
|
||||||
|
0x6008000C, // 0000 GETGBL R2 G12
|
||||||
|
0x880C0100, // 0001 GETMBR R3 R0 K0
|
||||||
|
0x880C0701, // 0002 GETMBR R3 R3 K1
|
||||||
|
0x7C080200, // 0003 CALL R2 1
|
||||||
|
0x24080502, // 0004 GT R2 R2 K2
|
||||||
|
0x780A0020, // 0005 JMPF R2 #0027
|
||||||
|
0x88080103, // 0006 GETMBR R2 R0 K3
|
||||||
|
0x780A000E, // 0007 JMPF R2 #0017
|
||||||
|
0x60080003, // 0008 GETGBL R2 G3
|
||||||
|
0x5C0C0000, // 0009 MOVE R3 R0
|
||||||
|
0x7C080200, // 000A CALL R2 1
|
||||||
|
0x8C080504, // 000B GETMET R2 R2 K4
|
||||||
|
0x5C100200, // 000C MOVE R4 R1
|
||||||
|
0x7C080400, // 000D CALL R2 2
|
||||||
|
0x5C0C0400, // 000E MOVE R3 R2
|
||||||
|
0x740E0001, // 000F JMPT R3 #0012
|
||||||
|
0x500C0000, // 0010 LDBOOL R3 0 0
|
||||||
|
0x80040600, // 0011 RET 1 R3
|
||||||
|
0x500C0000, // 0012 LDBOOL R3 0 0
|
||||||
|
0x90020603, // 0013 SETMBR R0 K3 R3
|
||||||
|
0x500C0000, // 0014 LDBOOL R3 0 0
|
||||||
|
0x80040600, // 0015 RET 1 R3
|
||||||
|
0x7002000E, // 0016 JMP #0026
|
||||||
|
0x88080105, // 0017 GETMBR R2 R0 K5
|
||||||
|
0x8C080506, // 0018 GETMET R2 R2 K6
|
||||||
|
0x7C080200, // 0019 CALL R2 1
|
||||||
|
0x8C0C0507, // 001A GETMET R3 R2 K7
|
||||||
|
0x7C0C0200, // 001B CALL R3 1
|
||||||
|
0x8C0C0508, // 001C GETMET R3 R2 K8
|
||||||
|
0x7C0C0200, // 001D CALL R3 1
|
||||||
|
0x8C0C0309, // 001E GETMET R3 R1 K9
|
||||||
|
0x8814050A, // 001F GETMBR R5 R2 K10
|
||||||
|
0x8818050B, // 0020 GETMBR R6 R2 K11
|
||||||
|
0x881C050C, // 0021 GETMBR R7 R2 K12
|
||||||
|
0x8820050D, // 0022 GETMBR R8 R2 K13
|
||||||
|
0x7C0C0A00, // 0023 CALL R3 5
|
||||||
|
0x500C0200, // 0024 LDBOOL R3 1 0
|
||||||
|
0x80040600, // 0025 RET 1 R3
|
||||||
|
0x70020007, // 0026 JMP #002F
|
||||||
|
0x60080003, // 0027 GETGBL R2 G3
|
||||||
|
0x5C0C0000, // 0028 MOVE R3 R0
|
||||||
|
0x7C080200, // 0029 CALL R2 1
|
||||||
|
0x8C080504, // 002A GETMET R2 R2 K4
|
||||||
|
0x5C100200, // 002B MOVE R4 R1
|
||||||
|
0x7C080400, // 002C CALL R2 2
|
||||||
|
0x50080200, // 002D LDBOOL R2 1 0
|
||||||
|
0x80040400, // 002E RET 1 R2
|
||||||
|
0x80000000, // 002F RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: ack_received
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_ReportDataSubscribed_ack_received, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
5, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(report_data_phase),
|
||||||
|
/* K1 */ be_nested_str_weak(ack_received),
|
||||||
|
}),
|
||||||
|
be_str_weak(ack_received),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[19]) { /* code */
|
||||||
|
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||||
|
0x780A0007, // 0001 JMPF R2 #000A
|
||||||
|
0x60080003, // 0002 GETGBL R2 G3
|
||||||
|
0x5C0C0000, // 0003 MOVE R3 R0
|
||||||
|
0x7C080200, // 0004 CALL R2 1
|
||||||
|
0x8C080501, // 0005 GETMET R2 R2 K1
|
||||||
|
0x5C100200, // 0006 MOVE R4 R1
|
||||||
|
0x7C080400, // 0007 CALL R2 2
|
||||||
|
0x80040400, // 0008 RET 1 R2
|
||||||
|
0x70020007, // 0009 JMP #0012
|
||||||
|
0x60080003, // 000A GETGBL R2 G3
|
||||||
|
0x5C0C0000, // 000B MOVE R3 R0
|
||||||
|
0x7C080200, // 000C CALL R2 1
|
||||||
|
0x8C080501, // 000D GETMET R2 R2 K1
|
||||||
|
0x4C100000, // 000E LDNIL R4
|
||||||
|
0x7C080400, // 000F CALL R2 2
|
||||||
|
0x50080000, // 0010 LDBOOL R2 0 0
|
||||||
|
0x80040400, // 0011 RET 1 R2
|
||||||
|
0x80000000, // 0012 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: init
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_ReportDataSubscribed_init, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
11, /* nstack */
|
||||||
|
5, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[12]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(resp),
|
/* K0 */ be_nested_str_weak(resp),
|
||||||
/* K1 */ be_nested_str_weak(matter),
|
/* K1 */ be_nested_str_weak(matter),
|
||||||
/* K2 */ be_nested_str_weak(Frame),
|
/* K2 */ be_nested_str_weak(Frame),
|
||||||
|
@ -819,29 +1007,34 @@ be_local_closure(Matter_IM_ReportDataSubscribed_init, /* name */
|
||||||
/* K7 */ be_nested_str_weak(tasmota),
|
/* K7 */ be_nested_str_weak(tasmota),
|
||||||
/* K8 */ be_nested_str_weak(millis),
|
/* K8 */ be_nested_str_weak(millis),
|
||||||
/* K9 */ be_nested_str_weak(MSG_TIMEOUT),
|
/* K9 */ be_nested_str_weak(MSG_TIMEOUT),
|
||||||
|
/* K10 */ be_nested_str_weak(sub),
|
||||||
|
/* K11 */ be_nested_str_weak(report_data_phase),
|
||||||
}),
|
}),
|
||||||
be_str_weak(init),
|
be_str_weak(init),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[19]) { /* code */
|
( &(const binstruction[22]) { /* code */
|
||||||
0xB8120200, // 0000 GETNGBL R4 K1
|
0xB8160200, // 0000 GETNGBL R5 K1
|
||||||
0x88100902, // 0001 GETMBR R4 R4 K2
|
0x88140B02, // 0001 GETMBR R5 R5 K2
|
||||||
0x8C100903, // 0002 GETMET R4 R4 K3
|
0x8C140B03, // 0002 GETMET R5 R5 K3
|
||||||
0x5C180200, // 0003 MOVE R6 R1
|
0x5C1C0200, // 0003 MOVE R7 R1
|
||||||
0x5C1C0400, // 0004 MOVE R7 R2
|
0x5C200400, // 0004 MOVE R8 R2
|
||||||
0x54220004, // 0005 LDINT R8 5
|
0x54260004, // 0005 LDINT R9 5
|
||||||
0x50240200, // 0006 LDBOOL R9 1 0
|
0x50280200, // 0006 LDBOOL R10 1 0
|
||||||
0x7C100A00, // 0007 CALL R4 5
|
0x7C140A00, // 0007 CALL R5 5
|
||||||
0x90020004, // 0008 SETMBR R0 K0 R4
|
0x90020005, // 0008 SETMBR R0 K0 R5
|
||||||
0x90020803, // 0009 SETMBR R0 K4 R3
|
0x90020803, // 0009 SETMBR R0 K4 R3
|
||||||
0x50100200, // 000A LDBOOL R4 1 0
|
0x50140200, // 000A LDBOOL R5 1 0
|
||||||
0x90020A04, // 000B SETMBR R0 K5 R4
|
0x90020A05, // 000B SETMBR R0 K5 R5
|
||||||
0xB8120E00, // 000C GETNGBL R4 K7
|
0xB8160E00, // 000C GETNGBL R5 K7
|
||||||
0x8C100908, // 000D GETMET R4 R4 K8
|
0x8C140B08, // 000D GETMET R5 R5 K8
|
||||||
0x7C100200, // 000E CALL R4 1
|
0x7C140200, // 000E CALL R5 1
|
||||||
0x88140109, // 000F GETMBR R5 R0 K9
|
0x88180109, // 000F GETMBR R6 R0 K9
|
||||||
0x00100805, // 0010 ADD R4 R4 R5
|
0x00140A06, // 0010 ADD R5 R5 R6
|
||||||
0x90020C04, // 0011 SETMBR R0 K6 R4
|
0x90020C05, // 0011 SETMBR R0 K6 R5
|
||||||
0x80000000, // 0012 RET 0
|
0x90021404, // 0012 SETMBR R0 K10 R4
|
||||||
|
0x50140200, // 0013 LDBOOL R5 1 0
|
||||||
|
0x90021605, // 0014 SETMBR R0 K11 R5
|
||||||
|
0x80000000, // 0015 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -853,11 +1046,16 @@ be_local_closure(Matter_IM_ReportDataSubscribed_init, /* name */
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
extern const bclass be_class_Matter_IM_ReportData;
|
extern const bclass be_class_Matter_IM_ReportData;
|
||||||
be_local_class(Matter_IM_ReportDataSubscribed,
|
be_local_class(Matter_IM_ReportDataSubscribed,
|
||||||
0,
|
2,
|
||||||
&be_class_Matter_IM_ReportData,
|
&be_class_Matter_IM_ReportData,
|
||||||
be_nested_map(1,
|
be_nested_map(6,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
|
{ be_const_key_weak(sub, 5), be_const_var(0) },
|
||||||
|
{ be_const_key_weak(ack_error, 0), be_const_closure(Matter_IM_ReportDataSubscribed_ack_error_closure) },
|
||||||
|
{ be_const_key_weak(ack_received, -1), be_const_closure(Matter_IM_ReportDataSubscribed_ack_received_closure) },
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_ReportDataSubscribed_init_closure) },
|
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_ReportDataSubscribed_init_closure) },
|
||||||
|
{ be_const_key_weak(report_data_phase, -1), be_const_var(1) },
|
||||||
|
{ be_const_key_weak(send, -1), be_const_closure(Matter_IM_ReportDataSubscribed_send_closure) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_IM_ReportDataSubscribed)
|
be_str_weak(Matter_IM_ReportDataSubscribed)
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,111 +7,30 @@
|
||||||
extern const bclass be_class_Matter_IM_Subscription;
|
extern const bclass be_class_Matter_IM_Subscription;
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: init
|
** Solidified function: remove_self
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_IM_Subscription_init, /* name */
|
be_local_closure(Matter_IM_Subscription_remove_self, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
12, /* nstack */
|
4, /* nstack */
|
||||||
4, /* argc */
|
1, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[24]) { /* constants */
|
( &(const bvalue[ 2]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(subscription_id),
|
/* K0 */ be_nested_str_weak(subs),
|
||||||
/* K1 */ be_nested_str_weak(session),
|
/* K1 */ be_nested_str_weak(remove_sub),
|
||||||
/* K2 */ be_nested_str_weak(min_interval_floor),
|
|
||||||
/* K3 */ be_const_int(0),
|
|
||||||
/* K4 */ be_nested_str_weak(min_interval),
|
|
||||||
/* K5 */ be_nested_str_weak(max_interval_ceiling),
|
|
||||||
/* K6 */ be_nested_str_weak(max_interval),
|
|
||||||
/* K7 */ be_nested_str_weak(fabric_filtered),
|
|
||||||
/* K8 */ be_nested_str_weak(path_list),
|
|
||||||
/* K9 */ be_nested_str_weak(attributes_requests),
|
|
||||||
/* K10 */ be_nested_str_weak(matter),
|
|
||||||
/* K11 */ be_nested_str_weak(Path),
|
|
||||||
/* K12 */ be_nested_str_weak(endpoint),
|
|
||||||
/* K13 */ be_nested_str_weak(cluster),
|
|
||||||
/* K14 */ be_nested_str_weak(attribute),
|
|
||||||
/* K15 */ be_nested_str_weak(push),
|
|
||||||
/* K16 */ be_nested_str_weak(stop_iteration),
|
|
||||||
/* K17 */ be_nested_str_weak(updates),
|
|
||||||
/* K18 */ be_nested_str_weak(clear_and_arm),
|
|
||||||
/* K19 */ be_nested_str_weak(tasmota),
|
|
||||||
/* K20 */ be_nested_str_weak(log),
|
|
||||||
/* K21 */ be_nested_str_weak(MTR_X3A_X20new_X20subsctiption_X20),
|
|
||||||
/* K22 */ be_nested_str_weak(inspect),
|
|
||||||
/* K23 */ be_const_int(2),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(init),
|
be_str_weak(remove_self),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[64]) { /* code */
|
( &(const binstruction[ 5]) { /* code */
|
||||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||||
0x88100702, // 0002 GETMBR R4 R3 K2
|
0x5C0C0000, // 0002 MOVE R3 R0
|
||||||
0x14140903, // 0003 LT R5 R4 K3
|
0x7C040400, // 0003 CALL R1 2
|
||||||
0x78160000, // 0004 JMPF R5 #0006
|
0x80000000, // 0004 RET 0
|
||||||
0x58100003, // 0005 LDCONST R4 K3
|
|
||||||
0x5416003B, // 0006 LDINT R5 60
|
|
||||||
0x24140805, // 0007 GT R5 R4 R5
|
|
||||||
0x78160000, // 0008 JMPF R5 #000A
|
|
||||||
0x5412003B, // 0009 LDINT R4 60
|
|
||||||
0x90020804, // 000A SETMBR R0 K4 R4
|
|
||||||
0x88140705, // 000B GETMBR R5 R3 K5
|
|
||||||
0x541A003B, // 000C LDINT R6 60
|
|
||||||
0x14180A06, // 000D LT R6 R5 R6
|
|
||||||
0x781A0000, // 000E JMPF R6 #0010
|
|
||||||
0x5416003B, // 000F LDINT R5 60
|
|
||||||
0x541A0E0F, // 0010 LDINT R6 3600
|
|
||||||
0x24180A06, // 0011 GT R6 R5 R6
|
|
||||||
0x781A0000, // 0012 JMPF R6 #0014
|
|
||||||
0x54160E0F, // 0013 LDINT R5 3600
|
|
||||||
0x90020C05, // 0014 SETMBR R0 K6 R5
|
|
||||||
0x88180707, // 0015 GETMBR R6 R3 K7
|
|
||||||
0x90020E06, // 0016 SETMBR R0 K7 R6
|
|
||||||
0x60180012, // 0017 GETGBL R6 G18
|
|
||||||
0x7C180000, // 0018 CALL R6 0
|
|
||||||
0x90021006, // 0019 SETMBR R0 K8 R6
|
|
||||||
0x60180010, // 001A GETGBL R6 G16
|
|
||||||
0x881C0709, // 001B GETMBR R7 R3 K9
|
|
||||||
0x7C180200, // 001C CALL R6 1
|
|
||||||
0xA802000F, // 001D EXBLK 0 #002E
|
|
||||||
0x5C1C0C00, // 001E MOVE R7 R6
|
|
||||||
0x7C1C0000, // 001F CALL R7 0
|
|
||||||
0xB8221400, // 0020 GETNGBL R8 K10
|
|
||||||
0x8C20110B, // 0021 GETMET R8 R8 K11
|
|
||||||
0x7C200200, // 0022 CALL R8 1
|
|
||||||
0x88240F0C, // 0023 GETMBR R9 R7 K12
|
|
||||||
0x90221809, // 0024 SETMBR R8 K12 R9
|
|
||||||
0x88240F0D, // 0025 GETMBR R9 R7 K13
|
|
||||||
0x90221A09, // 0026 SETMBR R8 K13 R9
|
|
||||||
0x88240F0E, // 0027 GETMBR R9 R7 K14
|
|
||||||
0x90221C09, // 0028 SETMBR R8 K14 R9
|
|
||||||
0x88240108, // 0029 GETMBR R9 R0 K8
|
|
||||||
0x8C24130F, // 002A GETMET R9 R9 K15
|
|
||||||
0x5C2C1000, // 002B MOVE R11 R8
|
|
||||||
0x7C240400, // 002C CALL R9 2
|
|
||||||
0x7001FFEF, // 002D JMP #001E
|
|
||||||
0x58180010, // 002E LDCONST R6 K16
|
|
||||||
0xAC180200, // 002F CATCH R6 1 0
|
|
||||||
0xB0080000, // 0030 RAISE 2 R0 R0
|
|
||||||
0x60180012, // 0031 GETGBL R6 G18
|
|
||||||
0x7C180000, // 0032 CALL R6 0
|
|
||||||
0x90022206, // 0033 SETMBR R0 K17 R6
|
|
||||||
0x8C180112, // 0034 GETMET R6 R0 K18
|
|
||||||
0x7C180200, // 0035 CALL R6 1
|
|
||||||
0xB81A2600, // 0036 GETNGBL R6 K19
|
|
||||||
0x8C180D14, // 0037 GETMET R6 R6 K20
|
|
||||||
0xB8221400, // 0038 GETNGBL R8 K10
|
|
||||||
0x8C201116, // 0039 GETMET R8 R8 K22
|
|
||||||
0x5C280000, // 003A MOVE R10 R0
|
|
||||||
0x7C200400, // 003B CALL R8 2
|
|
||||||
0x00222A08, // 003C ADD R8 K21 R8
|
|
||||||
0x58240017, // 003D LDCONST R9 K23
|
|
||||||
0x7C180600, // 003E CALL R6 3
|
|
||||||
0x80000000, // 003F RET 0
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -119,70 +38,172 @@ be_local_closure(Matter_IM_Subscription_init, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: attribute_updated
|
** Solidified function: init
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_IM_Subscription_attribute_updated, /* name */
|
be_local_closure(Matter_IM_Subscription_init, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
8, /* nstack */
|
13, /* nstack */
|
||||||
3, /* argc */
|
5, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 8]) { /* constants */
|
( &(const bvalue[25]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(subs),
|
||||||
|
/* K1 */ be_nested_str_weak(subscription_id),
|
||||||
|
/* K2 */ be_nested_str_weak(session),
|
||||||
|
/* K3 */ be_nested_str_weak(min_interval_floor),
|
||||||
|
/* K4 */ be_const_int(0),
|
||||||
|
/* K5 */ be_nested_str_weak(min_interval),
|
||||||
|
/* K6 */ be_nested_str_weak(max_interval_ceiling),
|
||||||
|
/* K7 */ be_nested_str_weak(max_interval),
|
||||||
|
/* K8 */ be_nested_str_weak(fabric_filtered),
|
||||||
|
/* K9 */ be_nested_str_weak(path_list),
|
||||||
|
/* K10 */ be_nested_str_weak(attributes_requests),
|
||||||
|
/* K11 */ be_nested_str_weak(matter),
|
||||||
|
/* K12 */ be_nested_str_weak(Path),
|
||||||
|
/* K13 */ be_nested_str_weak(endpoint),
|
||||||
|
/* K14 */ be_nested_str_weak(cluster),
|
||||||
|
/* K15 */ be_nested_str_weak(attribute),
|
||||||
|
/* K16 */ be_nested_str_weak(push),
|
||||||
|
/* K17 */ be_nested_str_weak(stop_iteration),
|
||||||
|
/* K18 */ be_nested_str_weak(updates),
|
||||||
|
/* K19 */ be_nested_str_weak(clear_and_arm),
|
||||||
|
/* K20 */ be_nested_str_weak(tasmota),
|
||||||
|
/* K21 */ be_nested_str_weak(log),
|
||||||
|
/* K22 */ be_nested_str_weak(MTR_X3A_X20new_X20subsctiption_X20),
|
||||||
|
/* K23 */ be_nested_str_weak(inspect),
|
||||||
|
/* K24 */ be_const_int(3),
|
||||||
|
}),
|
||||||
|
be_str_weak(init),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[65]) { /* code */
|
||||||
|
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||||
|
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||||
|
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||||
|
0x88140903, // 0003 GETMBR R5 R4 K3
|
||||||
|
0x14180B04, // 0004 LT R6 R5 K4
|
||||||
|
0x781A0000, // 0005 JMPF R6 #0007
|
||||||
|
0x58140004, // 0006 LDCONST R5 K4
|
||||||
|
0x541A003B, // 0007 LDINT R6 60
|
||||||
|
0x24180A06, // 0008 GT R6 R5 R6
|
||||||
|
0x781A0000, // 0009 JMPF R6 #000B
|
||||||
|
0x5416003B, // 000A LDINT R5 60
|
||||||
|
0x90020A05, // 000B SETMBR R0 K5 R5
|
||||||
|
0x88180906, // 000C GETMBR R6 R4 K6
|
||||||
|
0x541E003B, // 000D LDINT R7 60
|
||||||
|
0x141C0C07, // 000E LT R7 R6 R7
|
||||||
|
0x781E0000, // 000F JMPF R7 #0011
|
||||||
|
0x541A003B, // 0010 LDINT R6 60
|
||||||
|
0x541E0E0F, // 0011 LDINT R7 3600
|
||||||
|
0x241C0C07, // 0012 GT R7 R6 R7
|
||||||
|
0x781E0000, // 0013 JMPF R7 #0015
|
||||||
|
0x541A0E0F, // 0014 LDINT R6 3600
|
||||||
|
0x90020E06, // 0015 SETMBR R0 K7 R6
|
||||||
|
0x881C0908, // 0016 GETMBR R7 R4 K8
|
||||||
|
0x90021007, // 0017 SETMBR R0 K8 R7
|
||||||
|
0x601C0012, // 0018 GETGBL R7 G18
|
||||||
|
0x7C1C0000, // 0019 CALL R7 0
|
||||||
|
0x90021207, // 001A SETMBR R0 K9 R7
|
||||||
|
0x601C0010, // 001B GETGBL R7 G16
|
||||||
|
0x8820090A, // 001C GETMBR R8 R4 K10
|
||||||
|
0x7C1C0200, // 001D CALL R7 1
|
||||||
|
0xA802000F, // 001E EXBLK 0 #002F
|
||||||
|
0x5C200E00, // 001F MOVE R8 R7
|
||||||
|
0x7C200000, // 0020 CALL R8 0
|
||||||
|
0xB8261600, // 0021 GETNGBL R9 K11
|
||||||
|
0x8C24130C, // 0022 GETMET R9 R9 K12
|
||||||
|
0x7C240200, // 0023 CALL R9 1
|
||||||
|
0x8828110D, // 0024 GETMBR R10 R8 K13
|
||||||
|
0x90261A0A, // 0025 SETMBR R9 K13 R10
|
||||||
|
0x8828110E, // 0026 GETMBR R10 R8 K14
|
||||||
|
0x90261C0A, // 0027 SETMBR R9 K14 R10
|
||||||
|
0x8828110F, // 0028 GETMBR R10 R8 K15
|
||||||
|
0x90261E0A, // 0029 SETMBR R9 K15 R10
|
||||||
|
0x88280109, // 002A GETMBR R10 R0 K9
|
||||||
|
0x8C281510, // 002B GETMET R10 R10 K16
|
||||||
|
0x5C301200, // 002C MOVE R12 R9
|
||||||
|
0x7C280400, // 002D CALL R10 2
|
||||||
|
0x7001FFEF, // 002E JMP #001F
|
||||||
|
0x581C0011, // 002F LDCONST R7 K17
|
||||||
|
0xAC1C0200, // 0030 CATCH R7 1 0
|
||||||
|
0xB0080000, // 0031 RAISE 2 R0 R0
|
||||||
|
0x601C0012, // 0032 GETGBL R7 G18
|
||||||
|
0x7C1C0000, // 0033 CALL R7 0
|
||||||
|
0x90022407, // 0034 SETMBR R0 K18 R7
|
||||||
|
0x8C1C0113, // 0035 GETMET R7 R0 K19
|
||||||
|
0x7C1C0200, // 0036 CALL R7 1
|
||||||
|
0xB81E2800, // 0037 GETNGBL R7 K20
|
||||||
|
0x8C1C0F15, // 0038 GETMET R7 R7 K21
|
||||||
|
0xB8261600, // 0039 GETNGBL R9 K11
|
||||||
|
0x8C241317, // 003A GETMET R9 R9 K23
|
||||||
|
0x5C2C0000, // 003B MOVE R11 R0
|
||||||
|
0x7C240400, // 003C CALL R9 2
|
||||||
|
0x00262C09, // 003D ADD R9 K22 R9
|
||||||
|
0x58280018, // 003E LDCONST R10 K24
|
||||||
|
0x7C1C0600, // 003F CALL R7 3
|
||||||
|
0x80000000, // 0040 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: _add_attribute_unique_path
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Subscription__add_attribute_unique_path, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 7]) { /* constants */
|
||||||
/* K0 */ be_const_int(0),
|
/* K0 */ be_const_int(0),
|
||||||
/* K1 */ be_nested_str_weak(path_list),
|
/* K1 */ be_nested_str_weak(updates),
|
||||||
/* K2 */ be_nested_str_weak(endpoint),
|
/* K2 */ be_nested_str_weak(endpoint),
|
||||||
/* K3 */ be_nested_str_weak(cluster),
|
/* K3 */ be_nested_str_weak(cluster),
|
||||||
/* K4 */ be_nested_str_weak(attribute),
|
/* K4 */ be_nested_str_weak(attribute),
|
||||||
/* K5 */ be_nested_str_weak(updates),
|
/* K5 */ be_const_int(1),
|
||||||
/* K6 */ be_nested_str_weak(push),
|
/* K6 */ be_nested_str_weak(push),
|
||||||
/* K7 */ be_const_int(1),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(attribute_updated),
|
be_str_weak(_add_attribute_unique_path),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[39]) { /* code */
|
( &(const binstruction[28]) { /* code */
|
||||||
0x580C0000, // 0000 LDCONST R3 K0
|
0x58080000, // 0000 LDCONST R2 K0
|
||||||
0x6010000C, // 0001 GETGBL R4 G12
|
0x600C000C, // 0001 GETGBL R3 G12
|
||||||
0x88140101, // 0002 GETMBR R5 R0 K1
|
0x88100101, // 0002 GETMBR R4 R0 K1
|
||||||
0x7C100200, // 0003 CALL R4 1
|
0x7C0C0200, // 0003 CALL R3 1
|
||||||
0x14100604, // 0004 LT R4 R3 R4
|
0x140C0403, // 0004 LT R3 R2 R3
|
||||||
0x7812001F, // 0005 JMPF R4 #0026
|
0x780E0010, // 0005 JMPF R3 #0017
|
||||||
0x88100101, // 0006 GETMBR R4 R0 K1
|
0x880C0101, // 0006 GETMBR R3 R0 K1
|
||||||
0x94100803, // 0007 GETIDX R4 R4 R3
|
0x940C0602, // 0007 GETIDX R3 R3 R2
|
||||||
0x88140902, // 0008 GETMBR R5 R4 K2
|
0x88100702, // 0008 GETMBR R4 R3 K2
|
||||||
0x4C180000, // 0009 LDNIL R6
|
0x88140302, // 0009 GETMBR R5 R1 K2
|
||||||
0x1C140A06, // 000A EQ R5 R5 R6
|
0x1C100805, // 000A EQ R4 R4 R5
|
||||||
0x74160003, // 000B JMPT R5 #0010
|
0x78120008, // 000B JMPF R4 #0015
|
||||||
0x88140902, // 000C GETMBR R5 R4 K2
|
0x88100703, // 000C GETMBR R4 R3 K3
|
||||||
0x88180302, // 000D GETMBR R6 R1 K2
|
0x88140303, // 000D GETMBR R5 R1 K3
|
||||||
0x1C140A06, // 000E EQ R5 R5 R6
|
0x1C100805, // 000E EQ R4 R4 R5
|
||||||
0x78160013, // 000F JMPF R5 #0024
|
0x78120004, // 000F JMPF R4 #0015
|
||||||
0x88140903, // 0010 GETMBR R5 R4 K3
|
0x88100704, // 0010 GETMBR R4 R3 K4
|
||||||
0x4C180000, // 0011 LDNIL R6
|
0x88140304, // 0011 GETMBR R5 R1 K4
|
||||||
0x1C140A06, // 0012 EQ R5 R5 R6
|
0x1C100805, // 0012 EQ R4 R4 R5
|
||||||
0x74160003, // 0013 JMPT R5 #0018
|
0x78120000, // 0013 JMPF R4 #0015
|
||||||
0x88140903, // 0014 GETMBR R5 R4 K3
|
0x80000800, // 0014 RET 0
|
||||||
0x88180303, // 0015 GETMBR R6 R1 K3
|
0x00080505, // 0015 ADD R2 R2 K5
|
||||||
0x1C140A06, // 0016 EQ R5 R5 R6
|
0x7001FFE9, // 0016 JMP #0001
|
||||||
0x7816000B, // 0017 JMPF R5 #0024
|
0x880C0101, // 0017 GETMBR R3 R0 K1
|
||||||
0x88140904, // 0018 GETMBR R5 R4 K4
|
0x8C0C0706, // 0018 GETMET R3 R3 K6
|
||||||
0x4C180000, // 0019 LDNIL R6
|
0x5C140200, // 0019 MOVE R5 R1
|
||||||
0x1C140A06, // 001A EQ R5 R5 R6
|
0x7C0C0400, // 001A CALL R3 2
|
||||||
0x74160003, // 001B JMPT R5 #0020
|
0x80000000, // 001B RET 0
|
||||||
0x88140904, // 001C GETMBR R5 R4 K4
|
|
||||||
0x88180304, // 001D GETMBR R6 R1 K4
|
|
||||||
0x1C140A06, // 001E EQ R5 R5 R6
|
|
||||||
0x78160003, // 001F JMPF R5 #0024
|
|
||||||
0x88140105, // 0020 GETMBR R5 R0 K5
|
|
||||||
0x8C140B06, // 0021 GETMET R5 R5 K6
|
|
||||||
0x5C1C0200, // 0022 MOVE R7 R1
|
|
||||||
0x7C140400, // 0023 CALL R5 2
|
|
||||||
0x000C0707, // 0024 ADD R3 R3 K7
|
|
||||||
0x7001FFDA, // 0025 JMP #0001
|
|
||||||
0x80000000, // 0026 RET 0
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -202,32 +223,110 @@ be_local_closure(Matter_IM_Subscription_clear_and_arm, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 7]) { /* constants */
|
( &(const bvalue[10]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(updates),
|
/* K0 */ be_nested_str_weak(updates),
|
||||||
/* K1 */ be_nested_str_weak(clear),
|
/* K1 */ be_nested_str_weak(clear),
|
||||||
/* K2 */ be_nested_str_weak(expiration),
|
/* K2 */ be_nested_str_weak(tasmota),
|
||||||
/* K3 */ be_nested_str_weak(tasmota),
|
/* K3 */ be_nested_str_weak(millis),
|
||||||
/* K4 */ be_nested_str_weak(millis),
|
/* K4 */ be_nested_str_weak(expiration),
|
||||||
/* K5 */ be_nested_str_weak(max_interval),
|
/* K5 */ be_nested_str_weak(max_interval),
|
||||||
/* K6 */ be_nested_str_weak(MAX_INTERVAL_MARGIN),
|
/* K6 */ be_nested_str_weak(MAX_INTERVAL_MARGIN),
|
||||||
|
/* K7 */ be_nested_str_weak(not_before),
|
||||||
|
/* K8 */ be_nested_str_weak(min_interval),
|
||||||
|
/* K9 */ be_const_int(1),
|
||||||
}),
|
}),
|
||||||
be_str_weak(clear_and_arm),
|
be_str_weak(clear_and_arm),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[14]) { /* code */
|
( &(const binstruction[20]) { /* code */
|
||||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||||
0x7C040200, // 0002 CALL R1 1
|
0x7C040200, // 0002 CALL R1 1
|
||||||
0xB8060600, // 0003 GETNGBL R1 K3
|
0xB8060400, // 0003 GETNGBL R1 K2
|
||||||
0x8C040304, // 0004 GETMET R1 R1 K4
|
0x8C040303, // 0004 GETMET R1 R1 K3
|
||||||
0x7C040200, // 0005 CALL R1 1
|
0x7C040200, // 0005 CALL R1 1
|
||||||
0x88080105, // 0006 GETMBR R2 R0 K5
|
0x88080105, // 0006 GETMBR R2 R0 K5
|
||||||
0x880C0106, // 0007 GETMBR R3 R0 K6
|
0x880C0106, // 0007 GETMBR R3 R0 K6
|
||||||
0x04080403, // 0008 SUB R2 R2 R3
|
0x04080403, // 0008 SUB R2 R2 R3
|
||||||
0x540E03E7, // 0009 LDINT R3 1000
|
0x540E03E7, // 0009 LDINT R3 1000
|
||||||
0x08080403, // 000A MUL R2 R2 R3
|
0x08080403, // 000A MUL R2 R2 R3
|
||||||
0x00040202, // 000B ADD R1 R1 R2
|
0x00080202, // 000B ADD R2 R1 R2
|
||||||
0x90020401, // 000C SETMBR R0 K2 R1
|
0x90020802, // 000C SETMBR R0 K4 R2
|
||||||
0x80000000, // 000D RET 0
|
0x88080108, // 000D GETMBR R2 R0 K8
|
||||||
|
0x540E03E7, // 000E LDINT R3 1000
|
||||||
|
0x08080403, // 000F MUL R2 R2 R3
|
||||||
|
0x00080202, // 0010 ADD R2 R1 R2
|
||||||
|
0x04080509, // 0011 SUB R2 R2 K9
|
||||||
|
0x90020E02, // 0012 SETMBR R0 K7 R2
|
||||||
|
0x80000000, // 0013 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: attribute_updated_ctx
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Subscription_attribute_updated_ctx, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
8, /* nstack */
|
||||||
|
3, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 7]) { /* constants */
|
||||||
|
/* K0 */ be_const_int(0),
|
||||||
|
/* K1 */ be_nested_str_weak(path_list),
|
||||||
|
/* K2 */ be_nested_str_weak(endpoint),
|
||||||
|
/* K3 */ be_nested_str_weak(cluster),
|
||||||
|
/* K4 */ be_nested_str_weak(attribute),
|
||||||
|
/* K5 */ be_nested_str_weak(_add_attribute_unique_path),
|
||||||
|
/* K6 */ be_const_int(1),
|
||||||
|
}),
|
||||||
|
be_str_weak(attribute_updated_ctx),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[38]) { /* code */
|
||||||
|
0x580C0000, // 0000 LDCONST R3 K0
|
||||||
|
0x6010000C, // 0001 GETGBL R4 G12
|
||||||
|
0x88140101, // 0002 GETMBR R5 R0 K1
|
||||||
|
0x7C100200, // 0003 CALL R4 1
|
||||||
|
0x14100604, // 0004 LT R4 R3 R4
|
||||||
|
0x7812001E, // 0005 JMPF R4 #0025
|
||||||
|
0x88100101, // 0006 GETMBR R4 R0 K1
|
||||||
|
0x94100803, // 0007 GETIDX R4 R4 R3
|
||||||
|
0x88140902, // 0008 GETMBR R5 R4 K2
|
||||||
|
0x4C180000, // 0009 LDNIL R6
|
||||||
|
0x1C140A06, // 000A EQ R5 R5 R6
|
||||||
|
0x74160003, // 000B JMPT R5 #0010
|
||||||
|
0x88140902, // 000C GETMBR R5 R4 K2
|
||||||
|
0x88180302, // 000D GETMBR R6 R1 K2
|
||||||
|
0x1C140A06, // 000E EQ R5 R5 R6
|
||||||
|
0x78160012, // 000F JMPF R5 #0023
|
||||||
|
0x88140903, // 0010 GETMBR R5 R4 K3
|
||||||
|
0x4C180000, // 0011 LDNIL R6
|
||||||
|
0x1C140A06, // 0012 EQ R5 R5 R6
|
||||||
|
0x74160003, // 0013 JMPT R5 #0018
|
||||||
|
0x88140903, // 0014 GETMBR R5 R4 K3
|
||||||
|
0x88180303, // 0015 GETMBR R6 R1 K3
|
||||||
|
0x1C140A06, // 0016 EQ R5 R5 R6
|
||||||
|
0x7816000A, // 0017 JMPF R5 #0023
|
||||||
|
0x88140904, // 0018 GETMBR R5 R4 K4
|
||||||
|
0x4C180000, // 0019 LDNIL R6
|
||||||
|
0x1C140A06, // 001A EQ R5 R5 R6
|
||||||
|
0x74160003, // 001B JMPT R5 #0020
|
||||||
|
0x88140904, // 001C GETMBR R5 R4 K4
|
||||||
|
0x88180304, // 001D GETMBR R6 R1 K4
|
||||||
|
0x1C140A06, // 001E EQ R5 R5 R6
|
||||||
|
0x78160002, // 001F JMPF R5 #0023
|
||||||
|
0x8C140105, // 0020 GETMET R5 R0 K5
|
||||||
|
0x5C1C0200, // 0021 MOVE R7 R1
|
||||||
|
0x7C140400, // 0022 CALL R5 2
|
||||||
|
0x000C0706, // 0023 ADD R3 R3 K6
|
||||||
|
0x7001FFDB, // 0024 JMP #0001
|
||||||
|
0x80000000, // 0025 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -238,22 +337,26 @@ be_local_closure(Matter_IM_Subscription_clear_and_arm, /* name */
|
||||||
** Solidified class: Matter_IM_Subscription
|
** Solidified class: Matter_IM_Subscription
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_class(Matter_IM_Subscription,
|
be_local_class(Matter_IM_Subscription,
|
||||||
8,
|
10,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(12,
|
be_nested_map(16,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(expiration, -1), be_const_var(6) },
|
{ be_const_key_weak(remove_self, -1), be_const_closure(Matter_IM_Subscription_remove_self_closure) },
|
||||||
{ be_const_key_weak(updates, 9), be_const_var(7) },
|
{ be_const_key_weak(min_interval, -1), be_const_var(4) },
|
||||||
{ be_const_key_weak(fabric_filtered, -1), be_const_var(5) },
|
{ be_const_key_weak(subs, -1), be_const_var(0) },
|
||||||
{ be_const_key_weak(max_interval, 10), be_const_var(4) },
|
{ be_const_key_weak(init, 15), be_const_closure(Matter_IM_Subscription_init_closure) },
|
||||||
{ be_const_key_weak(session, -1), be_const_var(1) },
|
{ be_const_key_weak(subscription_id, -1), be_const_var(1) },
|
||||||
{ be_const_key_weak(min_interval, -1), be_const_var(3) },
|
{ be_const_key_weak(updates, -1), be_const_var(9) },
|
||||||
{ be_const_key_weak(MAX_INTERVAL_MARGIN, -1), be_const_int(10) },
|
{ be_const_key_weak(MAX_INTERVAL_MARGIN, -1), be_const_int(5) },
|
||||||
{ be_const_key_weak(attribute_updated, 4), be_const_closure(Matter_IM_Subscription_attribute_updated_closure) },
|
{ be_const_key_weak(session, 11), be_const_var(2) },
|
||||||
{ be_const_key_weak(subscription_id, -1), be_const_var(0) },
|
{ be_const_key_weak(expiration, 14), be_const_var(8) },
|
||||||
{ be_const_key_weak(clear_and_arm, -1), be_const_closure(Matter_IM_Subscription_clear_and_arm_closure) },
|
{ be_const_key_weak(fabric_filtered, -1), be_const_var(6) },
|
||||||
{ be_const_key_weak(path_list, 11), be_const_var(2) },
|
{ be_const_key_weak(_add_attribute_unique_path, 9), be_const_closure(Matter_IM_Subscription__add_attribute_unique_path_closure) },
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_Subscription_init_closure) },
|
{ be_const_key_weak(max_interval, -1), be_const_var(5) },
|
||||||
|
{ be_const_key_weak(attribute_updated_ctx, -1), be_const_closure(Matter_IM_Subscription_attribute_updated_ctx_closure) },
|
||||||
|
{ be_const_key_weak(clear_and_arm, 12), be_const_closure(Matter_IM_Subscription_clear_and_arm_closure) },
|
||||||
|
{ be_const_key_weak(not_before, -1), be_const_var(7) },
|
||||||
|
{ be_const_key_weak(path_list, -1), be_const_var(3) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_IM_Subscription)
|
be_str_weak(Matter_IM_Subscription)
|
||||||
);
|
);
|
||||||
|
@ -267,12 +370,140 @@ void be_load_Matter_IM_Subscription_class(bvm *vm) {
|
||||||
|
|
||||||
extern const bclass be_class_Matter_IM_Subscription_Shop;
|
extern const bclass be_class_Matter_IM_Subscription_Shop;
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: get_by_id
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Subscription_Shop_get_by_id, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
5, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 4]) { /* constants */
|
||||||
|
/* K0 */ be_const_int(0),
|
||||||
|
/* K1 */ be_nested_str_weak(subs),
|
||||||
|
/* K2 */ be_nested_str_weak(subscription_id),
|
||||||
|
/* K3 */ be_const_int(1),
|
||||||
|
}),
|
||||||
|
be_str_weak(get_by_id),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[17]) { /* code */
|
||||||
|
0x58080000, // 0000 LDCONST R2 K0
|
||||||
|
0x600C000C, // 0001 GETGBL R3 G12
|
||||||
|
0x88100101, // 0002 GETMBR R4 R0 K1
|
||||||
|
0x7C0C0200, // 0003 CALL R3 1
|
||||||
|
0x140C0403, // 0004 LT R3 R2 R3
|
||||||
|
0x780E0009, // 0005 JMPF R3 #0010
|
||||||
|
0x880C0101, // 0006 GETMBR R3 R0 K1
|
||||||
|
0x940C0602, // 0007 GETIDX R3 R3 R2
|
||||||
|
0x880C0702, // 0008 GETMBR R3 R3 K2
|
||||||
|
0x1C0C0601, // 0009 EQ R3 R3 R1
|
||||||
|
0x780E0002, // 000A JMPF R3 #000E
|
||||||
|
0x880C0101, // 000B GETMBR R3 R0 K1
|
||||||
|
0x940C0602, // 000C GETIDX R3 R3 R2
|
||||||
|
0x80040600, // 000D RET 1 R3
|
||||||
|
0x00080503, // 000E ADD R2 R2 K3
|
||||||
|
0x7001FFF0, // 000F JMP #0001
|
||||||
|
0x80000000, // 0010 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: every_250ms
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Subscription_Shop_every_250ms, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
1, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[11]) { /* constants */
|
||||||
|
/* K0 */ be_const_int(0),
|
||||||
|
/* K1 */ be_nested_str_weak(subs),
|
||||||
|
/* K2 */ be_nested_str_weak(updates),
|
||||||
|
/* K3 */ be_nested_str_weak(tasmota),
|
||||||
|
/* K4 */ be_nested_str_weak(time_reached),
|
||||||
|
/* K5 */ be_nested_str_weak(not_before),
|
||||||
|
/* K6 */ be_nested_str_weak(im),
|
||||||
|
/* K7 */ be_nested_str_weak(send_subscribe_update),
|
||||||
|
/* K8 */ be_nested_str_weak(clear_and_arm),
|
||||||
|
/* K9 */ be_const_int(1),
|
||||||
|
/* K10 */ be_nested_str_weak(expiration),
|
||||||
|
}),
|
||||||
|
be_str_weak(every_250ms),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[48]) { /* code */
|
||||||
|
0x58040000, // 0000 LDCONST R1 K0
|
||||||
|
0x6008000C, // 0001 GETGBL R2 G12
|
||||||
|
0x880C0101, // 0002 GETMBR R3 R0 K1
|
||||||
|
0x7C080200, // 0003 CALL R2 1
|
||||||
|
0x14080202, // 0004 LT R2 R1 R2
|
||||||
|
0x780A0013, // 0005 JMPF R2 #001A
|
||||||
|
0x88080101, // 0006 GETMBR R2 R0 K1
|
||||||
|
0x94080401, // 0007 GETIDX R2 R2 R1
|
||||||
|
0x600C000C, // 0008 GETGBL R3 G12
|
||||||
|
0x88100502, // 0009 GETMBR R4 R2 K2
|
||||||
|
0x7C0C0200, // 000A CALL R3 1
|
||||||
|
0x240C0700, // 000B GT R3 R3 K0
|
||||||
|
0x780E000A, // 000C JMPF R3 #0018
|
||||||
|
0xB80E0600, // 000D GETNGBL R3 K3
|
||||||
|
0x8C0C0704, // 000E GETMET R3 R3 K4
|
||||||
|
0x88140505, // 000F GETMBR R5 R2 K5
|
||||||
|
0x7C0C0400, // 0010 CALL R3 2
|
||||||
|
0x780E0005, // 0011 JMPF R3 #0018
|
||||||
|
0x880C0106, // 0012 GETMBR R3 R0 K6
|
||||||
|
0x8C0C0707, // 0013 GETMET R3 R3 K7
|
||||||
|
0x5C140400, // 0014 MOVE R5 R2
|
||||||
|
0x7C0C0400, // 0015 CALL R3 2
|
||||||
|
0x8C0C0508, // 0016 GETMET R3 R2 K8
|
||||||
|
0x7C0C0200, // 0017 CALL R3 1
|
||||||
|
0x00040309, // 0018 ADD R1 R1 K9
|
||||||
|
0x7001FFE6, // 0019 JMP #0001
|
||||||
|
0x58040000, // 001A LDCONST R1 K0
|
||||||
|
0x6008000C, // 001B GETGBL R2 G12
|
||||||
|
0x880C0101, // 001C GETMBR R3 R0 K1
|
||||||
|
0x7C080200, // 001D CALL R2 1
|
||||||
|
0x14080202, // 001E LT R2 R1 R2
|
||||||
|
0x780A000E, // 001F JMPF R2 #002F
|
||||||
|
0x88080101, // 0020 GETMBR R2 R0 K1
|
||||||
|
0x94080401, // 0021 GETIDX R2 R2 R1
|
||||||
|
0xB80E0600, // 0022 GETNGBL R3 K3
|
||||||
|
0x8C0C0704, // 0023 GETMET R3 R3 K4
|
||||||
|
0x8814050A, // 0024 GETMBR R5 R2 K10
|
||||||
|
0x7C0C0400, // 0025 CALL R3 2
|
||||||
|
0x780E0005, // 0026 JMPF R3 #002D
|
||||||
|
0x880C0106, // 0027 GETMBR R3 R0 K6
|
||||||
|
0x8C0C0707, // 0028 GETMET R3 R3 K7
|
||||||
|
0x5C140400, // 0029 MOVE R5 R2
|
||||||
|
0x7C0C0400, // 002A CALL R3 2
|
||||||
|
0x8C0C0508, // 002B GETMET R3 R2 K8
|
||||||
|
0x7C0C0200, // 002C CALL R3 1
|
||||||
|
0x00040309, // 002D ADD R1 R1 K9
|
||||||
|
0x7001FFEB, // 002E JMP #001B
|
||||||
|
0x80000000, // 002F RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: new_subscription
|
** Solidified function: new_subscription
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_IM_Subscription_Shop_new_subscription, /* name */
|
be_local_closure(Matter_IM_Subscription_Shop_new_subscription, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
10, /* nstack */
|
11, /* nstack */
|
||||||
3, /* argc */
|
3, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
|
@ -294,7 +525,7 @@ be_local_closure(Matter_IM_Subscription_Shop_new_subscription, /* name */
|
||||||
}),
|
}),
|
||||||
be_str_weak(new_subscription),
|
be_str_weak(new_subscription),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[32]) { /* code */
|
( &(const binstruction[33]) { /* code */
|
||||||
0xA40E0000, // 0000 IMPORT R3 K0
|
0xA40E0000, // 0000 IMPORT R3 K0
|
||||||
0x8C100701, // 0001 GETMET R4 R3 K1
|
0x8C100701, // 0001 GETMET R4 R3 K1
|
||||||
0x58180002, // 0002 LDCONST R6 K2
|
0x58180002, // 0002 LDCONST R6 K2
|
||||||
|
@ -318,15 +549,16 @@ be_local_closure(Matter_IM_Subscription_Shop_new_subscription, /* name */
|
||||||
0x7001FFF2, // 0014 JMP #0008
|
0x7001FFF2, // 0014 JMP #0008
|
||||||
0xB8160C00, // 0015 GETNGBL R5 K6
|
0xB8160C00, // 0015 GETNGBL R5 K6
|
||||||
0x8C140B07, // 0016 GETMET R5 R5 K7
|
0x8C140B07, // 0016 GETMET R5 R5 K7
|
||||||
0x5C1C0800, // 0017 MOVE R7 R4
|
0x5C1C0000, // 0017 MOVE R7 R0
|
||||||
0x5C200200, // 0018 MOVE R8 R1
|
0x5C200800, // 0018 MOVE R8 R4
|
||||||
0x5C240400, // 0019 MOVE R9 R2
|
0x5C240200, // 0019 MOVE R9 R1
|
||||||
0x7C140800, // 001A CALL R5 4
|
0x5C280400, // 001A MOVE R10 R2
|
||||||
0x88180108, // 001B GETMBR R6 R0 K8
|
0x7C140A00, // 001B CALL R5 5
|
||||||
0x8C180D09, // 001C GETMET R6 R6 K9
|
0x88180108, // 001C GETMBR R6 R0 K8
|
||||||
0x5C200A00, // 001D MOVE R8 R5
|
0x8C180D09, // 001D GETMET R6 R6 K9
|
||||||
0x7C180400, // 001E CALL R6 2
|
0x5C200A00, // 001E MOVE R8 R5
|
||||||
0x80040A00, // 001F RET 1 R5
|
0x7C180400, // 001F CALL R6 2
|
||||||
|
0x80040A00, // 0020 RET 1 R5
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -334,54 +566,42 @@ be_local_closure(Matter_IM_Subscription_Shop_new_subscription, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: every_second
|
** Solidified function: attribute_updated_ctx
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_IM_Subscription_Shop_every_second, /* name */
|
be_local_closure(Matter_IM_Subscription_Shop_attribute_updated_ctx, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
6, /* nstack */
|
8, /* nstack */
|
||||||
1, /* argc */
|
3, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 9]) { /* constants */
|
( &(const bvalue[ 4]) { /* constants */
|
||||||
/* K0 */ be_const_int(0),
|
/* K0 */ be_const_int(0),
|
||||||
/* K1 */ be_nested_str_weak(subs),
|
/* K1 */ be_nested_str_weak(subs),
|
||||||
/* K2 */ be_nested_str_weak(tasmota),
|
/* K2 */ be_nested_str_weak(attribute_updated_ctx),
|
||||||
/* K3 */ be_nested_str_weak(time_reached),
|
/* K3 */ be_const_int(1),
|
||||||
/* K4 */ be_nested_str_weak(expiration),
|
|
||||||
/* K5 */ be_nested_str_weak(im),
|
|
||||||
/* K6 */ be_nested_str_weak(send_subscribe_update),
|
|
||||||
/* K7 */ be_nested_str_weak(clear_and_arm),
|
|
||||||
/* K8 */ be_const_int(1),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(every_second),
|
be_str_weak(attribute_updated_ctx),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[22]) { /* code */
|
( &(const binstruction[15]) { /* code */
|
||||||
0x58040000, // 0000 LDCONST R1 K0
|
0x580C0000, // 0000 LDCONST R3 K0
|
||||||
0x6008000C, // 0001 GETGBL R2 G12
|
0x6010000C, // 0001 GETGBL R4 G12
|
||||||
0x880C0101, // 0002 GETMBR R3 R0 K1
|
0x88140101, // 0002 GETMBR R5 R0 K1
|
||||||
0x7C080200, // 0003 CALL R2 1
|
0x7C100200, // 0003 CALL R4 1
|
||||||
0x14080202, // 0004 LT R2 R1 R2
|
0x14100604, // 0004 LT R4 R3 R4
|
||||||
0x780A000E, // 0005 JMPF R2 #0015
|
0x78120007, // 0005 JMPF R4 #000E
|
||||||
0x88080101, // 0006 GETMBR R2 R0 K1
|
0x88100101, // 0006 GETMBR R4 R0 K1
|
||||||
0x94080401, // 0007 GETIDX R2 R2 R1
|
0x94100803, // 0007 GETIDX R4 R4 R3
|
||||||
0xB80E0400, // 0008 GETNGBL R3 K2
|
0x8C100902, // 0008 GETMET R4 R4 K2
|
||||||
0x8C0C0703, // 0009 GETMET R3 R3 K3
|
0x5C180200, // 0009 MOVE R6 R1
|
||||||
0x88140504, // 000A GETMBR R5 R2 K4
|
0x5C1C0400, // 000A MOVE R7 R2
|
||||||
0x7C0C0400, // 000B CALL R3 2
|
0x7C100600, // 000B CALL R4 3
|
||||||
0x780E0005, // 000C JMPF R3 #0013
|
0x000C0703, // 000C ADD R3 R3 K3
|
||||||
0x880C0105, // 000D GETMBR R3 R0 K5
|
0x7001FFF2, // 000D JMP #0001
|
||||||
0x8C0C0706, // 000E GETMET R3 R3 K6
|
0x80000000, // 000E RET 0
|
||||||
0x5C140400, // 000F MOVE R5 R2
|
|
||||||
0x7C0C0400, // 0010 CALL R3 2
|
|
||||||
0x8C0C0507, // 0011 GETMET R3 R2 K7
|
|
||||||
0x7C0C0200, // 0012 CALL R3 1
|
|
||||||
0x00040308, // 0013 ADD R1 R1 K8
|
|
||||||
0x7001FFEB, // 0014 JMP #0001
|
|
||||||
0x80000000, // 0015 RET 0
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -419,6 +639,52 @@ be_local_closure(Matter_IM_Subscription_Shop_init, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: remove_sub
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_IM_Subscription_Shop_remove_sub, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 4]) { /* constants */
|
||||||
|
/* K0 */ be_const_int(0),
|
||||||
|
/* K1 */ be_nested_str_weak(subs),
|
||||||
|
/* K2 */ be_nested_str_weak(remove),
|
||||||
|
/* K3 */ be_const_int(1),
|
||||||
|
}),
|
||||||
|
be_str_weak(remove_sub),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[18]) { /* code */
|
||||||
|
0x58080000, // 0000 LDCONST R2 K0
|
||||||
|
0x600C000C, // 0001 GETGBL R3 G12
|
||||||
|
0x88100101, // 0002 GETMBR R4 R0 K1
|
||||||
|
0x7C0C0200, // 0003 CALL R3 1
|
||||||
|
0x140C0403, // 0004 LT R3 R2 R3
|
||||||
|
0x780E000A, // 0005 JMPF R3 #0011
|
||||||
|
0x880C0101, // 0006 GETMBR R3 R0 K1
|
||||||
|
0x940C0602, // 0007 GETIDX R3 R3 R2
|
||||||
|
0x1C0C0601, // 0008 EQ R3 R3 R1
|
||||||
|
0x780E0004, // 0009 JMPF R3 #000F
|
||||||
|
0x880C0101, // 000A GETMBR R3 R0 K1
|
||||||
|
0x8C0C0702, // 000B GETMET R3 R3 K2
|
||||||
|
0x5C140400, // 000C MOVE R5 R2
|
||||||
|
0x7C0C0400, // 000D CALL R3 2
|
||||||
|
0x70020000, // 000E JMP #0010
|
||||||
|
0x00080503, // 000F ADD R2 R2 K3
|
||||||
|
0x7001FFEF, // 0010 JMP #0001
|
||||||
|
0x80000000, // 0011 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: remove_by_session
|
** Solidified function: remove_by_session
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -467,110 +733,23 @@ be_local_closure(Matter_IM_Subscription_Shop_remove_by_session, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: get_by_id
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_IM_Subscription_Shop_get_by_id, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
5, /* nstack */
|
|
||||||
2, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 4]) { /* constants */
|
|
||||||
/* K0 */ be_const_int(0),
|
|
||||||
/* K1 */ be_nested_str_weak(subs),
|
|
||||||
/* K2 */ be_nested_str_weak(subscription_id),
|
|
||||||
/* K3 */ be_const_int(1),
|
|
||||||
}),
|
|
||||||
be_str_weak(get_by_id),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[17]) { /* code */
|
|
||||||
0x58080000, // 0000 LDCONST R2 K0
|
|
||||||
0x600C000C, // 0001 GETGBL R3 G12
|
|
||||||
0x88100101, // 0002 GETMBR R4 R0 K1
|
|
||||||
0x7C0C0200, // 0003 CALL R3 1
|
|
||||||
0x140C0403, // 0004 LT R3 R2 R3
|
|
||||||
0x780E0009, // 0005 JMPF R3 #0010
|
|
||||||
0x880C0101, // 0006 GETMBR R3 R0 K1
|
|
||||||
0x940C0602, // 0007 GETIDX R3 R3 R2
|
|
||||||
0x880C0702, // 0008 GETMBR R3 R3 K2
|
|
||||||
0x1C0C0601, // 0009 EQ R3 R3 R1
|
|
||||||
0x780E0002, // 000A JMPF R3 #000E
|
|
||||||
0x880C0101, // 000B GETMBR R3 R0 K1
|
|
||||||
0x940C0602, // 000C GETIDX R3 R3 R2
|
|
||||||
0x80040600, // 000D RET 1 R3
|
|
||||||
0x00080503, // 000E ADD R2 R2 K3
|
|
||||||
0x7001FFF0, // 000F JMP #0001
|
|
||||||
0x80000000, // 0010 RET 0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: attribute_updated
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_IM_Subscription_Shop_attribute_updated, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
8, /* nstack */
|
|
||||||
3, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 4]) { /* constants */
|
|
||||||
/* K0 */ be_const_int(0),
|
|
||||||
/* K1 */ be_nested_str_weak(subs),
|
|
||||||
/* K2 */ be_nested_str_weak(attribute_updated),
|
|
||||||
/* K3 */ be_const_int(1),
|
|
||||||
}),
|
|
||||||
be_str_weak(attribute_updated),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[15]) { /* code */
|
|
||||||
0x580C0000, // 0000 LDCONST R3 K0
|
|
||||||
0x6010000C, // 0001 GETGBL R4 G12
|
|
||||||
0x88140101, // 0002 GETMBR R5 R0 K1
|
|
||||||
0x7C100200, // 0003 CALL R4 1
|
|
||||||
0x14100604, // 0004 LT R4 R3 R4
|
|
||||||
0x78120007, // 0005 JMPF R4 #000E
|
|
||||||
0x88100101, // 0006 GETMBR R4 R0 K1
|
|
||||||
0x94100803, // 0007 GETIDX R4 R4 R3
|
|
||||||
0x8C100902, // 0008 GETMET R4 R4 K2
|
|
||||||
0x5C180200, // 0009 MOVE R6 R1
|
|
||||||
0x5C1C0400, // 000A MOVE R7 R2
|
|
||||||
0x7C100600, // 000B CALL R4 3
|
|
||||||
0x000C0703, // 000C ADD R3 R3 K3
|
|
||||||
0x7001FFF2, // 000D JMP #0001
|
|
||||||
0x80000000, // 000E RET 0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: Matter_IM_Subscription_Shop
|
** Solidified class: Matter_IM_Subscription_Shop
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_class(Matter_IM_Subscription_Shop,
|
be_local_class(Matter_IM_Subscription_Shop,
|
||||||
2,
|
2,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(8,
|
be_nested_map(9,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_IM_Subscription_Shop_attribute_updated_closure) },
|
|
||||||
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_IM_Subscription_Shop_every_second_closure) },
|
|
||||||
{ be_const_key_weak(subs, -1), be_const_var(0) },
|
|
||||||
{ be_const_key_weak(init, 5), be_const_closure(Matter_IM_Subscription_Shop_init_closure) },
|
|
||||||
{ be_const_key_weak(remove_by_session, -1), be_const_closure(Matter_IM_Subscription_Shop_remove_by_session_closure) },
|
|
||||||
{ be_const_key_weak(im, 6), be_const_var(1) },
|
|
||||||
{ be_const_key_weak(get_by_id, -1), be_const_closure(Matter_IM_Subscription_Shop_get_by_id_closure) },
|
{ be_const_key_weak(get_by_id, -1), be_const_closure(Matter_IM_Subscription_Shop_get_by_id_closure) },
|
||||||
{ be_const_key_weak(new_subscription, 0), be_const_closure(Matter_IM_Subscription_Shop_new_subscription_closure) },
|
{ be_const_key_weak(attribute_updated_ctx, -1), be_const_closure(Matter_IM_Subscription_Shop_attribute_updated_ctx_closure) },
|
||||||
|
{ be_const_key_weak(every_250ms, -1), be_const_closure(Matter_IM_Subscription_Shop_every_250ms_closure) },
|
||||||
|
{ be_const_key_weak(remove_sub, 1), be_const_closure(Matter_IM_Subscription_Shop_remove_sub_closure) },
|
||||||
|
{ be_const_key_weak(new_subscription, 3), be_const_closure(Matter_IM_Subscription_Shop_new_subscription_closure) },
|
||||||
|
{ be_const_key_weak(subs, -1), be_const_var(0) },
|
||||||
|
{ be_const_key_weak(im, 7), be_const_var(1) },
|
||||||
|
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_Subscription_Shop_init_closure) },
|
||||||
|
{ be_const_key_weak(remove_by_session, -1), be_const_closure(Matter_IM_Subscription_Shop_remove_by_session_closure) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_IM_Subscription_Shop)
|
be_str_weak(Matter_IM_Subscription_Shop)
|
||||||
);
|
);
|
||||||
|
|
|
@ -313,7 +313,7 @@ be_local_closure(Matter_Frame_build_standalone_ack, /* name */
|
||||||
}),
|
}),
|
||||||
be_str_weak(build_standalone_ack),
|
be_str_weak(build_standalone_ack),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[49]) { /* code */
|
( &(const binstruction[54]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0x60080006, // 0001 GETGBL R2 G6
|
0x60080006, // 0001 GETGBL R2 G6
|
||||||
0x5C0C0000, // 0002 MOVE R3 R0
|
0x5C0C0000, // 0002 MOVE R3 R0
|
||||||
|
@ -341,28 +341,33 @@ be_local_closure(Matter_Frame_build_standalone_ack, /* name */
|
||||||
0x880C010A, // 0018 GETMBR R3 R0 K10
|
0x880C010A, // 0018 GETMBR R3 R0 K10
|
||||||
0x880C070F, // 0019 GETMBR R3 R3 K15
|
0x880C070F, // 0019 GETMBR R3 R3 K15
|
||||||
0x900A1C03, // 001A SETMBR R2 K14 R3
|
0x900A1C03, // 001A SETMBR R2 K14 R3
|
||||||
0x900A2109, // 001B SETMBR R2 K16 K9
|
0x880C0110, // 001B GETMBR R3 R0 K16
|
||||||
0x540E000F, // 001C LDINT R3 16
|
0x780E0001, // 001C JMPF R3 #001F
|
||||||
0x900A2203, // 001D SETMBR R2 K17 R3
|
0x580C0009, // 001D LDCONST R3 K9
|
||||||
0x880C0112, // 001E GETMBR R3 R0 K18
|
0x70020000, // 001E JMP #0020
|
||||||
0x900A2403, // 001F SETMBR R2 K18 R3
|
0x580C0006, // 001F LDCONST R3 K6
|
||||||
0x900A2709, // 0020 SETMBR R2 K19 K9
|
0x900A2003, // 0020 SETMBR R2 K16 R3
|
||||||
0x900A2906, // 0021 SETMBR R2 K20 K6
|
0x540E000F, // 0021 LDINT R3 16
|
||||||
0x880C010B, // 0022 GETMBR R3 R0 K11
|
0x900A2203, // 0022 SETMBR R2 K17 R3
|
||||||
0x900A2A03, // 0023 SETMBR R2 K21 R3
|
0x880C0112, // 0023 GETMBR R3 R0 K18
|
||||||
0x900A2D06, // 0024 SETMBR R2 K22 K6
|
0x900A2403, // 0024 SETMBR R2 K18 R3
|
||||||
0xB80E2E00, // 0025 GETNGBL R3 K23
|
0x900A2709, // 0025 SETMBR R2 K19 K9
|
||||||
0x8C0C0718, // 0026 GETMET R3 R3 K24
|
0x900A2906, // 0026 SETMBR R2 K20 K6
|
||||||
0x8C140319, // 0027 GETMET R5 R1 K25
|
0x880C010B, // 0027 GETMBR R3 R0 K11
|
||||||
0x581C001A, // 0028 LDCONST R7 K26
|
0x900A2A03, // 0028 SETMBR R2 K21 R3
|
||||||
0xB8223600, // 0029 GETNGBL R8 K27
|
0x900A2D06, // 0029 SETMBR R2 K22 K6
|
||||||
0x8C20111C, // 002A GETMET R8 R8 K28
|
0xB80E2E00, // 002A GETNGBL R3 K23
|
||||||
0x88280511, // 002B GETMBR R10 R2 K17
|
0x8C0C0718, // 002B GETMET R3 R3 K24
|
||||||
0x7C200400, // 002C CALL R8 2
|
0x8C140319, // 002C GETMET R5 R1 K25
|
||||||
0x7C140600, // 002D CALL R5 3
|
0x581C001A, // 002D LDCONST R7 K26
|
||||||
0x5818001D, // 002E LDCONST R6 K29
|
0xB8223600, // 002E GETNGBL R8 K27
|
||||||
0x7C0C0600, // 002F CALL R3 3
|
0x8C20111C, // 002F GETMET R8 R8 K28
|
||||||
0x80040400, // 0030 RET 1 R2
|
0x88280511, // 0030 GETMBR R10 R2 K17
|
||||||
|
0x7C200400, // 0031 CALL R8 2
|
||||||
|
0x7C140600, // 0032 CALL R5 3
|
||||||
|
0x5818001D, // 0033 LDCONST R6 K29
|
||||||
|
0x7C0C0600, // 0034 CALL R3 3
|
||||||
|
0x80040400, // 0035 RET 1 R2
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -418,7 +423,7 @@ be_local_closure(Matter_Frame_build_response, /* name */
|
||||||
}),
|
}),
|
||||||
be_str_weak(build_response),
|
be_str_weak(build_response),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[86]) { /* code */
|
( &(const binstruction[91]) { /* code */
|
||||||
0xA4120000, // 0000 IMPORT R4 K0
|
0xA4120000, // 0000 IMPORT R4 K0
|
||||||
0x4C140000, // 0001 LDNIL R5
|
0x4C140000, // 0001 LDNIL R5
|
||||||
0x1C140605, // 0002 EQ R5 R3 R5
|
0x1C140605, // 0002 EQ R5 R3 R5
|
||||||
|
@ -466,45 +471,50 @@ be_local_closure(Matter_Frame_build_response, /* name */
|
||||||
0x7C140200, // 002C CALL R5 1
|
0x7C140200, // 002C CALL R5 1
|
||||||
0x900E1A05, // 002D SETMBR R3 K13 R5
|
0x900E1A05, // 002D SETMBR R3 K13 R5
|
||||||
0x900E1709, // 002E SETMBR R3 K11 K9
|
0x900E1709, // 002E SETMBR R3 K11 K9
|
||||||
0x900E2309, // 002F SETMBR R3 K17 K9
|
0x88140111, // 002F GETMBR R5 R0 K17
|
||||||
0x900E2401, // 0030 SETMBR R3 K18 R1
|
0x78160001, // 0030 JMPF R5 #0033
|
||||||
0x88140113, // 0031 GETMBR R5 R0 K19
|
0x58140009, // 0031 LDCONST R5 K9
|
||||||
0x900E2605, // 0032 SETMBR R3 K19 R5
|
0x70020000, // 0032 JMP #0034
|
||||||
0x88140114, // 0033 GETMBR R5 R0 K20
|
0x58140006, // 0033 LDCONST R5 K6
|
||||||
0x900E2805, // 0034 SETMBR R3 K20 R5
|
0x900E2205, // 0034 SETMBR R3 K17 R5
|
||||||
0x88140115, // 0035 GETMBR R5 R0 K21
|
0x900E2401, // 0035 SETMBR R3 K18 R1
|
||||||
0x78160002, // 0036 JMPF R5 #003A
|
0x88140113, // 0036 GETMBR R5 R0 K19
|
||||||
0x900E2D06, // 0037 SETMBR R3 K22 K6
|
0x900E2605, // 0037 SETMBR R3 K19 R5
|
||||||
0x8814010D, // 0038 GETMBR R5 R0 K13
|
0x88140114, // 0038 GETMBR R5 R0 K20
|
||||||
0x900E2E05, // 0039 SETMBR R3 K23 R5
|
0x900E2805, // 0039 SETMBR R3 K20 R5
|
||||||
0x780A0001, // 003A JMPF R2 #003D
|
0x88140115, // 003A GETMBR R5 R0 K21
|
||||||
0x58140006, // 003B LDCONST R5 K6
|
0x78160002, // 003B JMPF R5 #003F
|
||||||
0x70020000, // 003C JMP #003E
|
0x900E2D06, // 003C SETMBR R3 K22 K6
|
||||||
0x58140009, // 003D LDCONST R5 K9
|
0x8814010D, // 003D GETMBR R5 R0 K13
|
||||||
0x900E2A05, // 003E SETMBR R3 K21 R5
|
0x900E2E05, // 003E SETMBR R3 K23 R5
|
||||||
0x8814070B, // 003F GETMBR R5 R3 K11
|
0x780A0001, // 003F JMPF R2 #0042
|
||||||
0x1C140B09, // 0040 EQ R5 R5 K9
|
0x58140006, // 0040 LDCONST R5 K6
|
||||||
0x78160012, // 0041 JMPF R5 #0055
|
0x70020000, // 0041 JMP #0043
|
||||||
0xB8163000, // 0042 GETNGBL R5 K24
|
0x58140009, // 0042 LDCONST R5 K9
|
||||||
0x8C140B19, // 0043 GETMET R5 R5 K25
|
0x900E2A05, // 0043 SETMBR R3 K21 R5
|
||||||
0x881C0712, // 0044 GETMBR R7 R3 K18
|
0x8814070B, // 0044 GETMBR R5 R3 K11
|
||||||
0x7C140400, // 0045 CALL R5 2
|
0x1C140B09, // 0045 EQ R5 R5 K9
|
||||||
0x5C180A00, // 0046 MOVE R6 R5
|
0x78160012, // 0046 JMPF R5 #005A
|
||||||
0x741A0004, // 0047 JMPT R6 #004D
|
0xB8163000, // 0047 GETNGBL R5 K24
|
||||||
0x8C18091A, // 0048 GETMET R6 R4 K26
|
0x8C140B19, // 0048 GETMET R5 R5 K25
|
||||||
0x5820001B, // 0049 LDCONST R8 K27
|
0x881C0712, // 0049 GETMBR R7 R3 K18
|
||||||
0x88240712, // 004A GETMBR R9 R3 K18
|
0x7C140400, // 004A CALL R5 2
|
||||||
0x7C180600, // 004B CALL R6 3
|
0x5C180A00, // 004B MOVE R6 R5
|
||||||
0x5C140C00, // 004C MOVE R5 R6
|
0x741A0004, // 004C JMPT R6 #0052
|
||||||
0xB81A3800, // 004D GETNGBL R6 K28
|
0x8C18091A, // 004D GETMET R6 R4 K26
|
||||||
0x8C180D1D, // 004E GETMET R6 R6 K29
|
0x5820001B, // 004E LDCONST R8 K27
|
||||||
0x8C20091A, // 004F GETMET R8 R4 K26
|
0x88240712, // 004F GETMBR R9 R3 K18
|
||||||
0x5828001E, // 0050 LDCONST R10 K30
|
0x7C180600, // 0050 CALL R6 3
|
||||||
0x5C2C0A00, // 0051 MOVE R11 R5
|
0x5C140C00, // 0051 MOVE R5 R6
|
||||||
0x7C200600, // 0052 CALL R8 3
|
0xB81A3800, // 0052 GETNGBL R6 K28
|
||||||
0x5824001F, // 0053 LDCONST R9 K31
|
0x8C180D1D, // 0053 GETMET R6 R6 K29
|
||||||
0x7C180600, // 0054 CALL R6 3
|
0x8C20091A, // 0054 GETMET R8 R4 K26
|
||||||
0x80040600, // 0055 RET 1 R3
|
0x5828001E, // 0055 LDCONST R10 K30
|
||||||
|
0x5C2C0A00, // 0056 MOVE R11 R5
|
||||||
|
0x7C200600, // 0057 CALL R8 3
|
||||||
|
0x5824001F, // 0058 LDCONST R9 K31
|
||||||
|
0x7C180600, // 0059 CALL R6 3
|
||||||
|
0x80040600, // 005A RET 1 R3
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -552,7 +562,7 @@ be_local_closure(Matter_Frame_initiate_response, /* name */
|
||||||
}),
|
}),
|
||||||
be_str_weak(initiate_response),
|
be_str_weak(initiate_response),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[46]) { /* code */
|
( &(const binstruction[48]) { /* code */
|
||||||
0x58140000, // 0000 LDCONST R5 K0
|
0x58140000, // 0000 LDCONST R5 K0
|
||||||
0xA41A0200, // 0001 IMPORT R6 K1
|
0xA41A0200, // 0001 IMPORT R6 K1
|
||||||
0x4C1C0000, // 0002 LDNIL R7
|
0x4C1C0000, // 0002 LDNIL R7
|
||||||
|
@ -591,14 +601,16 @@ be_local_closure(Matter_Frame_initiate_response, /* name */
|
||||||
0x001C0F12, // 0023 ADD R7 R7 K18
|
0x001C0F12, // 0023 ADD R7 R7 K18
|
||||||
0x90062807, // 0024 SETMBR R1 K20 R7
|
0x90062807, // 0024 SETMBR R1 K20 R7
|
||||||
0x881C0314, // 0025 GETMBR R7 R1 K20
|
0x881C0314, // 0025 GETMBR R7 R1 K20
|
||||||
0x90122A07, // 0026 SETMBR R4 K21 R7
|
0x5422FFFF, // 0026 LDINT R8 65536
|
||||||
0x90122D12, // 0027 SETMBR R4 K22 K18
|
0x301C0E08, // 0027 OR R7 R7 R8
|
||||||
0x780E0001, // 0028 JMPF R3 #002B
|
0x90122A07, // 0028 SETMBR R4 K21 R7
|
||||||
0x581C0012, // 0029 LDCONST R7 K18
|
0x90122D12, // 0029 SETMBR R4 K22 K18
|
||||||
0x70020000, // 002A JMP #002C
|
0x780E0001, // 002A JMPF R3 #002D
|
||||||
0x581C0009, // 002B LDCONST R7 K9
|
0x581C0012, // 002B LDCONST R7 K18
|
||||||
0x90122E07, // 002C SETMBR R4 K23 R7
|
0x70020000, // 002C JMP #002E
|
||||||
0x80040800, // 002D RET 1 R4
|
0x581C0009, // 002D LDCONST R7 K9
|
||||||
|
0x90122E07, // 002E SETMBR R4 K23 R7
|
||||||
|
0x80040800, // 002F RET 1 R4
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -818,7 +830,7 @@ be_local_closure(Matter_Frame_encode, /* name */
|
||||||
}),
|
}),
|
||||||
be_str_weak(encode),
|
be_str_weak(encode),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[144]) { /* code */
|
( &(const binstruction[146]) { /* code */
|
||||||
0x60080015, // 0000 GETGBL R2 G21
|
0x60080015, // 0000 GETGBL R2 G21
|
||||||
0x7C080000, // 0001 CALL R2 0
|
0x7C080000, // 0001 CALL R2 0
|
||||||
0x880C0100, // 0002 GETMBR R3 R0 K0
|
0x880C0100, // 0002 GETMBR R3 R0 K0
|
||||||
|
@ -940,29 +952,31 @@ be_local_closure(Matter_Frame_encode, /* name */
|
||||||
0x7C0C0600, // 0076 CALL R3 3
|
0x7C0C0600, // 0076 CALL R3 3
|
||||||
0x8C0C0505, // 0077 GETMET R3 R2 K5
|
0x8C0C0505, // 0077 GETMET R3 R2 K5
|
||||||
0x88140118, // 0078 GETMBR R5 R0 K24
|
0x88140118, // 0078 GETMBR R5 R0 K24
|
||||||
0x58180008, // 0079 LDCONST R6 K8
|
0x541AFFFE, // 0079 LDINT R6 65535
|
||||||
0x7C0C0600, // 007A CALL R3 3
|
0x2C140A06, // 007A AND R5 R5 R6
|
||||||
0x8C0C0505, // 007B GETMET R3 R2 K5
|
0x58180008, // 007B LDCONST R6 K8
|
||||||
0x88140119, // 007C GETMBR R5 R0 K25
|
0x7C0C0600, // 007C CALL R3 3
|
||||||
0x58180008, // 007D LDCONST R6 K8
|
0x8C0C0505, // 007D GETMET R3 R2 K5
|
||||||
0x7C0C0600, // 007E CALL R3 3
|
0x88140119, // 007E GETMBR R5 R0 K25
|
||||||
0x880C0115, // 007F GETMBR R3 R0 K21
|
0x58180008, // 007F LDCONST R6 K8
|
||||||
0x780E0003, // 0080 JMPF R3 #0085
|
0x7C0C0600, // 0080 CALL R3 3
|
||||||
0x8C0C0505, // 0081 GETMET R3 R2 K5
|
0x880C0115, // 0081 GETMBR R3 R0 K21
|
||||||
0x8814011A, // 0082 GETMBR R5 R0 K26
|
0x780E0003, // 0082 JMPF R3 #0087
|
||||||
0x541A0003, // 0083 LDINT R6 4
|
0x8C0C0505, // 0083 GETMET R3 R2 K5
|
||||||
0x7C0C0600, // 0084 CALL R3 3
|
0x8814011A, // 0084 GETMBR R5 R0 K26
|
||||||
0x600C000C, // 0085 GETGBL R3 G12
|
0x541A0003, // 0085 LDINT R6 4
|
||||||
0x5C100400, // 0086 MOVE R4 R2
|
0x7C0C0600, // 0086 CALL R3 3
|
||||||
0x7C0C0200, // 0087 CALL R3 1
|
0x600C000C, // 0087 GETGBL R3 G12
|
||||||
0x90023603, // 0088 SETMBR R0 K27 R3
|
0x5C100400, // 0088 MOVE R4 R2
|
||||||
0x78060000, // 0089 JMPF R1 #008B
|
0x7C0C0200, // 0089 CALL R3 1
|
||||||
0x400C0401, // 008A CONNECT R3 R2 R1
|
0x90023603, // 008A SETMBR R0 K27 R3
|
||||||
0x8C0C011C, // 008B GETMET R3 R0 K28
|
0x78060000, // 008B JMPF R1 #008D
|
||||||
0x5C140400, // 008C MOVE R5 R2
|
0x400C0401, // 008C CONNECT R3 R2 R1
|
||||||
0x7C0C0400, // 008D CALL R3 2
|
0x8C0C011C, // 008D GETMET R3 R0 K28
|
||||||
0x90023A02, // 008E SETMBR R0 K29 R2
|
0x5C140400, // 008E MOVE R5 R2
|
||||||
0x80040400, // 008F RET 1 R2
|
0x7C0C0400, // 008F CALL R3 2
|
||||||
|
0x90023A02, // 0090 SETMBR R0 K29 R2
|
||||||
|
0x80040400, // 0091 RET 1 R2
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -1005,7 +1019,7 @@ be_local_closure(Matter_Frame_decode_payload, /* name */
|
||||||
}),
|
}),
|
||||||
be_str_weak(decode_payload),
|
be_str_weak(decode_payload),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[87]) { /* code */
|
( &(const binstruction[93]) { /* code */
|
||||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||||
0x8C0C0503, // 0002 GETMET R3 R2 K3
|
0x8C0C0503, // 0002 GETMET R3 R2 K3
|
||||||
|
@ -1058,41 +1072,47 @@ be_local_closure(Matter_Frame_decode_payload, /* name */
|
||||||
0x5818000A, // 0031 LDCONST R6 K10
|
0x5818000A, // 0031 LDCONST R6 K10
|
||||||
0x7C0C0600, // 0032 CALL R3 3
|
0x7C0C0600, // 0032 CALL R3 3
|
||||||
0x90021C03, // 0033 SETMBR R0 K14 R3
|
0x90021C03, // 0033 SETMBR R0 K14 R3
|
||||||
0x8C0C0503, // 0034 GETMET R3 R2 K3
|
0x880C010C, // 0034 GETMBR R3 R0 K12
|
||||||
0x54160003, // 0035 LDINT R5 4
|
0x740E0003, // 0035 JMPT R3 #003A
|
||||||
0x00140205, // 0036 ADD R5 R1 R5
|
0x880C010E, // 0036 GETMBR R3 R0 K14
|
||||||
0x5818000A, // 0037 LDCONST R6 K10
|
0x5412FFFF, // 0037 LDINT R4 65536
|
||||||
0x7C0C0600, // 0038 CALL R3 3
|
0x300C0604, // 0038 OR R3 R3 R4
|
||||||
0x90021E03, // 0039 SETMBR R0 K15 R3
|
0x90021C03, // 0039 SETMBR R0 K14 R3
|
||||||
0x540E0005, // 003A LDINT R3 6
|
0x8C0C0503, // 003A GETMET R3 R2 K3
|
||||||
0x00040203, // 003B ADD R1 R1 R3
|
0x54160003, // 003B LDINT R5 4
|
||||||
0x880C0105, // 003C GETMBR R3 R0 K5
|
0x00140205, // 003C ADD R5 R1 R5
|
||||||
0x780E0005, // 003D JMPF R3 #0044
|
0x5818000A, // 003D LDCONST R6 K10
|
||||||
0x8C0C0503, // 003E GETMET R3 R2 K3
|
0x7C0C0600, // 003E CALL R3 3
|
||||||
0x5C140200, // 003F MOVE R5 R1
|
0x90021E03, // 003F SETMBR R0 K15 R3
|
||||||
0x5818000A, // 0040 LDCONST R6 K10
|
0x540E0005, // 0040 LDINT R3 6
|
||||||
0x7C0C0600, // 0041 CALL R3 3
|
0x00040203, // 0041 ADD R1 R1 R3
|
||||||
0x90022003, // 0042 SETMBR R0 K16 R3
|
0x880C0105, // 0042 GETMBR R3 R0 K5
|
||||||
0x0004030A, // 0043 ADD R1 R1 K10
|
0x780E0005, // 0043 JMPF R3 #004A
|
||||||
0x880C010B, // 0044 GETMBR R3 R0 K11
|
0x8C0C0503, // 0044 GETMET R3 R2 K3
|
||||||
0x780E0006, // 0045 JMPF R3 #004D
|
0x5C140200, // 0045 MOVE R5 R1
|
||||||
0x8C0C0503, // 0046 GETMET R3 R2 K3
|
0x5818000A, // 0046 LDCONST R6 K10
|
||||||
0x5C140200, // 0047 MOVE R5 R1
|
0x7C0C0600, // 0047 CALL R3 3
|
||||||
0x541A0003, // 0048 LDINT R6 4
|
0x90022003, // 0048 SETMBR R0 K16 R3
|
||||||
0x7C0C0600, // 0049 CALL R3 3
|
0x0004030A, // 0049 ADD R1 R1 K10
|
||||||
0x90022203, // 004A SETMBR R0 K17 R3
|
0x880C010B, // 004A GETMBR R3 R0 K11
|
||||||
0x540E0003, // 004B LDINT R3 4
|
0x780E0006, // 004B JMPF R3 #0053
|
||||||
0x00040203, // 004C ADD R1 R1 R3
|
0x8C0C0503, // 004C GETMET R3 R2 K3
|
||||||
0x880C0107, // 004D GETMBR R3 R0 K7
|
0x5C140200, // 004D MOVE R5 R1
|
||||||
0x780E0005, // 004E JMPF R3 #0055
|
0x541A0003, // 004E LDINT R6 4
|
||||||
0x8C0C0503, // 004F GETMET R3 R2 K3
|
0x7C0C0600, // 004F CALL R3 3
|
||||||
0x5C140200, // 0050 MOVE R5 R1
|
0x90022203, // 0050 SETMBR R0 K17 R3
|
||||||
0x5818000A, // 0051 LDCONST R6 K10
|
0x540E0003, // 0051 LDINT R3 4
|
||||||
0x7C0C0600, // 0052 CALL R3 3
|
0x00040203, // 0052 ADD R1 R1 R3
|
||||||
0x0010070A, // 0053 ADD R4 R3 K10
|
0x880C0107, // 0053 GETMBR R3 R0 K7
|
||||||
0x00040204, // 0054 ADD R1 R1 R4
|
0x780E0005, // 0054 JMPF R3 #005B
|
||||||
0x90022401, // 0055 SETMBR R0 K18 R1
|
0x8C0C0503, // 0055 GETMET R3 R2 K3
|
||||||
0x80040000, // 0056 RET 1 R0
|
0x5C140200, // 0056 MOVE R5 R1
|
||||||
|
0x5818000A, // 0057 LDCONST R6 K10
|
||||||
|
0x7C0C0600, // 0058 CALL R3 3
|
||||||
|
0x0010070A, // 0059 ADD R4 R3 K10
|
||||||
|
0x00040204, // 005A ADD R1 R1 R4
|
||||||
|
0x90022401, // 005B SETMBR R0 K18 R1
|
||||||
|
0x80040000, // 005C RET 1 R0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,12 +7,12 @@
|
||||||
extern const bclass be_class_Matter_Plugin;
|
extern const bclass be_class_Matter_Plugin;
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: read_event
|
** Solidified function: read_attribute
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_Plugin_read_event, /* name */
|
be_local_closure(Matter_Plugin_read_attribute, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
6, /* nstack */
|
4, /* nstack */
|
||||||
5, /* argc */
|
3, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
|
@ -20,11 +20,45 @@ be_local_closure(Matter_Plugin_read_event, /* name */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
0, /* has constants */
|
0, /* has constants */
|
||||||
NULL, /* no const */
|
NULL, /* no const */
|
||||||
be_str_weak(read_event),
|
be_str_weak(read_attribute),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 2]) { /* code */
|
( &(const binstruction[ 2]) { /* code */
|
||||||
0x4C140000, // 0000 LDNIL R5
|
0x4C0C0000, // 0000 LDNIL R3
|
||||||
0x80040A00, // 0001 RET 1 R5
|
0x80040600, // 0001 RET 1 R3
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: attribute_updated
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_Plugin_attribute_updated, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
11, /* nstack */
|
||||||
|
5, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(device),
|
||||||
|
/* K1 */ be_nested_str_weak(attribute_updated),
|
||||||
|
}),
|
||||||
|
be_str_weak(attribute_updated),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 8]) { /* code */
|
||||||
|
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||||
|
0x8C140B01, // 0001 GETMET R5 R5 K1
|
||||||
|
0x5C1C0200, // 0002 MOVE R7 R1
|
||||||
|
0x5C200400, // 0003 MOVE R8 R2
|
||||||
|
0x5C240600, // 0004 MOVE R9 R3
|
||||||
|
0x5C280800, // 0005 MOVE R10 R4
|
||||||
|
0x7C140A00, // 0006 CALL R5 5
|
||||||
|
0x80000000, // 0007 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -66,75 +100,24 @@ be_local_closure(Matter_Plugin_init, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: has
|
** Solidified function: subscribe_attribute
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_Plugin_has, /* name */
|
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
6, /* nstack */
|
6, /* nstack */
|
||||||
3, /* argc */
|
5, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
0, /* has constants */
|
||||||
( &(const bvalue[ 4]) { /* constants */
|
NULL, /* no const */
|
||||||
/* K0 */ be_nested_str_weak(clusters),
|
be_str_weak(subscribe_attribute),
|
||||||
/* K1 */ be_nested_str_weak(contains),
|
|
||||||
/* K2 */ be_nested_str_weak(endpoints),
|
|
||||||
/* K3 */ be_nested_str_weak(find),
|
|
||||||
}),
|
|
||||||
be_str_weak(has),
|
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[15]) { /* code */
|
( &(const binstruction[ 2]) { /* code */
|
||||||
0x880C0100, // 0000 GETMBR R3 R0 K0
|
0x4C140000, // 0000 LDNIL R5
|
||||||
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
0x80040A00, // 0001 RET 1 R5
|
||||||
0x5C140200, // 0002 MOVE R5 R1
|
|
||||||
0x7C0C0400, // 0003 CALL R3 2
|
|
||||||
0x780E0006, // 0004 JMPF R3 #000C
|
|
||||||
0x880C0102, // 0005 GETMBR R3 R0 K2
|
|
||||||
0x8C0C0703, // 0006 GETMET R3 R3 K3
|
|
||||||
0x5C140400, // 0007 MOVE R5 R2
|
|
||||||
0x7C0C0400, // 0008 CALL R3 2
|
|
||||||
0x4C100000, // 0009 LDNIL R4
|
|
||||||
0x200C0604, // 000A NE R3 R3 R4
|
|
||||||
0x740E0000, // 000B JMPT R3 #000D
|
|
||||||
0x500C0001, // 000C LDBOOL R3 0 1
|
|
||||||
0x500C0200, // 000D LDBOOL R3 1 0
|
|
||||||
0x80040600, // 000E RET 1 R3
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: get_attribute_list
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_Plugin_get_attribute_list, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
7, /* nstack */
|
|
||||||
3, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 3]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(clusters),
|
|
||||||
/* K1 */ be_nested_str_weak(find),
|
|
||||||
/* K2 */ be_nested_str_weak(EMPTY_LIST),
|
|
||||||
}),
|
|
||||||
be_str_weak(get_attribute_list),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 6]) { /* code */
|
|
||||||
0x880C0100, // 0000 GETMBR R3 R0 K0
|
|
||||||
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
|
||||||
0x5C140400, // 0002 MOVE R5 R2
|
|
||||||
0x88180102, // 0003 GETMBR R6 R0 K2
|
|
||||||
0x7C0C0600, // 0004 CALL R3 3
|
|
||||||
0x80040600, // 0005 RET 1 R3
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -187,81 +170,6 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: invoke_request
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_Plugin_invoke_request, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
5, /* nstack */
|
|
||||||
4, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
0, /* has constants */
|
|
||||||
NULL, /* no const */
|
|
||||||
be_str_weak(invoke_request),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 2]) { /* code */
|
|
||||||
0x4C100000, // 0000 LDNIL R4
|
|
||||||
0x80040800, // 0001 RET 1 R4
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: read_attribute
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_Plugin_read_attribute, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
4, /* nstack */
|
|
||||||
3, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
0, /* has constants */
|
|
||||||
NULL, /* no const */
|
|
||||||
be_str_weak(read_attribute),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 2]) { /* code */
|
|
||||||
0x4C0C0000, // 0000 LDNIL R3
|
|
||||||
0x80040600, // 0001 RET 1 R3
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: subscribe_event
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_Plugin_subscribe_event, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
6, /* nstack */
|
|
||||||
5, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
0, /* has constants */
|
|
||||||
NULL, /* no const */
|
|
||||||
be_str_weak(subscribe_event),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 2]) { /* code */
|
|
||||||
0x4C140000, // 0000 LDNIL R5
|
|
||||||
0x80040A00, // 0001 RET 1 R5
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: get_cluster_map
|
** Solidified function: get_cluster_map
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -289,6 +197,31 @@ be_local_closure(Matter_Plugin_get_cluster_map, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: invoke_request
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_Plugin_invoke_request, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
5, /* nstack */
|
||||||
|
4, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
0, /* has constants */
|
||||||
|
NULL, /* no const */
|
||||||
|
be_str_weak(invoke_request),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 2]) { /* code */
|
||||||
|
0x4C100000, // 0000 LDNIL R4
|
||||||
|
0x80040800, // 0001 RET 1 R4
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: get_endpoints
|
** Solidified function: get_endpoints
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -316,6 +249,31 @@ be_local_closure(Matter_Plugin_get_endpoints, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: subscribe_event
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_Plugin_subscribe_event, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
5, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
0, /* has constants */
|
||||||
|
NULL, /* no const */
|
||||||
|
be_str_weak(subscribe_event),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 2]) { /* code */
|
||||||
|
0x4C140000, // 0000 LDNIL R5
|
||||||
|
0x80040A00, // 0001 RET 1 R5
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: write_attribute
|
** Solidified function: write_attribute
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -341,6 +299,74 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: has
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_Plugin_has, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
3, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 4]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(clusters),
|
||||||
|
/* K1 */ be_nested_str_weak(contains),
|
||||||
|
/* K2 */ be_nested_str_weak(endpoints),
|
||||||
|
/* K3 */ be_nested_str_weak(find),
|
||||||
|
}),
|
||||||
|
be_str_weak(has),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[15]) { /* code */
|
||||||
|
0x880C0100, // 0000 GETMBR R3 R0 K0
|
||||||
|
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
||||||
|
0x5C140200, // 0002 MOVE R5 R1
|
||||||
|
0x7C0C0400, // 0003 CALL R3 2
|
||||||
|
0x780E0006, // 0004 JMPF R3 #000C
|
||||||
|
0x880C0102, // 0005 GETMBR R3 R0 K2
|
||||||
|
0x8C0C0703, // 0006 GETMET R3 R3 K3
|
||||||
|
0x5C140400, // 0007 MOVE R5 R2
|
||||||
|
0x7C0C0400, // 0008 CALL R3 2
|
||||||
|
0x4C100000, // 0009 LDNIL R4
|
||||||
|
0x200C0604, // 000A NE R3 R3 R4
|
||||||
|
0x740E0000, // 000B JMPT R3 #000D
|
||||||
|
0x500C0001, // 000C LDBOOL R3 0 1
|
||||||
|
0x500C0200, // 000D LDBOOL R3 1 0
|
||||||
|
0x80040600, // 000E RET 1 R3
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: read_event
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_Plugin_read_event, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
5, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
0, /* has constants */
|
||||||
|
NULL, /* no const */
|
||||||
|
be_str_weak(read_event),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 2]) { /* code */
|
||||||
|
0x4C140000, // 0000 LDNIL R5
|
||||||
|
0x80040A00, // 0001 RET 1 R5
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: timed_request
|
** Solidified function: timed_request
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -367,24 +393,32 @@ be_local_closure(Matter_Plugin_timed_request, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: subscribe_attribute
|
** Solidified function: get_attribute_list
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
be_local_closure(Matter_Plugin_get_attribute_list, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
6, /* nstack */
|
7, /* nstack */
|
||||||
5, /* argc */
|
3, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
0, /* has constants */
|
1, /* has constants */
|
||||||
NULL, /* no const */
|
( &(const bvalue[ 3]) { /* constants */
|
||||||
be_str_weak(subscribe_attribute),
|
/* K0 */ be_nested_str_weak(clusters),
|
||||||
|
/* K1 */ be_nested_str_weak(find),
|
||||||
|
/* K2 */ be_nested_str_weak(EMPTY_LIST),
|
||||||
|
}),
|
||||||
|
be_str_weak(get_attribute_list),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[ 2]) { /* code */
|
( &(const binstruction[ 6]) { /* code */
|
||||||
0x4C140000, // 0000 LDNIL R5
|
0x880C0100, // 0000 GETMBR R3 R0 K0
|
||||||
0x80040A00, // 0001 RET 1 R5
|
0x8C0C0701, // 0001 GETMET R3 R3 K1
|
||||||
|
0x5C140400, // 0002 MOVE R5 R2
|
||||||
|
0x88180102, // 0003 GETMBR R6 R0 K2
|
||||||
|
0x7C0C0600, // 0004 CALL R3 3
|
||||||
|
0x80040600, // 0005 RET 1 R3
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -397,32 +431,33 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
|
||||||
be_local_class(Matter_Plugin,
|
be_local_class(Matter_Plugin,
|
||||||
3,
|
3,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(18,
|
be_nested_map(19,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) },
|
|
||||||
{ be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
|
|
||||||
{ be_const_key_weak(endpoints, 1), be_const_var(1) },
|
|
||||||
{ be_const_key_weak(get_attribute_list, 9), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
|
|
||||||
{ be_const_key_weak(device, -1), be_const_var(0) },
|
|
||||||
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
|
|
||||||
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
|
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
|
||||||
{ be_const_key_weak(has, 13), be_const_closure(Matter_Plugin_has_closure) },
|
|
||||||
{ be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
|
|
||||||
{ be_const_key_weak(get_cluster_map, -1), be_const_closure(Matter_Plugin_get_cluster_map_closure) },
|
|
||||||
{ be_const_key_weak(clusters, -1), be_const_var(2) },
|
|
||||||
{ be_const_key_weak(EMPTY_MAP, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
|
||||||
be_const_map( * be_nested_map(0,
|
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
|
||||||
})) ) } )) },
|
|
||||||
{ be_const_key_weak(get_endpoints, -1), be_const_closure(Matter_Plugin_get_endpoints_closure) },
|
|
||||||
{ be_const_key_weak(write_attribute, 2), be_const_closure(Matter_Plugin_write_attribute_closure) },
|
|
||||||
{ be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
|
|
||||||
{ be_const_key_weak(init, 4), be_const_closure(Matter_Plugin_init_closure) },
|
|
||||||
{ be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
|
|
||||||
{ be_const_key_weak(EMPTY_LIST, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
{ be_const_key_weak(EMPTY_LIST, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||||
be_const_list( * be_nested_list(0,
|
be_const_list( * be_nested_list(0,
|
||||||
( (struct bvalue*) &(const bvalue[]) {
|
( (struct bvalue*) &(const bvalue[]) {
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
|
{ be_const_key_weak(clusters, 9), be_const_var(2) },
|
||||||
|
{ be_const_key_weak(get_endpoints, -1), be_const_closure(Matter_Plugin_get_endpoints_closure) },
|
||||||
|
{ be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
|
||||||
|
{ be_const_key_weak(get_cluster_list, 3), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
|
||||||
|
{ be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
|
||||||
|
{ be_const_key_weak(EMPTY_MAP, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||||
|
be_const_map( * be_nested_map(0,
|
||||||
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
|
})) ) } )) },
|
||||||
|
{ be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
|
||||||
|
{ be_const_key_weak(endpoints, 18), be_const_var(1) },
|
||||||
|
{ be_const_key_weak(invoke_request, 7), be_const_closure(Matter_Plugin_invoke_request_closure) },
|
||||||
|
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) },
|
||||||
|
{ be_const_key_weak(attribute_updated, 14), be_const_closure(Matter_Plugin_attribute_updated_closure) },
|
||||||
|
{ be_const_key_weak(init, 2), be_const_closure(Matter_Plugin_init_closure) },
|
||||||
|
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
|
||||||
|
{ be_const_key_weak(device, -1), be_const_var(0) },
|
||||||
|
{ be_const_key_weak(read_event, 6), be_const_closure(Matter_Plugin_read_event_closure) },
|
||||||
|
{ be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
|
||||||
|
{ be_const_key_weak(get_cluster_map, -1), be_const_closure(Matter_Plugin_get_cluster_map_closure) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_Plugin)
|
be_str_weak(Matter_Plugin)
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,12 +6,45 @@
|
||||||
|
|
||||||
extern const bclass be_class_Matter_Plugin_OnOff;
|
extern const bclass be_class_Matter_Plugin_OnOff;
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: onoff_changed
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
7, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 3]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(attribute_updated),
|
||||||
|
/* K1 */ be_nested_str_weak(endpoint),
|
||||||
|
/* K2 */ be_const_int(0),
|
||||||
|
}),
|
||||||
|
be_str_weak(onoff_changed),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 6]) { /* code */
|
||||||
|
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||||
|
0x88100301, // 0001 GETMBR R4 R1 K1
|
||||||
|
0x54160005, // 0002 LDINT R5 6
|
||||||
|
0x58180002, // 0003 LDCONST R6 K2
|
||||||
|
0x7C080800, // 0004 CALL R2 4
|
||||||
|
0x80000000, // 0005 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: invoke_request
|
** Solidified function: invoke_request
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
|
be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
14, /* nstack */
|
13, /* nstack */
|
||||||
4, /* argc */
|
4, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
|
@ -24,88 +57,100 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
|
||||||
/* K1 */ be_nested_str_weak(TLV),
|
/* K1 */ be_nested_str_weak(TLV),
|
||||||
/* K2 */ be_nested_str_weak(cluster),
|
/* K2 */ be_nested_str_weak(cluster),
|
||||||
/* K3 */ be_nested_str_weak(command),
|
/* K3 */ be_nested_str_weak(command),
|
||||||
/* K4 */ be_nested_str_weak(session),
|
/* K4 */ be_const_int(3),
|
||||||
/* K5 */ be_const_int(3),
|
/* K5 */ be_const_int(0),
|
||||||
/* K6 */ be_const_int(0),
|
/* K6 */ be_const_int(1),
|
||||||
/* K7 */ be_const_int(1),
|
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
|
||||||
/* K8 */ be_nested_str_weak(Matter_TLV_struct),
|
/* K8 */ be_nested_str_weak(add_TLV),
|
||||||
/* K9 */ be_nested_str_weak(add_TLV),
|
/* K9 */ be_nested_str_weak(U2),
|
||||||
/* K10 */ be_nested_str_weak(U2),
|
/* K10 */ be_nested_str_weak(onoff),
|
||||||
/* K11 */ be_nested_str_weak(onoff),
|
/* K11 */ be_nested_str_weak(onoff_changed),
|
||||||
/* K12 */ be_const_int(2),
|
/* K12 */ be_const_int(2),
|
||||||
}),
|
}),
|
||||||
be_str_weak(invoke_request),
|
be_str_weak(invoke_request),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[69]) { /* code */
|
( &(const binstruction[81]) { /* code */
|
||||||
0xB8120000, // 0000 GETNGBL R4 K0
|
0xB8120000, // 0000 GETNGBL R4 K0
|
||||||
0x88100901, // 0001 GETMBR R4 R4 K1
|
0x88100901, // 0001 GETMBR R4 R4 K1
|
||||||
0x88140702, // 0002 GETMBR R5 R3 K2
|
0x88140702, // 0002 GETMBR R5 R3 K2
|
||||||
0x88180703, // 0003 GETMBR R6 R3 K3
|
0x88180703, // 0003 GETMBR R6 R3 K3
|
||||||
0x881C0304, // 0004 GETMBR R7 R1 K4
|
0x1C1C0B04, // 0004 EQ R7 R5 K4
|
||||||
0x1C200B05, // 0005 EQ R8 R5 K5
|
0x781E0016, // 0005 JMPF R7 #001D
|
||||||
0x78220016, // 0006 JMPF R8 #001E
|
0x1C1C0D05, // 0006 EQ R7 R6 K5
|
||||||
0x1C200D06, // 0007 EQ R8 R6 K6
|
0x781E0002, // 0007 JMPF R7 #000B
|
||||||
0x78220002, // 0008 JMPF R8 #000C
|
0x501C0200, // 0008 LDBOOL R7 1 0
|
||||||
0x50200200, // 0009 LDBOOL R8 1 0
|
0x80040E00, // 0009 RET 1 R7
|
||||||
0x80041000, // 000A RET 1 R8
|
0x70020010, // 000A JMP #001C
|
||||||
0x70020010, // 000B JMP #001D
|
0x1C1C0D06, // 000B EQ R7 R6 K6
|
||||||
0x1C200D07, // 000C EQ R8 R6 K7
|
0x781E0009, // 000C JMPF R7 #0017
|
||||||
0x78220009, // 000D JMPF R8 #0018
|
0x8C1C0907, // 000D GETMET R7 R4 K7
|
||||||
0x8C200908, // 000E GETMET R8 R4 K8
|
0x7C1C0200, // 000E CALL R7 1
|
||||||
0x7C200200, // 000F CALL R8 1
|
0x8C200F08, // 000F GETMET R8 R7 K8
|
||||||
0x8C241109, // 0010 GETMET R9 R8 K9
|
0x58280005, // 0010 LDCONST R10 K5
|
||||||
0x582C0006, // 0011 LDCONST R11 K6
|
0x882C0909, // 0011 GETMBR R11 R4 K9
|
||||||
0x8830090A, // 0012 GETMBR R12 R4 K10
|
0x58300005, // 0012 LDCONST R12 K5
|
||||||
0x58340006, // 0013 LDCONST R13 K6
|
0x7C200800, // 0013 CALL R8 4
|
||||||
0x7C240800, // 0014 CALL R9 4
|
0x900E0705, // 0014 SETMBR R3 K3 K5
|
||||||
0x900E0706, // 0015 SETMBR R3 K3 K6
|
0x80040E00, // 0015 RET 1 R7
|
||||||
0x80041000, // 0016 RET 1 R8
|
0x70020004, // 0016 JMP #001C
|
||||||
0x70020004, // 0017 JMP #001D
|
0x541E003F, // 0017 LDINT R7 64
|
||||||
0x5422003F, // 0018 LDINT R8 64
|
0x1C1C0C07, // 0018 EQ R7 R6 R7
|
||||||
0x1C200C08, // 0019 EQ R8 R6 R8
|
0x781E0001, // 0019 JMPF R7 #001C
|
||||||
0x78220001, // 001A JMPF R8 #001D
|
0x501C0200, // 001A LDBOOL R7 1 0
|
||||||
0x50200200, // 001B LDBOOL R8 1 0
|
0x80040E00, // 001B RET 1 R7
|
||||||
0x80041000, // 001C RET 1 R8
|
0x70020032, // 001C JMP #0050
|
||||||
0x70020025, // 001D JMP #0044
|
0x541E0003, // 001D LDINT R7 4
|
||||||
0x54220003, // 001E LDINT R8 4
|
0x1C1C0A07, // 001E EQ R7 R5 R7
|
||||||
0x1C200A08, // 001F EQ R8 R5 R8
|
0x781E0002, // 001F JMPF R7 #0023
|
||||||
0x78220002, // 0020 JMPF R8 #0024
|
0x501C0200, // 0020 LDBOOL R7 1 0
|
||||||
0x50200200, // 0021 LDBOOL R8 1 0
|
0x80040E00, // 0021 RET 1 R7
|
||||||
0x80041000, // 0022 RET 1 R8
|
0x7002002C, // 0022 JMP #0050
|
||||||
0x7002001F, // 0023 JMP #0044
|
0x541E0004, // 0023 LDINT R7 5
|
||||||
0x54220004, // 0024 LDINT R8 5
|
0x1C1C0A07, // 0024 EQ R7 R5 R7
|
||||||
0x1C200A08, // 0025 EQ R8 R5 R8
|
0x781E0002, // 0025 JMPF R7 #0029
|
||||||
0x78220002, // 0026 JMPF R8 #002A
|
0x501C0200, // 0026 LDBOOL R7 1 0
|
||||||
0x50200200, // 0027 LDBOOL R8 1 0
|
0x80040E00, // 0027 RET 1 R7
|
||||||
0x80041000, // 0028 RET 1 R8
|
0x70020026, // 0028 JMP #0050
|
||||||
0x70020019, // 0029 JMP #0044
|
0x541E0005, // 0029 LDINT R7 6
|
||||||
0x54220005, // 002A LDINT R8 6
|
0x1C1C0A07, // 002A EQ R7 R5 R7
|
||||||
0x1C200A08, // 002B EQ R8 R5 R8
|
0x781E0023, // 002B JMPF R7 #0050
|
||||||
0x78220016, // 002C JMPF R8 #0044
|
0x1C1C0D05, // 002C EQ R7 R6 K5
|
||||||
0x1C200D06, // 002D EQ R8 R6 K6
|
0x781E0009, // 002D JMPF R7 #0038
|
||||||
0x78220004, // 002E JMPF R8 #0034
|
0x881C010A, // 002E GETMBR R7 R0 K10
|
||||||
0x50200000, // 002F LDBOOL R8 0 0
|
0x781E0002, // 002F JMPF R7 #0033
|
||||||
0x90021608, // 0030 SETMBR R0 K11 R8
|
0x8C1C010B, // 0030 GETMET R7 R0 K11
|
||||||
0x50200200, // 0031 LDBOOL R8 1 0
|
0x5C240600, // 0031 MOVE R9 R3
|
||||||
0x80041000, // 0032 RET 1 R8
|
0x7C1C0400, // 0032 CALL R7 2
|
||||||
0x7002000F, // 0033 JMP #0044
|
0x501C0000, // 0033 LDBOOL R7 0 0
|
||||||
0x1C200D07, // 0034 EQ R8 R6 K7
|
0x90021407, // 0034 SETMBR R0 K10 R7
|
||||||
0x78220004, // 0035 JMPF R8 #003B
|
0x501C0200, // 0035 LDBOOL R7 1 0
|
||||||
0x50200200, // 0036 LDBOOL R8 1 0
|
0x80040E00, // 0036 RET 1 R7
|
||||||
0x90021608, // 0037 SETMBR R0 K11 R8
|
0x70020017, // 0037 JMP #0050
|
||||||
0x50200200, // 0038 LDBOOL R8 1 0
|
0x1C1C0D06, // 0038 EQ R7 R6 K6
|
||||||
0x80041000, // 0039 RET 1 R8
|
0x781E0009, // 0039 JMPF R7 #0044
|
||||||
0x70020008, // 003A JMP #0044
|
0x881C010A, // 003A GETMBR R7 R0 K10
|
||||||
0x1C200D0C, // 003B EQ R8 R6 K12
|
0x741E0002, // 003B JMPT R7 #003F
|
||||||
0x78220006, // 003C JMPF R8 #0044
|
0x8C1C010B, // 003C GETMET R7 R0 K11
|
||||||
0x8820010B, // 003D GETMBR R8 R0 K11
|
0x5C240600, // 003D MOVE R9 R3
|
||||||
0x78220000, // 003E JMPF R8 #0040
|
0x7C1C0400, // 003E CALL R7 2
|
||||||
0x50200001, // 003F LDBOOL R8 0 1
|
0x501C0200, // 003F LDBOOL R7 1 0
|
||||||
0x50200200, // 0040 LDBOOL R8 1 0
|
0x90021407, // 0040 SETMBR R0 K10 R7
|
||||||
0x90021608, // 0041 SETMBR R0 K11 R8
|
0x501C0200, // 0041 LDBOOL R7 1 0
|
||||||
0x50200200, // 0042 LDBOOL R8 1 0
|
0x80040E00, // 0042 RET 1 R7
|
||||||
0x80041000, // 0043 RET 1 R8
|
0x7002000B, // 0043 JMP #0050
|
||||||
0x80000000, // 0044 RET 0
|
0x1C1C0D0C, // 0044 EQ R7 R6 K12
|
||||||
|
0x781E0009, // 0045 JMPF R7 #0050
|
||||||
|
0x8C1C010B, // 0046 GETMET R7 R0 K11
|
||||||
|
0x5C240600, // 0047 MOVE R9 R3
|
||||||
|
0x7C1C0400, // 0048 CALL R7 2
|
||||||
|
0x881C010A, // 0049 GETMBR R7 R0 K10
|
||||||
|
0x781E0000, // 004A JMPF R7 #004C
|
||||||
|
0x501C0001, // 004B LDBOOL R7 0 1
|
||||||
|
0x501C0200, // 004C LDBOOL R7 1 0
|
||||||
|
0x90021407, // 004D SETMBR R0 K10 R7
|
||||||
|
0x501C0200, // 004E LDBOOL R7 1 0
|
||||||
|
0x80040E00, // 004F RET 1 R7
|
||||||
|
0x80000000, // 0050 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -320,17 +365,24 @@ extern const bclass be_class_Matter_Plugin;
|
||||||
be_local_class(Matter_Plugin_OnOff,
|
be_local_class(Matter_Plugin_OnOff,
|
||||||
1,
|
1,
|
||||||
&be_class_Matter_Plugin,
|
&be_class_Matter_Plugin,
|
||||||
be_nested_map(7,
|
be_nested_map(8,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
|
{ be_const_key_weak(read_attribute, 6), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
|
||||||
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
|
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
|
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
|
||||||
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
{ be_const_key_weak(TYPES, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||||
be_const_list( * be_nested_list(1,
|
be_const_list( * be_nested_list(1,
|
||||||
( (struct bvalue*) &(const bvalue[]) {
|
( (struct bvalue*) &(const bvalue[]) {
|
||||||
be_const_int(256),
|
be_const_int(256),
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
{ be_const_key_weak(CLUSTERS, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
|
||||||
|
{ be_const_key_weak(onoff, -1), be_const_var(0) },
|
||||||
|
{ be_const_key_weak(ENDPOINTS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||||
|
be_const_list( * be_nested_list(1,
|
||||||
|
( (struct bvalue*) &(const bvalue[]) {
|
||||||
|
be_const_int(1),
|
||||||
|
})) ) } )) },
|
||||||
|
{ be_const_key_weak(onoff_changed, 7), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
|
||||||
|
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||||
be_const_map( * be_nested_map(5,
|
be_const_map( * be_nested_map(5,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
||||||
|
@ -368,12 +420,6 @@ be_local_class(Matter_Plugin_OnOff,
|
||||||
( (struct bvalue*) &(const bvalue[]) {
|
( (struct bvalue*) &(const bvalue[]) {
|
||||||
be_const_int(0),
|
be_const_int(0),
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
})) ) } )) },
|
|
||||||
{ be_const_key_weak(onoff, 2), be_const_var(0) },
|
|
||||||
{ be_const_key_weak(ENDPOINTS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
|
|
||||||
be_const_list( * be_nested_list(1,
|
|
||||||
( (struct bvalue*) &(const bvalue[]) {
|
|
||||||
be_const_int(1),
|
|
||||||
})) ) } )) },
|
})) ) } )) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_Plugin_OnOff)
|
be_str_weak(Matter_Plugin_OnOff)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -11,7 +11,7 @@ extern const bclass be_class_Matter_UDPPacket_sent;
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_UDPPacket_sent_init, /* name */
|
be_local_closure(Matter_UDPPacket_sent_init, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
7, /* nstack */
|
9, /* nstack */
|
||||||
5, /* argc */
|
5, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
|
@ -25,28 +25,114 @@ be_local_closure(Matter_UDPPacket_sent_init, /* name */
|
||||||
/* K2 */ be_nested_str_weak(port),
|
/* K2 */ be_nested_str_weak(port),
|
||||||
/* K3 */ be_nested_str_weak(msg_id),
|
/* K3 */ be_nested_str_weak(msg_id),
|
||||||
/* K4 */ be_nested_str_weak(retries),
|
/* K4 */ be_nested_str_weak(retries),
|
||||||
/* K5 */ be_nested_str_weak(RETRIES),
|
/* K5 */ be_const_int(0),
|
||||||
/* K6 */ be_nested_str_weak(next_try),
|
/* K6 */ be_nested_str_weak(next_try),
|
||||||
/* K7 */ be_nested_str_weak(tasmota),
|
/* K7 */ be_nested_str_weak(tasmota),
|
||||||
/* K8 */ be_nested_str_weak(millis),
|
/* K8 */ be_nested_str_weak(millis),
|
||||||
/* K9 */ be_nested_str_weak(RETRY_MS),
|
/* K9 */ be_nested_str_weak(backoff_time),
|
||||||
}),
|
}),
|
||||||
be_str_weak(init),
|
be_str_weak(init),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[13]) { /* code */
|
( &(const binstruction[14]) { /* code */
|
||||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||||
0x90020403, // 0002 SETMBR R0 K2 R3
|
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||||
0x90020604, // 0003 SETMBR R0 K3 R4
|
0x90020604, // 0003 SETMBR R0 K3 R4
|
||||||
0x88140105, // 0004 GETMBR R5 R0 K5
|
0x90020905, // 0004 SETMBR R0 K4 K5
|
||||||
0x90020805, // 0005 SETMBR R0 K4 R5
|
0xB8160E00, // 0005 GETNGBL R5 K7
|
||||||
0xB8160E00, // 0006 GETNGBL R5 K7
|
0x8C140B08, // 0006 GETMET R5 R5 K8
|
||||||
0x8C140B08, // 0007 GETMET R5 R5 K8
|
0x7C140200, // 0007 CALL R5 1
|
||||||
|
0x8C180109, // 0008 GETMET R6 R0 K9
|
||||||
|
0x88200104, // 0009 GETMBR R8 R0 K4
|
||||||
|
0x7C180400, // 000A CALL R6 2
|
||||||
|
0x00140A06, // 000B ADD R5 R5 R6
|
||||||
|
0x90020C05, // 000C SETMBR R0 K6 R5
|
||||||
|
0x80000000, // 000D RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: backoff_time
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_UDPPacket_sent_backoff_time, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
10, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
1, /* has sup protos */
|
||||||
|
( &(const struct bproto*[ 1]) {
|
||||||
|
be_nested_proto(
|
||||||
|
4, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
0, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 2]) { /* constants */
|
||||||
|
/* K0 */ be_const_int(1),
|
||||||
|
/* K1 */ be_const_int(0),
|
||||||
|
}),
|
||||||
|
be_str_weak(power_int),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[ 7]) { /* code */
|
||||||
|
0x58080000, // 0000 LDCONST R2 K0
|
||||||
|
0x240C0301, // 0001 GT R3 R1 K1
|
||||||
|
0x780E0002, // 0002 JMPF R3 #0006
|
||||||
|
0x08080400, // 0003 MUL R2 R2 R0
|
||||||
|
0x04040300, // 0004 SUB R1 R1 K0
|
||||||
|
0x7001FFFA, // 0005 JMP #0001
|
||||||
|
0x80040400, // 0006 RET 1 R2
|
||||||
|
})
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 7]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(math),
|
||||||
|
/* K1 */ be_nested_str_weak(rand),
|
||||||
|
/* K2 */ be_const_int(0),
|
||||||
|
/* K3 */ be_const_int(1),
|
||||||
|
/* K4 */ be_const_real_hex(0x3FCCCCCD),
|
||||||
|
/* K5 */ be_const_real_hex(0x3F800000),
|
||||||
|
/* K6 */ be_const_real_hex(0x3E800000),
|
||||||
|
}),
|
||||||
|
be_str_weak(backoff_time),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[28]) { /* code */
|
||||||
|
0x84080000, // 0000 CLOSURE R2 P0
|
||||||
|
0xA40E0000, // 0001 IMPORT R3 K0
|
||||||
|
0x5412012B, // 0002 LDINT R4 300
|
||||||
|
0x6014000A, // 0003 GETGBL R5 G10
|
||||||
|
0x8C180701, // 0004 GETMET R6 R3 K1
|
||||||
|
0x7C180200, // 0005 CALL R6 1
|
||||||
|
0x541E00FE, // 0006 LDINT R7 255
|
||||||
|
0x2C180C07, // 0007 AND R6 R6 R7
|
||||||
0x7C140200, // 0008 CALL R5 1
|
0x7C140200, // 0008 CALL R5 1
|
||||||
0x88180109, // 0009 GETMBR R6 R0 K9
|
0x541A00FE, // 0009 LDINT R6 255
|
||||||
0x00140A06, // 000A ADD R5 R5 R6
|
0x0C140A06, // 000A DIV R5 R5 R6
|
||||||
0x90020C05, // 000B SETMBR R0 K6 R5
|
0x24180302, // 000B GT R6 R1 K2
|
||||||
0x80000000, // 000C RET 0
|
0x781A0001, // 000C JMPF R6 #000F
|
||||||
|
0x04180303, // 000D SUB R6 R1 K3
|
||||||
|
0x70020000, // 000E JMP #0010
|
||||||
|
0x58180002, // 000F LDCONST R6 K2
|
||||||
|
0x5C1C0400, // 0010 MOVE R7 R2
|
||||||
|
0x58200004, // 0011 LDCONST R8 K4
|
||||||
|
0x5C240C00, // 0012 MOVE R9 R6
|
||||||
|
0x7C1C0400, // 0013 CALL R7 2
|
||||||
|
0x081C0807, // 0014 MUL R7 R4 R7
|
||||||
|
0x08200B06, // 0015 MUL R8 R5 K6
|
||||||
|
0x00220A08, // 0016 ADD R8 K5 R8
|
||||||
|
0x081C0E08, // 0017 MUL R7 R7 R8
|
||||||
|
0x60200009, // 0018 GETGBL R8 G9
|
||||||
|
0x5C240E00, // 0019 MOVE R9 R7
|
||||||
|
0x7C200200, // 001A CALL R8 1
|
||||||
|
0x80041000, // 001B RET 1 R8
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -131,18 +217,17 @@ be_local_closure(Matter_UDPPacket_sent_send, /* name */
|
||||||
be_local_class(Matter_UDPPacket_sent,
|
be_local_class(Matter_UDPPacket_sent,
|
||||||
6,
|
6,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(10,
|
be_nested_map(9,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(RETRY_MS, 7), be_const_int(500) },
|
{ be_const_key_weak(send, 7), be_const_closure(Matter_UDPPacket_sent_send_closure) },
|
||||||
{ be_const_key_weak(raw, 4), be_const_var(0) },
|
{ be_const_key_weak(msg_id, -1), be_const_var(3) },
|
||||||
{ be_const_key_weak(next_try, 9), be_const_var(5) },
|
{ be_const_key_weak(retries, 8), be_const_var(4) },
|
||||||
{ be_const_key_weak(retries, -1), be_const_var(4) },
|
{ be_const_key_weak(backoff_time, -1), be_const_closure(Matter_UDPPacket_sent_backoff_time_closure) },
|
||||||
{ be_const_key_weak(send, 6), be_const_closure(Matter_UDPPacket_sent_send_closure) },
|
{ be_const_key_weak(next_try, 0), be_const_var(5) },
|
||||||
|
{ be_const_key_weak(raw, 3), be_const_var(0) },
|
||||||
{ be_const_key_weak(init, -1), be_const_closure(Matter_UDPPacket_sent_init_closure) },
|
{ be_const_key_weak(init, -1), be_const_closure(Matter_UDPPacket_sent_init_closure) },
|
||||||
{ be_const_key_weak(RETRIES, -1), be_const_int(4) },
|
|
||||||
{ be_const_key_weak(port, -1), be_const_var(2) },
|
{ be_const_key_weak(port, -1), be_const_var(2) },
|
||||||
{ be_const_key_weak(addr, -1), be_const_var(1) },
|
{ be_const_key_weak(addr, -1), be_const_var(1) },
|
||||||
{ be_const_key_weak(msg_id, -1), be_const_var(3) },
|
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_UDPPacket_sent)
|
be_str_weak(Matter_UDPPacket_sent)
|
||||||
);
|
);
|
||||||
|
@ -156,6 +241,62 @@ void be_load_Matter_UDPPacket_sent_class(bvm *vm) {
|
||||||
|
|
||||||
extern const bclass be_class_Matter_UDPServer;
|
extern const bclass be_class_Matter_UDPServer;
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: start
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_UDPServer_start, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[11]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(listening),
|
||||||
|
/* K1 */ be_nested_str_weak(udp_socket),
|
||||||
|
/* K2 */ be_nested_str_weak(udp),
|
||||||
|
/* K3 */ be_nested_str_weak(begin),
|
||||||
|
/* K4 */ be_nested_str_weak(address),
|
||||||
|
/* K5 */ be_nested_str_weak(port),
|
||||||
|
/* K6 */ be_nested_str_weak(network_error),
|
||||||
|
/* K7 */ be_nested_str_weak(could_X20not_X20open_X20UDP_X20server),
|
||||||
|
/* K8 */ be_nested_str_weak(dispatch_cb),
|
||||||
|
/* K9 */ be_nested_str_weak(tasmota),
|
||||||
|
/* K10 */ be_nested_str_weak(add_driver),
|
||||||
|
}),
|
||||||
|
be_str_weak(start),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[21]) { /* code */
|
||||||
|
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||||
|
0x740A0011, // 0001 JMPT R2 #0014
|
||||||
|
0xB80A0400, // 0002 GETNGBL R2 K2
|
||||||
|
0x7C080000, // 0003 CALL R2 0
|
||||||
|
0x90020202, // 0004 SETMBR R0 K1 R2
|
||||||
|
0x88080101, // 0005 GETMBR R2 R0 K1
|
||||||
|
0x8C080503, // 0006 GETMET R2 R2 K3
|
||||||
|
0x88100104, // 0007 GETMBR R4 R0 K4
|
||||||
|
0x88140105, // 0008 GETMBR R5 R0 K5
|
||||||
|
0x7C080600, // 0009 CALL R2 3
|
||||||
|
0x5C0C0400, // 000A MOVE R3 R2
|
||||||
|
0x740E0000, // 000B JMPT R3 #000D
|
||||||
|
0xB0060D07, // 000C RAISE 1 K6 K7
|
||||||
|
0x500C0200, // 000D LDBOOL R3 1 0
|
||||||
|
0x90020003, // 000E SETMBR R0 K0 R3
|
||||||
|
0x90021001, // 000F SETMBR R0 K8 R1
|
||||||
|
0xB80E1200, // 0010 GETNGBL R3 K9
|
||||||
|
0x8C0C070A, // 0011 GETMET R3 R3 K10
|
||||||
|
0x5C140000, // 0012 MOVE R5 R0
|
||||||
|
0x7C0C0400, // 0013 CALL R3 2
|
||||||
|
0x80000000, // 0014 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: init
|
** Solidified function: init
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -202,35 +343,11 @@ be_local_closure(Matter_UDPServer_init, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: every_second
|
** Solidified function: resend_packets
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_UDPServer_every_second, /* name */
|
be_local_closure(Matter_UDPServer_resend_packets, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
1, /* nstack */
|
11, /* nstack */
|
||||||
1, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
0, /* has constants */
|
|
||||||
NULL, /* no const */
|
|
||||||
be_str_weak(every_second),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[ 1]) { /* code */
|
|
||||||
0x80000000, // 0000 RET 0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: stop
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_UDPServer_stop, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
4, /* nstack */
|
|
||||||
1, /* argc */
|
1, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
|
@ -238,28 +355,143 @@ be_local_closure(Matter_UDPServer_stop, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 5]) { /* constants */
|
( &(const bvalue[23]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(listening),
|
/* K0 */ be_nested_str_weak(packets_sent),
|
||||||
/* K1 */ be_nested_str_weak(udp_socket),
|
/* K1 */ be_nested_str_weak(tasmota),
|
||||||
/* K2 */ be_nested_str_weak(stop),
|
/* K2 */ be_nested_str_weak(time_reached),
|
||||||
/* K3 */ be_nested_str_weak(tasmota),
|
/* K3 */ be_nested_str_weak(next_try),
|
||||||
/* K4 */ be_nested_str_weak(remove_driver),
|
/* K4 */ be_nested_str_weak(retries),
|
||||||
|
/* K5 */ be_nested_str_weak(RETRIES),
|
||||||
|
/* K6 */ be_nested_str_weak(log),
|
||||||
|
/* K7 */ be_nested_str_weak(MTR_X3A_X20resending_X20packet_X20id_X3D),
|
||||||
|
/* K8 */ be_nested_str_weak(msg_id),
|
||||||
|
/* K9 */ be_const_int(3),
|
||||||
|
/* K10 */ be_nested_str_weak(send),
|
||||||
|
/* K11 */ be_nested_str_weak(udp_socket),
|
||||||
|
/* K12 */ be_nested_str_weak(millis),
|
||||||
|
/* K13 */ be_nested_str_weak(backoff_time),
|
||||||
|
/* K14 */ be_const_int(1),
|
||||||
|
/* K15 */ be_nested_str_weak(string),
|
||||||
|
/* K16 */ be_nested_str_weak(remove),
|
||||||
|
/* K17 */ be_nested_str_weak(format),
|
||||||
|
/* K18 */ be_nested_str_weak(MTR_X3A_X20target_X20unreachable_X20_X27_X5B_X25s_X5D_X3A_X25i_X27),
|
||||||
|
/* K19 */ be_nested_str_weak(addr),
|
||||||
|
/* K20 */ be_nested_str_weak(port),
|
||||||
|
/* K21 */ be_const_int(2),
|
||||||
|
/* K22 */ be_nested_str_weak(stop_iteration),
|
||||||
}),
|
}),
|
||||||
be_str_weak(stop),
|
be_str_weak(resend_packets),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[12]) { /* code */
|
( &(const binstruction[57]) { /* code */
|
||||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
0x60040010, // 0000 GETGBL R1 G16
|
||||||
0x78060008, // 0001 JMPF R1 #000B
|
0x88080100, // 0001 GETMBR R2 R0 K0
|
||||||
0x88040101, // 0002 GETMBR R1 R0 K1
|
0x7C040200, // 0002 CALL R1 1
|
||||||
0x8C040302, // 0003 GETMET R1 R1 K2
|
0xA8020030, // 0003 EXBLK 0 #0035
|
||||||
0x7C040200, // 0004 CALL R1 1
|
0x5C080200, // 0004 MOVE R2 R1
|
||||||
0x50040000, // 0005 LDBOOL R1 0 0
|
0x7C080000, // 0005 CALL R2 0
|
||||||
0x90020001, // 0006 SETMBR R0 K0 R1
|
0xB80E0200, // 0006 GETNGBL R3 K1
|
||||||
0xB8060600, // 0007 GETNGBL R1 K3
|
0x8C0C0702, // 0007 GETMET R3 R3 K2
|
||||||
0x8C040304, // 0008 GETMET R1 R1 K4
|
0x88140503, // 0008 GETMBR R5 R2 K3
|
||||||
0x5C0C0000, // 0009 MOVE R3 R0
|
0x7C0C0400, // 0009 CALL R3 2
|
||||||
0x7C040400, // 000A CALL R1 2
|
0x780E0028, // 000A JMPF R3 #0034
|
||||||
0x80000000, // 000B RET 0
|
0x880C0504, // 000B GETMBR R3 R2 K4
|
||||||
|
0x88100105, // 000C GETMBR R4 R0 K5
|
||||||
|
0x180C0604, // 000D LE R3 R3 R4
|
||||||
|
0x780E0016, // 000E JMPF R3 #0026
|
||||||
|
0xB80E0200, // 000F GETNGBL R3 K1
|
||||||
|
0x8C0C0706, // 0010 GETMET R3 R3 K6
|
||||||
|
0x60140008, // 0011 GETGBL R5 G8
|
||||||
|
0x88180508, // 0012 GETMBR R6 R2 K8
|
||||||
|
0x7C140200, // 0013 CALL R5 1
|
||||||
|
0x00160E05, // 0014 ADD R5 K7 R5
|
||||||
|
0x58180009, // 0015 LDCONST R6 K9
|
||||||
|
0x7C0C0600, // 0016 CALL R3 3
|
||||||
|
0x8C0C050A, // 0017 GETMET R3 R2 K10
|
||||||
|
0x8814010B, // 0018 GETMBR R5 R0 K11
|
||||||
|
0x7C0C0400, // 0019 CALL R3 2
|
||||||
|
0xB80E0200, // 001A GETNGBL R3 K1
|
||||||
|
0x8C0C070C, // 001B GETMET R3 R3 K12
|
||||||
|
0x7C0C0200, // 001C CALL R3 1
|
||||||
|
0x8C10050D, // 001D GETMET R4 R2 K13
|
||||||
|
0x88180504, // 001E GETMBR R6 R2 K4
|
||||||
|
0x7C100400, // 001F CALL R4 2
|
||||||
|
0x000C0604, // 0020 ADD R3 R3 R4
|
||||||
|
0x900A0603, // 0021 SETMBR R2 K3 R3
|
||||||
|
0x880C0504, // 0022 GETMBR R3 R2 K4
|
||||||
|
0x000C070E, // 0023 ADD R3 R3 K14
|
||||||
|
0x900A0803, // 0024 SETMBR R2 K4 R3
|
||||||
|
0x7002000D, // 0025 JMP #0034
|
||||||
|
0xA40E1E00, // 0026 IMPORT R3 K15
|
||||||
|
0x88100100, // 0027 GETMBR R4 R0 K0
|
||||||
|
0x8C100910, // 0028 GETMET R4 R4 K16
|
||||||
|
0x88180508, // 0029 GETMBR R6 R2 K8
|
||||||
|
0x7C100400, // 002A CALL R4 2
|
||||||
|
0xB8120200, // 002B GETNGBL R4 K1
|
||||||
|
0x8C100906, // 002C GETMET R4 R4 K6
|
||||||
|
0x8C180711, // 002D GETMET R6 R3 K17
|
||||||
|
0x58200012, // 002E LDCONST R8 K18
|
||||||
|
0x88240513, // 002F GETMBR R9 R2 K19
|
||||||
|
0x88280514, // 0030 GETMBR R10 R2 K20
|
||||||
|
0x7C180800, // 0031 CALL R6 4
|
||||||
|
0x581C0015, // 0032 LDCONST R7 K21
|
||||||
|
0x7C100600, // 0033 CALL R4 3
|
||||||
|
0x7001FFCE, // 0034 JMP #0004
|
||||||
|
0x58040016, // 0035 LDCONST R1 K22
|
||||||
|
0xAC040200, // 0036 CATCH R1 1 0
|
||||||
|
0xB0080000, // 0037 RAISE 2 R0 R0
|
||||||
|
0x80000000, // 0038 RET 0
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified function: packet_ack
|
||||||
|
********************************************************************/
|
||||||
|
be_local_closure(Matter_UDPServer_packet_ack, /* name */
|
||||||
|
be_nested_proto(
|
||||||
|
6, /* nstack */
|
||||||
|
2, /* argc */
|
||||||
|
2, /* varg */
|
||||||
|
0, /* has upvals */
|
||||||
|
NULL, /* no upvals */
|
||||||
|
0, /* has sup protos */
|
||||||
|
NULL, /* no sub protos */
|
||||||
|
1, /* has constants */
|
||||||
|
( &(const bvalue[ 6]) { /* constants */
|
||||||
|
/* K0 */ be_nested_str_weak(packets_sent),
|
||||||
|
/* K1 */ be_nested_str_weak(contains),
|
||||||
|
/* K2 */ be_nested_str_weak(remove),
|
||||||
|
/* K3 */ be_nested_str_weak(tasmota),
|
||||||
|
/* K4 */ be_nested_str_weak(log),
|
||||||
|
/* K5 */ be_nested_str_weak(MTR_X3A_X20removed_X20packet_X20from_X20sending_X20list_X20id_X3D),
|
||||||
|
}),
|
||||||
|
be_str_weak(packet_ack),
|
||||||
|
&be_const_str_solidified,
|
||||||
|
( &(const binstruction[22]) { /* code */
|
||||||
|
0x4C080000, // 0000 LDNIL R2
|
||||||
|
0x1C080202, // 0001 EQ R2 R1 R2
|
||||||
|
0x780A0000, // 0002 JMPF R2 #0004
|
||||||
|
0x80000400, // 0003 RET 0
|
||||||
|
0x88080100, // 0004 GETMBR R2 R0 K0
|
||||||
|
0x8C080501, // 0005 GETMET R2 R2 K1
|
||||||
|
0x5C100200, // 0006 MOVE R4 R1
|
||||||
|
0x7C080400, // 0007 CALL R2 2
|
||||||
|
0x780A000B, // 0008 JMPF R2 #0015
|
||||||
|
0x88080100, // 0009 GETMBR R2 R0 K0
|
||||||
|
0x8C080502, // 000A GETMET R2 R2 K2
|
||||||
|
0x5C100200, // 000B MOVE R4 R1
|
||||||
|
0x7C080400, // 000C CALL R2 2
|
||||||
|
0xB80A0600, // 000D GETNGBL R2 K3
|
||||||
|
0x8C080504, // 000E GETMET R2 R2 K4
|
||||||
|
0x60100008, // 000F GETGBL R4 G8
|
||||||
|
0x5C140200, // 0010 MOVE R5 R1
|
||||||
|
0x7C100200, // 0011 CALL R4 1
|
||||||
|
0x00120A04, // 0012 ADD R4 K5 R4
|
||||||
|
0x54160003, // 0013 LDINT R5 4
|
||||||
|
0x7C080600, // 0014 CALL R2 3
|
||||||
|
0x80000000, // 0015 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -352,99 +584,23 @@ be_local_closure(Matter_UDPServer_every_50ms, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: resend_packets
|
** Solidified function: every_second
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_UDPServer_resend_packets, /* name */
|
be_local_closure(Matter_UDPServer_every_second, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
11, /* nstack */
|
1, /* nstack */
|
||||||
1, /* argc */
|
1, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
0, /* has constants */
|
||||||
( &(const bvalue[22]) { /* constants */
|
NULL, /* no const */
|
||||||
/* K0 */ be_nested_str_weak(packets_sent),
|
be_str_weak(every_second),
|
||||||
/* K1 */ be_nested_str_weak(tasmota),
|
|
||||||
/* K2 */ be_nested_str_weak(time_reached),
|
|
||||||
/* K3 */ be_nested_str_weak(next_try),
|
|
||||||
/* K4 */ be_nested_str_weak(log),
|
|
||||||
/* K5 */ be_nested_str_weak(MTR_X3A_X20resending_X20packet_X20id_X3D),
|
|
||||||
/* K6 */ be_nested_str_weak(msg_id),
|
|
||||||
/* K7 */ be_const_int(3),
|
|
||||||
/* K8 */ be_nested_str_weak(send),
|
|
||||||
/* K9 */ be_nested_str_weak(udp_socket),
|
|
||||||
/* K10 */ be_nested_str_weak(retries),
|
|
||||||
/* K11 */ be_const_int(1),
|
|
||||||
/* K12 */ be_const_int(0),
|
|
||||||
/* K13 */ be_nested_str_weak(string),
|
|
||||||
/* K14 */ be_nested_str_weak(remove),
|
|
||||||
/* K15 */ be_nested_str_weak(format),
|
|
||||||
/* K16 */ be_nested_str_weak(MTR_X3A_X20non_X2Dacked_X20packet_X20to_X20_X27_X5B_X25s_X5D_X3A_X25i_X27),
|
|
||||||
/* K17 */ be_nested_str_weak(addr),
|
|
||||||
/* K18 */ be_nested_str_weak(port),
|
|
||||||
/* K19 */ be_nested_str_weak(millis),
|
|
||||||
/* K20 */ be_nested_str_weak(RETRY_MS),
|
|
||||||
/* K21 */ be_nested_str_weak(stop_iteration),
|
|
||||||
}),
|
|
||||||
be_str_weak(resend_packets),
|
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[54]) { /* code */
|
( &(const binstruction[ 1]) { /* code */
|
||||||
0x60040010, // 0000 GETGBL R1 G16
|
0x80000000, // 0000 RET 0
|
||||||
0x88080100, // 0001 GETMBR R2 R0 K0
|
|
||||||
0x7C040200, // 0002 CALL R1 1
|
|
||||||
0xA802002D, // 0003 EXBLK 0 #0032
|
|
||||||
0x5C080200, // 0004 MOVE R2 R1
|
|
||||||
0x7C080000, // 0005 CALL R2 0
|
|
||||||
0xB80E0200, // 0006 GETNGBL R3 K1
|
|
||||||
0x8C0C0702, // 0007 GETMET R3 R3 K2
|
|
||||||
0x88140503, // 0008 GETMBR R5 R2 K3
|
|
||||||
0x7C0C0400, // 0009 CALL R3 2
|
|
||||||
0x780E0025, // 000A JMPF R3 #0031
|
|
||||||
0xB80E0200, // 000B GETNGBL R3 K1
|
|
||||||
0x8C0C0704, // 000C GETMET R3 R3 K4
|
|
||||||
0x60140008, // 000D GETGBL R5 G8
|
|
||||||
0x88180506, // 000E GETMBR R6 R2 K6
|
|
||||||
0x7C140200, // 000F CALL R5 1
|
|
||||||
0x00160A05, // 0010 ADD R5 K5 R5
|
|
||||||
0x58180007, // 0011 LDCONST R6 K7
|
|
||||||
0x7C0C0600, // 0012 CALL R3 3
|
|
||||||
0x8C0C0508, // 0013 GETMET R3 R2 K8
|
|
||||||
0x88140109, // 0014 GETMBR R5 R0 K9
|
|
||||||
0x7C0C0400, // 0015 CALL R3 2
|
|
||||||
0x880C050A, // 0016 GETMBR R3 R2 K10
|
|
||||||
0x040C070B, // 0017 SUB R3 R3 K11
|
|
||||||
0x900A1403, // 0018 SETMBR R2 K10 R3
|
|
||||||
0x880C050A, // 0019 GETMBR R3 R2 K10
|
|
||||||
0x180C070C, // 001A LE R3 R3 K12
|
|
||||||
0x780E000E, // 001B JMPF R3 #002B
|
|
||||||
0xA40E1A00, // 001C IMPORT R3 K13
|
|
||||||
0x88100100, // 001D GETMBR R4 R0 K0
|
|
||||||
0x8C10090E, // 001E GETMET R4 R4 K14
|
|
||||||
0x88180506, // 001F GETMBR R6 R2 K6
|
|
||||||
0x7C100400, // 0020 CALL R4 2
|
|
||||||
0xB8120200, // 0021 GETNGBL R4 K1
|
|
||||||
0x8C100904, // 0022 GETMET R4 R4 K4
|
|
||||||
0x8C18070F, // 0023 GETMET R6 R3 K15
|
|
||||||
0x58200010, // 0024 LDCONST R8 K16
|
|
||||||
0x88240511, // 0025 GETMBR R9 R2 K17
|
|
||||||
0x88280512, // 0026 GETMBR R10 R2 K18
|
|
||||||
0x7C180800, // 0027 CALL R6 4
|
|
||||||
0x581C0007, // 0028 LDCONST R7 K7
|
|
||||||
0x7C100600, // 0029 CALL R4 3
|
|
||||||
0x70020005, // 002A JMP #0031
|
|
||||||
0xB80E0200, // 002B GETNGBL R3 K1
|
|
||||||
0x8C0C0713, // 002C GETMET R3 R3 K19
|
|
||||||
0x7C0C0200, // 002D CALL R3 1
|
|
||||||
0x88100514, // 002E GETMBR R4 R2 K20
|
|
||||||
0x000C0604, // 002F ADD R3 R3 R4
|
|
||||||
0x900A0603, // 0030 SETMBR R2 K3 R3
|
|
||||||
0x7001FFD1, // 0031 JMP #0004
|
|
||||||
0x58040015, // 0032 LDCONST R1 K21
|
|
||||||
0xAC040200, // 0033 CATCH R1 1 0
|
|
||||||
0xB0080000, // 0034 RAISE 2 R0 R0
|
|
||||||
0x80000000, // 0035 RET 0
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -452,55 +608,40 @@ be_local_closure(Matter_UDPServer_resend_packets, /* name */
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified function: start
|
** Solidified function: stop
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_closure(Matter_UDPServer_start, /* name */
|
be_local_closure(Matter_UDPServer_stop, /* name */
|
||||||
be_nested_proto(
|
be_nested_proto(
|
||||||
6, /* nstack */
|
4, /* nstack */
|
||||||
2, /* argc */
|
1, /* argc */
|
||||||
2, /* varg */
|
2, /* varg */
|
||||||
0, /* has upvals */
|
0, /* has upvals */
|
||||||
NULL, /* no upvals */
|
NULL, /* no upvals */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[11]) { /* constants */
|
( &(const bvalue[ 5]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(listening),
|
/* K0 */ be_nested_str_weak(listening),
|
||||||
/* K1 */ be_nested_str_weak(udp_socket),
|
/* K1 */ be_nested_str_weak(udp_socket),
|
||||||
/* K2 */ be_nested_str_weak(udp),
|
/* K2 */ be_nested_str_weak(stop),
|
||||||
/* K3 */ be_nested_str_weak(begin),
|
/* K3 */ be_nested_str_weak(tasmota),
|
||||||
/* K4 */ be_nested_str_weak(address),
|
/* K4 */ be_nested_str_weak(remove_driver),
|
||||||
/* K5 */ be_nested_str_weak(port),
|
|
||||||
/* K6 */ be_nested_str_weak(network_error),
|
|
||||||
/* K7 */ be_nested_str_weak(could_X20not_X20open_X20UDP_X20server),
|
|
||||||
/* K8 */ be_nested_str_weak(dispatch_cb),
|
|
||||||
/* K9 */ be_nested_str_weak(tasmota),
|
|
||||||
/* K10 */ be_nested_str_weak(add_driver),
|
|
||||||
}),
|
}),
|
||||||
be_str_weak(start),
|
be_str_weak(stop),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[21]) { /* code */
|
( &(const binstruction[12]) { /* code */
|
||||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||||
0x740A0011, // 0001 JMPT R2 #0014
|
0x78060008, // 0001 JMPF R1 #000B
|
||||||
0xB80A0400, // 0002 GETNGBL R2 K2
|
0x88040101, // 0002 GETMBR R1 R0 K1
|
||||||
0x7C080000, // 0003 CALL R2 0
|
0x8C040302, // 0003 GETMET R1 R1 K2
|
||||||
0x90020202, // 0004 SETMBR R0 K1 R2
|
0x7C040200, // 0004 CALL R1 1
|
||||||
0x88080101, // 0005 GETMBR R2 R0 K1
|
0x50040000, // 0005 LDBOOL R1 0 0
|
||||||
0x8C080503, // 0006 GETMET R2 R2 K3
|
0x90020001, // 0006 SETMBR R0 K0 R1
|
||||||
0x88100104, // 0007 GETMBR R4 R0 K4
|
0xB8060600, // 0007 GETNGBL R1 K3
|
||||||
0x88140105, // 0008 GETMBR R5 R0 K5
|
0x8C040304, // 0008 GETMET R1 R1 K4
|
||||||
0x7C080600, // 0009 CALL R2 3
|
0x5C0C0000, // 0009 MOVE R3 R0
|
||||||
0x5C0C0400, // 000A MOVE R3 R2
|
0x7C040400, // 000A CALL R1 2
|
||||||
0x740E0000, // 000B JMPT R3 #000D
|
0x80000000, // 000B RET 0
|
||||||
0xB0060D07, // 000C RAISE 1 K6 K7
|
|
||||||
0x500C0200, // 000D LDBOOL R3 1 0
|
|
||||||
0x90020003, // 000E SETMBR R0 K0 R3
|
|
||||||
0x90021001, // 000F SETMBR R0 K8 R1
|
|
||||||
0xB80E1200, // 0010 GETNGBL R3 K9
|
|
||||||
0x8C0C070A, // 0011 GETMET R3 R3 K10
|
|
||||||
0x5C140000, // 0012 MOVE R5 R0
|
|
||||||
0x7C0C0400, // 0013 CALL R3 2
|
|
||||||
0x80000000, // 0014 RET 0
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -550,81 +691,30 @@ be_local_closure(Matter_UDPServer_send_response, /* name */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
** Solidified function: packet_ack
|
|
||||||
********************************************************************/
|
|
||||||
be_local_closure(Matter_UDPServer_packet_ack, /* name */
|
|
||||||
be_nested_proto(
|
|
||||||
6, /* nstack */
|
|
||||||
2, /* argc */
|
|
||||||
2, /* varg */
|
|
||||||
0, /* has upvals */
|
|
||||||
NULL, /* no upvals */
|
|
||||||
0, /* has sup protos */
|
|
||||||
NULL, /* no sub protos */
|
|
||||||
1, /* has constants */
|
|
||||||
( &(const bvalue[ 6]) { /* constants */
|
|
||||||
/* K0 */ be_nested_str_weak(packets_sent),
|
|
||||||
/* K1 */ be_nested_str_weak(contains),
|
|
||||||
/* K2 */ be_nested_str_weak(remove),
|
|
||||||
/* K3 */ be_nested_str_weak(tasmota),
|
|
||||||
/* K4 */ be_nested_str_weak(log),
|
|
||||||
/* K5 */ be_nested_str_weak(MTR_X3A_X20removed_X20packet_X20from_X20sending_X20list_X20id_X3D),
|
|
||||||
}),
|
|
||||||
be_str_weak(packet_ack),
|
|
||||||
&be_const_str_solidified,
|
|
||||||
( &(const binstruction[22]) { /* code */
|
|
||||||
0x4C080000, // 0000 LDNIL R2
|
|
||||||
0x1C080202, // 0001 EQ R2 R1 R2
|
|
||||||
0x780A0000, // 0002 JMPF R2 #0004
|
|
||||||
0x80000400, // 0003 RET 0
|
|
||||||
0x88080100, // 0004 GETMBR R2 R0 K0
|
|
||||||
0x8C080501, // 0005 GETMET R2 R2 K1
|
|
||||||
0x5C100200, // 0006 MOVE R4 R1
|
|
||||||
0x7C080400, // 0007 CALL R2 2
|
|
||||||
0x780A000B, // 0008 JMPF R2 #0015
|
|
||||||
0x88080100, // 0009 GETMBR R2 R0 K0
|
|
||||||
0x8C080502, // 000A GETMET R2 R2 K2
|
|
||||||
0x5C100200, // 000B MOVE R4 R1
|
|
||||||
0x7C080400, // 000C CALL R2 2
|
|
||||||
0xB80A0600, // 000D GETNGBL R2 K3
|
|
||||||
0x8C080504, // 000E GETMET R2 R2 K4
|
|
||||||
0x60100008, // 000F GETGBL R4 G8
|
|
||||||
0x5C140200, // 0010 MOVE R5 R1
|
|
||||||
0x7C100200, // 0011 CALL R4 1
|
|
||||||
0x00120A04, // 0012 ADD R4 K5 R4
|
|
||||||
0x54160003, // 0013 LDINT R5 4
|
|
||||||
0x7C080600, // 0014 CALL R2 3
|
|
||||||
0x80000000, // 0015 RET 0
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
/*******************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: Matter_UDPServer
|
** Solidified class: Matter_UDPServer
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
be_local_class(Matter_UDPServer,
|
be_local_class(Matter_UDPServer,
|
||||||
6,
|
6,
|
||||||
NULL,
|
NULL,
|
||||||
be_nested_map(15,
|
be_nested_map(16,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(init, 1), be_const_closure(Matter_UDPServer_init_closure) },
|
{ be_const_key_weak(MAX_PACKETS_READ, 14), be_const_int(4) },
|
||||||
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_UDPServer_every_second_closure) },
|
|
||||||
{ be_const_key_weak(stop, -1), be_const_closure(Matter_UDPServer_stop_closure) },
|
|
||||||
{ be_const_key_weak(udp_socket, -1), be_const_var(3) },
|
|
||||||
{ be_const_key_weak(address, -1), be_const_var(0) },
|
|
||||||
{ be_const_key_weak(dispatch_cb, -1), be_const_var(4) },
|
|
||||||
{ be_const_key_weak(packet_ack, 7), be_const_closure(Matter_UDPServer_packet_ack_closure) },
|
|
||||||
{ be_const_key_weak(MAX_PACKETS_READ, 13), be_const_int(4) },
|
|
||||||
{ be_const_key_weak(every_50ms, 6), be_const_closure(Matter_UDPServer_every_50ms_closure) },
|
|
||||||
{ be_const_key_weak(listening, -1), be_const_var(2) },
|
|
||||||
{ be_const_key_weak(port, -1), be_const_var(1) },
|
|
||||||
{ be_const_key_weak(start, -1), be_const_closure(Matter_UDPServer_start_closure) },
|
|
||||||
{ be_const_key_weak(send_response, -1), be_const_closure(Matter_UDPServer_send_response_closure) },
|
{ be_const_key_weak(send_response, -1), be_const_closure(Matter_UDPServer_send_response_closure) },
|
||||||
|
{ be_const_key_weak(stop, -1), be_const_closure(Matter_UDPServer_stop_closure) },
|
||||||
|
{ be_const_key_weak(init, 12), be_const_closure(Matter_UDPServer_init_closure) },
|
||||||
{ be_const_key_weak(resend_packets, -1), be_const_closure(Matter_UDPServer_resend_packets_closure) },
|
{ be_const_key_weak(resend_packets, -1), be_const_closure(Matter_UDPServer_resend_packets_closure) },
|
||||||
{ be_const_key_weak(packets_sent, -1), be_const_var(5) },
|
{ be_const_key_weak(RETRIES, 2), be_const_int(4) },
|
||||||
|
{ be_const_key_weak(port, -1), be_const_var(1) },
|
||||||
|
{ be_const_key_weak(packet_ack, -1), be_const_closure(Matter_UDPServer_packet_ack_closure) },
|
||||||
|
{ be_const_key_weak(every_50ms, -1), be_const_closure(Matter_UDPServer_every_50ms_closure) },
|
||||||
|
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_UDPServer_every_second_closure) },
|
||||||
|
{ be_const_key_weak(listening, -1), be_const_var(2) },
|
||||||
|
{ be_const_key_weak(dispatch_cb, -1), be_const_var(4) },
|
||||||
|
{ be_const_key_weak(address, -1), be_const_var(0) },
|
||||||
|
{ be_const_key_weak(packets_sent, 11), be_const_var(5) },
|
||||||
|
{ be_const_key_weak(udp_socket, -1), be_const_var(3) },
|
||||||
|
{ be_const_key_weak(start, 1), be_const_closure(Matter_UDPServer_start_closure) },
|
||||||
})),
|
})),
|
||||||
be_str_weak(Matter_UDPServer)
|
be_str_weak(Matter_UDPServer)
|
||||||
);
|
);
|
||||||
|
|
|
@ -19,7 +19,7 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[24]) { /* constants */
|
( &(const bvalue[28]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(webserver),
|
/* K0 */ be_nested_str_weak(webserver),
|
||||||
/* K1 */ be_nested_str_weak(string),
|
/* K1 */ be_nested_str_weak(string),
|
||||||
/* K2 */ be_nested_str_weak(content_send),
|
/* K2 */ be_nested_str_weak(content_send),
|
||||||
|
@ -42,12 +42,16 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */
|
||||||
/* K19 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E),
|
/* K19 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E),
|
||||||
/* K20 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X272047_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E),
|
/* K20 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X272047_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E),
|
||||||
/* K21 */ be_nested_str_weak(discriminator),
|
/* K21 */ be_nested_str_weak(discriminator),
|
||||||
/* K22 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
|
/* K22 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E),
|
||||||
/* K23 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
|
/* K23 */ be_nested_str_weak(ipv4only),
|
||||||
|
/* K24 */ be_nested_str_weak(_X20checked),
|
||||||
|
/* K25 */ be_nested_str_weak(),
|
||||||
|
/* K26 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
|
||||||
|
/* K27 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
|
||||||
}),
|
}),
|
||||||
be_str_weak(show_commissioning_info),
|
be_str_weak(show_commissioning_info),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[70]) { /* code */
|
( &(const binstruction[81]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0xA40A0200, // 0001 IMPORT R2 K1
|
0xA40A0200, // 0001 IMPORT R2 K1
|
||||||
0x8C0C0302, // 0002 GETMET R3 R1 K2
|
0x8C0C0302, // 0002 GETMET R3 R1 K2
|
||||||
|
@ -112,12 +116,23 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */
|
||||||
0x7C1C0600, // 003D CALL R7 3
|
0x7C1C0600, // 003D CALL R7 3
|
||||||
0x7C140400, // 003E CALL R5 2
|
0x7C140400, // 003E CALL R5 2
|
||||||
0x8C140302, // 003F GETMET R5 R1 K2
|
0x8C140302, // 003F GETMET R5 R1 K2
|
||||||
0x581C0016, // 0040 LDCONST R7 K22
|
0x8C1C0506, // 0040 GETMET R7 R2 K6
|
||||||
0x7C140400, // 0041 CALL R5 2
|
0x58240016, // 0041 LDCONST R9 K22
|
||||||
0x8C140302, // 0042 GETMET R5 R1 K2
|
0x88280104, // 0042 GETMBR R10 R0 K4
|
||||||
0x581C0017, // 0043 LDCONST R7 K23
|
0x88281517, // 0043 GETMBR R10 R10 K23
|
||||||
0x7C140400, // 0044 CALL R5 2
|
0x782A0001, // 0044 JMPF R10 #0047
|
||||||
0x80000000, // 0045 RET 0
|
0x58280018, // 0045 LDCONST R10 K24
|
||||||
|
0x70020000, // 0046 JMP #0048
|
||||||
|
0x58280019, // 0047 LDCONST R10 K25
|
||||||
|
0x7C1C0600, // 0048 CALL R7 3
|
||||||
|
0x7C140400, // 0049 CALL R5 2
|
||||||
|
0x8C140302, // 004A GETMET R5 R1 K2
|
||||||
|
0x581C001A, // 004B LDCONST R7 K26
|
||||||
|
0x7C140400, // 004C CALL R5 2
|
||||||
|
0x8C140302, // 004D GETMET R5 R1 K2
|
||||||
|
0x581C001B, // 004E LDCONST R7 K27
|
||||||
|
0x7C140400, // 004F CALL R5 2
|
||||||
|
0x80000000, // 0050 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -518,7 +533,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[40]) { /* constants */
|
( &(const bvalue[43]) { /* constants */
|
||||||
/* K0 */ be_nested_str_weak(webserver),
|
/* K0 */ be_nested_str_weak(webserver),
|
||||||
/* K1 */ be_nested_str_weak(check_privileged_access),
|
/* K1 */ be_nested_str_weak(check_privileged_access),
|
||||||
/* K2 */ be_nested_str_weak(string),
|
/* K2 */ be_nested_str_weak(string),
|
||||||
|
@ -530,39 +545,42 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
/* K8 */ be_nested_str_weak(discriminator),
|
/* K8 */ be_nested_str_weak(discriminator),
|
||||||
/* K9 */ be_nested_str_weak(device),
|
/* K9 */ be_nested_str_weak(device),
|
||||||
/* K10 */ be_nested_str_weak(arg),
|
/* K10 */ be_nested_str_weak(arg),
|
||||||
/* K11 */ be_nested_str_weak(save_param),
|
/* K11 */ be_nested_str_weak(ipv4only),
|
||||||
/* K12 */ be_nested_str_weak(redirect),
|
/* K12 */ be_nested_str_weak(ipv4),
|
||||||
/* K13 */ be_nested_str_weak(_X2F_X3Frst_X3D),
|
/* K13 */ be_nested_str_weak(on),
|
||||||
/* K14 */ be_nested_str_weak(enable),
|
/* K14 */ be_nested_str_weak(save_param),
|
||||||
/* K15 */ be_nested_str_weak(tasmota),
|
/* K15 */ be_nested_str_weak(redirect),
|
||||||
/* K16 */ be_nested_str_weak(cmd),
|
/* K16 */ be_nested_str_weak(_X2F_X3Frst_X3D),
|
||||||
/* K17 */ be_nested_str_weak(SetOption),
|
/* K17 */ be_nested_str_weak(enable),
|
||||||
/* K18 */ be_nested_str_weak(matter),
|
/* K18 */ be_nested_str_weak(tasmota),
|
||||||
/* K19 */ be_nested_str_weak(MATTER_OPTION),
|
/* K19 */ be_nested_str_weak(cmd),
|
||||||
/* K20 */ be_nested_str_weak(_X201),
|
/* K20 */ be_nested_str_weak(SetOption),
|
||||||
/* K21 */ be_nested_str_weak(disable),
|
/* K21 */ be_nested_str_weak(matter),
|
||||||
/* K22 */ be_nested_str_weak(_X200),
|
/* K22 */ be_nested_str_weak(MATTER_OPTION),
|
||||||
/* K23 */ be_nested_str_weak(del_session),
|
/* K23 */ be_nested_str_weak(_X201),
|
||||||
/* K24 */ be_nested_str_weak(sessions),
|
/* K24 */ be_nested_str_weak(disable),
|
||||||
/* K25 */ be_nested_str_weak(get_session_by_local_session_id),
|
/* K25 */ be_nested_str_weak(_X200),
|
||||||
/* K26 */ be_nested_str_weak(remove_session),
|
/* K26 */ be_nested_str_weak(del_session),
|
||||||
/* K27 */ be_nested_str_weak(save),
|
/* K27 */ be_nested_str_weak(sessions),
|
||||||
/* K28 */ be_nested_str_weak(log),
|
/* K28 */ be_nested_str_weak(get_session_by_local_session_id),
|
||||||
/* K29 */ be_nested_str_weak(format),
|
/* K29 */ be_nested_str_weak(remove_session),
|
||||||
/* K30 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
/* K30 */ be_nested_str_weak(save),
|
||||||
/* K31 */ be_const_int(2),
|
/* K31 */ be_nested_str_weak(log),
|
||||||
/* K32 */ be_nested_str_weak(content_start),
|
/* K32 */ be_nested_str_weak(format),
|
||||||
/* K33 */ be_nested_str_weak(Parameter_X20error),
|
/* K33 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||||
/* K34 */ be_nested_str_weak(content_send_style),
|
/* K34 */ be_const_int(2),
|
||||||
/* K35 */ be_nested_str_weak(content_send),
|
/* K35 */ be_nested_str_weak(content_start),
|
||||||
/* K36 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
|
/* K36 */ be_nested_str_weak(Parameter_X20error),
|
||||||
/* K37 */ be_nested_str_weak(content_button),
|
/* K37 */ be_nested_str_weak(content_send_style),
|
||||||
/* K38 */ be_nested_str_weak(BUTTON_MANAGEMENT),
|
/* K38 */ be_nested_str_weak(content_send),
|
||||||
/* K39 */ be_nested_str_weak(content_stop),
|
/* K39 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
|
||||||
|
/* K40 */ be_nested_str_weak(content_button),
|
||||||
|
/* K41 */ be_nested_str_weak(BUTTON_MANAGEMENT),
|
||||||
|
/* K42 */ be_nested_str_weak(content_stop),
|
||||||
}),
|
}),
|
||||||
be_str_weak(page_part_ctl),
|
be_str_weak(page_part_ctl),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[144]) { /* code */
|
( &(const binstruction[150]) { /* code */
|
||||||
0xA4060000, // 0000 IMPORT R1 K0
|
0xA4060000, // 0000 IMPORT R1 K0
|
||||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||||
0x7C080200, // 0002 CALL R2 1
|
0x7C080200, // 0002 CALL R2 1
|
||||||
|
@ -574,7 +592,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0xA4120800, // 0008 IMPORT R4 K4
|
0xA4120800, // 0008 IMPORT R4 K4
|
||||||
0x8C140705, // 0009 GETMET R5 R3 K5
|
0x8C140705, // 0009 GETMET R5 R3 K5
|
||||||
0x7C140200, // 000A CALL R5 1
|
0x7C140200, // 000A CALL R5 1
|
||||||
0xA8020064, // 000B EXBLK 0 #0071
|
0xA802006A, // 000B EXBLK 0 #0077
|
||||||
0x8C180306, // 000C GETMET R6 R1 K6
|
0x8C180306, // 000C GETMET R6 R1 K6
|
||||||
0x58200007, // 000D LDCONST R8 K7
|
0x58200007, // 000D LDCONST R8 K7
|
||||||
0x7C180400, // 000E CALL R6 2
|
0x7C180400, // 000E CALL R6 2
|
||||||
|
@ -582,7 +600,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x8C180306, // 0010 GETMET R6 R1 K6
|
0x8C180306, // 0010 GETMET R6 R1 K6
|
||||||
0x58200008, // 0011 LDCONST R8 K8
|
0x58200008, // 0011 LDCONST R8 K8
|
||||||
0x7C180400, // 0012 CALL R6 2
|
0x7C180400, // 0012 CALL R6 2
|
||||||
0x781A001C, // 0013 JMPF R6 #0031
|
0x781A0022, // 0013 JMPF R6 #0037
|
||||||
0x8C180306, // 0014 GETMET R6 R1 K6
|
0x8C180306, // 0014 GETMET R6 R1 K6
|
||||||
0x58200007, // 0015 LDCONST R8 K7
|
0x58200007, // 0015 LDCONST R8 K7
|
||||||
0x7C180400, // 0016 CALL R6 2
|
0x7C180400, // 0016 CALL R6 2
|
||||||
|
@ -606,107 +624,113 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
|
||||||
0x7C1C0200, // 0028 CALL R7 1
|
0x7C1C0200, // 0028 CALL R7 1
|
||||||
0x901A1007, // 0029 SETMBR R6 K8 R7
|
0x901A1007, // 0029 SETMBR R6 K8 R7
|
||||||
0x88180109, // 002A GETMBR R6 R0 K9
|
0x88180109, // 002A GETMBR R6 R0 K9
|
||||||
0x8C180D0B, // 002B GETMET R6 R6 K11
|
0x8C1C030A, // 002B GETMET R7 R1 K10
|
||||||
0x7C180200, // 002C CALL R6 1
|
0x5824000C, // 002C LDCONST R9 K12
|
||||||
0x8C18030C, // 002D GETMET R6 R1 K12
|
0x7C1C0400, // 002D CALL R7 2
|
||||||
0x5820000D, // 002E LDCONST R8 K13
|
0x1C1C0F0D, // 002E EQ R7 R7 K13
|
||||||
0x7C180400, // 002F CALL R6 2
|
0x901A1607, // 002F SETMBR R6 K11 R7
|
||||||
0x7002003D, // 0030 JMP #006F
|
0x88180109, // 0030 GETMBR R6 R0 K9
|
||||||
0x8C180306, // 0031 GETMET R6 R1 K6
|
0x8C180D0E, // 0031 GETMET R6 R6 K14
|
||||||
0x5820000E, // 0032 LDCONST R8 K14
|
0x7C180200, // 0032 CALL R6 1
|
||||||
0x7C180400, // 0033 CALL R6 2
|
0x8C18030F, // 0033 GETMET R6 R1 K15
|
||||||
0x781A000C, // 0034 JMPF R6 #0042
|
0x58200010, // 0034 LDCONST R8 K16
|
||||||
0xB81A1E00, // 0035 GETNGBL R6 K15
|
0x7C180400, // 0035 CALL R6 2
|
||||||
0x8C180D10, // 0036 GETMET R6 R6 K16
|
0x7002003D, // 0036 JMP #0075
|
||||||
0x60200008, // 0037 GETGBL R8 G8
|
0x8C180306, // 0037 GETMET R6 R1 K6
|
||||||
0xB8262400, // 0038 GETNGBL R9 K18
|
0x58200011, // 0038 LDCONST R8 K17
|
||||||
0x88241313, // 0039 GETMBR R9 R9 K19
|
0x7C180400, // 0039 CALL R6 2
|
||||||
0x7C200200, // 003A CALL R8 1
|
0x781A000C, // 003A JMPF R6 #0048
|
||||||
0x00222208, // 003B ADD R8 K17 R8
|
0xB81A2400, // 003B GETNGBL R6 K18
|
||||||
0x00201114, // 003C ADD R8 R8 K20
|
0x8C180D13, // 003C GETMET R6 R6 K19
|
||||||
0x7C180400, // 003D CALL R6 2
|
0x60200008, // 003D GETGBL R8 G8
|
||||||
0x8C18030C, // 003E GETMET R6 R1 K12
|
0xB8262A00, // 003E GETNGBL R9 K21
|
||||||
0x5820000D, // 003F LDCONST R8 K13
|
0x88241316, // 003F GETMBR R9 R9 K22
|
||||||
0x7C180400, // 0040 CALL R6 2
|
0x7C200200, // 0040 CALL R8 1
|
||||||
0x7002002C, // 0041 JMP #006F
|
0x00222808, // 0041 ADD R8 K20 R8
|
||||||
0x8C180306, // 0042 GETMET R6 R1 K6
|
0x00201117, // 0042 ADD R8 R8 K23
|
||||||
0x58200015, // 0043 LDCONST R8 K21
|
0x7C180400, // 0043 CALL R6 2
|
||||||
0x7C180400, // 0044 CALL R6 2
|
0x8C18030F, // 0044 GETMET R6 R1 K15
|
||||||
0x781A000C, // 0045 JMPF R6 #0053
|
0x58200010, // 0045 LDCONST R8 K16
|
||||||
0xB81A1E00, // 0046 GETNGBL R6 K15
|
0x7C180400, // 0046 CALL R6 2
|
||||||
0x8C180D10, // 0047 GETMET R6 R6 K16
|
0x7002002C, // 0047 JMP #0075
|
||||||
0x60200008, // 0048 GETGBL R8 G8
|
0x8C180306, // 0048 GETMET R6 R1 K6
|
||||||
0xB8262400, // 0049 GETNGBL R9 K18
|
0x58200018, // 0049 LDCONST R8 K24
|
||||||
0x88241313, // 004A GETMBR R9 R9 K19
|
0x7C180400, // 004A CALL R6 2
|
||||||
0x7C200200, // 004B CALL R8 1
|
0x781A000C, // 004B JMPF R6 #0059
|
||||||
0x00222208, // 004C ADD R8 K17 R8
|
0xB81A2400, // 004C GETNGBL R6 K18
|
||||||
0x00201116, // 004D ADD R8 R8 K22
|
0x8C180D13, // 004D GETMET R6 R6 K19
|
||||||
0x7C180400, // 004E CALL R6 2
|
0x60200008, // 004E GETGBL R8 G8
|
||||||
0x8C18030C, // 004F GETMET R6 R1 K12
|
0xB8262A00, // 004F GETNGBL R9 K21
|
||||||
0x5820000D, // 0050 LDCONST R8 K13
|
0x88241316, // 0050 GETMBR R9 R9 K22
|
||||||
0x7C180400, // 0051 CALL R6 2
|
0x7C200200, // 0051 CALL R8 1
|
||||||
0x7002001B, // 0052 JMP #006F
|
0x00222808, // 0052 ADD R8 K20 R8
|
||||||
0x8C180306, // 0053 GETMET R6 R1 K6
|
0x00201119, // 0053 ADD R8 R8 K25
|
||||||
0x58200017, // 0054 LDCONST R8 K23
|
0x7C180400, // 0054 CALL R6 2
|
||||||
0x7C180400, // 0055 CALL R6 2
|
0x8C18030F, // 0055 GETMET R6 R1 K15
|
||||||
0x781A0017, // 0056 JMPF R6 #006F
|
0x58200010, // 0056 LDCONST R8 K16
|
||||||
0x88180109, // 0057 GETMBR R6 R0 K9
|
0x7C180400, // 0057 CALL R6 2
|
||||||
0x88180D18, // 0058 GETMBR R6 R6 K24
|
0x7002001B, // 0058 JMP #0075
|
||||||
0x8C180D19, // 0059 GETMET R6 R6 K25
|
0x8C180306, // 0059 GETMET R6 R1 K6
|
||||||
0x60200009, // 005A GETGBL R8 G9
|
0x5820001A, // 005A LDCONST R8 K26
|
||||||
0x8C24030A, // 005B GETMET R9 R1 K10
|
0x7C180400, // 005B CALL R6 2
|
||||||
0x582C0017, // 005C LDCONST R11 K23
|
0x781A0017, // 005C JMPF R6 #0075
|
||||||
0x7C240400, // 005D CALL R9 2
|
0x88180109, // 005D GETMBR R6 R0 K9
|
||||||
0x7C200200, // 005E CALL R8 1
|
0x88180D1B, // 005E GETMBR R6 R6 K27
|
||||||
0x7C180400, // 005F CALL R6 2
|
0x8C180D1C, // 005F GETMET R6 R6 K28
|
||||||
0x4C1C0000, // 0060 LDNIL R7
|
0x60200009, // 0060 GETGBL R8 G9
|
||||||
0x201C0C07, // 0061 NE R7 R6 R7
|
0x8C24030A, // 0061 GETMET R9 R1 K10
|
||||||
0x781E0008, // 0062 JMPF R7 #006C
|
0x582C001A, // 0062 LDCONST R11 K26
|
||||||
0x881C0109, // 0063 GETMBR R7 R0 K9
|
0x7C240400, // 0063 CALL R9 2
|
||||||
0x881C0F18, // 0064 GETMBR R7 R7 K24
|
0x7C200200, // 0064 CALL R8 1
|
||||||
0x8C1C0F1A, // 0065 GETMET R7 R7 K26
|
0x7C180400, // 0065 CALL R6 2
|
||||||
0x5C240C00, // 0066 MOVE R9 R6
|
0x4C1C0000, // 0066 LDNIL R7
|
||||||
0x7C1C0400, // 0067 CALL R7 2
|
0x201C0C07, // 0067 NE R7 R6 R7
|
||||||
0x881C0109, // 0068 GETMBR R7 R0 K9
|
0x781E0008, // 0068 JMPF R7 #0072
|
||||||
0x881C0F18, // 0069 GETMBR R7 R7 K24
|
0x881C0109, // 0069 GETMBR R7 R0 K9
|
||||||
0x8C1C0F1B, // 006A GETMET R7 R7 K27
|
0x881C0F1B, // 006A GETMBR R7 R7 K27
|
||||||
0x7C1C0200, // 006B CALL R7 1
|
0x8C1C0F1D, // 006B GETMET R7 R7 K29
|
||||||
0x8C1C030C, // 006C GETMET R7 R1 K12
|
0x5C240C00, // 006C MOVE R9 R6
|
||||||
0x5824000D, // 006D LDCONST R9 K13
|
0x7C1C0400, // 006D CALL R7 2
|
||||||
0x7C1C0400, // 006E CALL R7 2
|
0x881C0109, // 006E GETMBR R7 R0 K9
|
||||||
0xA8040001, // 006F EXBLK 1 1
|
0x881C0F1B, // 006F GETMBR R7 R7 K27
|
||||||
0x7002001D, // 0070 JMP #008F
|
0x8C1C0F1E, // 0070 GETMET R7 R7 K30
|
||||||
0xAC180002, // 0071 CATCH R6 0 2
|
0x7C1C0200, // 0071 CALL R7 1
|
||||||
0x7002001A, // 0072 JMP #008E
|
0x8C1C030F, // 0072 GETMET R7 R1 K15
|
||||||
0xB8221E00, // 0073 GETNGBL R8 K15
|
0x58240010, // 0073 LDCONST R9 K16
|
||||||
0x8C20111C, // 0074 GETMET R8 R8 K28
|
0x7C1C0400, // 0074 CALL R7 2
|
||||||
0x8C28051D, // 0075 GETMET R10 R2 K29
|
0xA8040001, // 0075 EXBLK 1 1
|
||||||
0x5830001E, // 0076 LDCONST R12 K30
|
0x7002001D, // 0076 JMP #0095
|
||||||
0x5C340C00, // 0077 MOVE R13 R6
|
0xAC180002, // 0077 CATCH R6 0 2
|
||||||
0x5C380E00, // 0078 MOVE R14 R7
|
0x7002001A, // 0078 JMP #0094
|
||||||
0x7C280800, // 0079 CALL R10 4
|
0xB8222400, // 0079 GETNGBL R8 K18
|
||||||
0x582C001F, // 007A LDCONST R11 K31
|
0x8C20111F, // 007A GETMET R8 R8 K31
|
||||||
0x7C200600, // 007B CALL R8 3
|
0x8C280520, // 007B GETMET R10 R2 K32
|
||||||
0x8C200320, // 007C GETMET R8 R1 K32
|
0x58300021, // 007C LDCONST R12 K33
|
||||||
0x58280021, // 007D LDCONST R10 K33
|
0x5C340C00, // 007D MOVE R13 R6
|
||||||
0x7C200400, // 007E CALL R8 2
|
0x5C380E00, // 007E MOVE R14 R7
|
||||||
0x8C200322, // 007F GETMET R8 R1 K34
|
0x7C280800, // 007F CALL R10 4
|
||||||
0x7C200200, // 0080 CALL R8 1
|
0x582C0022, // 0080 LDCONST R11 K34
|
||||||
0x8C200323, // 0081 GETMET R8 R1 K35
|
0x7C200600, // 0081 CALL R8 3
|
||||||
0x8C28051D, // 0082 GETMET R10 R2 K29
|
0x8C200323, // 0082 GETMET R8 R1 K35
|
||||||
0x58300024, // 0083 LDCONST R12 K36
|
0x58280024, // 0083 LDCONST R10 K36
|
||||||
0x5C340C00, // 0084 MOVE R13 R6
|
0x7C200400, // 0084 CALL R8 2
|
||||||
0x5C380E00, // 0085 MOVE R14 R7
|
0x8C200325, // 0085 GETMET R8 R1 K37
|
||||||
0x7C280800, // 0086 CALL R10 4
|
0x7C200200, // 0086 CALL R8 1
|
||||||
0x7C200400, // 0087 CALL R8 2
|
0x8C200326, // 0087 GETMET R8 R1 K38
|
||||||
0x8C200325, // 0088 GETMET R8 R1 K37
|
0x8C280520, // 0088 GETMET R10 R2 K32
|
||||||
0x88280326, // 0089 GETMBR R10 R1 K38
|
0x58300027, // 0089 LDCONST R12 K39
|
||||||
0x7C200400, // 008A CALL R8 2
|
0x5C340C00, // 008A MOVE R13 R6
|
||||||
0x8C200327, // 008B GETMET R8 R1 K39
|
0x5C380E00, // 008B MOVE R14 R7
|
||||||
0x7C200200, // 008C CALL R8 1
|
0x7C280800, // 008C CALL R10 4
|
||||||
0x70020000, // 008D JMP #008F
|
0x7C200400, // 008D CALL R8 2
|
||||||
0xB0080000, // 008E RAISE 2 R0 R0
|
0x8C200328, // 008E GETMET R8 R1 K40
|
||||||
0x80000000, // 008F RET 0
|
0x88280329, // 008F GETMBR R10 R1 K41
|
||||||
|
0x7C200400, // 0090 CALL R8 2
|
||||||
|
0x8C20032A, // 0091 GETMET R8 R1 K42
|
||||||
|
0x7C200200, // 0092 CALL R8 1
|
||||||
|
0x70020000, // 0093 JMP #0095
|
||||||
|
0xB0080000, // 0094 RAISE 2 R0 R0
|
||||||
|
0x80000000, // 0095 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue