From b8483dfb6fa5461ee83415acb63ce40641d936db Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Wed, 12 Apr 2023 22:01:23 +0200 Subject: [PATCH] Matter refactoring of UDP sending (#18398) --- .../src/embedded/Matter_Commissioning.be | 10 +- .../src/embedded/Matter_Device.be | 8 +- .../src/embedded/Matter_IM_Message.be | 8 +- .../src/embedded/Matter_MessageHandler.be | 22 +- .../src/embedded/Matter_UDPServer.be | 68 +- .../solidified_Matter_Commissioning.h | 1019 ++++++++--------- .../src/solidify/solidified_Matter_Device.h | 22 +- .../solidify/solidified_Matter_IM_Message.h | 236 ++-- .../solidified_Matter_MessageHandler.h | 154 ++- .../solidify/solidified_Matter_UDPServer.h | 805 ++++++------- 10 files changed, 1148 insertions(+), 1204 deletions(-) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be index 366d5f11f..370571e5b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be @@ -120,7 +120,7 @@ class Matter_Commisioning_Context var raw = resp.encode_frame(status_raw) - self.responder.send_response(raw, msg.remote_ip, msg.remote_port, reliable ? resp.message_counter : nil, msg.session.local_session_id) + self.responder.send_response_frame(resp) end def parse_PBKDFParamRequest(msg) @@ -169,7 +169,7 @@ class Matter_Commisioning_Context var resp = msg.build_response(0x21 #-PBKDR Response-#, true) var raw = resp.encode_frame(pbkdfparamresp_raw) - self.responder.send_response(raw, msg.remote_ip, msg.remote_port, resp.message_counter, msg.session.local_session_id) + self.responder.send_response_frame(resp) return true end @@ -250,7 +250,7 @@ class Matter_Commisioning_Context var resp = msg.build_response(0x23 #-pake-2-#, true) # no reliable flag var raw = resp.encode_frame(pake2_raw) - self.responder.send_response(raw, msg.remote_ip, msg.remote_port, resp.message_counter, msg.session.local_session_id) + self.responder.send_response_frame(resp) return true end @@ -432,7 +432,7 @@ class Matter_Commisioning_Context var resp = msg.build_response(0x33 #-sigma-2-resume-#, true) var raw = resp.encode_frame(sigma2resume_raw) - self.responder.send_response(raw, msg.remote_ip, msg.remote_port, resp.message_counter, msg.session.local_session_id) + self.responder.send_response_frame(resp) session.close() session.set_keys(i2r, r2i, ac, created) @@ -542,7 +542,7 @@ class Matter_Commisioning_Context var resp = msg.build_response(0x31 #-sigma-2-#, true) # no reliable flag var raw = resp.encode_frame(sigma2_raw) - self.responder.send_response(raw, msg.remote_ip, msg.remote_port, resp.message_counter, msg.session.local_session_id) + self.responder.send_response_frame(resp) return true end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be index 7db0113ae..312189d2b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be @@ -336,15 +336,15 @@ class Matter_Device ############################################################# # Global entry point for sending a message. # Delegates to `udp_server` - def msg_send(raw, addr, port, id, session_id) - return self.udp_server.send_response(raw, addr, port, id, session_id) + def msg_send(msg) + return self.udp_server.send_UDP(msg) end ############################################################# # Signals that a ack was received. # Delegates to `udp_server` to remove from resending list. - def received_ack(id) - return self.udp_server.received_ack(id) + def received_ack(msg) + return self.udp_server.received_ack(msg) end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be index f4fa03d2c..3c342e92e 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be @@ -123,7 +123,7 @@ class Matter_IM_Message resp.encode_frame(self.data.to_TLV().tlv2raw()) # payload in cleartext resp.encrypt() tasmota.log(string.format("MTR: >>>> send elements after encrypt") tasmota.log(string.format("MTR: 0 @@ -340,7 +340,7 @@ class Matter_IM_ReportDataSubscribed : Matter_IM_ReportData resp.encode_frame() resp.encrypt() tasmota.log(string.format("MTR: rcv (%6i) [%02X/%02X] rid=%i exch=%i ack=%s %sfrom [%s]:%i", session.local_session_id, frame.protocol_id, frame.opcode, frame.message_counter, frame.exchange_id, str(frame.ack_message_counter), frame.x_flag_r ? "{reliable} " : "", addr, port), 3) - self.device.received_ack(frame.ack_message_counter) # remove acknowledge packet from sending list + self.device.received_ack(frame) # remove acknowledge packet from sending list # dispatch according to protocol_id var protocol_id = frame.protocol_id @@ -210,8 +210,18 @@ class Matter_MessageHandler end ############################################################# - def send_response(raw, addr, port, id, session_id) - self.device.msg_send(raw, addr, port, id, session_id) + # send a frame to target, usually a response + # + # We need the following: + # msg.raw: raw bytes to send (bytes) + # msg.remote_ip: ip address of target (string) + # msg.remote_port: port of target (int) + # msg.x_flag_r: is the frame expecting a Ack back (int) + # msg.message_counter: counter for this message (int) + # msg.exchange_id: exchange id (int) + # msg.local_session_id: local session (for logging) + def send_response_frame(msg) + self.device.msg_send(msg) end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be b/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be index 53379c13d..3578b7155 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UDPServer.be @@ -37,35 +37,24 @@ class Matter_UDPPacket_sent var addr # ip_address (string) var port # port (int) var msg_id # (int) message identifier that needs to be acknowledged, or `nil` if no ack needed - var session_id # (int) exchange id, for logging only + var exchange_id # (int) exchange id, to match ack + var session_id # (int) session id, for logging only var retries # 0 in first attempts, goes up to RETRIES var next_try # timestamp (millis) when to try again - def init(raw, addr, port, id, session_id) - self.raw = raw - self.addr = addr - self.port = port - self.msg_id = id + def init(msg) + # extract information from msg + self.raw = msg.raw + self.addr = msg.remote_ip + self.port = msg.remote_port + self.msg_id = msg.x_flag_r ? msg.message_counter : nil + self.exchange_id = (msg.exchange_id != nil) ? msg.exchange_id : 0 + self.session_id = (msg.local_session_id != nil) ? msg.local_session_id : 0 + # other information self.retries = 0 - self.session_id = (session_id != nil) ? session_id : 0 self.next_try = tasmota.millis() + matter.UDPServer._backoff_time(self.retries) end - ############################################################# - # Send packet now. - # - # Returns `true` if packet was successfully sent. - def send(udp_socket) - import string - var ok = udp_socket.send(self.addr ? self.addr : udp_socket.remote_ip, self.port ? self.port : udp_socket.remote_port, self.raw) - if ok - tasmota.log(string.format("MTR: sending packet to '[%s]:%i'", self.addr, self.port), 4) - else - tasmota.log(string.format("MTR: error sending packet to '[%s]:%i'", self.addr, self.port), 3) - end - return ok - end - end matter.UDPPacket_sent = Matter_UDPPacket_sent @@ -74,7 +63,7 @@ matter.UDPPacket_sent = Matter_UDPPacket_sent # ################################################################################# class Matter_UDPServer - static var RETRIES = 6 # 7 transmissions max (6 retries) - 2 more than spec `MRP_MAX_TRANSMISSIONS` 4.11.8 p.146 + static var RETRIES = 5 # 6 transmissions max (5 retries) - 1 more than spec `MRP_MAX_TRANSMISSIONS` 4.11.8 p.146 static var MAX_PACKETS_READ = 4 # read at most 4 packets per tick var addr, port # local addr and port var listening # true if active @@ -150,6 +139,21 @@ class Matter_UDPServer self._resend_packets() # resend any packet end + ############################################################# + # Send packet now. + # + # Returns `true` if packet was successfully sent. + def send(packet) + import string + var ok = self.udp_socket.send(packet.addr ? packet.addr : self.udp_socket.remote_ip, packet.port ? packet.port : self.udp_socket.remote_port, packet.raw) + if ok + tasmota.log(string.format("MTR: sending packet to '[%s]:%i'", packet.addr, packet.port), 4) + else + tasmota.log(string.format("MTR: error sending packet to '[%s]:%i'", packet.addr, packet.port), 2) + end + return ok + end + ############################################################# # Resend packets if they have not been acknowledged by receiver # either with direct Ack packet or ack embedded in another packet. @@ -166,7 +170,7 @@ class Matter_UDPServer if tasmota.time_reached(packet.next_try) if packet.retries <= self.RETRIES tasmota.log("MTR: . Resending packet id=" + str(packet.msg_id), 3) - packet.send(self.udp_socket) # resend + self.send(packet) packet.next_try = tasmota.millis() + self._backoff_time(packet.retries) packet.retries += 1 idx += 1 @@ -183,12 +187,15 @@ class Matter_UDPServer ############################################################# # Just received acknowledgment, remove packet from sender - def received_ack(id) + def received_ack(msg) + var id = msg.ack_message_counter + var exch = msg.exchange_id if id == nil return end tasmota.log("MTR: receveived ACK id="+str(id), 3) var idx = 0 while idx < size(self.packets_sent) - if self.packets_sent[idx].msg_id == id + var packet = self.packets_sent[idx] + if packet.msg_id == id && packet.exchange_id == exch self.packets_sent.remove(idx) tasmota.log("MTR: . Removed packet from sending list id=" + str(id), 3) else @@ -199,11 +206,10 @@ class Matter_UDPServer ############################################################# # Send a packet, enqueue it if `id` is not `nil` - def send_response(raw, addr, port, id, session_id) - var packet = matter.UDPPacket_sent(raw, addr, port, id, session_id) - packet.send(self.udp_socket) # send - if id - # tasmota.log("MTR: <<< enqueue id="+str(id)) + def send_UDP(msg) + var packet = matter.UDPPacket_sent(msg) + self.send(packet) + if packet.msg_id self.packets_sent.push(packet) end end diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h index f00b8535a..f5caf7d70 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h @@ -11,7 +11,7 @@ extern const bclass be_class_Matter_Commisioning_Context; ********************************************************************/ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name */ be_nested_proto( - 16, /* nstack */ + 13, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -19,7 +19,7 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[52]) { /* constants */ + ( &(const bvalue[51]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(opcode), @@ -70,12 +70,11 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name /* K47 */ be_nested_str_weak(build_response), /* K48 */ be_nested_str_weak(encode_frame), /* K49 */ be_nested_str_weak(responder), - /* K50 */ be_nested_str_weak(send_response), - /* K51 */ be_nested_str_weak(message_counter), + /* K50 */ be_nested_str_weak(send_response_frame), }), be_str_weak(parse_PBKDFParamRequest), &be_const_str_solidified, - ( &(const binstruction[141]) { /* code */ + ( &(const binstruction[136]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xA40E0200, // 0001 IMPORT R3 K1 0x88100302, // 0002 GETMBR R4 R1 K2 @@ -208,15 +207,10 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name 0x7C200400, // 0081 CALL R8 2 0x88240131, // 0082 GETMBR R9 R0 K49 0x8C241332, // 0083 GETMET R9 R9 K50 - 0x5C2C1000, // 0084 MOVE R11 R8 - 0x8830031F, // 0085 GETMBR R12 R1 K31 - 0x88340320, // 0086 GETMBR R13 R1 K32 - 0x88380F33, // 0087 GETMBR R14 R7 K51 - 0x883C0312, // 0088 GETMBR R15 R1 K18 - 0x883C1F03, // 0089 GETMBR R15 R15 K3 - 0x7C240C00, // 008A CALL R9 6 - 0x50240200, // 008B LDBOOL R9 1 0 - 0x80041200, // 008C RET 1 R9 + 0x5C2C0E00, // 0084 MOVE R11 R7 + 0x7C240400, // 0085 CALL R9 2 + 0x50240200, // 0086 LDBOOL R9 1 0 + 0x80041200, // 0087 RET 1 R9 }) ) ); @@ -228,7 +222,7 @@ be_local_closure(Matter_Commisioning_Context_parse_PBKDFParamRequest, /* name ********************************************************************/ be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ be_nested_proto( - 17, /* nstack */ + 13, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -236,7 +230,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[48]) { /* constants */ + ( &(const bvalue[44]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(opcode), /* K2 */ be_nested_str_weak(local_session_id), @@ -280,15 +274,11 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ /* K40 */ be_nested_str_weak(build_response), /* K41 */ be_nested_str_weak(encode_frame), /* K42 */ be_nested_str_weak(responder), - /* K43 */ be_nested_str_weak(send_response), - /* K44 */ be_nested_str_weak(remote_ip), - /* K45 */ be_nested_str_weak(remote_port), - /* K46 */ be_nested_str_weak(message_counter), - /* K47 */ be_nested_str_weak(session), + /* K43 */ be_nested_str_weak(send_response_frame), }), be_str_weak(parse_Pake1), &be_const_str_solidified, - ( &(const binstruction[119]) { /* code */ + ( &(const binstruction[114]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0x880C0301, // 0001 GETMBR R3 R1 K1 0x54120021, // 0002 LDINT R4 34 @@ -399,15 +389,10 @@ be_local_closure(Matter_Commisioning_Context_parse_Pake1, /* name */ 0x7C240400, // 006B CALL R9 2 0x8828012A, // 006C GETMBR R10 R0 K42 0x8C28152B, // 006D GETMET R10 R10 K43 - 0x5C301200, // 006E MOVE R12 R9 - 0x8834032C, // 006F GETMBR R13 R1 K44 - 0x8838032D, // 0070 GETMBR R14 R1 K45 - 0x883C112E, // 0071 GETMBR R15 R8 K46 - 0x8840032F, // 0072 GETMBR R16 R1 K47 - 0x88402102, // 0073 GETMBR R16 R16 K2 - 0x7C280C00, // 0074 CALL R10 6 - 0x50280200, // 0075 LDBOOL R10 1 0 - 0x80041400, // 0076 RET 1 R10 + 0x5C301000, // 006E MOVE R12 R8 + 0x7C280400, // 006F CALL R10 2 + 0x50280200, // 0070 LDBOOL R10 1 0 + 0x80041400, // 0071 RET 1 R10 }) ) ); @@ -1702,7 +1687,7 @@ be_local_closure(Matter_Commisioning_Context_parse_StatusReport, /* name */ ********************************************************************/ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ be_nested_proto( - 38, /* nstack */ + 37, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1710,7 +1695,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[146]) { /* constants */ + ( &(const bvalue[145]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(opcode), @@ -1795,72 +1780,71 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ /* K81 */ be_nested_str_weak(build_response), /* K82 */ be_nested_str_weak(encode_frame), /* K83 */ be_nested_str_weak(responder), - /* K84 */ be_nested_str_weak(send_response), - /* K85 */ be_nested_str_weak(message_counter), - /* K86 */ be_nested_str_weak(close), - /* K87 */ be_nested_str_weak(set_keys), - /* K88 */ be_nested_str_weak(_breadcrumb), - /* K89 */ be_nested_str_weak(counter_snd_next), - /* K90 */ be_nested_str_weak(set_persist), - /* K91 */ be_nested_str_weak(set_no_expiration), - /* K92 */ be_nested_str_weak(persist_to_fabric), - /* K93 */ be_nested_str_weak(save), - /* K94 */ be_nested_str_weak(find_fabric_by_destination_id), - /* K95 */ be_nested_str_weak(destinationId), - /* K96 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28GeneralCode_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20NO_SHARED_TRUST_ROOTS_X29), - /* K97 */ be_nested_str_weak(future_local_session_id), - /* K98 */ be_nested_str_weak(MTR_X3A_X20fabric_X3D), - /* K99 */ be_nested_str_weak(MTR_X3A_X20no_private_key_X3D), - /* K100 */ be_nested_str_weak(no_private_key), - /* K101 */ be_nested_str_weak(MTR_X3A_X20noc_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K102 */ be_nested_str_weak(noc), - /* K103 */ be_nested_str_weak(get_icac), - /* K104 */ be_nested_str_weak(MTR_X3A_X20icac_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), - /* K105 */ be_nested_str_weak(MTR_X3A_X20root_ca_cert_X20_X20_X3D), - /* K106 */ be_nested_str_weak(root_ca_certificate), - /* K107 */ be_nested_str_weak(ResponderEph_priv), - /* K108 */ be_nested_str_weak(ResponderEph_pub), - /* K109 */ be_nested_str_weak(EC_P256), - /* K110 */ be_nested_str_weak(public_key), - /* K111 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_priv_X20_X20_X3D), - /* K112 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_pub_X20_X20_X3D), - /* K113 */ be_nested_str_weak(shared_key), - /* K114 */ be_nested_str_weak(TLV), - /* K115 */ be_nested_str_weak(Matter_TLV_struct), - /* K116 */ be_nested_str_weak(add_TLV), - /* K117 */ be_nested_str_weak(B2), - /* K118 */ be_nested_str_weak(get_noc), - /* K119 */ be_const_int(3), - /* K120 */ be_nested_str_weak(ecdsa_sign_sha256), - /* K121 */ be_nested_str_weak(get_pk), - /* K122 */ be_nested_str_weak(Msg1), - /* K123 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20resumptionid_X20_X20_X3D_X20), - /* K124 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20MSG1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K125 */ be_nested_str_weak(SHA256), - /* K126 */ be_nested_str_weak(update), - /* K127 */ be_nested_str_weak(out), - /* K128 */ be_nested_str_weak(MTR_X3A_X20TranscriptHash_X20_X3D), - /* K129 */ be_nested_str_weak(S2K_Info), - /* K130 */ be_nested_str_weak(get_ipk_group_key), - /* K131 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20SharedSecret_X20_X20_X3D_X20), - /* K132 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_salt_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K133 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), - /* K134 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Raw_X20_X20_X20_X3D_X20), - /* K135 */ be_nested_str_weak(TBEData2_Nonce), - /* K136 */ be_nested_str_weak(encrypt), - /* K137 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Enc_X20_X20_X20_X3D_X20), - /* K138 */ be_nested_str_weak(Sigma2), - /* K139 */ be_nested_str_weak(responderRandom), - /* K140 */ be_nested_str_weak(responderSessionId), - /* K141 */ be_nested_str_weak(responderEphPubKey), - /* K142 */ be_nested_str_weak(encrypted2), - /* K143 */ be_nested_str_weak(MTR_X3A_X20sigma2_X3A_X20), - /* K144 */ be_nested_str_weak(__Msg2), - /* K145 */ be_nested_str_weak(MTR_X3A_X20sigma2_raw_X3A_X20), + /* K84 */ be_nested_str_weak(send_response_frame), + /* K85 */ be_nested_str_weak(close), + /* K86 */ be_nested_str_weak(set_keys), + /* K87 */ be_nested_str_weak(_breadcrumb), + /* K88 */ be_nested_str_weak(counter_snd_next), + /* K89 */ be_nested_str_weak(set_persist), + /* K90 */ be_nested_str_weak(set_no_expiration), + /* K91 */ be_nested_str_weak(persist_to_fabric), + /* K92 */ be_nested_str_weak(save), + /* K93 */ be_nested_str_weak(find_fabric_by_destination_id), + /* K94 */ be_nested_str_weak(destinationId), + /* K95 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28GeneralCode_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20NO_SHARED_TRUST_ROOTS_X29), + /* K96 */ be_nested_str_weak(future_local_session_id), + /* K97 */ be_nested_str_weak(MTR_X3A_X20fabric_X3D), + /* K98 */ be_nested_str_weak(MTR_X3A_X20no_private_key_X3D), + /* K99 */ be_nested_str_weak(no_private_key), + /* K100 */ be_nested_str_weak(MTR_X3A_X20noc_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K101 */ be_nested_str_weak(noc), + /* K102 */ be_nested_str_weak(get_icac), + /* K103 */ be_nested_str_weak(MTR_X3A_X20icac_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D), + /* K104 */ be_nested_str_weak(MTR_X3A_X20root_ca_cert_X20_X20_X3D), + /* K105 */ be_nested_str_weak(root_ca_certificate), + /* K106 */ be_nested_str_weak(ResponderEph_priv), + /* K107 */ be_nested_str_weak(ResponderEph_pub), + /* K108 */ be_nested_str_weak(EC_P256), + /* K109 */ be_nested_str_weak(public_key), + /* K110 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_priv_X20_X20_X3D), + /* K111 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_pub_X20_X20_X3D), + /* K112 */ be_nested_str_weak(shared_key), + /* K113 */ be_nested_str_weak(TLV), + /* K114 */ be_nested_str_weak(Matter_TLV_struct), + /* K115 */ be_nested_str_weak(add_TLV), + /* K116 */ be_nested_str_weak(B2), + /* K117 */ be_nested_str_weak(get_noc), + /* K118 */ be_const_int(3), + /* K119 */ be_nested_str_weak(ecdsa_sign_sha256), + /* K120 */ be_nested_str_weak(get_pk), + /* K121 */ be_nested_str_weak(Msg1), + /* K122 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20resumptionid_X20_X20_X3D_X20), + /* K123 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20MSG1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K124 */ be_nested_str_weak(SHA256), + /* K125 */ be_nested_str_weak(update), + /* K126 */ be_nested_str_weak(out), + /* K127 */ be_nested_str_weak(MTR_X3A_X20TranscriptHash_X20_X3D), + /* K128 */ be_nested_str_weak(S2K_Info), + /* K129 */ be_nested_str_weak(get_ipk_group_key), + /* K130 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20SharedSecret_X20_X20_X3D_X20), + /* K131 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_salt_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K132 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20), + /* K133 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Raw_X20_X20_X20_X3D_X20), + /* K134 */ be_nested_str_weak(TBEData2_Nonce), + /* K135 */ be_nested_str_weak(encrypt), + /* K136 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Enc_X20_X20_X20_X3D_X20), + /* K137 */ be_nested_str_weak(Sigma2), + /* K138 */ be_nested_str_weak(responderRandom), + /* K139 */ be_nested_str_weak(responderSessionId), + /* K140 */ be_nested_str_weak(responderEphPubKey), + /* K141 */ be_nested_str_weak(encrypted2), + /* K142 */ be_nested_str_weak(MTR_X3A_X20sigma2_X3A_X20), + /* K143 */ be_nested_str_weak(__Msg2), + /* K144 */ be_nested_str_weak(MTR_X3A_X20sigma2_raw_X3A_X20), }), be_str_weak(parse_Sigma1), &be_const_str_solidified, - ( &(const binstruction[805]) { /* code */ + ( &(const binstruction[795]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xA40E0200, // 0001 IMPORT R3 K1 0x88100302, // 0002 GETMBR R4 R1 K2 @@ -1961,7 +1945,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ 0x1C201009, // 0061 EQ R8 R8 R9 0x78220000, // 0062 JMPF R8 #0064 0x50140000, // 0063 LDBOOL R5 0 0 - 0x7816013F, // 0064 JMPF R5 #01A5 + 0x7816013A, // 0064 JMPF R5 #01A0 0x8820091F, // 0065 GETMBR R8 R4 K31 0x88240916, // 0066 GETMBR R9 R4 K22 0x00201009, // 0067 ADD R8 R8 R9 @@ -2047,7 +2031,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ 0x54520003, // 00B7 LDINT R20 4 0x7C440600, // 00B8 CALL R17 3 0x1C441A10, // 00B9 EQ R17 R13 R16 - 0x784600E8, // 00BA JMPF R17 #01A4 + 0x784600E3, // 00BA JMPF R17 #019F 0x88440F1E, // 00BB GETMBR R17 R7 K30 0x901A3C11, // 00BC SETMBR R6 K30 R17 0x88440331, // 00BD GETMBR R17 R1 K49 @@ -2251,421 +2235,411 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ 0x7C780400, // 0183 CALL R30 2 0x887C0153, // 0184 GETMBR R31 R0 K83 0x8C7C3F54, // 0185 GETMET R31 R31 K84 - 0x5C843C00, // 0186 MOVE R33 R30 - 0x88880338, // 0187 GETMBR R34 R1 K56 - 0x888C0339, // 0188 GETMBR R35 R1 K57 - 0x88903B55, // 0189 GETMBR R36 R29 K85 - 0x88940319, // 018A GETMBR R37 R1 K25 - 0x88944B03, // 018B GETMBR R37 R37 K3 - 0x7C7C0C00, // 018C CALL R31 6 - 0x8C7C0D56, // 018D GETMET R31 R6 K86 - 0x7C7C0200, // 018E CALL R31 1 - 0x8C7C0D57, // 018F GETMET R31 R6 K87 - 0x5C843000, // 0190 MOVE R33 R24 - 0x5C883200, // 0191 MOVE R34 R25 - 0x5C8C3400, // 0192 MOVE R35 R26 - 0x5C903600, // 0193 MOVE R36 R27 - 0x7C7C0A00, // 0194 CALL R31 5 - 0x901AB104, // 0195 SETMBR R6 K88 K4 - 0x8C7C0D59, // 0196 GETMET R31 R6 K89 + 0x5C843A00, // 0186 MOVE R33 R29 + 0x7C7C0400, // 0187 CALL R31 2 + 0x8C7C0D55, // 0188 GETMET R31 R6 K85 + 0x7C7C0200, // 0189 CALL R31 1 + 0x8C7C0D56, // 018A GETMET R31 R6 K86 + 0x5C843000, // 018B MOVE R33 R24 + 0x5C883200, // 018C MOVE R34 R25 + 0x5C8C3400, // 018D MOVE R35 R26 + 0x5C903600, // 018E MOVE R36 R27 + 0x7C7C0A00, // 018F CALL R31 5 + 0x901AAF04, // 0190 SETMBR R6 K87 K4 + 0x8C7C0D58, // 0191 GETMET R31 R6 K88 + 0x7C7C0200, // 0192 CALL R31 1 + 0x8C7C0D59, // 0193 GETMET R31 R6 K89 + 0x50840200, // 0194 LDBOOL R33 1 0 + 0x7C7C0400, // 0195 CALL R31 2 + 0x8C7C0D5A, // 0196 GETMET R31 R6 K90 0x7C7C0200, // 0197 CALL R31 1 - 0x8C7C0D5A, // 0198 GETMET R31 R6 K90 - 0x50840200, // 0199 LDBOOL R33 1 0 - 0x7C7C0400, // 019A CALL R31 2 - 0x8C7C0D5B, // 019B GETMET R31 R6 K91 - 0x7C7C0200, // 019C CALL R31 1 - 0x8C7C0D5C, // 019D GETMET R31 R6 K92 - 0x7C7C0200, // 019E CALL R31 1 - 0x8C7C0D5D, // 019F GETMET R31 R6 K93 - 0x7C7C0200, // 01A0 CALL R31 1 - 0x507C0200, // 01A1 LDBOOL R31 1 0 - 0x80043E00, // 01A2 RET 1 R31 - 0x70020000, // 01A3 JMP #01A5 - 0x50140000, // 01A4 LDBOOL R5 0 0 - 0x5C200A00, // 01A5 MOVE R8 R5 - 0x7422017B, // 01A6 JMPT R8 #0323 - 0x8C20015E, // 01A7 GETMET R8 R0 K94 - 0x8828095F, // 01A8 GETMBR R10 R4 K95 - 0x882C091F, // 01A9 GETMBR R11 R4 K31 - 0x7C200600, // 01AA CALL R8 3 - 0x901A3C08, // 01AB SETMBR R6 K30 R8 - 0x4C240000, // 01AC LDNIL R9 - 0x1C240C09, // 01AD EQ R9 R6 R9 - 0x74260003, // 01AE JMPT R9 #01B3 - 0x88240D1E, // 01AF GETMBR R9 R6 K30 - 0x4C280000, // 01B0 LDNIL R10 - 0x1C24120A, // 01B1 EQ R9 R9 R10 - 0x7826000D, // 01B2 JMPF R9 #01C1 - 0xB8260C00, // 01B3 GETNGBL R9 K6 - 0x8C241307, // 01B4 GETMET R9 R9 K7 - 0x582C0060, // 01B5 LDCONST R11 K96 - 0x58300009, // 01B6 LDCONST R12 K9 - 0x7C240600, // 01B7 CALL R9 3 - 0x8C24010A, // 01B8 GETMET R9 R0 K10 - 0x5C2C0200, // 01B9 MOVE R11 R1 - 0x5830000B, // 01BA LDCONST R12 K11 - 0x58340004, // 01BB LDCONST R13 K4 - 0x5838000B, // 01BC LDCONST R14 K11 - 0x503C0000, // 01BD LDBOOL R15 0 0 - 0x7C240C00, // 01BE CALL R9 6 - 0x50280000, // 01BF LDBOOL R10 0 0 - 0x80041400, // 01C0 RET 1 R10 - 0x88240331, // 01C1 GETMBR R9 R1 K49 - 0x901A6009, // 01C2 SETMBR R6 K48 R9 - 0x8C240D32, // 01C3 GETMET R9 R6 K50 - 0x7C240200, // 01C4 CALL R9 1 - 0x88240934, // 01C5 GETMBR R9 R4 K52 - 0x901A6609, // 01C6 SETMBR R6 K51 R9 - 0x8824011A, // 01C7 GETMBR R9 R0 K26 - 0x8824131B, // 01C8 GETMBR R9 R9 K27 - 0x8C241336, // 01C9 GETMET R9 R9 K54 - 0x7C240200, // 01CA CALL R9 1 - 0x901A6A09, // 01CB SETMBR R6 K53 R9 - 0x88240D35, // 01CC GETMBR R9 R6 K53 - 0x9002C209, // 01CD SETMBR R0 K97 R9 - 0xB8260C00, // 01CE GETNGBL R9 K6 - 0x8C241307, // 01CF GETMET R9 R9 K7 - 0x8C2C0711, // 01D0 GETMET R11 R3 K17 - 0x58340037, // 01D1 LDCONST R13 K55 - 0x88380161, // 01D2 GETMBR R14 R0 K97 - 0x883C0338, // 01D3 GETMBR R15 R1 K56 - 0x88400339, // 01D4 GETMBR R16 R1 K57 - 0x7C2C0A00, // 01D5 CALL R11 5 - 0x58300009, // 01D6 LDCONST R12 K9 - 0x7C240600, // 01D7 CALL R9 3 - 0xB8260C00, // 01D8 GETNGBL R9 K6 - 0x8C241307, // 01D9 GETMET R9 R9 K7 - 0xB82E1800, // 01DA GETNGBL R11 K12 - 0x8C2C1713, // 01DB GETMET R11 R11 K19 - 0x88340D1E, // 01DC GETMBR R13 R6 K30 - 0x7C2C0400, // 01DD CALL R11 2 - 0x002EC40B, // 01DE ADD R11 K98 R11 - 0x54320003, // 01DF LDINT R12 4 - 0x7C240600, // 01E0 CALL R9 3 - 0xB8260C00, // 01E1 GETNGBL R9 K6 - 0x8C241307, // 01E2 GETMET R9 R9 K7 - 0x882C0D1E, // 01E3 GETMBR R11 R6 K30 - 0x882C1764, // 01E4 GETMBR R11 R11 K100 - 0x8C2C172C, // 01E5 GETMET R11 R11 K44 - 0x7C2C0200, // 01E6 CALL R11 1 - 0x002EC60B, // 01E7 ADD R11 K99 R11 - 0x54320003, // 01E8 LDINT R12 4 - 0x7C240600, // 01E9 CALL R9 3 - 0xB8260C00, // 01EA GETNGBL R9 K6 - 0x8C241307, // 01EB GETMET R9 R9 K7 - 0x882C0D1E, // 01EC GETMBR R11 R6 K30 - 0x882C1766, // 01ED GETMBR R11 R11 K102 - 0x8C2C172C, // 01EE GETMET R11 R11 K44 - 0x7C2C0200, // 01EF CALL R11 1 - 0x002ECA0B, // 01F0 ADD R11 K101 R11 - 0x54320003, // 01F1 LDINT R12 4 - 0x7C240600, // 01F2 CALL R9 3 - 0x88240D1E, // 01F3 GETMBR R9 R6 K30 - 0x8C241367, // 01F4 GETMET R9 R9 K103 - 0x7C240200, // 01F5 CALL R9 1 - 0x78260009, // 01F6 JMPF R9 #0201 - 0xB8260C00, // 01F7 GETNGBL R9 K6 - 0x8C241307, // 01F8 GETMET R9 R9 K7 - 0x882C0D1E, // 01F9 GETMBR R11 R6 K30 - 0x8C2C1767, // 01FA GETMET R11 R11 K103 - 0x7C2C0200, // 01FB CALL R11 1 - 0x8C2C172C, // 01FC GETMET R11 R11 K44 - 0x7C2C0200, // 01FD CALL R11 1 - 0x002ED00B, // 01FE ADD R11 K104 R11 - 0x54320003, // 01FF LDINT R12 4 - 0x7C240600, // 0200 CALL R9 3 - 0xB8260C00, // 0201 GETNGBL R9 K6 - 0x8C241307, // 0202 GETMET R9 R9 K7 - 0x882C0D1E, // 0203 GETMBR R11 R6 K30 - 0x882C176A, // 0204 GETMBR R11 R11 K106 - 0x8C2C172C, // 0205 GETMET R11 R11 K44 - 0x7C2C0200, // 0206 CALL R11 1 - 0x002ED20B, // 0207 ADD R11 K105 R11 - 0x54320003, // 0208 LDINT R12 4 - 0x7C240600, // 0209 CALL R9 3 - 0x8C24053B, // 020A GETMET R9 R2 K59 - 0x542E000F, // 020B LDINT R11 16 - 0x7C240400, // 020C CALL R9 2 - 0x901A7409, // 020D SETMBR R6 K58 R9 - 0x8C24053B, // 020E GETMET R9 R2 K59 - 0x542E001F, // 020F LDINT R11 32 - 0x7C240400, // 0210 CALL R9 2 - 0x9002D609, // 0211 SETMBR R0 K107 R9 - 0x8C24056D, // 0212 GETMET R9 R2 K109 - 0x7C240200, // 0213 CALL R9 1 - 0x8C24136E, // 0214 GETMET R9 R9 K110 - 0x882C016B, // 0215 GETMBR R11 R0 K107 - 0x7C240400, // 0216 CALL R9 2 - 0x9002D809, // 0217 SETMBR R0 K108 R9 - 0xB8260C00, // 0218 GETNGBL R9 K6 - 0x8C241307, // 0219 GETMET R9 R9 K7 - 0x882C016B, // 021A GETMBR R11 R0 K107 - 0x8C2C172C, // 021B GETMET R11 R11 K44 - 0x7C2C0200, // 021C CALL R11 1 - 0x002EDE0B, // 021D ADD R11 K111 R11 - 0x54320003, // 021E LDINT R12 4 - 0x7C240600, // 021F CALL R9 3 - 0xB8260C00, // 0220 GETNGBL R9 K6 - 0x8C241307, // 0221 GETMET R9 R9 K7 - 0x882C016C, // 0222 GETMBR R11 R0 K108 - 0x8C2C172C, // 0223 GETMET R11 R11 K44 - 0x7C2C0200, // 0224 CALL R11 1 - 0x002EE00B, // 0225 ADD R11 K112 R11 - 0x54320003, // 0226 LDINT R12 4 - 0x7C240600, // 0227 CALL R9 3 - 0x8C24053B, // 0228 GETMET R9 R2 K59 - 0x542E001F, // 0229 LDINT R11 32 - 0x7C240400, // 022A CALL R9 2 - 0x8C28056D, // 022B GETMET R10 R2 K109 - 0x7C280200, // 022C CALL R10 1 - 0x8C281571, // 022D GETMET R10 R10 K113 - 0x8830016B, // 022E GETMBR R12 R0 K107 - 0x88340915, // 022F GETMBR R13 R4 K21 - 0x7C280600, // 0230 CALL R10 3 - 0x901A480A, // 0231 SETMBR R6 K36 R10 - 0xB82A1800, // 0232 GETNGBL R10 K12 - 0x88281572, // 0233 GETMBR R10 R10 K114 - 0x8C281573, // 0234 GETMET R10 R10 K115 - 0x7C280200, // 0235 CALL R10 1 - 0x8C2C1574, // 0236 GETMET R11 R10 K116 - 0x5834000B, // 0237 LDCONST R13 K11 - 0xB83A1800, // 0238 GETNGBL R14 K12 - 0x88381D72, // 0239 GETMBR R14 R14 K114 - 0x88381D75, // 023A GETMBR R14 R14 K117 - 0x8C3C0D76, // 023B GETMET R15 R6 K118 - 0x7C3C0200, // 023C CALL R15 1 - 0x7C2C0800, // 023D CALL R11 4 - 0x8C2C1574, // 023E GETMET R11 R10 K116 - 0x58340009, // 023F LDCONST R13 K9 - 0xB83A1800, // 0240 GETNGBL R14 K12 - 0x88381D72, // 0241 GETMBR R14 R14 K114 - 0x88381D75, // 0242 GETMBR R14 R14 K117 - 0x8C3C0D67, // 0243 GETMET R15 R6 K103 - 0x7C3C0200, // 0244 CALL R15 1 - 0x7C2C0800, // 0245 CALL R11 4 - 0x8C2C1574, // 0246 GETMET R11 R10 K116 - 0x58340077, // 0247 LDCONST R13 K119 - 0xB83A1800, // 0248 GETNGBL R14 K12 - 0x88381D72, // 0249 GETMBR R14 R14 K114 - 0x88381D75, // 024A GETMBR R14 R14 K117 - 0x883C016C, // 024B GETMBR R15 R0 K108 - 0x7C2C0800, // 024C CALL R11 4 - 0x8C2C1574, // 024D GETMET R11 R10 K116 - 0x54360003, // 024E LDINT R13 4 - 0xB83A1800, // 024F GETNGBL R14 K12 - 0x88381D72, // 0250 GETMBR R14 R14 K114 - 0x88381D75, // 0251 GETMBR R14 R14 K117 - 0x883C0915, // 0252 GETMBR R15 R4 K21 - 0x7C2C0800, // 0253 CALL R11 4 - 0x8C2C056D, // 0254 GETMET R11 R2 K109 - 0x7C2C0200, // 0255 CALL R11 1 - 0x8C2C1778, // 0256 GETMET R11 R11 K120 - 0x8C340D79, // 0257 GETMET R13 R6 K121 - 0x7C340200, // 0258 CALL R13 1 - 0x8C38154D, // 0259 GETMET R14 R10 K77 - 0x7C380200, // 025A CALL R14 1 - 0x7C2C0600, // 025B CALL R11 3 - 0xB8321800, // 025C GETNGBL R12 K12 - 0x88301972, // 025D GETMBR R12 R12 K114 - 0x8C301973, // 025E GETMET R12 R12 K115 - 0x7C300200, // 025F CALL R12 1 - 0x8C341974, // 0260 GETMET R13 R12 K116 - 0x583C000B, // 0261 LDCONST R15 K11 - 0xB8421800, // 0262 GETNGBL R16 K12 - 0x88402172, // 0263 GETMBR R16 R16 K114 - 0x88402175, // 0264 GETMBR R16 R16 K117 - 0x8C440D76, // 0265 GETMET R17 R6 K118 - 0x7C440200, // 0266 CALL R17 1 - 0x7C340800, // 0267 CALL R13 4 - 0x8C341974, // 0268 GETMET R13 R12 K116 - 0x583C0009, // 0269 LDCONST R15 K9 - 0xB8421800, // 026A GETNGBL R16 K12 - 0x88402172, // 026B GETMBR R16 R16 K114 - 0x88402175, // 026C GETMBR R16 R16 K117 - 0x8C440D67, // 026D GETMET R17 R6 K103 - 0x7C440200, // 026E CALL R17 1 - 0x7C340800, // 026F CALL R13 4 - 0x8C341974, // 0270 GETMET R13 R12 K116 - 0x583C0077, // 0271 LDCONST R15 K119 - 0xB8421800, // 0272 GETNGBL R16 K12 - 0x88402172, // 0273 GETMBR R16 R16 K114 - 0x88402175, // 0274 GETMBR R16 R16 K117 - 0x5C441600, // 0275 MOVE R17 R11 - 0x7C340800, // 0276 CALL R13 4 - 0x8C341974, // 0277 GETMET R13 R12 K116 - 0x543E0003, // 0278 LDINT R15 4 - 0xB8421800, // 0279 GETNGBL R16 K12 - 0x88402172, // 027A GETMBR R16 R16 K114 - 0x88402175, // 027B GETMBR R16 R16 K117 - 0x88440D3A, // 027C GETMBR R17 R6 K58 - 0x7C340800, // 027D CALL R13 4 - 0xB8360C00, // 027E GETNGBL R13 K6 - 0x8C341B07, // 027F GETMET R13 R13 K7 - 0x583C002A, // 0280 LDCONST R15 K42 - 0x54420003, // 0281 LDINT R16 4 - 0x7C340600, // 0282 CALL R13 3 - 0x8834097A, // 0283 GETMBR R13 R4 K122 - 0x901A9C0D, // 0284 SETMBR R6 K78 R13 - 0xB8360C00, // 0285 GETNGBL R13 K6 - 0x8C341B07, // 0286 GETMET R13 R13 K7 - 0x883C0D3A, // 0287 GETMBR R15 R6 K58 - 0x8C3C1F2C, // 0288 GETMET R15 R15 K44 - 0x7C3C0200, // 0289 CALL R15 1 - 0x003EF60F, // 028A ADD R15 K123 R15 - 0x54420003, // 028B LDINT R16 4 - 0x7C340600, // 028C CALL R13 3 - 0xB8360C00, // 028D GETNGBL R13 K6 - 0x8C341B07, // 028E GETMET R13 R13 K7 - 0x883C0D4E, // 028F GETMBR R15 R6 K78 - 0x8C3C1F2C, // 0290 GETMET R15 R15 K44 - 0x7C3C0200, // 0291 CALL R15 1 - 0x003EF80F, // 0292 ADD R15 K124 R15 - 0x54420003, // 0293 LDINT R16 4 - 0x7C340600, // 0294 CALL R13 3 - 0x8C34057D, // 0295 GETMET R13 R2 K125 + 0x8C7C0D5B, // 0198 GETMET R31 R6 K91 + 0x7C7C0200, // 0199 CALL R31 1 + 0x8C7C0D5C, // 019A GETMET R31 R6 K92 + 0x7C7C0200, // 019B CALL R31 1 + 0x507C0200, // 019C LDBOOL R31 1 0 + 0x80043E00, // 019D RET 1 R31 + 0x70020000, // 019E JMP #01A0 + 0x50140000, // 019F LDBOOL R5 0 0 + 0x5C200A00, // 01A0 MOVE R8 R5 + 0x74220176, // 01A1 JMPT R8 #0319 + 0x8C20015D, // 01A2 GETMET R8 R0 K93 + 0x8828095E, // 01A3 GETMBR R10 R4 K94 + 0x882C091F, // 01A4 GETMBR R11 R4 K31 + 0x7C200600, // 01A5 CALL R8 3 + 0x901A3C08, // 01A6 SETMBR R6 K30 R8 + 0x4C240000, // 01A7 LDNIL R9 + 0x1C240C09, // 01A8 EQ R9 R6 R9 + 0x74260003, // 01A9 JMPT R9 #01AE + 0x88240D1E, // 01AA GETMBR R9 R6 K30 + 0x4C280000, // 01AB LDNIL R10 + 0x1C24120A, // 01AC EQ R9 R9 R10 + 0x7826000D, // 01AD JMPF R9 #01BC + 0xB8260C00, // 01AE GETNGBL R9 K6 + 0x8C241307, // 01AF GETMET R9 R9 K7 + 0x582C005F, // 01B0 LDCONST R11 K95 + 0x58300009, // 01B1 LDCONST R12 K9 + 0x7C240600, // 01B2 CALL R9 3 + 0x8C24010A, // 01B3 GETMET R9 R0 K10 + 0x5C2C0200, // 01B4 MOVE R11 R1 + 0x5830000B, // 01B5 LDCONST R12 K11 + 0x58340004, // 01B6 LDCONST R13 K4 + 0x5838000B, // 01B7 LDCONST R14 K11 + 0x503C0000, // 01B8 LDBOOL R15 0 0 + 0x7C240C00, // 01B9 CALL R9 6 + 0x50280000, // 01BA LDBOOL R10 0 0 + 0x80041400, // 01BB RET 1 R10 + 0x88240331, // 01BC GETMBR R9 R1 K49 + 0x901A6009, // 01BD SETMBR R6 K48 R9 + 0x8C240D32, // 01BE GETMET R9 R6 K50 + 0x7C240200, // 01BF CALL R9 1 + 0x88240934, // 01C0 GETMBR R9 R4 K52 + 0x901A6609, // 01C1 SETMBR R6 K51 R9 + 0x8824011A, // 01C2 GETMBR R9 R0 K26 + 0x8824131B, // 01C3 GETMBR R9 R9 K27 + 0x8C241336, // 01C4 GETMET R9 R9 K54 + 0x7C240200, // 01C5 CALL R9 1 + 0x901A6A09, // 01C6 SETMBR R6 K53 R9 + 0x88240D35, // 01C7 GETMBR R9 R6 K53 + 0x9002C009, // 01C8 SETMBR R0 K96 R9 + 0xB8260C00, // 01C9 GETNGBL R9 K6 + 0x8C241307, // 01CA GETMET R9 R9 K7 + 0x8C2C0711, // 01CB GETMET R11 R3 K17 + 0x58340037, // 01CC LDCONST R13 K55 + 0x88380160, // 01CD GETMBR R14 R0 K96 + 0x883C0338, // 01CE GETMBR R15 R1 K56 + 0x88400339, // 01CF GETMBR R16 R1 K57 + 0x7C2C0A00, // 01D0 CALL R11 5 + 0x58300009, // 01D1 LDCONST R12 K9 + 0x7C240600, // 01D2 CALL R9 3 + 0xB8260C00, // 01D3 GETNGBL R9 K6 + 0x8C241307, // 01D4 GETMET R9 R9 K7 + 0xB82E1800, // 01D5 GETNGBL R11 K12 + 0x8C2C1713, // 01D6 GETMET R11 R11 K19 + 0x88340D1E, // 01D7 GETMBR R13 R6 K30 + 0x7C2C0400, // 01D8 CALL R11 2 + 0x002EC20B, // 01D9 ADD R11 K97 R11 + 0x54320003, // 01DA LDINT R12 4 + 0x7C240600, // 01DB CALL R9 3 + 0xB8260C00, // 01DC GETNGBL R9 K6 + 0x8C241307, // 01DD GETMET R9 R9 K7 + 0x882C0D1E, // 01DE GETMBR R11 R6 K30 + 0x882C1763, // 01DF GETMBR R11 R11 K99 + 0x8C2C172C, // 01E0 GETMET R11 R11 K44 + 0x7C2C0200, // 01E1 CALL R11 1 + 0x002EC40B, // 01E2 ADD R11 K98 R11 + 0x54320003, // 01E3 LDINT R12 4 + 0x7C240600, // 01E4 CALL R9 3 + 0xB8260C00, // 01E5 GETNGBL R9 K6 + 0x8C241307, // 01E6 GETMET R9 R9 K7 + 0x882C0D1E, // 01E7 GETMBR R11 R6 K30 + 0x882C1765, // 01E8 GETMBR R11 R11 K101 + 0x8C2C172C, // 01E9 GETMET R11 R11 K44 + 0x7C2C0200, // 01EA CALL R11 1 + 0x002EC80B, // 01EB ADD R11 K100 R11 + 0x54320003, // 01EC LDINT R12 4 + 0x7C240600, // 01ED CALL R9 3 + 0x88240D1E, // 01EE GETMBR R9 R6 K30 + 0x8C241366, // 01EF GETMET R9 R9 K102 + 0x7C240200, // 01F0 CALL R9 1 + 0x78260009, // 01F1 JMPF R9 #01FC + 0xB8260C00, // 01F2 GETNGBL R9 K6 + 0x8C241307, // 01F3 GETMET R9 R9 K7 + 0x882C0D1E, // 01F4 GETMBR R11 R6 K30 + 0x8C2C1766, // 01F5 GETMET R11 R11 K102 + 0x7C2C0200, // 01F6 CALL R11 1 + 0x8C2C172C, // 01F7 GETMET R11 R11 K44 + 0x7C2C0200, // 01F8 CALL R11 1 + 0x002ECE0B, // 01F9 ADD R11 K103 R11 + 0x54320003, // 01FA LDINT R12 4 + 0x7C240600, // 01FB CALL R9 3 + 0xB8260C00, // 01FC GETNGBL R9 K6 + 0x8C241307, // 01FD GETMET R9 R9 K7 + 0x882C0D1E, // 01FE GETMBR R11 R6 K30 + 0x882C1769, // 01FF GETMBR R11 R11 K105 + 0x8C2C172C, // 0200 GETMET R11 R11 K44 + 0x7C2C0200, // 0201 CALL R11 1 + 0x002ED00B, // 0202 ADD R11 K104 R11 + 0x54320003, // 0203 LDINT R12 4 + 0x7C240600, // 0204 CALL R9 3 + 0x8C24053B, // 0205 GETMET R9 R2 K59 + 0x542E000F, // 0206 LDINT R11 16 + 0x7C240400, // 0207 CALL R9 2 + 0x901A7409, // 0208 SETMBR R6 K58 R9 + 0x8C24053B, // 0209 GETMET R9 R2 K59 + 0x542E001F, // 020A LDINT R11 32 + 0x7C240400, // 020B CALL R9 2 + 0x9002D409, // 020C SETMBR R0 K106 R9 + 0x8C24056C, // 020D GETMET R9 R2 K108 + 0x7C240200, // 020E CALL R9 1 + 0x8C24136D, // 020F GETMET R9 R9 K109 + 0x882C016A, // 0210 GETMBR R11 R0 K106 + 0x7C240400, // 0211 CALL R9 2 + 0x9002D609, // 0212 SETMBR R0 K107 R9 + 0xB8260C00, // 0213 GETNGBL R9 K6 + 0x8C241307, // 0214 GETMET R9 R9 K7 + 0x882C016A, // 0215 GETMBR R11 R0 K106 + 0x8C2C172C, // 0216 GETMET R11 R11 K44 + 0x7C2C0200, // 0217 CALL R11 1 + 0x002EDC0B, // 0218 ADD R11 K110 R11 + 0x54320003, // 0219 LDINT R12 4 + 0x7C240600, // 021A CALL R9 3 + 0xB8260C00, // 021B GETNGBL R9 K6 + 0x8C241307, // 021C GETMET R9 R9 K7 + 0x882C016B, // 021D GETMBR R11 R0 K107 + 0x8C2C172C, // 021E GETMET R11 R11 K44 + 0x7C2C0200, // 021F CALL R11 1 + 0x002EDE0B, // 0220 ADD R11 K111 R11 + 0x54320003, // 0221 LDINT R12 4 + 0x7C240600, // 0222 CALL R9 3 + 0x8C24053B, // 0223 GETMET R9 R2 K59 + 0x542E001F, // 0224 LDINT R11 32 + 0x7C240400, // 0225 CALL R9 2 + 0x8C28056C, // 0226 GETMET R10 R2 K108 + 0x7C280200, // 0227 CALL R10 1 + 0x8C281570, // 0228 GETMET R10 R10 K112 + 0x8830016A, // 0229 GETMBR R12 R0 K106 + 0x88340915, // 022A GETMBR R13 R4 K21 + 0x7C280600, // 022B CALL R10 3 + 0x901A480A, // 022C SETMBR R6 K36 R10 + 0xB82A1800, // 022D GETNGBL R10 K12 + 0x88281571, // 022E GETMBR R10 R10 K113 + 0x8C281572, // 022F GETMET R10 R10 K114 + 0x7C280200, // 0230 CALL R10 1 + 0x8C2C1573, // 0231 GETMET R11 R10 K115 + 0x5834000B, // 0232 LDCONST R13 K11 + 0xB83A1800, // 0233 GETNGBL R14 K12 + 0x88381D71, // 0234 GETMBR R14 R14 K113 + 0x88381D74, // 0235 GETMBR R14 R14 K116 + 0x8C3C0D75, // 0236 GETMET R15 R6 K117 + 0x7C3C0200, // 0237 CALL R15 1 + 0x7C2C0800, // 0238 CALL R11 4 + 0x8C2C1573, // 0239 GETMET R11 R10 K115 + 0x58340009, // 023A LDCONST R13 K9 + 0xB83A1800, // 023B GETNGBL R14 K12 + 0x88381D71, // 023C GETMBR R14 R14 K113 + 0x88381D74, // 023D GETMBR R14 R14 K116 + 0x8C3C0D66, // 023E GETMET R15 R6 K102 + 0x7C3C0200, // 023F CALL R15 1 + 0x7C2C0800, // 0240 CALL R11 4 + 0x8C2C1573, // 0241 GETMET R11 R10 K115 + 0x58340076, // 0242 LDCONST R13 K118 + 0xB83A1800, // 0243 GETNGBL R14 K12 + 0x88381D71, // 0244 GETMBR R14 R14 K113 + 0x88381D74, // 0245 GETMBR R14 R14 K116 + 0x883C016B, // 0246 GETMBR R15 R0 K107 + 0x7C2C0800, // 0247 CALL R11 4 + 0x8C2C1573, // 0248 GETMET R11 R10 K115 + 0x54360003, // 0249 LDINT R13 4 + 0xB83A1800, // 024A GETNGBL R14 K12 + 0x88381D71, // 024B GETMBR R14 R14 K113 + 0x88381D74, // 024C GETMBR R14 R14 K116 + 0x883C0915, // 024D GETMBR R15 R4 K21 + 0x7C2C0800, // 024E CALL R11 4 + 0x8C2C056C, // 024F GETMET R11 R2 K108 + 0x7C2C0200, // 0250 CALL R11 1 + 0x8C2C1777, // 0251 GETMET R11 R11 K119 + 0x8C340D78, // 0252 GETMET R13 R6 K120 + 0x7C340200, // 0253 CALL R13 1 + 0x8C38154D, // 0254 GETMET R14 R10 K77 + 0x7C380200, // 0255 CALL R14 1 + 0x7C2C0600, // 0256 CALL R11 3 + 0xB8321800, // 0257 GETNGBL R12 K12 + 0x88301971, // 0258 GETMBR R12 R12 K113 + 0x8C301972, // 0259 GETMET R12 R12 K114 + 0x7C300200, // 025A CALL R12 1 + 0x8C341973, // 025B GETMET R13 R12 K115 + 0x583C000B, // 025C LDCONST R15 K11 + 0xB8421800, // 025D GETNGBL R16 K12 + 0x88402171, // 025E GETMBR R16 R16 K113 + 0x88402174, // 025F GETMBR R16 R16 K116 + 0x8C440D75, // 0260 GETMET R17 R6 K117 + 0x7C440200, // 0261 CALL R17 1 + 0x7C340800, // 0262 CALL R13 4 + 0x8C341973, // 0263 GETMET R13 R12 K115 + 0x583C0009, // 0264 LDCONST R15 K9 + 0xB8421800, // 0265 GETNGBL R16 K12 + 0x88402171, // 0266 GETMBR R16 R16 K113 + 0x88402174, // 0267 GETMBR R16 R16 K116 + 0x8C440D66, // 0268 GETMET R17 R6 K102 + 0x7C440200, // 0269 CALL R17 1 + 0x7C340800, // 026A CALL R13 4 + 0x8C341973, // 026B GETMET R13 R12 K115 + 0x583C0076, // 026C LDCONST R15 K118 + 0xB8421800, // 026D GETNGBL R16 K12 + 0x88402171, // 026E GETMBR R16 R16 K113 + 0x88402174, // 026F GETMBR R16 R16 K116 + 0x5C441600, // 0270 MOVE R17 R11 + 0x7C340800, // 0271 CALL R13 4 + 0x8C341973, // 0272 GETMET R13 R12 K115 + 0x543E0003, // 0273 LDINT R15 4 + 0xB8421800, // 0274 GETNGBL R16 K12 + 0x88402171, // 0275 GETMBR R16 R16 K113 + 0x88402174, // 0276 GETMBR R16 R16 K116 + 0x88440D3A, // 0277 GETMBR R17 R6 K58 + 0x7C340800, // 0278 CALL R13 4 + 0xB8360C00, // 0279 GETNGBL R13 K6 + 0x8C341B07, // 027A GETMET R13 R13 K7 + 0x583C002A, // 027B LDCONST R15 K42 + 0x54420003, // 027C LDINT R16 4 + 0x7C340600, // 027D CALL R13 3 + 0x88340979, // 027E GETMBR R13 R4 K121 + 0x901A9C0D, // 027F SETMBR R6 K78 R13 + 0xB8360C00, // 0280 GETNGBL R13 K6 + 0x8C341B07, // 0281 GETMET R13 R13 K7 + 0x883C0D3A, // 0282 GETMBR R15 R6 K58 + 0x8C3C1F2C, // 0283 GETMET R15 R15 K44 + 0x7C3C0200, // 0284 CALL R15 1 + 0x003EF40F, // 0285 ADD R15 K122 R15 + 0x54420003, // 0286 LDINT R16 4 + 0x7C340600, // 0287 CALL R13 3 + 0xB8360C00, // 0288 GETNGBL R13 K6 + 0x8C341B07, // 0289 GETMET R13 R13 K7 + 0x883C0D4E, // 028A GETMBR R15 R6 K78 + 0x8C3C1F2C, // 028B GETMET R15 R15 K44 + 0x7C3C0200, // 028C CALL R15 1 + 0x003EF60F, // 028D ADD R15 K123 R15 + 0x54420003, // 028E LDINT R16 4 + 0x7C340600, // 028F CALL R13 3 + 0x8C34057C, // 0290 GETMET R13 R2 K124 + 0x7C340200, // 0291 CALL R13 1 + 0x8C341B7D, // 0292 GETMET R13 R13 K125 + 0x883C0D4E, // 0293 GETMBR R15 R6 K78 + 0x7C340400, // 0294 CALL R13 2 + 0x8C341B7E, // 0295 GETMET R13 R13 K126 0x7C340200, // 0296 CALL R13 1 - 0x8C341B7E, // 0297 GETMET R13 R13 K126 - 0x883C0D4E, // 0298 GETMBR R15 R6 K78 - 0x7C340400, // 0299 CALL R13 2 - 0x8C341B7F, // 029A GETMET R13 R13 K127 - 0x7C340200, // 029B CALL R13 1 - 0xB83A0C00, // 029C GETNGBL R14 K6 - 0x8C381D07, // 029D GETMET R14 R14 K7 - 0x8C401B2C, // 029E GETMET R16 R13 K44 - 0x7C400200, // 029F CALL R16 1 - 0x00430010, // 02A0 ADD R16 K128 R16 - 0x54460003, // 02A1 LDINT R17 4 - 0x7C380600, // 02A2 CALL R14 3 - 0x60380015, // 02A3 GETGBL R14 G21 - 0x7C380000, // 02A4 CALL R14 0 - 0x8C381D20, // 02A5 GETMET R14 R14 K32 - 0x88400181, // 02A6 GETMBR R16 R0 K129 - 0x7C380400, // 02A7 CALL R14 2 - 0x8C3C0D82, // 02A8 GETMET R15 R6 K130 - 0x7C3C0200, // 02A9 CALL R15 1 - 0x003C1E09, // 02AA ADD R15 R15 R9 - 0x8840016C, // 02AB GETMBR R16 R0 K108 - 0x003C1E10, // 02AC ADD R15 R15 R16 - 0x003C1E0D, // 02AD ADD R15 R15 R13 - 0x8C400522, // 02AE GETMET R16 R2 K34 - 0x7C400200, // 02AF CALL R16 1 - 0x8C402123, // 02B0 GETMET R16 R16 K35 - 0x88480D24, // 02B1 GETMBR R18 R6 K36 - 0x5C4C1E00, // 02B2 MOVE R19 R15 - 0x5C501C00, // 02B3 MOVE R20 R14 - 0x5456000F, // 02B4 LDINT R21 16 - 0x7C400A00, // 02B5 CALL R16 5 - 0xB8460C00, // 02B6 GETNGBL R17 K6 - 0x8C442307, // 02B7 GETMET R17 R17 K7 - 0x884C0D24, // 02B8 GETMBR R19 R6 K36 - 0x8C4C272C, // 02B9 GETMET R19 R19 K44 - 0x7C4C0200, // 02BA CALL R19 1 - 0x004F0613, // 02BB ADD R19 K131 R19 - 0x54520003, // 02BC LDINT R20 4 - 0x7C440600, // 02BD CALL R17 3 - 0xB8460C00, // 02BE GETNGBL R17 K6 - 0x8C442307, // 02BF GETMET R17 R17 K7 - 0x8C4C1F2C, // 02C0 GETMET R19 R15 K44 - 0x7C4C0200, // 02C1 CALL R19 1 - 0x004F0813, // 02C2 ADD R19 K132 R19 - 0x54520003, // 02C3 LDINT R20 4 - 0x7C440600, // 02C4 CALL R17 3 - 0xB8460C00, // 02C5 GETNGBL R17 K6 - 0x8C442307, // 02C6 GETMET R17 R17 K7 - 0x8C4C212C, // 02C7 GETMET R19 R16 K44 - 0x7C4C0200, // 02C8 CALL R19 1 - 0x004F0A13, // 02C9 ADD R19 K133 R19 - 0x54520003, // 02CA LDINT R20 4 - 0x7C440600, // 02CB CALL R17 3 - 0x8C44194D, // 02CC GETMET R17 R12 K77 - 0x7C440200, // 02CD CALL R17 1 - 0xB84A0C00, // 02CE GETNGBL R18 K6 - 0x8C482507, // 02CF GETMET R18 R18 K7 - 0x8C50232C, // 02D0 GETMET R20 R17 K44 - 0x7C500200, // 02D1 CALL R20 1 - 0x00530C14, // 02D2 ADD R20 K134 R20 - 0x54560003, // 02D3 LDINT R21 4 - 0x7C480600, // 02D4 CALL R18 3 - 0x8C480527, // 02D5 GETMET R18 R2 K39 - 0x5C502000, // 02D6 MOVE R20 R16 - 0x60540015, // 02D7 GETGBL R21 G21 - 0x7C540000, // 02D8 CALL R21 0 - 0x8C542B20, // 02D9 GETMET R21 R21 K32 - 0x885C0187, // 02DA GETMBR R23 R0 K135 - 0x7C540400, // 02DB CALL R21 2 - 0x60580015, // 02DC GETGBL R22 G21 - 0x7C580000, // 02DD CALL R22 0 - 0x605C000C, // 02DE GETGBL R23 G12 - 0x5C602200, // 02DF MOVE R24 R17 - 0x7C5C0200, // 02E0 CALL R23 1 - 0x5462000F, // 02E1 LDINT R24 16 - 0x7C480C00, // 02E2 CALL R18 6 - 0x8C4C2588, // 02E3 GETMET R19 R18 K136 - 0x5C542200, // 02E4 MOVE R21 R17 - 0x7C4C0400, // 02E5 CALL R19 2 - 0x8C502529, // 02E6 GETMET R20 R18 K41 - 0x7C500200, // 02E7 CALL R20 1 - 0x004C2614, // 02E8 ADD R19 R19 R20 - 0xB8520C00, // 02E9 GETNGBL R20 K6 - 0x8C502907, // 02EA GETMET R20 R20 K7 - 0x8C58272C, // 02EB GETMET R22 R19 K44 - 0x7C580200, // 02EC CALL R22 1 - 0x005B1216, // 02ED ADD R22 K137 R22 + 0xB83A0C00, // 0297 GETNGBL R14 K6 + 0x8C381D07, // 0298 GETMET R14 R14 K7 + 0x8C401B2C, // 0299 GETMET R16 R13 K44 + 0x7C400200, // 029A CALL R16 1 + 0x0042FE10, // 029B ADD R16 K127 R16 + 0x54460003, // 029C LDINT R17 4 + 0x7C380600, // 029D CALL R14 3 + 0x60380015, // 029E GETGBL R14 G21 + 0x7C380000, // 029F CALL R14 0 + 0x8C381D20, // 02A0 GETMET R14 R14 K32 + 0x88400180, // 02A1 GETMBR R16 R0 K128 + 0x7C380400, // 02A2 CALL R14 2 + 0x8C3C0D81, // 02A3 GETMET R15 R6 K129 + 0x7C3C0200, // 02A4 CALL R15 1 + 0x003C1E09, // 02A5 ADD R15 R15 R9 + 0x8840016B, // 02A6 GETMBR R16 R0 K107 + 0x003C1E10, // 02A7 ADD R15 R15 R16 + 0x003C1E0D, // 02A8 ADD R15 R15 R13 + 0x8C400522, // 02A9 GETMET R16 R2 K34 + 0x7C400200, // 02AA CALL R16 1 + 0x8C402123, // 02AB GETMET R16 R16 K35 + 0x88480D24, // 02AC GETMBR R18 R6 K36 + 0x5C4C1E00, // 02AD MOVE R19 R15 + 0x5C501C00, // 02AE MOVE R20 R14 + 0x5456000F, // 02AF LDINT R21 16 + 0x7C400A00, // 02B0 CALL R16 5 + 0xB8460C00, // 02B1 GETNGBL R17 K6 + 0x8C442307, // 02B2 GETMET R17 R17 K7 + 0x884C0D24, // 02B3 GETMBR R19 R6 K36 + 0x8C4C272C, // 02B4 GETMET R19 R19 K44 + 0x7C4C0200, // 02B5 CALL R19 1 + 0x004F0413, // 02B6 ADD R19 K130 R19 + 0x54520003, // 02B7 LDINT R20 4 + 0x7C440600, // 02B8 CALL R17 3 + 0xB8460C00, // 02B9 GETNGBL R17 K6 + 0x8C442307, // 02BA GETMET R17 R17 K7 + 0x8C4C1F2C, // 02BB GETMET R19 R15 K44 + 0x7C4C0200, // 02BC CALL R19 1 + 0x004F0613, // 02BD ADD R19 K131 R19 + 0x54520003, // 02BE LDINT R20 4 + 0x7C440600, // 02BF CALL R17 3 + 0xB8460C00, // 02C0 GETNGBL R17 K6 + 0x8C442307, // 02C1 GETMET R17 R17 K7 + 0x8C4C212C, // 02C2 GETMET R19 R16 K44 + 0x7C4C0200, // 02C3 CALL R19 1 + 0x004F0813, // 02C4 ADD R19 K132 R19 + 0x54520003, // 02C5 LDINT R20 4 + 0x7C440600, // 02C6 CALL R17 3 + 0x8C44194D, // 02C7 GETMET R17 R12 K77 + 0x7C440200, // 02C8 CALL R17 1 + 0xB84A0C00, // 02C9 GETNGBL R18 K6 + 0x8C482507, // 02CA GETMET R18 R18 K7 + 0x8C50232C, // 02CB GETMET R20 R17 K44 + 0x7C500200, // 02CC CALL R20 1 + 0x00530A14, // 02CD ADD R20 K133 R20 + 0x54560003, // 02CE LDINT R21 4 + 0x7C480600, // 02CF CALL R18 3 + 0x8C480527, // 02D0 GETMET R18 R2 K39 + 0x5C502000, // 02D1 MOVE R20 R16 + 0x60540015, // 02D2 GETGBL R21 G21 + 0x7C540000, // 02D3 CALL R21 0 + 0x8C542B20, // 02D4 GETMET R21 R21 K32 + 0x885C0186, // 02D5 GETMBR R23 R0 K134 + 0x7C540400, // 02D6 CALL R21 2 + 0x60580015, // 02D7 GETGBL R22 G21 + 0x7C580000, // 02D8 CALL R22 0 + 0x605C000C, // 02D9 GETGBL R23 G12 + 0x5C602200, // 02DA MOVE R24 R17 + 0x7C5C0200, // 02DB CALL R23 1 + 0x5462000F, // 02DC LDINT R24 16 + 0x7C480C00, // 02DD CALL R18 6 + 0x8C4C2587, // 02DE GETMET R19 R18 K135 + 0x5C542200, // 02DF MOVE R21 R17 + 0x7C4C0400, // 02E0 CALL R19 2 + 0x8C502529, // 02E1 GETMET R20 R18 K41 + 0x7C500200, // 02E2 CALL R20 1 + 0x004C2614, // 02E3 ADD R19 R19 R20 + 0xB8520C00, // 02E4 GETNGBL R20 K6 + 0x8C502907, // 02E5 GETMET R20 R20 K7 + 0x8C58272C, // 02E6 GETMET R22 R19 K44 + 0x7C580200, // 02E7 CALL R22 1 + 0x005B1016, // 02E8 ADD R22 K136 R22 + 0x545E0003, // 02E9 LDINT R23 4 + 0x7C500600, // 02EA CALL R20 3 + 0xB8520C00, // 02EB GETNGBL R20 K6 + 0x8C502907, // 02EC GETMET R20 R20 K7 + 0x5858002A, // 02ED LDCONST R22 K42 0x545E0003, // 02EE LDINT R23 4 0x7C500600, // 02EF CALL R20 3 - 0xB8520C00, // 02F0 GETNGBL R20 K6 - 0x8C502907, // 02F1 GETMET R20 R20 K7 - 0x5858002A, // 02F2 LDCONST R22 K42 - 0x545E0003, // 02F3 LDINT R23 4 - 0x7C500600, // 02F4 CALL R20 3 - 0xB8521800, // 02F5 GETNGBL R20 K12 - 0x8C50298A, // 02F6 GETMET R20 R20 K138 - 0x7C500200, // 02F7 CALL R20 1 - 0x90531609, // 02F8 SETMBR R20 K139 R9 - 0x88540161, // 02F9 GETMBR R21 R0 K97 - 0x90531815, // 02FA SETMBR R20 K140 R21 - 0x8854016C, // 02FB GETMBR R21 R0 K108 - 0x90531A15, // 02FC SETMBR R20 K141 R21 - 0x90531C13, // 02FD SETMBR R20 K142 R19 - 0xB8560C00, // 02FE GETNGBL R21 K6 - 0x8C542B07, // 02FF GETMET R21 R21 K7 - 0xB85E1800, // 0300 GETNGBL R23 K12 - 0x8C5C2F13, // 0301 GETMET R23 R23 K19 - 0x5C642800, // 0302 MOVE R25 R20 - 0x7C5C0400, // 0303 CALL R23 2 - 0x005F1E17, // 0304 ADD R23 K143 R23 - 0x54620003, // 0305 LDINT R24 4 - 0x7C540600, // 0306 CALL R21 3 - 0x8C54294D, // 0307 GETMET R21 R20 K77 - 0x7C540200, // 0308 CALL R21 1 - 0x901B2015, // 0309 SETMBR R6 K144 R21 - 0xB85A0C00, // 030A GETNGBL R22 K6 - 0x8C582D07, // 030B GETMET R22 R22 K7 - 0x8C602B2C, // 030C GETMET R24 R21 K44 - 0x7C600200, // 030D CALL R24 1 - 0x00632218, // 030E ADD R24 K145 R24 - 0x54660003, // 030F LDINT R25 4 - 0x7C580600, // 0310 CALL R22 3 - 0x8C580351, // 0311 GETMET R22 R1 K81 - 0x54620030, // 0312 LDINT R24 49 - 0x50640200, // 0313 LDBOOL R25 1 0 - 0x7C580600, // 0314 CALL R22 3 - 0x8C5C2D52, // 0315 GETMET R23 R22 K82 - 0x5C642A00, // 0316 MOVE R25 R21 - 0x7C5C0400, // 0317 CALL R23 2 - 0x88600153, // 0318 GETMBR R24 R0 K83 - 0x8C603154, // 0319 GETMET R24 R24 K84 - 0x5C682E00, // 031A MOVE R26 R23 - 0x886C0338, // 031B GETMBR R27 R1 K56 - 0x88700339, // 031C GETMBR R28 R1 K57 - 0x88742D55, // 031D GETMBR R29 R22 K85 - 0x88780319, // 031E GETMBR R30 R1 K25 - 0x88783D03, // 031F GETMBR R30 R30 K3 - 0x7C600C00, // 0320 CALL R24 6 - 0x50600200, // 0321 LDBOOL R24 1 0 - 0x80043000, // 0322 RET 1 R24 - 0x50200200, // 0323 LDBOOL R8 1 0 - 0x80041000, // 0324 RET 1 R8 + 0xB8521800, // 02F0 GETNGBL R20 K12 + 0x8C502989, // 02F1 GETMET R20 R20 K137 + 0x7C500200, // 02F2 CALL R20 1 + 0x90531409, // 02F3 SETMBR R20 K138 R9 + 0x88540160, // 02F4 GETMBR R21 R0 K96 + 0x90531615, // 02F5 SETMBR R20 K139 R21 + 0x8854016B, // 02F6 GETMBR R21 R0 K107 + 0x90531815, // 02F7 SETMBR R20 K140 R21 + 0x90531A13, // 02F8 SETMBR R20 K141 R19 + 0xB8560C00, // 02F9 GETNGBL R21 K6 + 0x8C542B07, // 02FA GETMET R21 R21 K7 + 0xB85E1800, // 02FB GETNGBL R23 K12 + 0x8C5C2F13, // 02FC GETMET R23 R23 K19 + 0x5C642800, // 02FD MOVE R25 R20 + 0x7C5C0400, // 02FE CALL R23 2 + 0x005F1C17, // 02FF ADD R23 K142 R23 + 0x54620003, // 0300 LDINT R24 4 + 0x7C540600, // 0301 CALL R21 3 + 0x8C54294D, // 0302 GETMET R21 R20 K77 + 0x7C540200, // 0303 CALL R21 1 + 0x901B1E15, // 0304 SETMBR R6 K143 R21 + 0xB85A0C00, // 0305 GETNGBL R22 K6 + 0x8C582D07, // 0306 GETMET R22 R22 K7 + 0x8C602B2C, // 0307 GETMET R24 R21 K44 + 0x7C600200, // 0308 CALL R24 1 + 0x00632018, // 0309 ADD R24 K144 R24 + 0x54660003, // 030A LDINT R25 4 + 0x7C580600, // 030B CALL R22 3 + 0x8C580351, // 030C GETMET R22 R1 K81 + 0x54620030, // 030D LDINT R24 49 + 0x50640200, // 030E LDBOOL R25 1 0 + 0x7C580600, // 030F CALL R22 3 + 0x8C5C2D52, // 0310 GETMET R23 R22 K82 + 0x5C642A00, // 0311 MOVE R25 R21 + 0x7C5C0400, // 0312 CALL R23 2 + 0x88600153, // 0313 GETMBR R24 R0 K83 + 0x8C603154, // 0314 GETMET R24 R24 K84 + 0x5C682C00, // 0315 MOVE R26 R22 + 0x7C600400, // 0316 CALL R24 2 + 0x50600200, // 0317 LDBOOL R24 1 0 + 0x80043000, // 0318 RET 1 R24 + 0x50200200, // 0319 LDBOOL R8 1 0 + 0x80041000, // 031A RET 1 R8 }) ) ); @@ -2677,7 +2651,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */ ********************************************************************/ be_local_closure(Matter_Commisioning_Context_send_status_report, /* name */ be_nested_proto( - 16, /* nstack */ + 12, /* nstack */ 6, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -2685,22 +2659,17 @@ be_local_closure(Matter_Commisioning_Context_send_status_report, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ + ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_nested_str_weak(build_response), /* K1 */ be_nested_str_weak(add), /* K2 */ be_const_int(2), /* K3 */ be_nested_str_weak(encode_frame), /* K4 */ be_nested_str_weak(responder), - /* K5 */ be_nested_str_weak(send_response), - /* K6 */ be_nested_str_weak(remote_ip), - /* K7 */ be_nested_str_weak(remote_port), - /* K8 */ be_nested_str_weak(message_counter), - /* K9 */ be_nested_str_weak(session), - /* K10 */ be_nested_str_weak(local_session_id), + /* K5 */ be_nested_str_weak(send_response_frame), }), be_str_weak(send_status_report), &be_const_str_solidified, - ( &(const binstruction[34]) { /* code */ + ( &(const binstruction[26]) { /* code */ 0x8C180300, // 0000 GETMET R6 R1 K0 0x5422003F, // 0001 LDINT R8 64 0x5C240A00, // 0002 MOVE R9 R5 @@ -2724,17 +2693,9 @@ be_local_closure(Matter_Commisioning_Context_send_status_report, /* name */ 0x7C200400, // 0014 CALL R8 2 0x88240104, // 0015 GETMBR R9 R0 K4 0x8C241305, // 0016 GETMET R9 R9 K5 - 0x5C2C1000, // 0017 MOVE R11 R8 - 0x88300306, // 0018 GETMBR R12 R1 K6 - 0x88340307, // 0019 GETMBR R13 R1 K7 - 0x78160001, // 001A JMPF R5 #001D - 0x88380D08, // 001B GETMBR R14 R6 K8 - 0x70020000, // 001C JMP #001E - 0x4C380000, // 001D LDNIL R14 - 0x883C0309, // 001E GETMBR R15 R1 K9 - 0x883C1F0A, // 001F GETMBR R15 R15 K10 - 0x7C240C00, // 0020 CALL R9 6 - 0x80000000, // 0021 RET 0 + 0x5C2C0C00, // 0017 MOVE R11 R6 + 0x7C240400, // 0018 CALL R9 2 + 0x80000000, // 0019 RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h index 6c941738e..afddf3b57 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h @@ -3456,8 +3456,8 @@ be_local_closure(Matter_Device_autoconf_device, /* name */ ********************************************************************/ be_local_closure(Matter_Device_msg_send, /* name */ be_nested_proto( - 13, /* nstack */ - 6, /* argc */ + 5, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -3466,20 +3466,16 @@ be_local_closure(Matter_Device_msg_send, /* name */ 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(send_response), + /* K1 */ be_nested_str_weak(send_UDP), }), be_str_weak(msg_send), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88180100, // 0000 GETMBR R6 R0 K0 - 0x8C180D01, // 0001 GETMET R6 R6 K1 - 0x5C200200, // 0002 MOVE R8 R1 - 0x5C240400, // 0003 MOVE R9 R2 - 0x5C280600, // 0004 MOVE R10 R3 - 0x5C2C0800, // 0005 MOVE R11 R4 - 0x5C300A00, // 0006 MOVE R12 R5 - 0x7C180C00, // 0007 CALL R6 6 - 0x80040C00, // 0008 RET 1 R6 + ( &(const binstruction[ 5]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h index 0b32129cd..4f006e515 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h @@ -274,7 +274,7 @@ be_local_closure(Matter_IM_Message_send_im, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[26]) { /* constants */ + ( &(const bvalue[23]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(log), @@ -296,15 +296,12 @@ be_local_closure(Matter_IM_Message_send_im, /* name */ /* K18 */ be_nested_str_weak(local_session_id), /* K19 */ be_nested_str_weak(message_counter), /* K20 */ be_nested_str_weak(ack_message_counter), - /* K21 */ be_nested_str_weak(send_response), - /* K22 */ be_nested_str_weak(raw), - /* K23 */ be_nested_str_weak(remote_ip), - /* K24 */ be_nested_str_weak(remote_port), - /* K25 */ be_nested_str_weak(last_counter), + /* K21 */ be_nested_str_weak(send_response_frame), + /* K22 */ be_nested_str_weak(last_counter), }), be_str_weak(send_im), &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ + ( &(const binstruction[48]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xB80E0200, // 0001 GETNGBL R3 K1 0x8C0C0702, // 0002 GETMET R3 R3 K2 @@ -347,17 +344,12 @@ be_local_closure(Matter_IM_Message_send_im, /* name */ 0x581C000A, // 0027 LDCONST R7 K10 0x7C100600, // 0028 CALL R4 3 0x8C100315, // 0029 GETMET R4 R1 K21 - 0x88180716, // 002A GETMBR R6 R3 K22 - 0x881C0717, // 002B GETMBR R7 R3 K23 - 0x88200718, // 002C GETMBR R8 R3 K24 - 0x88240713, // 002D GETMBR R9 R3 K19 - 0x88280711, // 002E GETMBR R10 R3 K17 - 0x88281512, // 002F GETMBR R10 R10 K18 - 0x7C100C00, // 0030 CALL R4 6 - 0x88100713, // 0031 GETMBR R4 R3 K19 - 0x90023204, // 0032 SETMBR R0 K25 R4 - 0x50100200, // 0033 LDBOOL R4 1 0 - 0x80040800, // 0034 RET 1 R4 + 0x5C180600, // 002A MOVE R6 R3 + 0x7C100400, // 002B CALL R4 2 + 0x88100713, // 002C GETMBR R4 R3 K19 + 0x90022C04, // 002D SETMBR R0 K22 R4 + 0x50100200, // 002E LDBOOL R4 1 0 + 0x80040800, // 002F RET 1 R4 }) ) ); @@ -712,7 +704,7 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[36]) { /* constants */ + ( &(const bvalue[33]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(log), @@ -743,16 +735,13 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */ /* K27 */ be_nested_str_weak(local_session_id), /* K28 */ be_nested_str_weak(message_counter), /* K29 */ be_nested_str_weak(ack_message_counter), - /* K30 */ be_nested_str_weak(send_response), - /* K31 */ be_nested_str_weak(raw), - /* K32 */ be_nested_str_weak(remote_ip), - /* K33 */ be_nested_str_weak(remote_port), - /* K34 */ be_nested_str_weak(last_counter), - /* K35 */ be_nested_str_weak(MTR_X3A_X20to_be_sent_later_X20size_X3D_X25i_X20exch_X3D_X25i), + /* K30 */ be_nested_str_weak(send_response_frame), + /* K31 */ be_nested_str_weak(last_counter), + /* K32 */ be_nested_str_weak(MTR_X3A_X20to_be_sent_later_X20size_X3D_X25i_X20exch_X3D_X25i), }), be_str_weak(send_im), &be_const_str_solidified, - ( &(const binstruction[170]) { /* code */ + ( &(const binstruction[165]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xB80E0200, // 0001 GETNGBL R3 K1 0x8C0C0702, // 0002 GETMET R3 R3 K2 @@ -889,40 +878,35 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */ 0x5838000A, // 0085 LDCONST R14 K10 0x7C2C0600, // 0086 CALL R11 3 0x8C2C031E, // 0087 GETMET R11 R1 K30 - 0x8834071F, // 0088 GETMBR R13 R3 K31 - 0x88380720, // 0089 GETMBR R14 R3 K32 - 0x883C0721, // 008A GETMBR R15 R3 K33 - 0x8840071C, // 008B GETMBR R16 R3 K28 - 0x8844071A, // 008C GETMBR R17 R3 K26 - 0x8844231B, // 008D GETMBR R17 R17 K27 - 0x7C2C0C00, // 008E CALL R11 6 - 0x882C071C, // 008F GETMBR R11 R3 K28 - 0x9002440B, // 0090 SETMBR R0 K34 R11 - 0x602C000C, // 0091 GETGBL R11 G12 - 0x5C301000, // 0092 MOVE R12 R8 - 0x7C2C0200, // 0093 CALL R11 1 - 0x242C1709, // 0094 GT R11 R11 K9 - 0x782E0010, // 0095 JMPF R11 #00A7 - 0x90121A08, // 0096 SETMBR R4 K13 R8 - 0xB82E0200, // 0097 GETNGBL R11 K1 - 0x8C2C1702, // 0098 GETMET R11 R11 K2 - 0x8C340503, // 0099 GETMET R13 R2 K3 - 0x583C0023, // 009A LDCONST R15 K35 - 0x6040000C, // 009B GETGBL R16 G12 - 0x8844090D, // 009C GETMBR R17 R4 K13 - 0x7C400200, // 009D CALL R16 1 - 0x88440706, // 009E GETMBR R17 R3 K6 - 0x7C340800, // 009F CALL R13 4 - 0x5838000A, // 00A0 LDCONST R14 K10 - 0x7C2C0600, // 00A1 CALL R11 3 - 0x502C0000, // 00A2 LDBOOL R11 0 0 - 0x90020E0B, // 00A3 SETMBR R0 K7 R11 - 0x502C0000, // 00A4 LDBOOL R11 0 0 - 0x80041600, // 00A5 RET 1 R11 - 0x70020001, // 00A6 JMP #00A9 - 0x502C0200, // 00A7 LDBOOL R11 1 0 - 0x80041600, // 00A8 RET 1 R11 - 0x80000000, // 00A9 RET 0 + 0x5C340600, // 0088 MOVE R13 R3 + 0x7C2C0400, // 0089 CALL R11 2 + 0x882C071C, // 008A GETMBR R11 R3 K28 + 0x90023E0B, // 008B SETMBR R0 K31 R11 + 0x602C000C, // 008C GETGBL R11 G12 + 0x5C301000, // 008D MOVE R12 R8 + 0x7C2C0200, // 008E CALL R11 1 + 0x242C1709, // 008F GT R11 R11 K9 + 0x782E0010, // 0090 JMPF R11 #00A2 + 0x90121A08, // 0091 SETMBR R4 K13 R8 + 0xB82E0200, // 0092 GETNGBL R11 K1 + 0x8C2C1702, // 0093 GETMET R11 R11 K2 + 0x8C340503, // 0094 GETMET R13 R2 K3 + 0x583C0020, // 0095 LDCONST R15 K32 + 0x6040000C, // 0096 GETGBL R16 G12 + 0x8844090D, // 0097 GETMBR R17 R4 K13 + 0x7C400200, // 0098 CALL R16 1 + 0x88440706, // 0099 GETMBR R17 R3 K6 + 0x7C340800, // 009A CALL R13 4 + 0x5838000A, // 009B LDCONST R14 K10 + 0x7C2C0600, // 009C CALL R11 3 + 0x502C0000, // 009D LDBOOL R11 0 0 + 0x90020E0B, // 009E SETMBR R0 K7 R11 + 0x502C0000, // 009F LDBOOL R11 0 0 + 0x80041600, // 00A0 RET 1 R11 + 0x70020001, // 00A1 JMP #00A4 + 0x502C0200, // 00A2 LDBOOL R11 1 0 + 0x80041600, // 00A3 RET 1 R11 + 0x80000000, // 00A4 RET 0 }) ) ); @@ -1069,7 +1053,7 @@ be_local_closure(Matter_IM_ReportDataSubscribed_send_im, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[30]) { /* constants */ + ( &(const bvalue[27]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(log), @@ -1095,15 +1079,12 @@ be_local_closure(Matter_IM_ReportDataSubscribed_send_im, /* name */ /* K22 */ be_nested_str_weak(local_session_id), /* K23 */ be_nested_str_weak(ack_message_counter), /* K24 */ be_nested_str_weak(message_counter), - /* K25 */ be_nested_str_weak(send_response), - /* K26 */ be_nested_str_weak(raw), - /* K27 */ be_nested_str_weak(remote_ip), - /* K28 */ be_nested_str_weak(remote_port), - /* K29 */ be_nested_str_weak(last_counter), + /* K25 */ be_nested_str_weak(send_response_frame), + /* K26 */ be_nested_str_weak(last_counter), }), be_str_weak(send_im), &be_const_str_solidified, - ( &(const binstruction[92]) { /* code */ + ( &(const binstruction[87]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xB80E0200, // 0001 GETNGBL R3 K1 0x8C0C0702, // 0002 GETMET R3 R3 K2 @@ -1130,7 +1111,7 @@ be_local_closure(Matter_IM_ReportDataSubscribed_send_im, /* name */ 0x8810090E, // 0017 GETMBR R4 R4 K14 0x7C0C0200, // 0018 CALL R3 1 0x240C070B, // 0019 GT R3 R3 K11 - 0x780E0030, // 001A JMPF R3 #004C + 0x780E002B, // 001A JMPF R3 #0047 0x880C010F, // 001B GETMBR R3 R0 K15 0x780E000E, // 001C JMPF R3 #002C 0x600C0003, // 001D GETGBL R3 G3 @@ -1147,7 +1128,7 @@ be_local_closure(Matter_IM_ReportDataSubscribed_send_im, /* name */ 0x90021E04, // 0028 SETMBR R0 K15 R4 0x50100000, // 0029 LDBOOL R4 0 0 0x80040800, // 002A RET 1 R4 - 0x7002001E, // 002B JMP #004B + 0x70020019, // 002B JMP #0046 0x880C0107, // 002C GETMBR R3 R0 K7 0x8C0C0711, // 002D GETMET R3 R3 K17 0x50140000, // 002E LDBOOL R5 0 0 @@ -1168,34 +1149,29 @@ be_local_closure(Matter_IM_ReportDataSubscribed_send_im, /* name */ 0x581C000C, // 003D LDCONST R7 K12 0x7C100600, // 003E CALL R4 3 0x8C100319, // 003F GETMET R4 R1 K25 - 0x8818071A, // 0040 GETMBR R6 R3 K26 - 0x881C071B, // 0041 GETMBR R7 R3 K27 - 0x8820071C, // 0042 GETMBR R8 R3 K28 - 0x4C240000, // 0043 LDNIL R9 - 0x88280715, // 0044 GETMBR R10 R3 K21 - 0x88281516, // 0045 GETMBR R10 R10 K22 - 0x7C100C00, // 0046 CALL R4 6 - 0x88100718, // 0047 GETMBR R4 R3 K24 - 0x90023A04, // 0048 SETMBR R0 K29 R4 - 0x50100200, // 0049 LDBOOL R4 1 0 - 0x80040800, // 004A RET 1 R4 - 0x7002000E, // 004B JMP #005B - 0x880C010F, // 004C GETMBR R3 R0 K15 - 0x780E000A, // 004D JMPF R3 #0059 - 0x600C0003, // 004E GETGBL R3 G3 - 0x5C100000, // 004F MOVE R4 R0 - 0x7C0C0200, // 0050 CALL R3 1 - 0x8C0C0710, // 0051 GETMET R3 R3 K16 - 0x5C140200, // 0052 MOVE R5 R1 - 0x7C0C0400, // 0053 CALL R3 2 - 0x500C0000, // 0054 LDBOOL R3 0 0 - 0x90021E03, // 0055 SETMBR R0 K15 R3 - 0x500C0000, // 0056 LDBOOL R3 0 0 - 0x80040600, // 0057 RET 1 R3 - 0x70020001, // 0058 JMP #005B - 0x500C0200, // 0059 LDBOOL R3 1 0 - 0x80040600, // 005A RET 1 R3 - 0x80000000, // 005B RET 0 + 0x5C180600, // 0040 MOVE R6 R3 + 0x7C100400, // 0041 CALL R4 2 + 0x88100718, // 0042 GETMBR R4 R3 K24 + 0x90023404, // 0043 SETMBR R0 K26 R4 + 0x50100200, // 0044 LDBOOL R4 1 0 + 0x80040800, // 0045 RET 1 R4 + 0x7002000E, // 0046 JMP #0056 + 0x880C010F, // 0047 GETMBR R3 R0 K15 + 0x780E000A, // 0048 JMPF R3 #0054 + 0x600C0003, // 0049 GETGBL R3 G3 + 0x5C100000, // 004A MOVE R4 R0 + 0x7C0C0200, // 004B CALL R3 1 + 0x8C0C0710, // 004C GETMET R3 R3 K16 + 0x5C140200, // 004D MOVE R5 R1 + 0x7C0C0400, // 004E CALL R3 2 + 0x500C0000, // 004F LDBOOL R3 0 0 + 0x90021E03, // 0050 SETMBR R0 K15 R3 + 0x500C0000, // 0051 LDBOOL R3 0 0 + 0x80040600, // 0052 RET 1 R3 + 0x70020001, // 0053 JMP #0056 + 0x500C0200, // 0054 LDBOOL R3 1 0 + 0x80040600, // 0055 RET 1 R3 + 0x80000000, // 0056 RET 0 }) ) ); @@ -1571,7 +1547,7 @@ be_local_closure(Matter_IM_SubscribeResponse_send_im, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[32]) { /* constants */ + ( &(const bvalue[27]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(tasmota), /* K2 */ be_nested_str_weak(log), @@ -1594,20 +1570,15 @@ be_local_closure(Matter_IM_SubscribeResponse_send_im, /* name */ /* K19 */ be_nested_str_weak(to_TLV), /* K20 */ be_nested_str_weak(tlv2raw), /* K21 */ be_nested_str_weak(encrypt), - /* K22 */ be_nested_str_weak(send_response), - /* K23 */ be_nested_str_weak(raw), - /* K24 */ be_nested_str_weak(remote_ip), - /* K25 */ be_nested_str_weak(remote_port), - /* K26 */ be_nested_str_weak(message_counter), - /* K27 */ be_nested_str_weak(session), - /* K28 */ be_nested_str_weak(local_session_id), - /* K29 */ be_nested_str_weak(last_counter), - /* K30 */ be_nested_str_weak(MTR_X3A_X20Send_X20SubscribeResponseMessage_X20sub_X3D_X25i_X20id_X3D_X25i), - /* K31 */ be_nested_str_weak(re_arm), + /* K22 */ be_nested_str_weak(send_response_frame), + /* K23 */ be_nested_str_weak(last_counter), + /* K24 */ be_nested_str_weak(message_counter), + /* K25 */ be_nested_str_weak(MTR_X3A_X20Send_X20SubscribeResponseMessage_X20sub_X3D_X25i_X20id_X3D_X25i), + /* K26 */ be_nested_str_weak(re_arm), }), be_str_weak(send_im), &be_const_str_solidified, - ( &(const binstruction[82]) { /* code */ + ( &(const binstruction[77]) { /* code */ 0xA40A0000, // 0000 IMPORT R2 K0 0xB80E0200, // 0001 GETNGBL R3 K1 0x8C0C0702, // 0002 GETMET R3 R3 K2 @@ -1642,7 +1613,7 @@ be_local_closure(Matter_IM_SubscribeResponse_send_im, /* name */ 0x90020E04, // 001F SETMBR R0 K7 R4 0x50100000, // 0020 LDBOOL R4 0 0 0x80040800, // 0021 RET 1 R4 - 0x7002002D, // 0022 JMP #0051 + 0x70020028, // 0022 JMP #004C 0x880C010D, // 0023 GETMBR R3 R0 K13 0xB8121C00, // 0024 GETNGBL R4 K14 0x8C10090F, // 0025 GETMET R4 R4 K15 @@ -1665,31 +1636,26 @@ be_local_closure(Matter_IM_SubscribeResponse_send_im, /* name */ 0x8C140715, // 0036 GETMET R5 R3 K21 0x7C140200, // 0037 CALL R5 1 0x8C140316, // 0038 GETMET R5 R1 K22 - 0x881C0717, // 0039 GETMBR R7 R3 K23 - 0x88200718, // 003A GETMBR R8 R3 K24 - 0x88240719, // 003B GETMBR R9 R3 K25 - 0x8828071A, // 003C GETMBR R10 R3 K26 - 0x882C071B, // 003D GETMBR R11 R3 K27 - 0x882C171C, // 003E GETMBR R11 R11 K28 - 0x7C140C00, // 003F CALL R5 6 - 0x8814071A, // 0040 GETMBR R5 R3 K26 - 0x90023A05, // 0041 SETMBR R0 K29 R5 - 0xB8160200, // 0042 GETNGBL R5 K1 - 0x8C140B02, // 0043 GETMET R5 R5 K2 - 0x8C1C0503, // 0044 GETMET R7 R2 K3 - 0x5824001E, // 0045 LDCONST R9 K30 - 0x88280105, // 0046 GETMBR R10 R0 K5 - 0x88281506, // 0047 GETMBR R10 R10 K6 - 0x882C071A, // 0048 GETMBR R11 R3 K26 - 0x7C1C0800, // 0049 CALL R7 4 - 0x5820000A, // 004A LDCONST R8 K10 - 0x7C140600, // 004B CALL R5 3 - 0x88140105, // 004C GETMBR R5 R0 K5 - 0x8C140B1F, // 004D GETMET R5 R5 K31 - 0x7C140200, // 004E CALL R5 1 - 0x50140200, // 004F LDBOOL R5 1 0 - 0x80040A00, // 0050 RET 1 R5 - 0x80000000, // 0051 RET 0 + 0x5C1C0600, // 0039 MOVE R7 R3 + 0x7C140400, // 003A CALL R5 2 + 0x88140718, // 003B GETMBR R5 R3 K24 + 0x90022E05, // 003C SETMBR R0 K23 R5 + 0xB8160200, // 003D GETNGBL R5 K1 + 0x8C140B02, // 003E GETMET R5 R5 K2 + 0x8C1C0503, // 003F GETMET R7 R2 K3 + 0x58240019, // 0040 LDCONST R9 K25 + 0x88280105, // 0041 GETMBR R10 R0 K5 + 0x88281506, // 0042 GETMBR R10 R10 K6 + 0x882C0718, // 0043 GETMBR R11 R3 K24 + 0x7C1C0800, // 0044 CALL R7 4 + 0x5820000A, // 0045 LDCONST R8 K10 + 0x7C140600, // 0046 CALL R5 3 + 0x88140105, // 0047 GETMBR R5 R0 K5 + 0x8C140B1A, // 0048 GETMET R5 R5 K26 + 0x7C140200, // 0049 CALL R5 1 + 0x50140200, // 004A LDBOOL R5 1 0 + 0x80040A00, // 004B RET 1 R5 + 0x80000000, // 004C RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h index 4646fd645..59441effa 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h @@ -7,12 +7,12 @@ extern const bclass be_class_Matter_MessageHandler; /******************************************************************** -** Solidified function: send_response +** Solidified function: send_response_frame ********************************************************************/ -be_local_closure(Matter_MessageHandler_send_response, /* name */ +be_local_closure(Matter_MessageHandler_send_response_frame, /* name */ be_nested_proto( - 13, /* nstack */ - 6, /* argc */ + 5, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -23,18 +23,14 @@ be_local_closure(Matter_MessageHandler_send_response, /* name */ /* K0 */ be_nested_str_weak(device), /* K1 */ be_nested_str_weak(msg_send), }), - be_str_weak(send_response), + be_str_weak(send_response_frame), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88180100, // 0000 GETMBR R6 R0 K0 - 0x8C180D01, // 0001 GETMET R6 R6 K1 - 0x5C200200, // 0002 MOVE R8 R1 - 0x5C240400, // 0003 MOVE R9 R2 - 0x5C280600, // 0004 MOVE R10 R3 - 0x5C2C0800, // 0005 MOVE R11 R4 - 0x5C300A00, // 0006 MOVE R12 R5 - 0x7C180C00, // 0007 CALL R6 6 - 0x80000000, // 0008 RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80000000, // 0004 RET 0 }) ) ); @@ -54,7 +50,7 @@ be_local_closure(Matter_MessageHandler_send_encrypted_ack, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[20]) { /* constants */ + ( &(const bvalue[17]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(x_flag_r), /* K2 */ be_nested_str_weak(build_standalone_ack), @@ -71,17 +67,14 @@ be_local_closure(Matter_MessageHandler_send_encrypted_ack, /* name */ /* K13 */ be_nested_str_weak(_X7Breliable_X7D), /* K14 */ be_nested_str_weak(), /* K15 */ be_const_int(3), - /* K16 */ be_nested_str_weak(send_response), - /* K17 */ be_nested_str_weak(raw), - /* K18 */ be_nested_str_weak(remote_ip), - /* K19 */ be_nested_str_weak(remote_port), + /* K16 */ be_nested_str_weak(send_response_frame), }), be_str_weak(send_encrypted_ack), &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ + ( &(const binstruction[29]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0x88100301, // 0001 GETMBR R4 R1 K1 - 0x78120020, // 0002 JMPF R4 #0024 + 0x78120018, // 0002 JMPF R4 #001C 0x8C100302, // 0003 GETMET R4 R1 K2 0x5C180400, // 0004 MOVE R6 R2 0x7C100400, // 0005 CALL R4 2 @@ -105,17 +98,9 @@ be_local_closure(Matter_MessageHandler_send_encrypted_ack, /* name */ 0x5820000F, // 0017 LDCONST R8 K15 0x7C140600, // 0018 CALL R5 3 0x8C140110, // 0019 GETMET R5 R0 K16 - 0x881C0911, // 001A GETMBR R7 R4 K17 - 0x88200912, // 001B GETMBR R8 R4 K18 - 0x88240913, // 001C GETMBR R9 R4 K19 - 0x780A0001, // 001D JMPF R2 #0020 - 0x8828090C, // 001E GETMBR R10 R4 K12 - 0x70020000, // 001F JMP #0021 - 0x4C280000, // 0020 LDNIL R10 - 0x882C0909, // 0021 GETMBR R11 R4 K9 - 0x882C170A, // 0022 GETMBR R11 R11 K10 - 0x7C140C00, // 0023 CALL R5 6 - 0x80000000, // 0024 RET 0 + 0x5C1C0800, // 001A MOVE R7 R4 + 0x7C140400, // 001B CALL R5 2 + 0x80000000, // 001C RET 0 }) ) ); @@ -169,7 +154,7 @@ be_local_closure(Matter_MessageHandler_send_simple_ack, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[19]) { /* constants */ + ( &(const bvalue[16]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(x_flag_r), /* K2 */ be_nested_str_weak(build_standalone_ack), @@ -185,17 +170,14 @@ be_local_closure(Matter_MessageHandler_send_simple_ack, /* name */ /* K12 */ be_nested_str_weak(_X7Breliable_X7D), /* K13 */ be_nested_str_weak(), /* K14 */ be_const_int(3), - /* K15 */ be_nested_str_weak(send_response), - /* K16 */ be_nested_str_weak(raw), - /* K17 */ be_nested_str_weak(remote_ip), - /* K18 */ be_nested_str_weak(remote_port), + /* K15 */ be_nested_str_weak(send_response_frame), }), be_str_weak(send_simple_ack), &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ + ( &(const binstruction[27]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0x88100301, // 0001 GETMBR R4 R1 K1 - 0x7812001E, // 0002 JMPF R4 #0022 + 0x78120016, // 0002 JMPF R4 #001A 0x8C100302, // 0003 GETMET R4 R1 K2 0x5C180400, // 0004 MOVE R6 R2 0x7C100400, // 0005 CALL R4 2 @@ -217,17 +199,9 @@ be_local_closure(Matter_MessageHandler_send_simple_ack, /* name */ 0x5820000E, // 0015 LDCONST R8 K14 0x7C140600, // 0016 CALL R5 3 0x8C14010F, // 0017 GETMET R5 R0 K15 - 0x881C0910, // 0018 GETMBR R7 R4 K16 - 0x88200911, // 0019 GETMBR R8 R4 K17 - 0x88240912, // 001A GETMBR R9 R4 K18 - 0x780A0001, // 001B JMPF R2 #001E - 0x8828090B, // 001C GETMBR R10 R4 K11 - 0x70020000, // 001D JMP #001F - 0x4C280000, // 001E LDNIL R10 - 0x882C0908, // 001F GETMBR R11 R4 K8 - 0x882C1709, // 0020 GETMBR R11 R11 K9 - 0x7C140C00, // 0021 CALL R5 6 - 0x80000000, // 0022 RET 0 + 0x5C1C0800, // 0018 MOVE R7 R4 + 0x7C140400, // 0019 CALL R5 2 + 0x80000000, // 001A RET 0 }) ) ); @@ -285,16 +259,16 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ /* K34 */ be_nested_str_weak(send_simple_ack), /* K35 */ be_nested_str_weak(decode_payload), /* K36 */ be_nested_str_weak(received_ack), - /* K37 */ be_nested_str_weak(ack_message_counter), - /* K38 */ be_nested_str_weak(opcode), - /* K39 */ be_nested_str_weak(get_opcode_name), - /* K40 */ be_nested_str_weak(0x_X2502X), - /* K41 */ be_nested_str_weak(MTR_X3A_X20_X3EReceived_X20_X20_X28_X256i_X29_X20_X25s_X20rid_X3D_X25i_X20exch_X3D_X25i_X20from_X20_X5B_X25s_X5D_X3A_X25i), - /* K42 */ be_nested_str_weak(exchange_id), - /* K43 */ be_nested_str_weak(MTR_X3A_X20_X3Ercv_X20Ack_X20_X20_X20_X28_X256i_X29_X20rid_X3D_X25i_X20exch_X3D_X25i_X20ack_X3D_X25s_X20_X25sfrom_X20_X5B_X25s_X5D_X3A_X25i), - /* K44 */ be_nested_str_weak(x_flag_r), - /* K45 */ be_nested_str_weak(_X7Breliable_X7D_X20), - /* K46 */ be_nested_str_weak(), + /* K37 */ be_nested_str_weak(opcode), + /* K38 */ be_nested_str_weak(get_opcode_name), + /* K39 */ be_nested_str_weak(0x_X2502X), + /* K40 */ be_nested_str_weak(MTR_X3A_X20_X3EReceived_X20_X20_X28_X256i_X29_X20_X25s_X20rid_X3D_X25i_X20exch_X3D_X25i_X20from_X20_X5B_X25s_X5D_X3A_X25i), + /* K41 */ be_nested_str_weak(exchange_id), + /* K42 */ be_nested_str_weak(MTR_X3A_X20_X3Ercv_X20Ack_X20_X20_X20_X28_X256i_X29_X20rid_X3D_X25i_X20exch_X3D_X25i_X20ack_X3D_X25s_X20_X25sfrom_X20_X5B_X25s_X5D_X3A_X25i), + /* K43 */ be_nested_str_weak(x_flag_r), + /* K44 */ be_nested_str_weak(_X7Breliable_X7D_X20), + /* K45 */ be_nested_str_weak(), + /* K46 */ be_nested_str_weak(ack_message_counter), /* K47 */ be_nested_str_weak(commissioning), /* K48 */ be_nested_str_weak(process_incoming), /* K49 */ be_nested_str_weak(MTR_X3A_X20decode_X20header_X3A_X20local_session_id_X3D_X25i_X20message_counter_X3D_X25i), @@ -451,31 +425,31 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ 0x80041200, // 0078 RET 1 R9 0x8824010B, // 0079 GETMBR R9 R0 K11 0x8C241324, // 007A GETMET R9 R9 K36 - 0x882C0D25, // 007B GETMBR R11 R6 K37 + 0x5C2C0C00, // 007B MOVE R11 R6 0x7C240400, // 007C CALL R9 2 - 0x88240D26, // 007D GETMBR R9 R6 K38 + 0x88240D25, // 007D GETMBR R9 R6 K37 0x542A000F, // 007E LDINT R10 16 0x2024120A, // 007F NE R9 R9 R10 0x78260018, // 0080 JMPF R9 #009A 0xB8260A00, // 0081 GETNGBL R9 K5 - 0x8C241327, // 0082 GETMET R9 R9 K39 - 0x882C0D26, // 0083 GETMBR R11 R6 K38 + 0x8C241326, // 0082 GETMET R9 R9 K38 + 0x882C0D25, // 0083 GETMBR R11 R6 K37 0x7C240400, // 0084 CALL R9 2 0x5C281200, // 0085 MOVE R10 R9 0x742A0004, // 0086 JMPT R10 #008C 0x8C28091F, // 0087 GETMET R10 R4 K31 - 0x58300028, // 0088 LDCONST R12 K40 - 0x88340D26, // 0089 GETMBR R13 R6 K38 + 0x58300027, // 0088 LDCONST R12 K39 + 0x88340D25, // 0089 GETMBR R13 R6 K37 0x7C280600, // 008A CALL R10 3 0x5C241400, // 008B MOVE R9 R10 0xB82A0200, // 008C GETNGBL R10 K1 0x8C281502, // 008D GETMET R10 R10 K2 0x8C30091F, // 008E GETMET R12 R4 K31 - 0x58380029, // 008F LDCONST R14 K41 + 0x58380028, // 008F LDCONST R14 K40 0x883C1111, // 0090 GETMBR R15 R8 K17 0x5C401200, // 0091 MOVE R16 R9 0x88440D1E, // 0092 GETMBR R17 R6 K30 - 0x88480D2A, // 0093 GETMBR R18 R6 K42 + 0x88480D29, // 0093 GETMBR R18 R6 K41 0x5C4C0400, // 0094 MOVE R19 R2 0x5C500600, // 0095 MOVE R20 R3 0x7C301000, // 0096 CALL R12 8 @@ -485,17 +459,17 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ 0xB8260200, // 009A GETNGBL R9 K1 0x8C241302, // 009B GETMET R9 R9 K2 0x8C2C091F, // 009C GETMET R11 R4 K31 - 0x5834002B, // 009D LDCONST R13 K43 + 0x5834002A, // 009D LDCONST R13 K42 0x88381111, // 009E GETMBR R14 R8 K17 0x883C0D1E, // 009F GETMBR R15 R6 K30 - 0x88400D2C, // 00A0 GETMBR R16 R6 K44 + 0x88400D2B, // 00A0 GETMBR R16 R6 K43 0x78420001, // 00A1 JMPF R16 #00A4 - 0x5840002D, // 00A2 LDCONST R16 K45 + 0x5840002C, // 00A2 LDCONST R16 K44 0x70020000, // 00A3 JMP #00A5 - 0x5840002E, // 00A4 LDCONST R16 K46 - 0x88440D2A, // 00A5 GETMBR R17 R6 K42 + 0x5840002D, // 00A4 LDCONST R16 K45 + 0x88440D29, // 00A5 GETMBR R17 R6 K41 0x60480008, // 00A6 GETGBL R18 G8 - 0x884C0D25, // 00A7 GETMBR R19 R6 K37 + 0x884C0D2E, // 00A7 GETMBR R19 R6 K46 0x7C480200, // 00A8 CALL R18 1 0x5C4C0400, // 00A9 MOVE R19 R2 0x5C500600, // 00AA MOVE R20 R3 @@ -612,12 +586,12 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ 0x00327C0C, // 0119 ADD R12 K62 R12 0x00301940, // 011A ADD R12 R12 K64 0x60340008, // 011B GETGBL R13 G8 - 0x88380D26, // 011C GETMBR R14 R6 K38 + 0x88380D25, // 011C GETMBR R14 R6 K37 0x7C340200, // 011D CALL R13 1 0x0030180D, // 011E ADD R12 R12 R13 0x00301941, // 011F ADD R12 R12 K65 0x60340008, // 0120 GETGBL R13 G8 - 0x88380D2A, // 0121 GETMBR R14 R6 K42 + 0x88380D29, // 0121 GETMBR R14 R6 K41 0x543EFFFE, // 0122 LDINT R15 65535 0x2C381C0F, // 0123 AND R14 R14 R15 0x7C340200, // 0124 CALL R13 1 @@ -630,17 +604,17 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ 0x58380042, // 012B LDCONST R14 K66 0x883C1111, // 012C GETMBR R15 R8 K17 0x88400D3F, // 012D GETMBR R16 R6 K63 - 0x88440D26, // 012E GETMBR R17 R6 K38 + 0x88440D25, // 012E GETMBR R17 R6 K37 0x88480D1E, // 012F GETMBR R18 R6 K30 - 0x884C0D2A, // 0130 GETMBR R19 R6 K42 + 0x884C0D29, // 0130 GETMBR R19 R6 K41 0x60500008, // 0131 GETGBL R20 G8 - 0x88540D25, // 0132 GETMBR R21 R6 K37 + 0x88540D2E, // 0132 GETMBR R21 R6 K46 0x7C500200, // 0133 CALL R20 1 - 0x88540D2C, // 0134 GETMBR R21 R6 K44 + 0x88540D2B, // 0134 GETMBR R21 R6 K43 0x78560001, // 0135 JMPF R21 #0138 - 0x5854002D, // 0136 LDCONST R21 K45 + 0x5854002C, // 0136 LDCONST R21 K44 0x70020000, // 0137 JMP #0139 - 0x5854002E, // 0138 LDCONST R21 K46 + 0x5854002D, // 0138 LDCONST R21 K45 0x5C580400, // 0139 MOVE R22 R2 0x5C5C0600, // 013A MOVE R23 R3 0x7C301600, // 013B CALL R12 11 @@ -648,7 +622,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ 0x7C280600, // 013D CALL R10 3 0x8828010B, // 013E GETMBR R10 R0 K11 0x8C281524, // 013F GETMET R10 R10 K36 - 0x88300D25, // 0140 GETMBR R12 R6 K37 + 0x5C300C00, // 0140 MOVE R12 R6 0x7C280400, // 0141 CALL R10 2 0x88280D3F, // 0142 GETMBR R10 R6 K63 0x1C2C1515, // 0143 EQ R11 R10 K21 @@ -662,7 +636,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */ 0x0036860D, // 014B ADD R13 K67 R13 0x58380017, // 014C LDCONST R14 K23 0x7C2C0600, // 014D CALL R11 3 - 0x882C0D26, // 014E GETMBR R11 R6 K38 + 0x882C0D25, // 014E GETMBR R11 R6 K37 0x5432000F, // 014F LDINT R12 16 0x1C2C160C, // 0150 EQ R11 R11 R12 0x782E0009, // 0151 JMPF R11 #015C @@ -824,17 +798,17 @@ be_local_class(Matter_MessageHandler, NULL, be_nested_map(11, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(im, -1), be_const_var(2) }, + { be_const_key_weak(im, 3), be_const_var(2) }, { be_const_key_weak(init, -1), be_const_closure(Matter_MessageHandler_init_closure) }, { be_const_key_weak(send_encrypted_ack, -1), be_const_closure(Matter_MessageHandler_send_encrypted_ack_closure) }, - { be_const_key_weak(control_message, -1), be_const_var(3) }, - { be_const_key_weak(every_250ms, 3), be_const_closure(Matter_MessageHandler_every_250ms_closure) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_MessageHandler_every_second_closure) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_MessageHandler_every_250ms_closure) }, { be_const_key_weak(device, -1), be_const_var(0) }, { be_const_key_weak(msg_received, -1), be_const_closure(Matter_MessageHandler_msg_received_closure) }, - { be_const_key_weak(send_response, 4), be_const_closure(Matter_MessageHandler_send_response_closure) }, + { be_const_key_weak(control_message, 4), be_const_var(3) }, { be_const_key_weak(commissioning, -1), be_const_var(1) }, { be_const_key_weak(send_simple_ack, 1), be_const_closure(Matter_MessageHandler_send_simple_ack_closure) }, - { be_const_key_weak(every_second, 0), be_const_closure(Matter_MessageHandler_every_second_closure) }, + { be_const_key_weak(send_response_frame, 0), be_const_closure(Matter_MessageHandler_send_response_frame_closure) }, })), be_str_weak(Matter_MessageHandler) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h index bb698fb9d..a95cc8253 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UDPServer.h @@ -11,67 +11,7 @@ extern const bclass be_class_Matter_UDPPacket_sent; ********************************************************************/ be_local_closure(Matter_UDPPacket_sent_init, /* name */ be_nested_proto( - 10, /* nstack */ - 6, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(raw), - /* K1 */ be_nested_str_weak(addr), - /* K2 */ be_nested_str_weak(port), - /* K3 */ be_nested_str_weak(msg_id), - /* K4 */ be_nested_str_weak(retries), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(session_id), - /* K7 */ be_nested_str_weak(next_try), - /* K8 */ be_nested_str_weak(tasmota), - /* K9 */ be_nested_str_weak(millis), - /* K10 */ be_nested_str_weak(matter), - /* K11 */ be_nested_str_weak(UDPServer), - /* K12 */ be_nested_str_weak(_backoff_time), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x90020403, // 0002 SETMBR R0 K2 R3 - 0x90020604, // 0003 SETMBR R0 K3 R4 - 0x90020905, // 0004 SETMBR R0 K4 K5 - 0x4C180000, // 0005 LDNIL R6 - 0x20180A06, // 0006 NE R6 R5 R6 - 0x781A0001, // 0007 JMPF R6 #000A - 0x5C180A00, // 0008 MOVE R6 R5 - 0x70020000, // 0009 JMP #000B - 0x58180005, // 000A LDCONST R6 K5 - 0x90020C06, // 000B SETMBR R0 K6 R6 - 0xB81A1000, // 000C GETNGBL R6 K8 - 0x8C180D09, // 000D GETMET R6 R6 K9 - 0x7C180200, // 000E CALL R6 1 - 0xB81E1400, // 000F GETNGBL R7 K10 - 0x881C0F0B, // 0010 GETMBR R7 R7 K11 - 0x8C1C0F0C, // 0011 GETMET R7 R7 K12 - 0x88240104, // 0012 GETMBR R9 R0 K4 - 0x7C1C0400, // 0013 CALL R7 2 - 0x00180C07, // 0014 ADD R6 R6 R7 - 0x90020E06, // 0015 SETMBR R0 K7 R6 - 0x80000000, // 0016 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: send -********************************************************************/ -be_local_closure(Matter_UDPPacket_sent_send, /* name */ - be_nested_proto( - 11, /* nstack */ + 6, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -79,59 +19,70 @@ be_local_closure(Matter_UDPPacket_sent_send, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(send), - /* K2 */ be_nested_str_weak(addr), - /* K3 */ be_nested_str_weak(remote_ip), - /* K4 */ be_nested_str_weak(port), - /* K5 */ be_nested_str_weak(remote_port), - /* K6 */ be_nested_str_weak(raw), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(log), - /* K9 */ be_nested_str_weak(format), - /* K10 */ be_nested_str_weak(MTR_X3A_X20sending_X20packet_X20to_X20_X27_X5B_X25s_X5D_X3A_X25i_X27), - /* K11 */ be_nested_str_weak(MTR_X3A_X20error_X20sending_X20packet_X20to_X20_X27_X5B_X25s_X5D_X3A_X25i_X27), - /* K12 */ be_const_int(3), + ( &(const bvalue[19]) { /* constants */ + /* K0 */ be_nested_str_weak(raw), + /* K1 */ be_nested_str_weak(addr), + /* K2 */ be_nested_str_weak(remote_ip), + /* K3 */ be_nested_str_weak(port), + /* K4 */ be_nested_str_weak(remote_port), + /* K5 */ be_nested_str_weak(msg_id), + /* K6 */ be_nested_str_weak(x_flag_r), + /* K7 */ be_nested_str_weak(message_counter), + /* K8 */ be_nested_str_weak(exchange_id), + /* K9 */ be_const_int(0), + /* K10 */ be_nested_str_weak(session_id), + /* K11 */ be_nested_str_weak(local_session_id), + /* K12 */ be_nested_str_weak(retries), + /* K13 */ be_nested_str_weak(next_try), + /* K14 */ be_nested_str_weak(tasmota), + /* K15 */ be_nested_str_weak(millis), + /* K16 */ be_nested_str_weak(matter), + /* K17 */ be_nested_str_weak(UDPServer), + /* K18 */ be_nested_str_weak(_backoff_time), }), - be_str_weak(send), + be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x78160001, // 0003 JMPF R5 #0006 - 0x88140102, // 0004 GETMBR R5 R0 K2 - 0x70020000, // 0005 JMP #0007 - 0x88140303, // 0006 GETMBR R5 R1 K3 - 0x88180104, // 0007 GETMBR R6 R0 K4 - 0x781A0001, // 0008 JMPF R6 #000B - 0x88180104, // 0009 GETMBR R6 R0 K4 - 0x70020000, // 000A JMP #000C - 0x88180305, // 000B GETMBR R6 R1 K5 - 0x881C0106, // 000C GETMBR R7 R0 K6 - 0x7C0C0800, // 000D CALL R3 4 - 0x780E0009, // 000E JMPF R3 #0019 - 0xB8120E00, // 000F GETNGBL R4 K7 - 0x8C100908, // 0010 GETMET R4 R4 K8 - 0x8C180509, // 0011 GETMET R6 R2 K9 - 0x5820000A, // 0012 LDCONST R8 K10 - 0x88240102, // 0013 GETMBR R9 R0 K2 - 0x88280104, // 0014 GETMBR R10 R0 K4 - 0x7C180800, // 0015 CALL R6 4 - 0x541E0003, // 0016 LDINT R7 4 - 0x7C100600, // 0017 CALL R4 3 - 0x70020008, // 0018 JMP #0022 - 0xB8120E00, // 0019 GETNGBL R4 K7 - 0x8C100908, // 001A GETMET R4 R4 K8 - 0x8C180509, // 001B GETMET R6 R2 K9 - 0x5820000B, // 001C LDCONST R8 K11 - 0x88240102, // 001D GETMBR R9 R0 K2 - 0x88280104, // 001E GETMBR R10 R0 K4 - 0x7C180800, // 001F CALL R6 4 - 0x581C000C, // 0020 LDCONST R7 K12 - 0x7C100600, // 0021 CALL R4 3 - 0x80040600, // 0022 RET 1 R3 + ( &(const binstruction[40]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x90020002, // 0001 SETMBR R0 K0 R2 + 0x88080302, // 0002 GETMBR R2 R1 K2 + 0x90020202, // 0003 SETMBR R0 K1 R2 + 0x88080304, // 0004 GETMBR R2 R1 K4 + 0x90020602, // 0005 SETMBR R0 K3 R2 + 0x88080306, // 0006 GETMBR R2 R1 K6 + 0x780A0001, // 0007 JMPF R2 #000A + 0x88080307, // 0008 GETMBR R2 R1 K7 + 0x70020000, // 0009 JMP #000B + 0x4C080000, // 000A LDNIL R2 + 0x90020A02, // 000B SETMBR R0 K5 R2 + 0x88080308, // 000C GETMBR R2 R1 K8 + 0x4C0C0000, // 000D LDNIL R3 + 0x20080403, // 000E NE R2 R2 R3 + 0x780A0001, // 000F JMPF R2 #0012 + 0x88080308, // 0010 GETMBR R2 R1 K8 + 0x70020000, // 0011 JMP #0013 + 0x58080009, // 0012 LDCONST R2 K9 + 0x90021002, // 0013 SETMBR R0 K8 R2 + 0x8808030B, // 0014 GETMBR R2 R1 K11 + 0x4C0C0000, // 0015 LDNIL R3 + 0x20080403, // 0016 NE R2 R2 R3 + 0x780A0001, // 0017 JMPF R2 #001A + 0x8808030B, // 0018 GETMBR R2 R1 K11 + 0x70020000, // 0019 JMP #001B + 0x58080009, // 001A LDCONST R2 K9 + 0x90021402, // 001B SETMBR R0 K10 R2 + 0x90021909, // 001C SETMBR R0 K12 K9 + 0xB80A1C00, // 001D GETNGBL R2 K14 + 0x8C08050F, // 001E GETMET R2 R2 K15 + 0x7C080200, // 001F CALL R2 1 + 0xB80E2000, // 0020 GETNGBL R3 K16 + 0x880C0711, // 0021 GETMBR R3 R3 K17 + 0x8C0C0712, // 0022 GETMET R3 R3 K18 + 0x8814010C, // 0023 GETMBR R5 R0 K12 + 0x7C0C0400, // 0024 CALL R3 2 + 0x00080403, // 0025 ADD R2 R2 R3 + 0x90021A02, // 0026 SETMBR R0 K13 R2 + 0x80000000, // 0027 RET 0 }) ) ); @@ -142,19 +93,19 @@ be_local_closure(Matter_UDPPacket_sent_send, /* name */ ** Solidified class: Matter_UDPPacket_sent ********************************************************************/ be_local_class(Matter_UDPPacket_sent, - 7, + 8, NULL, be_nested_map(9, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(next_try, 3), be_const_var(6) }, - { be_const_key_weak(msg_id, 8), be_const_var(3) }, - { be_const_key_weak(retries, 7), be_const_var(5) }, - { be_const_key_weak(send, -1), be_const_closure(Matter_UDPPacket_sent_send_closure) }, + { be_const_key_weak(next_try, -1), be_const_var(7) }, + { be_const_key_weak(session_id, 8), be_const_var(5) }, + { be_const_key_weak(retries, 3), be_const_var(6) }, + { be_const_key_weak(addr, -1), be_const_var(1) }, { be_const_key_weak(port, 0), be_const_var(2) }, { be_const_key_weak(raw, -1), be_const_var(0) }, { be_const_key_weak(init, -1), be_const_closure(Matter_UDPPacket_sent_init_closure) }, - { be_const_key_weak(addr, -1), be_const_var(1) }, - { be_const_key_weak(session_id, -1), be_const_var(4) }, + { be_const_key_weak(exchange_id, -1), be_const_var(4) }, + { be_const_key_weak(msg_id, -1), be_const_var(3) }, })), be_str_weak(Matter_UDPPacket_sent) ); @@ -256,12 +207,144 @@ be_local_closure(Matter_UDPServer__backoff_time, /* name */ /******************************************************************** -** Solidified function: send_response +** Solidified function: _resend_packets ********************************************************************/ -be_local_closure(Matter_UDPServer_send_response, /* name */ +be_local_closure(Matter_UDPServer__resend_packets, /* name */ be_nested_proto( 13, /* nstack */ - 6, /* argc */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[23]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(packets_sent), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(time_reached), + /* K4 */ be_nested_str_weak(next_try), + /* K5 */ be_nested_str_weak(retries), + /* K6 */ be_nested_str_weak(RETRIES), + /* K7 */ be_nested_str_weak(log), + /* K8 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Resending_X20packet_X20id_X3D), + /* K9 */ be_nested_str_weak(msg_id), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(send), + /* 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_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20Unacked_X20packet_X20_X27_X5B_X25s_X5D_X3A_X25i_X27_X20msg_id_X3D_X25i), + /* K19 */ be_nested_str_weak(session_id), + /* K20 */ be_nested_str_weak(addr), + /* K21 */ be_nested_str_weak(port), + /* K22 */ be_const_int(2), + }), + be_str_weak(_resend_packets), + &be_const_str_solidified, + ( &(const binstruction[61]) { /* 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 + 0x780A0035, // 0005 JMPF R2 #003C + 0x88080101, // 0006 GETMBR R2 R0 K1 + 0x94080401, // 0007 GETIDX R2 R2 R1 + 0xB80E0400, // 0008 GETNGBL R3 K2 + 0x8C0C0703, // 0009 GETMET R3 R3 K3 + 0x88140504, // 000A GETMBR R5 R2 K4 + 0x7C0C0400, // 000B CALL R3 2 + 0x780E002C, // 000C JMPF R3 #003A + 0x880C0505, // 000D GETMBR R3 R2 K5 + 0x88100106, // 000E GETMBR R4 R0 K6 + 0x180C0604, // 000F LE R3 R3 R4 + 0x780E0017, // 0010 JMPF R3 #0029 + 0xB80E0400, // 0011 GETNGBL R3 K2 + 0x8C0C0707, // 0012 GETMET R3 R3 K7 + 0x60140008, // 0013 GETGBL R5 G8 + 0x88180509, // 0014 GETMBR R6 R2 K9 + 0x7C140200, // 0015 CALL R5 1 + 0x00161005, // 0016 ADD R5 K8 R5 + 0x5818000A, // 0017 LDCONST R6 K10 + 0x7C0C0600, // 0018 CALL R3 3 + 0x8C0C010B, // 0019 GETMET R3 R0 K11 + 0x5C140400, // 001A MOVE R5 R2 + 0x7C0C0400, // 001B CALL R3 2 + 0xB80E0400, // 001C GETNGBL R3 K2 + 0x8C0C070C, // 001D GETMET R3 R3 K12 + 0x7C0C0200, // 001E CALL R3 1 + 0x8C10010D, // 001F GETMET R4 R0 K13 + 0x88180505, // 0020 GETMBR R6 R2 K5 + 0x7C100400, // 0021 CALL R4 2 + 0x000C0604, // 0022 ADD R3 R3 R4 + 0x900A0803, // 0023 SETMBR R2 K4 R3 + 0x880C0505, // 0024 GETMBR R3 R2 K5 + 0x000C070E, // 0025 ADD R3 R3 K14 + 0x900A0A03, // 0026 SETMBR R2 K5 R3 + 0x0004030E, // 0027 ADD R1 R1 K14 + 0x7002000F, // 0028 JMP #0039 + 0xA40E1E00, // 0029 IMPORT R3 K15 + 0x88100101, // 002A GETMBR R4 R0 K1 + 0x8C100910, // 002B GETMET R4 R4 K16 + 0x5C180200, // 002C MOVE R6 R1 + 0x7C100400, // 002D CALL R4 2 + 0xB8120400, // 002E GETNGBL R4 K2 + 0x8C100907, // 002F GETMET R4 R4 K7 + 0x8C180711, // 0030 GETMET R6 R3 K17 + 0x58200012, // 0031 LDCONST R8 K18 + 0x88240513, // 0032 GETMBR R9 R2 K19 + 0x88280514, // 0033 GETMBR R10 R2 K20 + 0x882C0515, // 0034 GETMBR R11 R2 K21 + 0x88300509, // 0035 GETMBR R12 R2 K9 + 0x7C180C00, // 0036 CALL R6 6 + 0x581C0016, // 0037 LDCONST R7 K22 + 0x7C100600, // 0038 CALL R4 3 + 0x70020000, // 0039 JMP #003B + 0x0004030E, // 003A ADD R1 R1 K14 + 0x7001FFC4, // 003B JMP #0001 + 0x80000000, // 003C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_UDPServer_every_second, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(every_second), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: send_UDP +********************************************************************/ +be_local_closure(Matter_UDPServer_send_UDP, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -272,30 +355,27 @@ be_local_closure(Matter_UDPServer_send_response, /* name */ /* K0 */ be_nested_str_weak(matter), /* K1 */ be_nested_str_weak(UDPPacket_sent), /* K2 */ be_nested_str_weak(send), - /* K3 */ be_nested_str_weak(udp_socket), + /* K3 */ be_nested_str_weak(msg_id), /* K4 */ be_nested_str_weak(packets_sent), /* K5 */ be_nested_str_weak(push), }), - be_str_weak(send_response), + be_str_weak(send_UDP), &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0xB81A0000, // 0000 GETNGBL R6 K0 - 0x8C180D01, // 0001 GETMET R6 R6 K1 - 0x5C200200, // 0002 MOVE R8 R1 - 0x5C240400, // 0003 MOVE R9 R2 - 0x5C280600, // 0004 MOVE R10 R3 - 0x5C2C0800, // 0005 MOVE R11 R4 - 0x5C300A00, // 0006 MOVE R12 R5 - 0x7C180C00, // 0007 CALL R6 6 - 0x8C1C0D02, // 0008 GETMET R7 R6 K2 - 0x88240103, // 0009 GETMBR R9 R0 K3 - 0x7C1C0400, // 000A CALL R7 2 - 0x78120003, // 000B JMPF R4 #0010 - 0x881C0104, // 000C GETMBR R7 R0 K4 - 0x8C1C0F05, // 000D GETMET R7 R7 K5 - 0x5C240C00, // 000E MOVE R9 R6 - 0x7C1C0400, // 000F CALL R7 2 - 0x80000000, // 0010 RET 0 + ( &(const binstruction[14]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x8C0C0102, // 0004 GETMET R3 R0 K2 + 0x5C140400, // 0005 MOVE R5 R2 + 0x7C0C0400, // 0006 CALL R3 2 + 0x880C0503, // 0007 GETMBR R3 R2 K3 + 0x780E0003, // 0008 JMPF R3 #000D + 0x880C0104, // 0009 GETMBR R3 R0 K4 + 0x8C0C0705, // 000A GETMET R3 R3 K5 + 0x5C140400, // 000B MOVE R5 R2 + 0x7C0C0400, // 000C CALL R3 2 + 0x80000000, // 000D RET 0 }) ) ); @@ -388,30 +468,6 @@ be_local_closure(Matter_UDPServer_every_50ms, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_UDPServer_every_second, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: stop ********************************************************************/ @@ -453,160 +509,6 @@ be_local_closure(Matter_UDPServer_stop, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_UDPServer_init, /* name */ - be_nested_proto( - 4, /* nstack */ - 3, /* 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(addr), - /* K1 */ be_nested_str_weak(), - /* K2 */ be_nested_str_weak(port), - /* K3 */ be_nested_str_weak(listening), - /* K4 */ be_nested_str_weak(packets_sent), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x78060001, // 0000 JMPF R1 #0003 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x70020000, // 0002 JMP #0004 - 0x580C0001, // 0003 LDCONST R3 K1 - 0x90020003, // 0004 SETMBR R0 K0 R3 - 0x780A0001, // 0005 JMPF R2 #0008 - 0x5C0C0400, // 0006 MOVE R3 R2 - 0x70020000, // 0007 JMP #0009 - 0x540E15A3, // 0008 LDINT R3 5540 - 0x90020403, // 0009 SETMBR R0 K2 R3 - 0x500C0000, // 000A LDBOOL R3 0 0 - 0x90020603, // 000B SETMBR R0 K3 R3 - 0x600C0012, // 000C GETGBL R3 G18 - 0x7C0C0000, // 000D CALL R3 0 - 0x90020803, // 000E SETMBR R0 K4 R3 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _resend_packets -********************************************************************/ -be_local_closure(Matter_UDPServer__resend_packets, /* name */ - be_nested_proto( - 13, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[24]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(packets_sent), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(time_reached), - /* K4 */ be_nested_str_weak(next_try), - /* K5 */ be_nested_str_weak(retries), - /* K6 */ be_nested_str_weak(RETRIES), - /* K7 */ be_nested_str_weak(log), - /* K8 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Resending_X20packet_X20id_X3D), - /* K9 */ be_nested_str_weak(msg_id), - /* K10 */ be_const_int(3), - /* K11 */ be_nested_str_weak(send), - /* K12 */ be_nested_str_weak(udp_socket), - /* K13 */ be_nested_str_weak(millis), - /* K14 */ be_nested_str_weak(_backoff_time), - /* K15 */ be_const_int(1), - /* K16 */ be_nested_str_weak(string), - /* K17 */ be_nested_str_weak(remove), - /* K18 */ be_nested_str_weak(format), - /* K19 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20Unacked_X20packet_X20_X27_X5B_X25s_X5D_X3A_X25i_X27_X20msg_id_X3D_X25i), - /* K20 */ be_nested_str_weak(session_id), - /* K21 */ be_nested_str_weak(addr), - /* K22 */ be_nested_str_weak(port), - /* K23 */ be_const_int(2), - }), - be_str_weak(_resend_packets), - &be_const_str_solidified, - ( &(const binstruction[61]) { /* 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 - 0x780A0035, // 0005 JMPF R2 #003C - 0x88080101, // 0006 GETMBR R2 R0 K1 - 0x94080401, // 0007 GETIDX R2 R2 R1 - 0xB80E0400, // 0008 GETNGBL R3 K2 - 0x8C0C0703, // 0009 GETMET R3 R3 K3 - 0x88140504, // 000A GETMBR R5 R2 K4 - 0x7C0C0400, // 000B CALL R3 2 - 0x780E002C, // 000C JMPF R3 #003A - 0x880C0505, // 000D GETMBR R3 R2 K5 - 0x88100106, // 000E GETMBR R4 R0 K6 - 0x180C0604, // 000F LE R3 R3 R4 - 0x780E0017, // 0010 JMPF R3 #0029 - 0xB80E0400, // 0011 GETNGBL R3 K2 - 0x8C0C0707, // 0012 GETMET R3 R3 K7 - 0x60140008, // 0013 GETGBL R5 G8 - 0x88180509, // 0014 GETMBR R6 R2 K9 - 0x7C140200, // 0015 CALL R5 1 - 0x00161005, // 0016 ADD R5 K8 R5 - 0x5818000A, // 0017 LDCONST R6 K10 - 0x7C0C0600, // 0018 CALL R3 3 - 0x8C0C050B, // 0019 GETMET R3 R2 K11 - 0x8814010C, // 001A GETMBR R5 R0 K12 - 0x7C0C0400, // 001B CALL R3 2 - 0xB80E0400, // 001C GETNGBL R3 K2 - 0x8C0C070D, // 001D GETMET R3 R3 K13 - 0x7C0C0200, // 001E CALL R3 1 - 0x8C10010E, // 001F GETMET R4 R0 K14 - 0x88180505, // 0020 GETMBR R6 R2 K5 - 0x7C100400, // 0021 CALL R4 2 - 0x000C0604, // 0022 ADD R3 R3 R4 - 0x900A0803, // 0023 SETMBR R2 K4 R3 - 0x880C0505, // 0024 GETMBR R3 R2 K5 - 0x000C070F, // 0025 ADD R3 R3 K15 - 0x900A0A03, // 0026 SETMBR R2 K5 R3 - 0x0004030F, // 0027 ADD R1 R1 K15 - 0x7002000F, // 0028 JMP #0039 - 0xA40E2000, // 0029 IMPORT R3 K16 - 0x88100101, // 002A GETMBR R4 R0 K1 - 0x8C100911, // 002B GETMET R4 R4 K17 - 0x5C180200, // 002C MOVE R6 R1 - 0x7C100400, // 002D CALL R4 2 - 0xB8120400, // 002E GETNGBL R4 K2 - 0x8C100907, // 002F GETMET R4 R4 K7 - 0x8C180712, // 0030 GETMET R6 R3 K18 - 0x58200013, // 0031 LDCONST R8 K19 - 0x88240514, // 0032 GETMBR R9 R2 K20 - 0x88280515, // 0033 GETMBR R10 R2 K21 - 0x882C0516, // 0034 GETMBR R11 R2 K22 - 0x88300509, // 0035 GETMBR R12 R2 K9 - 0x7C180C00, // 0036 CALL R6 6 - 0x581C0017, // 0037 LDCONST R7 K23 - 0x7C100600, // 0038 CALL R4 3 - 0x70020000, // 0039 JMP #003B - 0x0004030F, // 003A ADD R1 R1 K15 - 0x7001FFC4, // 003B JMP #0001 - 0x80000000, // 003C RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: start ********************************************************************/ @@ -668,7 +570,7 @@ be_local_closure(Matter_UDPServer_start, /* name */ ********************************************************************/ be_local_closure(Matter_UDPServer_received_ack, /* name */ be_nested_proto( - 7, /* nstack */ + 10, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -676,60 +578,188 @@ be_local_closure(Matter_UDPServer_received_ack, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(log), - /* K2 */ be_nested_str_weak(MTR_X3A_X20receveived_X20ACK_X20id_X3D), - /* K3 */ be_const_int(3), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(packets_sent), - /* K6 */ be_nested_str_weak(msg_id), - /* K7 */ be_nested_str_weak(remove), - /* K8 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Removed_X20packet_X20from_X20sending_X20list_X20id_X3D), - /* K9 */ be_const_int(1), + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(ack_message_counter), + /* K1 */ be_nested_str_weak(exchange_id), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(log), + /* K4 */ be_nested_str_weak(MTR_X3A_X20receveived_X20ACK_X20id_X3D), + /* K5 */ be_const_int(3), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(packets_sent), + /* K8 */ be_nested_str_weak(msg_id), + /* K9 */ be_nested_str_weak(remove), + /* K10 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Removed_X20packet_X20from_X20sending_X20list_X20id_X3D), + /* K11 */ be_const_int(1), }), be_str_weak(received_ack), &be_const_str_solidified, - ( &(const binstruction[39]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0000, // 0002 JMPF R2 #0004 - 0x80000400, // 0003 RET 0 - 0xB80A0000, // 0004 GETNGBL R2 K0 - 0x8C080501, // 0005 GETMET R2 R2 K1 - 0x60100008, // 0006 GETGBL R4 G8 - 0x5C140200, // 0007 MOVE R5 R1 - 0x7C100200, // 0008 CALL R4 1 - 0x00120404, // 0009 ADD R4 K2 R4 - 0x58140003, // 000A LDCONST R5 K3 - 0x7C080600, // 000B CALL R2 3 - 0x58080004, // 000C LDCONST R2 K4 - 0x600C000C, // 000D GETGBL R3 G12 - 0x88100105, // 000E GETMBR R4 R0 K5 - 0x7C0C0200, // 000F CALL R3 1 - 0x140C0403, // 0010 LT R3 R2 R3 - 0x780E0013, // 0011 JMPF R3 #0026 - 0x880C0105, // 0012 GETMBR R3 R0 K5 - 0x940C0602, // 0013 GETIDX R3 R3 R2 - 0x880C0706, // 0014 GETMBR R3 R3 K6 - 0x1C0C0601, // 0015 EQ R3 R3 R1 - 0x780E000C, // 0016 JMPF R3 #0024 - 0x880C0105, // 0017 GETMBR R3 R0 K5 - 0x8C0C0707, // 0018 GETMET R3 R3 K7 - 0x5C140400, // 0019 MOVE R5 R2 - 0x7C0C0400, // 001A CALL R3 2 - 0xB80E0000, // 001B GETNGBL R3 K0 - 0x8C0C0701, // 001C GETMET R3 R3 K1 - 0x60140008, // 001D GETGBL R5 G8 - 0x5C180200, // 001E MOVE R6 R1 - 0x7C140200, // 001F CALL R5 1 - 0x00161005, // 0020 ADD R5 K8 R5 - 0x58180003, // 0021 LDCONST R6 K3 - 0x7C0C0600, // 0022 CALL R3 3 - 0x70020000, // 0023 JMP #0025 - 0x00080509, // 0024 ADD R2 R2 K9 - 0x7001FFE6, // 0025 JMP #000D - 0x80000000, // 0026 RET 0 + ( &(const binstruction[44]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x880C0301, // 0001 GETMBR R3 R1 K1 + 0x4C100000, // 0002 LDNIL R4 + 0x1C100404, // 0003 EQ R4 R2 R4 + 0x78120000, // 0004 JMPF R4 #0006 + 0x80000800, // 0005 RET 0 + 0xB8120400, // 0006 GETNGBL R4 K2 + 0x8C100903, // 0007 GETMET R4 R4 K3 + 0x60180008, // 0008 GETGBL R6 G8 + 0x5C1C0400, // 0009 MOVE R7 R2 + 0x7C180200, // 000A CALL R6 1 + 0x001A0806, // 000B ADD R6 K4 R6 + 0x581C0005, // 000C LDCONST R7 K5 + 0x7C100600, // 000D CALL R4 3 + 0x58100006, // 000E LDCONST R4 K6 + 0x6014000C, // 000F GETGBL R5 G12 + 0x88180107, // 0010 GETMBR R6 R0 K7 + 0x7C140200, // 0011 CALL R5 1 + 0x14140805, // 0012 LT R5 R4 R5 + 0x78160016, // 0013 JMPF R5 #002B + 0x88140107, // 0014 GETMBR R5 R0 K7 + 0x94140A04, // 0015 GETIDX R5 R5 R4 + 0x88180B08, // 0016 GETMBR R6 R5 K8 + 0x1C180C02, // 0017 EQ R6 R6 R2 + 0x781A000F, // 0018 JMPF R6 #0029 + 0x88180B01, // 0019 GETMBR R6 R5 K1 + 0x1C180C03, // 001A EQ R6 R6 R3 + 0x781A000C, // 001B JMPF R6 #0029 + 0x88180107, // 001C GETMBR R6 R0 K7 + 0x8C180D09, // 001D GETMET R6 R6 K9 + 0x5C200800, // 001E MOVE R8 R4 + 0x7C180400, // 001F CALL R6 2 + 0xB81A0400, // 0020 GETNGBL R6 K2 + 0x8C180D03, // 0021 GETMET R6 R6 K3 + 0x60200008, // 0022 GETGBL R8 G8 + 0x5C240400, // 0023 MOVE R9 R2 + 0x7C200200, // 0024 CALL R8 1 + 0x00221408, // 0025 ADD R8 K10 R8 + 0x58240005, // 0026 LDCONST R9 K5 + 0x7C180600, // 0027 CALL R6 3 + 0x70020000, // 0028 JMP #002A + 0x0010090B, // 0029 ADD R4 R4 K11 + 0x7001FFE3, // 002A JMP #000F + 0x80000000, // 002B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_UDPServer_init, /* name */ + be_nested_proto( + 4, /* nstack */ + 3, /* 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(addr), + /* K1 */ be_nested_str_weak(), + /* K2 */ be_nested_str_weak(port), + /* K3 */ be_nested_str_weak(listening), + /* K4 */ be_nested_str_weak(packets_sent), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x78060001, // 0000 JMPF R1 #0003 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x70020000, // 0002 JMP #0004 + 0x580C0001, // 0003 LDCONST R3 K1 + 0x90020003, // 0004 SETMBR R0 K0 R3 + 0x780A0001, // 0005 JMPF R2 #0008 + 0x5C0C0400, // 0006 MOVE R3 R2 + 0x70020000, // 0007 JMP #0009 + 0x540E15A3, // 0008 LDINT R3 5540 + 0x90020403, // 0009 SETMBR R0 K2 R3 + 0x500C0000, // 000A LDBOOL R3 0 0 + 0x90020603, // 000B SETMBR R0 K3 R3 + 0x600C0012, // 000C GETGBL R3 G18 + 0x7C0C0000, // 000D CALL R3 0 + 0x90020803, // 000E SETMBR R0 K4 R3 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: send +********************************************************************/ +be_local_closure(Matter_UDPServer_send, /* name */ + be_nested_proto( + 11, /* 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(string), + /* K1 */ be_nested_str_weak(udp_socket), + /* K2 */ be_nested_str_weak(send), + /* K3 */ be_nested_str_weak(addr), + /* K4 */ be_nested_str_weak(remote_ip), + /* K5 */ be_nested_str_weak(port), + /* K6 */ be_nested_str_weak(remote_port), + /* K7 */ be_nested_str_weak(raw), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(log), + /* K10 */ be_nested_str_weak(format), + /* K11 */ be_nested_str_weak(MTR_X3A_X20sending_X20packet_X20to_X20_X27_X5B_X25s_X5D_X3A_X25i_X27), + /* K12 */ be_nested_str_weak(MTR_X3A_X20error_X20sending_X20packet_X20to_X20_X27_X5B_X25s_X5D_X3A_X25i_X27), + /* K13 */ be_const_int(2), + }), + be_str_weak(send), + &be_const_str_solidified, + ( &(const binstruction[38]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x8C0C0702, // 0002 GETMET R3 R3 K2 + 0x88140303, // 0003 GETMBR R5 R1 K3 + 0x78160001, // 0004 JMPF R5 #0007 + 0x88140303, // 0005 GETMBR R5 R1 K3 + 0x70020001, // 0006 JMP #0009 + 0x88140101, // 0007 GETMBR R5 R0 K1 + 0x88140B04, // 0008 GETMBR R5 R5 K4 + 0x88180305, // 0009 GETMBR R6 R1 K5 + 0x781A0001, // 000A JMPF R6 #000D + 0x88180305, // 000B GETMBR R6 R1 K5 + 0x70020001, // 000C JMP #000F + 0x88180101, // 000D GETMBR R6 R0 K1 + 0x88180D06, // 000E GETMBR R6 R6 K6 + 0x881C0307, // 000F GETMBR R7 R1 K7 + 0x7C0C0800, // 0010 CALL R3 4 + 0x780E0009, // 0011 JMPF R3 #001C + 0xB8121000, // 0012 GETNGBL R4 K8 + 0x8C100909, // 0013 GETMET R4 R4 K9 + 0x8C18050A, // 0014 GETMET R6 R2 K10 + 0x5820000B, // 0015 LDCONST R8 K11 + 0x88240303, // 0016 GETMBR R9 R1 K3 + 0x88280305, // 0017 GETMBR R10 R1 K5 + 0x7C180800, // 0018 CALL R6 4 + 0x541E0003, // 0019 LDINT R7 4 + 0x7C100600, // 001A CALL R4 3 + 0x70020008, // 001B JMP #0025 + 0xB8121000, // 001C GETNGBL R4 K8 + 0x8C100909, // 001D GETMET R4 R4 K9 + 0x8C18050A, // 001E GETMET R6 R2 K10 + 0x5820000C, // 001F LDCONST R8 K12 + 0x88240303, // 0020 GETMBR R9 R1 K3 + 0x88280305, // 0021 GETMBR R10 R1 K5 + 0x7C180800, // 0022 CALL R6 4 + 0x581C000D, // 0023 LDCONST R7 K13 + 0x7C100600, // 0024 CALL R4 3 + 0x80040600, // 0025 RET 1 R3 }) ) ); @@ -742,25 +772,26 @@ be_local_closure(Matter_UDPServer_received_ack, /* name */ be_local_class(Matter_UDPServer, 6, NULL, - be_nested_map(17, + be_nested_map(18, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(RETRIES, -1), be_const_int(6) }, - { be_const_key_weak(_backoff_time, 6), be_const_static_closure(Matter_UDPServer__backoff_time_closure) }, - { be_const_key_weak(listening, -1), be_const_var(2) }, - { be_const_key_weak(send_response, -1), be_const_closure(Matter_UDPServer_send_response_closure) }, - { be_const_key_weak(received_ack, -1), be_const_closure(Matter_UDPServer_received_ack_closure) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_UDPServer_every_second_closure) }, - { be_const_key_weak(every_50ms, -1), be_const_closure(Matter_UDPServer_every_50ms_closure) }, + { be_const_key_weak(_backoff_time, 17), be_const_static_closure(Matter_UDPServer__backoff_time_closure) }, { be_const_key_weak(packets_sent, -1), be_const_var(5) }, - { be_const_key_weak(port, -1), be_const_var(1) }, - { be_const_key_weak(udp_socket, -1), be_const_var(3) }, - { be_const_key_weak(_resend_packets, 11), be_const_closure(Matter_UDPServer__resend_packets_closure) }, - { be_const_key_weak(stop, -1), be_const_closure(Matter_UDPServer_stop_closure) }, { be_const_key_weak(addr, -1), be_const_var(0) }, - { be_const_key_weak(MAX_PACKETS_READ, 10), be_const_int(4) }, + { be_const_key_weak(every_second, -1), be_const_closure(Matter_UDPServer_every_second_closure) }, + { be_const_key_weak(port, -1), be_const_var(1) }, + { be_const_key_weak(dispatch_cb, 1), be_const_var(4) }, + { be_const_key_weak(udp_socket, -1), be_const_var(3) }, + { be_const_key_weak(send_UDP, -1), be_const_closure(Matter_UDPServer_send_UDP_closure) }, + { be_const_key_weak(every_50ms, -1), be_const_closure(Matter_UDPServer_every_50ms_closure) }, + { be_const_key_weak(send, 10), be_const_closure(Matter_UDPServer_send_closure) }, + { be_const_key_weak(RETRIES, -1), be_const_int(5) }, + { be_const_key_weak(stop, 16), be_const_closure(Matter_UDPServer_stop_closure) }, + { be_const_key_weak(received_ack, -1), be_const_closure(Matter_UDPServer_received_ack_closure) }, + { be_const_key_weak(_resend_packets, 9), be_const_closure(Matter_UDPServer__resend_packets_closure) }, + { be_const_key_weak(MAX_PACKETS_READ, -1), be_const_int(4) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_UDPServer_init_closure) }, { be_const_key_weak(start, -1), be_const_closure(Matter_UDPServer_start_closure) }, - { be_const_key_weak(init, 4), be_const_closure(Matter_UDPServer_init_closure) }, - { be_const_key_weak(dispatch_cb, 0), be_const_var(4) }, + { be_const_key_weak(listening, -1), be_const_var(2) }, })), be_str_weak(Matter_UDPServer) );