From 43b6f91cf2c88af7bf8ada1e042623f81294c58c Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Tue, 7 Feb 2023 02:55:20 +0100 Subject: [PATCH] Berry implement more attributes and commands (#17903) --- .../src/embedded/Matter_Plugin_core.be | 40 +- .../src/embedded/Matter_Session.be | 24 + .../berry_matter/src/embedded/Matter_TLV.be | 11 +- .../solidify/solidified_Matter_Plugin_core.h | 683 +++-- .../src/solidify/solidified_Matter_Session.h | 2399 +++++++++-------- .../src/solidify/solidified_Matter_TLV.h | 350 +-- 6 files changed, 1920 insertions(+), 1587 deletions(-) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_core.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_core.be index 02ed99bde..217c76c23 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_core.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_core.be @@ -129,9 +129,25 @@ class Matter_Plugin_core : Matter_Plugin elif cluster == 0x003E # ========== Node Operational Credentials Cluster 11.17 p.704 ========== if attribute == 0x0000 # ---------- NOCs / list[NOCStruct] ---------- - # TODO + var nocl = TLV.Matter_TLV_array() # NOCs, p.711 + for session: self.device.sessions.sessions_active() + var nocs = nocl.add_struct(nil) + nocs.add_TLV(1, TLV.B2, session.noc) # NOC + nocs.add_TLV(2, TLV.B2, session.icac) # ICAC + end + return nocl elif attribute == 0x0001 # ---------- Fabrics / list[FabricDescriptorStruct] ---------- - # TODO + var fabrics = TLV.Matter_TLV_array() # Fabrics, p.711 + for session: self.device.sessions.sessions_active() + var root_ca_tlv = TLV.parse(session.get_ca()) + var fab = fabrics.add_struct(nil) # encoding see p.303 + fab.add_TLV(1, TLV.B2, root_ca_tlv.findsubval(9)) # RootPublicKey + fab.add_TLV(2, TLV.U2, session.admin_vendor) # VendorID + fab.add_TLV(3, TLV.U8, session.fabric) # FabricID + fab.add_TLV(4, TLV.U8, session.deviceid) # NodeID + fab.add_TLV(5, TLV.UTF1, session.fabric_label) # Label + end + return fabrics elif attribute == 0x0002 # ---------- SupportedFabrics / u1 ---------- return TLV.create_TLV(TLV.U1, 5) # Max 5 fabrics elif attribute == 0x0003 # ---------- CommissionedFabrics / u1 ---------- @@ -398,6 +414,26 @@ class Matter_Plugin_core : Matter_Plugin ctx.command = 0x08 # NOCResponse return nocr + elif command == 0x0009 # ---------- UpdateFabricLabel ---------- + var label = val.findsubval(0) # Label string max 32 + session.set_fabric_label(label) + ctx.status = matter.SUCCESS # OK + return nil # trigger a standalone ack + + elif command == 0x000A # ---------- RemoveFabric ---------- + var index = val.findsubval(0) # FabricIndex + var sessions_act = self.device.sessions.sessions_active() + if index >= 1 && index <= size(sessions_act) + var session_deleted = sessions_act[index - 1] + tasmota.log("MTR: removing fabric " + session.fabric.copy().reverse().tohex()) + self.device.sessions.remove_session() + self.device.sessions.save() + else + # TODO return error 11 InvalidFabricIndex + end + ctx.status = matter.SUCCESS # OK + return nil # trigger a standalone ack + end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Session.be b/lib/libesp32/berry_matter/src/embedded/Matter_Session.be index 028f8a28d..340dccc4c 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Session.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Session.be @@ -72,6 +72,7 @@ class Matter_Session var fabric # fabric identifier as bytes(8) little endian var fabric_compressed # comrpessed fabric identifier, hashed with root_ca public key var deviceid # our own device id bytes(8) little endian + var fabric_label # set by UpdateFabricLabel # Admin info extracted from NOC/ICAC var admin_subject var admin_vendor @@ -112,6 +113,7 @@ class Matter_Session self._i2r_privacy = nil self.r2ikey = nil self.attestation_challenge = nil + self.fabric_label = "" # clear any attribute starting with `_` import introspect for k : introspect.members(self) @@ -155,6 +157,11 @@ class Matter_Session def set_persist(p) self._persist = bool(p) end + def set_fabric_label(s) + if type(s) == 'string' + self.fabric_label = s + end + end ############################################################# def get_mode() @@ -505,6 +512,23 @@ class Matter_Session_Store return session end + ############################################################# + # list of sessions that are active, i.e. have been + # successfully commissioned + # + def sessions_active() + var ret = [] + var idx = 0 + while idx < size(self.sessions) + var session = self.sessions[idx] + if session.get_deviceid() && session.get_fabric() + ret.push(session) + end + idx += 1 + end + return ret + end + ############################################################# def save() import json diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be b/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be index 3f54f56a8..1571af07a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be @@ -254,11 +254,16 @@ class Matter_TLV elif self.typ == TLV.I4 || self.typ == TLV.U4 b.add(int(self.val), 4) elif self.typ == TLV.I8 || self.typ == TLV.U8 + # I8/U8 can be encoded from bytes(8)/int64/int var i64 = self.val - if !isinstance(i64, int64) - i64 = int64(int(self.val)) + if isinstance(i64, bytes) + i64 = i64.copy().resize(8) # bytes(8) + elif isinstance(i64, int64) + i64 = i64.tobytes() # bytes(8) + else + i64 = int64(int(i64)).tobytes() # bytes(8) end - b .. i64.tobytes() + b .. i64 elif self.typ == TLV.BFALSE || self.typ == TLV.BTRUE # push nothing elif self.typ == TLV.FLOAT diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_core.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_core.h index a68e124e2..de1617ce8 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_core.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_core.h @@ -19,7 +19,7 @@ be_local_closure(Matter_Plugin_core_read_attribute, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[63]) { /* constants */ + ( &(const bvalue[76]) { /* constants */ /* K0 */ be_nested_str_weak(string), /* K1 */ be_nested_str_weak(matter), /* K2 */ be_nested_str_weak(TLV), @@ -70,23 +70,36 @@ be_local_closure(Matter_Plugin_core_read_attribute, /* name */ /* K47 */ be_nested_str_weak(utc), /* K48 */ be_const_int(1000000), /* K49 */ be_nested_str_weak(local), - /* K50 */ be_nested_str_weak(Tasmota), - /* K51 */ be_nested_str_weak(device), - /* K52 */ be_nested_str_weak(vendorid), - /* K53 */ be_nested_str_weak(DeviceName), - /* K54 */ be_nested_str_weak(FriendlyName), - /* K55 */ be_nested_str_weak(FriendlyName1), - /* K56 */ be_nested_str_weak(XX), - /* K57 */ be_nested_str_weak(Status_X202), - /* K58 */ be_nested_str_weak(StatusFWR), - /* K59 */ be_nested_str_weak(Hardware), - /* K60 */ be_nested_str_weak(Version), - /* K61 */ be_nested_str_weak(locale), - /* K62 */ be_nested_str_weak(Matter_TLV_list), + /* K50 */ be_nested_str_weak(device), + /* K51 */ be_nested_str_weak(sessions), + /* K52 */ be_nested_str_weak(sessions_active), + /* K53 */ be_nested_str_weak(B2), + /* K54 */ be_nested_str_weak(noc), + /* K55 */ be_nested_str_weak(icac), + /* K56 */ be_nested_str_weak(stop_iteration), + /* K57 */ be_nested_str_weak(parse), + /* K58 */ be_nested_str_weak(get_ca), + /* K59 */ be_nested_str_weak(findsubval), + /* K60 */ be_nested_str_weak(admin_vendor), + /* K61 */ be_nested_str_weak(fabric), + /* K62 */ be_nested_str_weak(deviceid), + /* K63 */ be_nested_str_weak(fabric_label), + /* K64 */ be_nested_str_weak(Tasmota), + /* K65 */ be_nested_str_weak(vendorid), + /* K66 */ be_nested_str_weak(DeviceName), + /* K67 */ be_nested_str_weak(FriendlyName), + /* K68 */ be_nested_str_weak(FriendlyName1), + /* K69 */ be_nested_str_weak(XX), + /* K70 */ be_nested_str_weak(Status_X202), + /* K71 */ be_nested_str_weak(StatusFWR), + /* K72 */ be_nested_str_weak(Hardware), + /* K73 */ be_nested_str_weak(Version), + /* K74 */ be_nested_str_weak(locale), + /* K75 */ be_nested_str_weak(Matter_TLV_list), }), be_str_weak(read_attribute), &be_const_str_solidified, - ( &(const binstruction[570]) { /* code */ + ( &(const binstruction[649]) { /* code */ 0xA4160000, // 0000 IMPORT R5 K0 0xB81A0200, // 0001 GETNGBL R6 K1 0x88180D02, // 0002 GETMBR R6 R6 K2 @@ -142,11 +155,11 @@ be_local_closure(Matter_Plugin_core_read_attribute, /* name */ 0x50280000, // 0034 LDBOOL R10 0 0 0x7C1C0600, // 0035 CALL R7 3 0x80040E00, // 0036 RET 1 R7 - 0x70020200, // 0037 JMP #0239 + 0x7002024F, // 0037 JMP #0288 0x541E0031, // 0038 LDINT R7 50 0x1C1C0607, // 0039 EQ R7 R3 R7 0x781E0000, // 003A JMPF R7 #003C - 0x700201FC, // 003B JMP #0239 + 0x7002024B, // 003B JMP #0288 0x541E0032, // 003C LDINT R7 51 0x1C1C0607, // 003D EQ R7 R3 R7 0x781E00DA, // 003E JMPF R7 #011A @@ -368,11 +381,11 @@ be_local_closure(Matter_Plugin_core_read_attribute, /* name */ 0x50280000, // 0116 LDBOOL R10 0 0 0x7C1C0600, // 0117 CALL R7 3 0x80040E00, // 0118 RET 1 R7 - 0x7002011E, // 0119 JMP #0239 + 0x7002016D, // 0119 JMP #0288 0x541E0033, // 011A LDINT R7 52 0x1C1C0607, // 011B EQ R7 R3 R7 0x781E0000, // 011C JMPF R7 #011E - 0x7002011A, // 011D JMP #0239 + 0x70020169, // 011D JMP #0288 0x541E0037, // 011E LDINT R7 56 0x1C1C0607, // 011F EQ R7 R3 R7 0x781E002C, // 0120 JMPF R7 #014E @@ -420,243 +433,322 @@ be_local_closure(Matter_Plugin_core_read_attribute, /* name */ 0x5C2C0E00, // 014A MOVE R11 R7 0x7C200600, // 014B CALL R8 3 0x80041000, // 014C RET 1 R8 - 0x700200EA, // 014D JMP #0239 + 0x70020139, // 014D JMP #0288 0x541E003D, // 014E LDINT R7 62 0x1C1C0607, // 014F EQ R7 R3 R7 - 0x781E001D, // 0150 JMPF R7 #016F + 0x781E006C, // 0150 JMPF R7 #01BE 0x1C1C0903, // 0151 EQ R7 R4 K3 - 0x781E0000, // 0152 JMPF R7 #0154 - 0x70020019, // 0153 JMP #016E - 0x1C1C0908, // 0154 EQ R7 R4 K8 - 0x781E0000, // 0155 JMPF R7 #0157 - 0x70020016, // 0156 JMP #016E - 0x1C1C090C, // 0157 EQ R7 R4 K12 - 0x781E0005, // 0158 JMPF R7 #015F - 0x8C1C0D04, // 0159 GETMET R7 R6 K4 - 0x88240D0D, // 015A GETMBR R9 R6 K13 - 0x542A0004, // 015B LDINT R10 5 - 0x7C1C0600, // 015C CALL R7 3 - 0x80040E00, // 015D RET 1 R7 - 0x7002000E, // 015E JMP #016E - 0x1C1C090E, // 015F EQ R7 R4 K14 - 0x781E0005, // 0160 JMPF R7 #0167 - 0x8C1C0D04, // 0161 GETMET R7 R6 K4 - 0x88240D0D, // 0162 GETMBR R9 R6 K13 - 0x58280008, // 0163 LDCONST R10 K8 - 0x7C1C0600, // 0164 CALL R7 3 - 0x80040E00, // 0165 RET 1 R7 - 0x70020006, // 0166 JMP #016E - 0x541E0003, // 0167 LDINT R7 4 - 0x1C1C0807, // 0168 EQ R7 R4 R7 - 0x781E0000, // 0169 JMPF R7 #016B - 0x70020002, // 016A JMP #016E - 0x541E0004, // 016B LDINT R7 5 - 0x1C1C0807, // 016C EQ R7 R4 R7 - 0x781DFFFF, // 016D JMPF R7 #016E - 0x700200C9, // 016E JMP #0239 - 0x541E003B, // 016F LDINT R7 60 - 0x1C1C0607, // 0170 EQ R7 R3 R7 - 0x781E0000, // 0171 JMPF R7 #0173 - 0x700200C5, // 0172 JMP #0239 - 0x541E0027, // 0173 LDINT R7 40 - 0x1C1C0607, // 0174 EQ R7 R3 R7 - 0x781E0071, // 0175 JMPF R7 #01E8 - 0x1C1C0903, // 0176 EQ R7 R4 K3 - 0x781E0005, // 0177 JMPF R7 #017E - 0x8C1C0D04, // 0178 GETMET R7 R6 K4 - 0x88240D0B, // 0179 GETMBR R9 R6 K11 - 0x58280003, // 017A LDCONST R10 K3 - 0x7C1C0600, // 017B CALL R7 3 - 0x80040E00, // 017C RET 1 R7 - 0x70020068, // 017D JMP #01E7 - 0x1C1C0908, // 017E EQ R7 R4 K8 - 0x781E0005, // 017F JMPF R7 #0186 - 0x8C1C0D04, // 0180 GETMET R7 R6 K4 - 0x88240D15, // 0181 GETMBR R9 R6 K21 - 0x58280032, // 0182 LDCONST R10 K50 - 0x7C1C0600, // 0183 CALL R7 3 - 0x80040E00, // 0184 RET 1 R7 - 0x70020060, // 0185 JMP #01E7 - 0x1C1C090C, // 0186 EQ R7 R4 K12 - 0x781E0006, // 0187 JMPF R7 #018F - 0x8C1C0D04, // 0188 GETMET R7 R6 K4 - 0x88240D0B, // 0189 GETMBR R9 R6 K11 - 0x88280133, // 018A GETMBR R10 R0 K51 - 0x88281534, // 018B GETMBR R10 R10 K52 - 0x7C1C0600, // 018C CALL R7 3 - 0x80040E00, // 018D RET 1 R7 - 0x70020057, // 018E JMP #01E7 - 0x1C1C090E, // 018F EQ R7 R4 K14 - 0x781E0009, // 0190 JMPF R7 #019B - 0x8C1C0D04, // 0191 GETMET R7 R6 K4 - 0x88240D15, // 0192 GETMBR R9 R6 K21 - 0xB82A2200, // 0193 GETNGBL R10 K17 - 0x8C281525, // 0194 GETMET R10 R10 K37 - 0x58300035, // 0195 LDCONST R12 K53 - 0x7C280400, // 0196 CALL R10 2 - 0x94281535, // 0197 GETIDX R10 R10 K53 - 0x7C1C0600, // 0198 CALL R7 3 - 0x80040E00, // 0199 RET 1 R7 - 0x7002004B, // 019A JMP #01E7 - 0x541E0003, // 019B LDINT R7 4 - 0x1C1C0807, // 019C EQ R7 R4 R7 - 0x781E0005, // 019D JMPF R7 #01A4 - 0x8C1C0D04, // 019E GETMET R7 R6 K4 - 0x88240D0B, // 019F GETMBR R9 R6 K11 - 0x542A7FFF, // 01A0 LDINT R10 32768 - 0x7C1C0600, // 01A1 CALL R7 3 - 0x80040E00, // 01A2 RET 1 R7 - 0x70020042, // 01A3 JMP #01E7 - 0x541E0004, // 01A4 LDINT R7 5 - 0x1C1C0807, // 01A5 EQ R7 R4 R7 - 0x781E0009, // 01A6 JMPF R7 #01B1 - 0x8C1C0D04, // 01A7 GETMET R7 R6 K4 - 0x88240D15, // 01A8 GETMBR R9 R6 K21 - 0xB82A2200, // 01A9 GETNGBL R10 K17 - 0x8C281525, // 01AA GETMET R10 R10 K37 - 0x58300036, // 01AB LDCONST R12 K54 - 0x7C280400, // 01AC CALL R10 2 - 0x94281537, // 01AD GETIDX R10 R10 K55 - 0x7C1C0600, // 01AE CALL R7 3 - 0x80040E00, // 01AF RET 1 R7 - 0x70020035, // 01B0 JMP #01E7 - 0x541E0005, // 01B1 LDINT R7 6 - 0x1C1C0807, // 01B2 EQ R7 R4 R7 - 0x781E0005, // 01B3 JMPF R7 #01BA - 0x8C1C0D04, // 01B4 GETMET R7 R6 K4 - 0x88240D15, // 01B5 GETMBR R9 R6 K21 - 0x58280038, // 01B6 LDCONST R10 K56 - 0x7C1C0600, // 01B7 CALL R7 3 - 0x80040E00, // 01B8 RET 1 R7 - 0x7002002C, // 01B9 JMP #01E7 - 0x541E0006, // 01BA LDINT R7 7 + 0x781E001D, // 0152 JMPF R7 #0171 + 0x8C1C0D10, // 0153 GETMET R7 R6 K16 + 0x7C1C0200, // 0154 CALL R7 1 + 0x60200010, // 0155 GETGBL R8 G16 + 0x88240132, // 0156 GETMBR R9 R0 K50 + 0x88241333, // 0157 GETMBR R9 R9 K51 + 0x8C241334, // 0158 GETMET R9 R9 K52 + 0x7C240200, // 0159 CALL R9 1 + 0x7C200200, // 015A CALL R8 1 + 0xA802000F, // 015B EXBLK 0 #016C + 0x5C241000, // 015C MOVE R9 R8 + 0x7C240000, // 015D CALL R9 0 + 0x8C280F14, // 015E GETMET R10 R7 K20 + 0x4C300000, // 015F LDNIL R12 + 0x7C280400, // 0160 CALL R10 2 + 0x8C2C150A, // 0161 GETMET R11 R10 K10 + 0x58340008, // 0162 LDCONST R13 K8 + 0x88380D35, // 0163 GETMBR R14 R6 K53 + 0x883C1336, // 0164 GETMBR R15 R9 K54 + 0x7C2C0800, // 0165 CALL R11 4 + 0x8C2C150A, // 0166 GETMET R11 R10 K10 + 0x5834000C, // 0167 LDCONST R13 K12 + 0x88380D35, // 0168 GETMBR R14 R6 K53 + 0x883C1337, // 0169 GETMBR R15 R9 K55 + 0x7C2C0800, // 016A CALL R11 4 + 0x7001FFEF, // 016B JMP #015C + 0x58200038, // 016C LDCONST R8 K56 + 0xAC200200, // 016D CATCH R8 1 0 + 0xB0080000, // 016E RAISE 2 R0 R0 + 0x80040E00, // 016F RET 1 R7 + 0x7002004B, // 0170 JMP #01BD + 0x1C1C0908, // 0171 EQ R7 R4 K8 + 0x781E0032, // 0172 JMPF R7 #01A6 + 0x8C1C0D10, // 0173 GETMET R7 R6 K16 + 0x7C1C0200, // 0174 CALL R7 1 + 0x60200010, // 0175 GETGBL R8 G16 + 0x88240132, // 0176 GETMBR R9 R0 K50 + 0x88241333, // 0177 GETMBR R9 R9 K51 + 0x8C241334, // 0178 GETMET R9 R9 K52 + 0x7C240200, // 0179 CALL R9 1 + 0x7C200200, // 017A CALL R8 1 + 0xA8020024, // 017B EXBLK 0 #01A1 + 0x5C241000, // 017C MOVE R9 R8 + 0x7C240000, // 017D CALL R9 0 + 0x8C280D39, // 017E GETMET R10 R6 K57 + 0x8C30133A, // 017F GETMET R12 R9 K58 + 0x7C300200, // 0180 CALL R12 1 + 0x7C280400, // 0181 CALL R10 2 + 0x8C2C0F14, // 0182 GETMET R11 R7 K20 + 0x4C340000, // 0183 LDNIL R13 + 0x7C2C0400, // 0184 CALL R11 2 + 0x8C30170A, // 0185 GETMET R12 R11 K10 + 0x58380008, // 0186 LDCONST R14 K8 + 0x883C0D35, // 0187 GETMBR R15 R6 K53 + 0x8C40153B, // 0188 GETMET R16 R10 K59 + 0x544A0008, // 0189 LDINT R18 9 + 0x7C400400, // 018A CALL R16 2 + 0x7C300800, // 018B CALL R12 4 + 0x8C30170A, // 018C GETMET R12 R11 K10 + 0x5838000C, // 018D LDCONST R14 K12 + 0x883C0D0B, // 018E GETMBR R15 R6 K11 + 0x8840133C, // 018F GETMBR R16 R9 K60 + 0x7C300800, // 0190 CALL R12 4 + 0x8C30170A, // 0191 GETMET R12 R11 K10 + 0x5838000E, // 0192 LDCONST R14 K14 + 0x883C0D05, // 0193 GETMBR R15 R6 K5 + 0x8840133D, // 0194 GETMBR R16 R9 K61 + 0x7C300800, // 0195 CALL R12 4 + 0x8C30170A, // 0196 GETMET R12 R11 K10 + 0x543A0003, // 0197 LDINT R14 4 + 0x883C0D05, // 0198 GETMBR R15 R6 K5 + 0x8840133E, // 0199 GETMBR R16 R9 K62 + 0x7C300800, // 019A CALL R12 4 + 0x8C30170A, // 019B GETMET R12 R11 K10 + 0x543A0004, // 019C LDINT R14 5 + 0x883C0D15, // 019D GETMBR R15 R6 K21 + 0x8840133F, // 019E GETMBR R16 R9 K63 + 0x7C300800, // 019F CALL R12 4 + 0x7001FFDA, // 01A0 JMP #017C + 0x58200038, // 01A1 LDCONST R8 K56 + 0xAC200200, // 01A2 CATCH R8 1 0 + 0xB0080000, // 01A3 RAISE 2 R0 R0 + 0x80040E00, // 01A4 RET 1 R7 + 0x70020016, // 01A5 JMP #01BD + 0x1C1C090C, // 01A6 EQ R7 R4 K12 + 0x781E0005, // 01A7 JMPF R7 #01AE + 0x8C1C0D04, // 01A8 GETMET R7 R6 K4 + 0x88240D0D, // 01A9 GETMBR R9 R6 K13 + 0x542A0004, // 01AA LDINT R10 5 + 0x7C1C0600, // 01AB CALL R7 3 + 0x80040E00, // 01AC RET 1 R7 + 0x7002000E, // 01AD JMP #01BD + 0x1C1C090E, // 01AE EQ R7 R4 K14 + 0x781E0005, // 01AF JMPF R7 #01B6 + 0x8C1C0D04, // 01B0 GETMET R7 R6 K4 + 0x88240D0D, // 01B1 GETMBR R9 R6 K13 + 0x58280008, // 01B2 LDCONST R10 K8 + 0x7C1C0600, // 01B3 CALL R7 3 + 0x80040E00, // 01B4 RET 1 R7 + 0x70020006, // 01B5 JMP #01BD + 0x541E0003, // 01B6 LDINT R7 4 + 0x1C1C0807, // 01B7 EQ R7 R4 R7 + 0x781E0000, // 01B8 JMPF R7 #01BA + 0x70020002, // 01B9 JMP #01BD + 0x541E0004, // 01BA LDINT R7 5 0x1C1C0807, // 01BB EQ R7 R4 R7 - 0x781E0005, // 01BC JMPF R7 #01C3 - 0x8C1C0D04, // 01BD GETMET R7 R6 K4 - 0x88240D0B, // 01BE GETMBR R9 R6 K11 - 0x58280003, // 01BF LDCONST R10 K3 - 0x7C1C0600, // 01C0 CALL R7 3 - 0x80040E00, // 01C1 RET 1 R7 - 0x70020023, // 01C2 JMP #01E7 - 0x541E0007, // 01C3 LDINT R7 8 - 0x1C1C0807, // 01C4 EQ R7 R4 R7 - 0x781E000A, // 01C5 JMPF R7 #01D1 - 0x8C1C0D04, // 01C6 GETMET R7 R6 K4 - 0x88240D15, // 01C7 GETMBR R9 R6 K21 - 0xB82A2200, // 01C8 GETNGBL R10 K17 - 0x8C281525, // 01C9 GETMET R10 R10 K37 - 0x58300039, // 01CA LDCONST R12 K57 - 0x7C280400, // 01CB CALL R10 2 - 0x9428153A, // 01CC GETIDX R10 R10 K58 - 0x9428153B, // 01CD GETIDX R10 R10 K59 - 0x7C1C0600, // 01CE CALL R7 3 - 0x80040E00, // 01CF RET 1 R7 - 0x70020015, // 01D0 JMP #01E7 - 0x541E0008, // 01D1 LDINT R7 9 - 0x1C1C0807, // 01D2 EQ R7 R4 R7 - 0x781E0005, // 01D3 JMPF R7 #01DA - 0x8C1C0D04, // 01D4 GETMET R7 R6 K4 - 0x88240D0B, // 01D5 GETMBR R9 R6 K11 - 0x58280003, // 01D6 LDCONST R10 K3 - 0x7C1C0600, // 01D7 CALL R7 3 - 0x80040E00, // 01D8 RET 1 R7 - 0x7002000C, // 01D9 JMP #01E7 - 0x541E0009, // 01DA LDINT R7 10 - 0x1C1C0807, // 01DB EQ R7 R4 R7 - 0x781E0009, // 01DC JMPF R7 #01E7 - 0x8C1C0D04, // 01DD GETMET R7 R6 K4 - 0x88240D15, // 01DE GETMBR R9 R6 K21 - 0xB82A2200, // 01DF GETNGBL R10 K17 - 0x8C281525, // 01E0 GETMET R10 R10 K37 - 0x58300039, // 01E1 LDCONST R12 K57 - 0x7C280400, // 01E2 CALL R10 2 - 0x9428153A, // 01E3 GETIDX R10 R10 K58 - 0x9428153C, // 01E4 GETIDX R10 R10 K60 - 0x7C1C0600, // 01E5 CALL R7 3 - 0x80040E00, // 01E6 RET 1 R7 - 0x70020050, // 01E7 JMP #0239 - 0x541E003E, // 01E8 LDINT R7 63 - 0x1C1C0607, // 01E9 EQ R7 R3 R7 - 0x781E0000, // 01EA JMPF R7 #01EC - 0x7002004C, // 01EB JMP #0239 - 0x541E002A, // 01EC LDINT R7 43 - 0x1C1C0607, // 01ED EQ R7 R3 R7 - 0x781E0016, // 01EE JMPF R7 #0206 - 0x1C1C0903, // 01EF EQ R7 R4 K3 - 0x781E0007, // 01F0 JMPF R7 #01F9 - 0x8C1C0D04, // 01F1 GETMET R7 R6 K4 - 0x88240D15, // 01F2 GETMBR R9 R6 K21 - 0xB82A2200, // 01F3 GETNGBL R10 K17 - 0x8C28153D, // 01F4 GETMET R10 R10 K61 - 0x7C280200, // 01F5 CALL R10 1 - 0x7C1C0600, // 01F6 CALL R7 3 - 0x80040E00, // 01F7 RET 1 R7 - 0x7002000B, // 01F8 JMP #0205 - 0x1C1C0908, // 01F9 EQ R7 R4 K8 - 0x781E0009, // 01FA JMPF R7 #0205 - 0x8C1C0D3E, // 01FB GETMET R7 R6 K62 - 0x7C1C0200, // 01FC CALL R7 1 - 0x8C200F0A, // 01FD GETMET R8 R7 K10 - 0x4C280000, // 01FE LDNIL R10 - 0x882C0D15, // 01FF GETMBR R11 R6 K21 - 0xB8322200, // 0200 GETNGBL R12 K17 - 0x8C30193D, // 0201 GETMET R12 R12 K61 - 0x7C300200, // 0202 CALL R12 1 - 0x7C200800, // 0203 CALL R8 4 - 0x80040E00, // 0204 RET 1 R7 - 0x70020032, // 0205 JMP #0239 - 0x541E002B, // 0206 LDINT R7 44 - 0x1C1C0607, // 0207 EQ R7 R3 R7 - 0x781E001C, // 0208 JMPF R7 #0226 - 0x1C1C0903, // 0209 EQ R7 R4 K3 - 0x781E0005, // 020A JMPF R7 #0211 - 0x8C1C0D04, // 020B GETMET R7 R6 K4 - 0x88240D0D, // 020C GETMBR R9 R6 K13 - 0x58280008, // 020D LDCONST R10 K8 - 0x7C1C0600, // 020E CALL R7 3 - 0x80040E00, // 020F RET 1 R7 - 0x70020013, // 0210 JMP #0225 - 0x1C1C0908, // 0211 EQ R7 R4 K8 - 0x781E0005, // 0212 JMPF R7 #0219 - 0x8C1C0D04, // 0213 GETMET R7 R6 K4 - 0x88240D0D, // 0214 GETMBR R9 R6 K13 - 0x542A0003, // 0215 LDINT R10 4 - 0x7C1C0600, // 0216 CALL R7 3 - 0x80040E00, // 0217 RET 1 R7 - 0x7002000B, // 0218 JMP #0225 - 0x1C1C090C, // 0219 EQ R7 R4 K12 - 0x781E0009, // 021A JMPF R7 #0225 - 0x8C1C0D3E, // 021B GETMET R7 R6 K62 - 0x7C1C0200, // 021C CALL R7 1 - 0x8C200F0A, // 021D GETMET R8 R7 K10 - 0x4C280000, // 021E LDNIL R10 - 0x8C2C0D04, // 021F GETMET R11 R6 K4 - 0x88340D0D, // 0220 GETMBR R13 R6 K13 - 0x543A0003, // 0221 LDINT R14 4 - 0x7C2C0600, // 0222 CALL R11 3 - 0x7C200600, // 0223 CALL R8 3 - 0x80040E00, // 0224 RET 1 R7 - 0x70020012, // 0225 JMP #0239 - 0x541E0030, // 0226 LDINT R7 49 - 0x1C1C0607, // 0227 EQ R7 R3 R7 - 0x781E000F, // 0228 JMPF R7 #0239 - 0x1C1C090E, // 0229 EQ R7 R4 K14 - 0x781E0005, // 022A JMPF R7 #0231 - 0x8C1C0D04, // 022B GETMET R7 R6 K4 - 0x88240D0D, // 022C GETMBR R9 R6 K13 - 0x542A001D, // 022D LDINT R10 30 - 0x7C1C0600, // 022E CALL R7 3 - 0x80040E00, // 022F RET 1 R7 - 0x70020007, // 0230 JMP #0239 - 0x541EFFFB, // 0231 LDINT R7 65532 - 0x1C1C0807, // 0232 EQ R7 R4 R7 - 0x781E0004, // 0233 JMPF R7 #0239 - 0x8C1C0D04, // 0234 GETMET R7 R6 K4 - 0x88240D29, // 0235 GETMBR R9 R6 K41 - 0x58280003, // 0236 LDCONST R10 K3 - 0x7C1C0600, // 0237 CALL R7 3 - 0x80040E00, // 0238 RET 1 R7 - 0x80000000, // 0239 RET 0 + 0x781DFFFF, // 01BC JMPF R7 #01BD + 0x700200C9, // 01BD JMP #0288 + 0x541E003B, // 01BE LDINT R7 60 + 0x1C1C0607, // 01BF EQ R7 R3 R7 + 0x781E0000, // 01C0 JMPF R7 #01C2 + 0x700200C5, // 01C1 JMP #0288 + 0x541E0027, // 01C2 LDINT R7 40 + 0x1C1C0607, // 01C3 EQ R7 R3 R7 + 0x781E0071, // 01C4 JMPF R7 #0237 + 0x1C1C0903, // 01C5 EQ R7 R4 K3 + 0x781E0005, // 01C6 JMPF R7 #01CD + 0x8C1C0D04, // 01C7 GETMET R7 R6 K4 + 0x88240D0B, // 01C8 GETMBR R9 R6 K11 + 0x58280003, // 01C9 LDCONST R10 K3 + 0x7C1C0600, // 01CA CALL R7 3 + 0x80040E00, // 01CB RET 1 R7 + 0x70020068, // 01CC JMP #0236 + 0x1C1C0908, // 01CD EQ R7 R4 K8 + 0x781E0005, // 01CE JMPF R7 #01D5 + 0x8C1C0D04, // 01CF GETMET R7 R6 K4 + 0x88240D15, // 01D0 GETMBR R9 R6 K21 + 0x58280040, // 01D1 LDCONST R10 K64 + 0x7C1C0600, // 01D2 CALL R7 3 + 0x80040E00, // 01D3 RET 1 R7 + 0x70020060, // 01D4 JMP #0236 + 0x1C1C090C, // 01D5 EQ R7 R4 K12 + 0x781E0006, // 01D6 JMPF R7 #01DE + 0x8C1C0D04, // 01D7 GETMET R7 R6 K4 + 0x88240D0B, // 01D8 GETMBR R9 R6 K11 + 0x88280132, // 01D9 GETMBR R10 R0 K50 + 0x88281541, // 01DA GETMBR R10 R10 K65 + 0x7C1C0600, // 01DB CALL R7 3 + 0x80040E00, // 01DC RET 1 R7 + 0x70020057, // 01DD JMP #0236 + 0x1C1C090E, // 01DE EQ R7 R4 K14 + 0x781E0009, // 01DF JMPF R7 #01EA + 0x8C1C0D04, // 01E0 GETMET R7 R6 K4 + 0x88240D15, // 01E1 GETMBR R9 R6 K21 + 0xB82A2200, // 01E2 GETNGBL R10 K17 + 0x8C281525, // 01E3 GETMET R10 R10 K37 + 0x58300042, // 01E4 LDCONST R12 K66 + 0x7C280400, // 01E5 CALL R10 2 + 0x94281542, // 01E6 GETIDX R10 R10 K66 + 0x7C1C0600, // 01E7 CALL R7 3 + 0x80040E00, // 01E8 RET 1 R7 + 0x7002004B, // 01E9 JMP #0236 + 0x541E0003, // 01EA LDINT R7 4 + 0x1C1C0807, // 01EB EQ R7 R4 R7 + 0x781E0005, // 01EC JMPF R7 #01F3 + 0x8C1C0D04, // 01ED GETMET R7 R6 K4 + 0x88240D0B, // 01EE GETMBR R9 R6 K11 + 0x542A7FFF, // 01EF LDINT R10 32768 + 0x7C1C0600, // 01F0 CALL R7 3 + 0x80040E00, // 01F1 RET 1 R7 + 0x70020042, // 01F2 JMP #0236 + 0x541E0004, // 01F3 LDINT R7 5 + 0x1C1C0807, // 01F4 EQ R7 R4 R7 + 0x781E0009, // 01F5 JMPF R7 #0200 + 0x8C1C0D04, // 01F6 GETMET R7 R6 K4 + 0x88240D15, // 01F7 GETMBR R9 R6 K21 + 0xB82A2200, // 01F8 GETNGBL R10 K17 + 0x8C281525, // 01F9 GETMET R10 R10 K37 + 0x58300043, // 01FA LDCONST R12 K67 + 0x7C280400, // 01FB CALL R10 2 + 0x94281544, // 01FC GETIDX R10 R10 K68 + 0x7C1C0600, // 01FD CALL R7 3 + 0x80040E00, // 01FE RET 1 R7 + 0x70020035, // 01FF JMP #0236 + 0x541E0005, // 0200 LDINT R7 6 + 0x1C1C0807, // 0201 EQ R7 R4 R7 + 0x781E0005, // 0202 JMPF R7 #0209 + 0x8C1C0D04, // 0203 GETMET R7 R6 K4 + 0x88240D15, // 0204 GETMBR R9 R6 K21 + 0x58280045, // 0205 LDCONST R10 K69 + 0x7C1C0600, // 0206 CALL R7 3 + 0x80040E00, // 0207 RET 1 R7 + 0x7002002C, // 0208 JMP #0236 + 0x541E0006, // 0209 LDINT R7 7 + 0x1C1C0807, // 020A EQ R7 R4 R7 + 0x781E0005, // 020B JMPF R7 #0212 + 0x8C1C0D04, // 020C GETMET R7 R6 K4 + 0x88240D0B, // 020D GETMBR R9 R6 K11 + 0x58280003, // 020E LDCONST R10 K3 + 0x7C1C0600, // 020F CALL R7 3 + 0x80040E00, // 0210 RET 1 R7 + 0x70020023, // 0211 JMP #0236 + 0x541E0007, // 0212 LDINT R7 8 + 0x1C1C0807, // 0213 EQ R7 R4 R7 + 0x781E000A, // 0214 JMPF R7 #0220 + 0x8C1C0D04, // 0215 GETMET R7 R6 K4 + 0x88240D15, // 0216 GETMBR R9 R6 K21 + 0xB82A2200, // 0217 GETNGBL R10 K17 + 0x8C281525, // 0218 GETMET R10 R10 K37 + 0x58300046, // 0219 LDCONST R12 K70 + 0x7C280400, // 021A CALL R10 2 + 0x94281547, // 021B GETIDX R10 R10 K71 + 0x94281548, // 021C GETIDX R10 R10 K72 + 0x7C1C0600, // 021D CALL R7 3 + 0x80040E00, // 021E RET 1 R7 + 0x70020015, // 021F JMP #0236 + 0x541E0008, // 0220 LDINT R7 9 + 0x1C1C0807, // 0221 EQ R7 R4 R7 + 0x781E0005, // 0222 JMPF R7 #0229 + 0x8C1C0D04, // 0223 GETMET R7 R6 K4 + 0x88240D0B, // 0224 GETMBR R9 R6 K11 + 0x58280003, // 0225 LDCONST R10 K3 + 0x7C1C0600, // 0226 CALL R7 3 + 0x80040E00, // 0227 RET 1 R7 + 0x7002000C, // 0228 JMP #0236 + 0x541E0009, // 0229 LDINT R7 10 + 0x1C1C0807, // 022A EQ R7 R4 R7 + 0x781E0009, // 022B JMPF R7 #0236 + 0x8C1C0D04, // 022C GETMET R7 R6 K4 + 0x88240D15, // 022D GETMBR R9 R6 K21 + 0xB82A2200, // 022E GETNGBL R10 K17 + 0x8C281525, // 022F GETMET R10 R10 K37 + 0x58300046, // 0230 LDCONST R12 K70 + 0x7C280400, // 0231 CALL R10 2 + 0x94281547, // 0232 GETIDX R10 R10 K71 + 0x94281549, // 0233 GETIDX R10 R10 K73 + 0x7C1C0600, // 0234 CALL R7 3 + 0x80040E00, // 0235 RET 1 R7 + 0x70020050, // 0236 JMP #0288 + 0x541E003E, // 0237 LDINT R7 63 + 0x1C1C0607, // 0238 EQ R7 R3 R7 + 0x781E0000, // 0239 JMPF R7 #023B + 0x7002004C, // 023A JMP #0288 + 0x541E002A, // 023B LDINT R7 43 + 0x1C1C0607, // 023C EQ R7 R3 R7 + 0x781E0016, // 023D JMPF R7 #0255 + 0x1C1C0903, // 023E EQ R7 R4 K3 + 0x781E0007, // 023F JMPF R7 #0248 + 0x8C1C0D04, // 0240 GETMET R7 R6 K4 + 0x88240D15, // 0241 GETMBR R9 R6 K21 + 0xB82A2200, // 0242 GETNGBL R10 K17 + 0x8C28154A, // 0243 GETMET R10 R10 K74 + 0x7C280200, // 0244 CALL R10 1 + 0x7C1C0600, // 0245 CALL R7 3 + 0x80040E00, // 0246 RET 1 R7 + 0x7002000B, // 0247 JMP #0254 + 0x1C1C0908, // 0248 EQ R7 R4 K8 + 0x781E0009, // 0249 JMPF R7 #0254 + 0x8C1C0D4B, // 024A GETMET R7 R6 K75 + 0x7C1C0200, // 024B CALL R7 1 + 0x8C200F0A, // 024C GETMET R8 R7 K10 + 0x4C280000, // 024D LDNIL R10 + 0x882C0D15, // 024E GETMBR R11 R6 K21 + 0xB8322200, // 024F GETNGBL R12 K17 + 0x8C30194A, // 0250 GETMET R12 R12 K74 + 0x7C300200, // 0251 CALL R12 1 + 0x7C200800, // 0252 CALL R8 4 + 0x80040E00, // 0253 RET 1 R7 + 0x70020032, // 0254 JMP #0288 + 0x541E002B, // 0255 LDINT R7 44 + 0x1C1C0607, // 0256 EQ R7 R3 R7 + 0x781E001C, // 0257 JMPF R7 #0275 + 0x1C1C0903, // 0258 EQ R7 R4 K3 + 0x781E0005, // 0259 JMPF R7 #0260 + 0x8C1C0D04, // 025A GETMET R7 R6 K4 + 0x88240D0D, // 025B GETMBR R9 R6 K13 + 0x58280008, // 025C LDCONST R10 K8 + 0x7C1C0600, // 025D CALL R7 3 + 0x80040E00, // 025E RET 1 R7 + 0x70020013, // 025F JMP #0274 + 0x1C1C0908, // 0260 EQ R7 R4 K8 + 0x781E0005, // 0261 JMPF R7 #0268 + 0x8C1C0D04, // 0262 GETMET R7 R6 K4 + 0x88240D0D, // 0263 GETMBR R9 R6 K13 + 0x542A0003, // 0264 LDINT R10 4 + 0x7C1C0600, // 0265 CALL R7 3 + 0x80040E00, // 0266 RET 1 R7 + 0x7002000B, // 0267 JMP #0274 + 0x1C1C090C, // 0268 EQ R7 R4 K12 + 0x781E0009, // 0269 JMPF R7 #0274 + 0x8C1C0D4B, // 026A GETMET R7 R6 K75 + 0x7C1C0200, // 026B CALL R7 1 + 0x8C200F0A, // 026C GETMET R8 R7 K10 + 0x4C280000, // 026D LDNIL R10 + 0x8C2C0D04, // 026E GETMET R11 R6 K4 + 0x88340D0D, // 026F GETMBR R13 R6 K13 + 0x543A0003, // 0270 LDINT R14 4 + 0x7C2C0600, // 0271 CALL R11 3 + 0x7C200600, // 0272 CALL R8 3 + 0x80040E00, // 0273 RET 1 R7 + 0x70020012, // 0274 JMP #0288 + 0x541E0030, // 0275 LDINT R7 49 + 0x1C1C0607, // 0276 EQ R7 R3 R7 + 0x781E000F, // 0277 JMPF R7 #0288 + 0x1C1C090E, // 0278 EQ R7 R4 K14 + 0x781E0005, // 0279 JMPF R7 #0280 + 0x8C1C0D04, // 027A GETMET R7 R6 K4 + 0x88240D0D, // 027B GETMBR R9 R6 K13 + 0x542A001D, // 027C LDINT R10 30 + 0x7C1C0600, // 027D CALL R7 3 + 0x80040E00, // 027E RET 1 R7 + 0x70020007, // 027F JMP #0288 + 0x541EFFFB, // 0280 LDINT R7 65532 + 0x1C1C0807, // 0281 EQ R7 R4 R7 + 0x781E0004, // 0282 JMPF R7 #0288 + 0x8C1C0D04, // 0283 GETMET R7 R6 K4 + 0x88240D29, // 0284 GETMBR R9 R6 K41 + 0x58280003, // 0285 LDCONST R10 K3 + 0x7C1C0600, // 0286 CALL R7 3 + 0x80040E00, // 0287 RET 1 R7 + 0x80000000, // 0288 RET 0 }) ) ); @@ -714,7 +806,7 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[66]) { /* constants */ + ( &(const bvalue[73]) { /* constants */ /* K0 */ be_nested_str_weak(crypto), /* K1 */ be_nested_str_weak(matter), /* K2 */ be_nested_str_weak(TLV), @@ -781,10 +873,17 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ /* K63 */ be_nested_str_weak(derive), /* K64 */ be_nested_str_weak(set_fabric_device), /* K65 */ be_nested_str_weak(start_operational_dicovery_deferred), + /* K66 */ be_nested_str_weak(set_fabric_label), + /* K67 */ be_nested_str_weak(sessions), + /* K68 */ be_nested_str_weak(sessions_active), + /* K69 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), + /* K70 */ be_nested_str_weak(fabric), + /* K71 */ be_nested_str_weak(remove_session), + /* K72 */ be_nested_str_weak(save), }), be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[435]) { /* code */ + ( &(const binstruction[495]) { /* code */ 0xA4120000, // 0000 IMPORT R4 K0 0xB8160200, // 0001 GETNGBL R5 K1 0x88140B02, // 0002 GETMBR R5 R5 K2 @@ -874,10 +973,10 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0x5C301000, // 0056 MOVE R12 R8 0x7C280400, // 0057 CALL R10 2 0x80041200, // 0058 RET 1 R9 - 0x70020157, // 0059 JMP #01B2 + 0x70020193, // 0059 JMP #01EE 0x5426003D, // 005A LDINT R9 62 0x1C240C09, // 005B EQ R9 R6 R9 - 0x78260154, // 005C JMPF R9 #01B2 + 0x78260190, // 005C JMPF R9 #01EE 0x1C240F0F, // 005D EQ R9 R7 K15 0x7826001D, // 005E JMPF R9 #007D 0x8C240507, // 005F GETMET R9 R2 K7 @@ -909,7 +1008,7 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0x7C2C0800, // 0079 CALL R11 4 0x900E0911, // 007A SETMBR R3 K4 K17 0x80041400, // 007B RET 1 R10 - 0x70020134, // 007C JMP #01B2 + 0x70020170, // 007C JMP #01EE 0x1C240F06, // 007D EQ R9 R7 K6 0x78260044, // 007E JMPF R9 #00C4 0x8C240507, // 007F GETMET R9 R2 K7 @@ -980,7 +1079,7 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0x7C400800, // 00C0 CALL R16 4 0x900E0908, // 00C1 SETMBR R3 K4 K8 0x80041E00, // 00C2 RET 1 R15 - 0x700200ED, // 00C3 JMP #01B2 + 0x70020129, // 00C3 JMP #01EE 0x54260003, // 00C4 LDINT R9 4 0x1C240E09, // 00C5 EQ R9 R7 R9 0x78260040, // 00C6 JMPF R9 #0108 @@ -1048,7 +1147,7 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0x54460004, // 0104 LDINT R17 5 0x900E0811, // 0105 SETMBR R3 K4 R17 0x80042000, // 0106 RET 1 R16 - 0x700200A9, // 0107 JMP #01B2 + 0x700200E5, // 0107 JMP #01EE 0x5426000A, // 0108 LDINT R9 11 0x1C240E09, // 0109 EQ R9 R7 R9 0x78260012, // 010A JMPF R9 #011E @@ -1070,10 +1169,10 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0x900E2A0A, // 011A SETMBR R3 K21 R10 0x4C280000, // 011B LDNIL R10 0x80041400, // 011C RET 1 R10 - 0x70020093, // 011D JMP #01B2 + 0x700200CF, // 011D JMP #01EE 0x54260005, // 011E LDINT R9 6 0x1C240E09, // 011F EQ R9 R7 R9 - 0x78260090, // 0120 JMPF R9 #01B2 + 0x78260091, // 0120 JMPF R9 #01B3 0x8C240507, // 0121 GETMET R9 R2 K7 0x582C0006, // 0122 LDCONST R11 K6 0x7C240400, // 0123 CALL R9 2 @@ -1219,7 +1318,67 @@ be_local_closure(Matter_Plugin_core_invoke_request, /* name */ 0x54620007, // 01AF LDINT R24 8 0x900E0818, // 01B0 SETMBR R3 K4 R24 0x80042E00, // 01B1 RET 1 R23 - 0x80000000, // 01B2 RET 0 + 0x7002003A, // 01B2 JMP #01EE + 0x54260008, // 01B3 LDINT R9 9 + 0x1C240E09, // 01B4 EQ R9 R7 R9 + 0x7826000B, // 01B5 JMPF R9 #01C2 + 0x8C240507, // 01B6 GETMET R9 R2 K7 + 0x582C0006, // 01B7 LDCONST R11 K6 + 0x7C240400, // 01B8 CALL R9 2 + 0x8C281142, // 01B9 GETMET R10 R8 K66 + 0x5C301200, // 01BA MOVE R12 R9 + 0x7C280400, // 01BB CALL R10 2 + 0xB82A0200, // 01BC GETNGBL R10 K1 + 0x8828152C, // 01BD GETMBR R10 R10 K44 + 0x900E2A0A, // 01BE SETMBR R3 K21 R10 + 0x4C280000, // 01BF LDNIL R10 + 0x80041400, // 01C0 RET 1 R10 + 0x7002002B, // 01C1 JMP #01EE + 0x54260009, // 01C2 LDINT R9 10 + 0x1C240E09, // 01C3 EQ R9 R7 R9 + 0x78260028, // 01C4 JMPF R9 #01EE + 0x8C240507, // 01C5 GETMET R9 R2 K7 + 0x582C0006, // 01C6 LDCONST R11 K6 + 0x7C240400, // 01C7 CALL R9 2 + 0x88280113, // 01C8 GETMBR R10 R0 K19 + 0x88281543, // 01C9 GETMBR R10 R10 K67 + 0x8C281544, // 01CA GETMET R10 R10 K68 + 0x7C280200, // 01CB CALL R10 1 + 0x282C1308, // 01CC GE R11 R9 K8 + 0x782E001A, // 01CD JMPF R11 #01E9 + 0x602C000C, // 01CE GETGBL R11 G12 + 0x5C301400, // 01CF MOVE R12 R10 + 0x7C2C0200, // 01D0 CALL R11 1 + 0x182C120B, // 01D1 LE R11 R9 R11 + 0x782E0015, // 01D2 JMPF R11 #01E9 + 0x042C1308, // 01D3 SUB R11 R9 K8 + 0x942C140B, // 01D4 GETIDX R11 R10 R11 + 0xB8323A00, // 01D5 GETNGBL R12 K29 + 0x8C301922, // 01D6 GETMET R12 R12 K34 + 0x88381146, // 01D7 GETMBR R14 R8 K70 + 0x8C381D3D, // 01D8 GETMET R14 R14 K61 + 0x7C380200, // 01D9 CALL R14 1 + 0x8C381D3E, // 01DA GETMET R14 R14 K62 + 0x7C380200, // 01DB CALL R14 1 + 0x8C381D24, // 01DC GETMET R14 R14 K36 + 0x7C380200, // 01DD CALL R14 1 + 0x003A8A0E, // 01DE ADD R14 K69 R14 + 0x7C300400, // 01DF CALL R12 2 + 0x88300113, // 01E0 GETMBR R12 R0 K19 + 0x88301943, // 01E1 GETMBR R12 R12 K67 + 0x8C301947, // 01E2 GETMET R12 R12 K71 + 0x7C300200, // 01E3 CALL R12 1 + 0x88300113, // 01E4 GETMBR R12 R0 K19 + 0x88301943, // 01E5 GETMBR R12 R12 K67 + 0x8C301948, // 01E6 GETMET R12 R12 K72 + 0x7C300200, // 01E7 CALL R12 1 + 0x7001FFFF, // 01E8 JMP #01E9 + 0xB82E0200, // 01E9 GETNGBL R11 K1 + 0x882C172C, // 01EA GETMBR R11 R11 K44 + 0x900E2A0B, // 01EB SETMBR R3 K21 R11 + 0x4C2C0000, // 01EC LDNIL R11 + 0x80041600, // 01ED RET 1 R11 + 0x80000000, // 01EE RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h index 3857f1e4d..3b4a450b0 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h @@ -7,11 +7,11 @@ extern const bclass be_class_Matter_Session; /******************************************************************** -** Solidified function: get_fabric_compressed +** Solidified function: get_ca_pub ********************************************************************/ -be_local_closure(Matter_Session_get_fabric_compressed, /* name */ +be_local_closure(Matter_Session_get_ca_pub, /* name */ be_nested_proto( - 2, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -19,242 +19,28 @@ be_local_closure(Matter_Session_get_fabric_compressed, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric_compressed), - }), - be_str_weak(get_fabric_compressed), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_no_expiration -********************************************************************/ -be_local_closure(Matter_Session_set_no_expiration, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(expiration), - }), - be_str_weak(set_no_expiration), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x4C040000, // 0000 LDNIL R1 - 0x90020001, // 0001 SETMBR R0 K0 R1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_ca -********************************************************************/ -be_local_closure(Matter_Session_set_ca, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(root_ca_certificate), - }), - be_str_weak(set_ca), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_fabric_device -********************************************************************/ -be_local_closure(Matter_Session_set_fabric_device, /* name */ - be_nested_proto( - 7, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric), - /* K1 */ be_nested_str_weak(deviceid), - /* K2 */ be_nested_str_weak(fabric_compressed), - /* K3 */ be_nested_str_weak(__store), - /* K4 */ be_nested_str_weak(remove_redundant_session), + /* K0 */ be_nested_str_weak(root_ca_certificate), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(parse), + /* K4 */ be_nested_str_weak(findsubval), }), - be_str_weak(set_fabric_device), + be_str_weak(get_ca_pub), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x90020403, // 0002 SETMBR R0 K2 R3 - 0x88100103, // 0003 GETMBR R4 R0 K3 - 0x8C100904, // 0004 GETMET R4 R4 K4 - 0x5C180000, // 0005 MOVE R6 R0 - 0x7C100400, // 0006 CALL R4 2 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_r2i -********************************************************************/ -be_local_closure(Matter_Session_get_r2i, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(r2ikey), - }), - be_str_weak(get_r2i), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ + ( &(const binstruction[12]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_i2r_privacy -********************************************************************/ -be_local_closure(Matter_Session_get_i2r_privacy, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(_i2r_privacy), - /* K1 */ be_nested_str_weak(crypto), - /* K2 */ be_nested_str_weak(HKDF_SHA256), - /* K3 */ be_nested_str_weak(derive), - /* K4 */ be_nested_str_weak(get_i2r), - /* K5 */ be_nested_str_weak(fromstring), - /* K6 */ be_nested_str_weak(PrivacyKey), - }), - be_str_weak(get_i2r_privacy), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x7806000F, // 0003 JMPF R1 #0014 - 0xA4060200, // 0004 IMPORT R1 K1 - 0x8C080302, // 0005 GETMET R2 R1 K2 - 0x7C080200, // 0006 CALL R2 1 - 0x8C080503, // 0007 GETMET R2 R2 K3 - 0x8C100104, // 0008 GETMET R4 R0 K4 - 0x7C100200, // 0009 CALL R4 1 - 0x60140015, // 000A GETGBL R5 G21 - 0x7C140000, // 000B CALL R5 0 - 0x60180015, // 000C GETGBL R6 G21 - 0x7C180000, // 000D CALL R6 0 - 0x8C180D05, // 000E GETMET R6 R6 K5 - 0x58200006, // 000F LDCONST R8 K6 - 0x7C180400, // 0010 CALL R6 2 - 0x541E000F, // 0011 LDINT R7 16 - 0x7C080A00, // 0012 CALL R2 5 - 0x90020002, // 0013 SETMBR R0 K0 R2 - 0x88040100, // 0014 GETMBR R1 R0 K0 - 0x80040200, // 0015 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_ipk_group_key -********************************************************************/ -be_local_closure(Matter_Session_get_ipk_group_key, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), - /* K1 */ be_nested_str_weak(fabric_compressed), - /* K2 */ be_nested_str_weak(crypto), - /* K3 */ be_nested_str_weak(HKDF_SHA256), - /* K4 */ be_nested_str_weak(fromstring), - /* K5 */ be_nested_str_weak(__GROUP_KEY), - /* K6 */ be_nested_str_weak(derive), - }), - be_str_weak(get_ipk_group_key), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x74060003, // 0003 JMPT R1 #0008 - 0x88040101, // 0004 GETMBR R1 R0 K1 - 0x4C080000, // 0005 LDNIL R2 - 0x1C040202, // 0006 EQ R1 R1 R2 - 0x78060001, // 0007 JMPF R1 #000A - 0x4C040000, // 0008 LDNIL R1 - 0x80040200, // 0009 RET 1 R1 - 0xA4060400, // 000A IMPORT R1 K2 - 0x8C080303, // 000B GETMET R2 R1 K3 - 0x7C080200, // 000C CALL R2 1 - 0x600C0015, // 000D GETGBL R3 G21 - 0x7C0C0000, // 000E CALL R3 0 - 0x8C0C0704, // 000F GETMET R3 R3 K4 - 0x88140105, // 0010 GETMBR R5 R0 K5 - 0x7C0C0400, // 0011 CALL R3 2 - 0x8C100506, // 0012 GETMET R4 R2 K6 - 0x88180100, // 0013 GETMBR R6 R0 K0 - 0x881C0101, // 0014 GETMBR R7 R0 K1 - 0x5C200600, // 0015 MOVE R8 R3 - 0x5426000F, // 0016 LDINT R9 16 - 0x7C100A00, // 0017 CALL R4 5 - 0x80040800, // 0018 RET 1 R4 + 0x78060008, // 0001 JMPF R1 #000B + 0xB8060200, // 0002 GETNGBL R1 K1 + 0x88040302, // 0003 GETMBR R1 R1 K2 + 0x8C040303, // 0004 GETMET R1 R1 K3 + 0x880C0100, // 0005 GETMBR R3 R0 K0 + 0x7C040400, // 0006 CALL R1 2 + 0x8C080304, // 0007 GETMET R2 R1 K4 + 0x54120008, // 0008 LDINT R4 9 + 0x7C080400, // 0009 CALL R2 2 + 0x80040400, // 000A RET 1 R2 + 0x80000000, // 000B RET 0 }) ) ); @@ -393,9 +179,9 @@ be_local_closure(Matter_Session_fromjson, /* name */ /******************************************************************** -** Solidified function: get_deviceid +** Solidified function: get_fabric_compressed ********************************************************************/ -be_local_closure(Matter_Session_get_deviceid, /* name */ +be_local_closure(Matter_Session_get_fabric_compressed, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -406,9 +192,9 @@ be_local_closure(Matter_Session_get_deviceid, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(deviceid), + /* K0 */ be_nested_str_weak(fabric_compressed), }), - be_str_weak(get_deviceid), + be_str_weak(get_fabric_compressed), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -420,103 +206,29 @@ be_local_closure(Matter_Session_get_deviceid, /* name */ /******************************************************************** -** Solidified function: close +** Solidified function: set_expire_time ********************************************************************/ -be_local_closure(Matter_Session_close, /* name */ +be_local_closure(Matter_Session_set_expire_time, /* name */ be_nested_proto( - 9, /* nstack */ - 1, /* argc */ + 4, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[22]) { /* constants */ - /* K0 */ be_nested_str_weak(_persist), - /* K1 */ be_nested_str_weak(local_session_id), - /* K2 */ be_nested_str_weak(_future_local_session_id), - /* K3 */ be_nested_str_weak(initiator_session_id), - /* K4 */ be_nested_str_weak(_future_initiator_session_id), - /* K5 */ be_nested_str_weak(source_node_id), - /* K6 */ be_nested_str_weak(counter_rcv), - /* K7 */ be_nested_str_weak(reset), - /* K8 */ be_nested_str_weak(counter_snd), - /* K9 */ be_nested_str_weak(i2rkey), - /* K10 */ be_nested_str_weak(_i2r_privacy), - /* K11 */ be_nested_str_weak(r2ikey), - /* K12 */ be_nested_str_weak(attestation_challenge), - /* K13 */ be_nested_str_weak(introspect), - /* K14 */ be_nested_str_weak(members), - /* K15 */ be_nested_str_weak(get), - /* K16 */ be_nested_str_weak(function), - /* K17 */ be_nested_str_weak(instance), - /* K18 */ be_const_int(0), - /* K19 */ be_nested_str_weak(_), - /* K20 */ be_const_int(1), - /* K21 */ be_nested_str_weak(stop_iteration), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(expiration), }), - be_str_weak(close), + be_str_weak(set_expire_time), &be_const_str_solidified, - ( &(const binstruction[58]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88080102, // 0001 GETMBR R2 R0 K2 - 0x90020202, // 0002 SETMBR R0 K1 R2 - 0x88080104, // 0003 GETMBR R2 R0 K4 - 0x90020602, // 0004 SETMBR R0 K3 R2 - 0x4C080000, // 0005 LDNIL R2 - 0x90020A02, // 0006 SETMBR R0 K5 R2 - 0x88080106, // 0007 GETMBR R2 R0 K6 - 0x8C080507, // 0008 GETMET R2 R2 K7 - 0x7C080200, // 0009 CALL R2 1 - 0x88080108, // 000A GETMBR R2 R0 K8 - 0x8C080507, // 000B GETMET R2 R2 K7 - 0x7C080200, // 000C CALL R2 1 - 0x4C080000, // 000D LDNIL R2 - 0x90021202, // 000E SETMBR R0 K9 R2 - 0x4C080000, // 000F LDNIL R2 - 0x90021402, // 0010 SETMBR R0 K10 R2 - 0x4C080000, // 0011 LDNIL R2 - 0x90021602, // 0012 SETMBR R0 K11 R2 - 0x4C080000, // 0013 LDNIL R2 - 0x90021802, // 0014 SETMBR R0 K12 R2 - 0xA40A1A00, // 0015 IMPORT R2 K13 - 0x600C0010, // 0016 GETGBL R3 G16 - 0x8C10050E, // 0017 GETMET R4 R2 K14 - 0x5C180000, // 0018 MOVE R6 R0 - 0x7C100400, // 0019 CALL R4 2 - 0x7C0C0200, // 001A CALL R3 1 - 0xA8020018, // 001B EXBLK 0 #0035 - 0x5C100600, // 001C MOVE R4 R3 - 0x7C100000, // 001D CALL R4 0 - 0x8C14050F, // 001E GETMET R5 R2 K15 - 0x5C1C0000, // 001F MOVE R7 R0 - 0x5C200800, // 0020 MOVE R8 R4 - 0x7C140600, // 0021 CALL R5 3 - 0x60180004, // 0022 GETGBL R6 G4 - 0x5C1C0A00, // 0023 MOVE R7 R5 - 0x7C180200, // 0024 CALL R6 1 - 0x20180D10, // 0025 NE R6 R6 K16 - 0x781A000C, // 0026 JMPF R6 #0034 - 0x60180004, // 0027 GETGBL R6 G4 - 0x5C1C0A00, // 0028 MOVE R7 R5 - 0x7C180200, // 0029 CALL R6 1 - 0x20180D11, // 002A NE R6 R6 K17 - 0x781A0007, // 002B JMPF R6 #0034 - 0x94180912, // 002C GETIDX R6 R4 K18 - 0x1C180D13, // 002D EQ R6 R6 K19 - 0x781A0004, // 002E JMPF R6 #0034 - 0x94180914, // 002F GETIDX R6 R4 K20 - 0x20180D13, // 0030 NE R6 R6 K19 - 0x781A0001, // 0031 JMPF R6 #0034 - 0x4C180000, // 0032 LDNIL R6 - 0x90000806, // 0033 SETMBR R0 R4 R6 - 0x7001FFE6, // 0034 JMP #001C - 0x580C0015, // 0035 LDCONST R3 K21 - 0xAC0C0200, // 0036 CATCH R3 1 0 - 0xB0080000, // 0037 RAISE 2 R0 R0 - 0x90020001, // 0038 SETMBR R0 K0 R1 - 0x80000000, // 0039 RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x80000000, // 0004 RET 0 }) ) ); @@ -524,11 +236,81 @@ be_local_closure(Matter_Session_close, /* name */ /******************************************************************** -** Solidified function: get_pk +** Solidified function: set_expire_in_seconds ********************************************************************/ -be_local_closure(Matter_Session_get_pk, /* name */ +be_local_closure(Matter_Session_set_expire_in_seconds, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(rtc), + /* K2 */ be_nested_str_weak(utc), + /* K3 */ be_nested_str_weak(set_expire_time), + }), + be_str_weak(set_expire_in_seconds), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x1C0C0203, // 0001 EQ R3 R1 R3 + 0x780E0000, // 0002 JMPF R3 #0004 + 0x80000600, // 0003 RET 0 + 0x4C0C0000, // 0004 LDNIL R3 + 0x1C0C0403, // 0005 EQ R3 R2 R3 + 0x780E0003, // 0006 JMPF R3 #000B + 0xB80E0000, // 0007 GETNGBL R3 K0 + 0x8C0C0701, // 0008 GETMET R3 R3 K1 + 0x7C0C0200, // 0009 CALL R3 1 + 0x94080702, // 000A GETIDX R2 R3 K2 + 0x8C0C0103, // 000B GETMET R3 R0 K3 + 0x00140401, // 000C ADD R5 R2 R1 + 0x7C0C0400, // 000D CALL R3 2 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_ipk_epoch_key +********************************************************************/ +be_local_closure(Matter_Session_set_ipk_epoch_key, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(ipk_epoch_key), + }), + be_str_weak(set_ipk_epoch_key), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_noc +********************************************************************/ +be_local_closure(Matter_Session_get_noc, /* name */ + be_nested_proto( + 2, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -536,23 +318,14 @@ be_local_closure(Matter_Session_get_pk, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(no_private_key), - /* K1 */ be_nested_str_weak(crypto), - /* K2 */ be_nested_str_weak(random), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(noc), }), - be_str_weak(get_pk), + be_str_weak(get_noc), &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ + ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x74060004, // 0001 JMPT R1 #0007 - 0xA4060200, // 0002 IMPORT R1 K1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x5412001F, // 0004 LDINT R4 32 - 0x7C080400, // 0005 CALL R2 2 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88040100, // 0007 GETMBR R1 R0 K0 - 0x80040200, // 0008 RET 1 R1 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -706,237 +479,12 @@ be_local_closure(Matter_Session_tojson, /* name */ /******************************************************************** -** Solidified function: set_expire_time +** Solidified function: set_fabric_device ********************************************************************/ -be_local_closure(Matter_Session_set_expire_time, /* name */ +be_local_closure(Matter_Session_set_fabric_device, /* name */ be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(expiration), - }), - be_str_weak(set_expire_time), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_mode -********************************************************************/ -be_local_closure(Matter_Session_set_mode, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(mode), - }), - be_str_weak(set_mode), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_icac -********************************************************************/ -be_local_closure(Matter_Session_get_icac, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(icac), - }), - be_str_weak(get_icac), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_persist -********************************************************************/ -be_local_closure(Matter_Session_set_persist, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(_persist), - }), - be_str_weak(set_persist), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60080017, // 0000 GETGBL R2 G23 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_ipk_epoch_key -********************************************************************/ -be_local_closure(Matter_Session_set_ipk_epoch_key, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), - }), - be_str_weak(set_ipk_epoch_key), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_mode -********************************************************************/ -be_local_closure(Matter_Session_get_mode, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(mode), - }), - be_str_weak(get_mode), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_ca -********************************************************************/ -be_local_closure(Matter_Session_get_ca, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(root_ca_certificate), - }), - be_str_weak(get_ca), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: save -********************************************************************/ -be_local_closure(Matter_Session_save, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(__store), - /* K1 */ be_nested_str_weak(save), - }), - be_str_weak(save), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_ca_pub -********************************************************************/ -be_local_closure(Matter_Session_get_ca_pub, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ + 7, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -944,27 +492,23 @@ be_local_closure(Matter_Session_get_ca_pub, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(root_ca_certificate), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(parse), - /* K4 */ be_nested_str_weak(findsubval), + /* K0 */ be_nested_str_weak(fabric), + /* K1 */ be_nested_str_weak(deviceid), + /* K2 */ be_nested_str_weak(fabric_compressed), + /* K3 */ be_nested_str_weak(__store), + /* K4 */ be_nested_str_weak(remove_redundant_session), }), - be_str_weak(get_ca_pub), + be_str_weak(set_fabric_device), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060008, // 0001 JMPF R1 #000B - 0xB8060200, // 0002 GETNGBL R1 K1 - 0x88040302, // 0003 GETMBR R1 R1 K2 - 0x8C040303, // 0004 GETMET R1 R1 K3 - 0x880C0100, // 0005 GETMBR R3 R0 K0 - 0x7C040400, // 0006 CALL R1 2 - 0x8C080304, // 0007 GETMET R2 R1 K4 - 0x54120008, // 0008 LDINT R4 9 - 0x7C080400, // 0009 CALL R2 2 - 0x80040400, // 000A RET 1 R2 - 0x80000000, // 000B RET 0 + ( &(const binstruction[ 8]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x90020403, // 0002 SETMBR R0 K2 R3 + 0x88100103, // 0003 GETMBR R4 R0 K3 + 0x8C100904, // 0004 GETMET R4 R4 K4 + 0x5C180000, // 0005 MOVE R6 R0 + 0x7C100400, // 0006 CALL R4 2 + 0x80000000, // 0007 RET 0 }) ) ); @@ -972,9 +516,9 @@ be_local_closure(Matter_Session_get_ca_pub, /* name */ /******************************************************************** -** Solidified function: get_ipk_epoch_key +** Solidified function: get_deviceid ********************************************************************/ -be_local_closure(Matter_Session_get_ipk_epoch_key, /* name */ +be_local_closure(Matter_Session_get_deviceid, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -985,9 +529,9 @@ be_local_closure(Matter_Session_get_ipk_epoch_key, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(ipk_epoch_key), + /* K0 */ be_nested_str_weak(deviceid), }), - be_str_weak(get_ipk_epoch_key), + be_str_weak(get_deviceid), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -999,9 +543,9 @@ be_local_closure(Matter_Session_get_ipk_epoch_key, /* name */ /******************************************************************** -** Solidified function: get_ac +** Solidified function: get_r2i ********************************************************************/ -be_local_closure(Matter_Session_get_ac, /* name */ +be_local_closure(Matter_Session_get_r2i, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1012,9 +556,9 @@ be_local_closure(Matter_Session_get_ac, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(attestation_challenge), + /* K0 */ be_nested_str_weak(r2ikey), }), - be_str_weak(get_ac), + be_str_weak(get_r2i), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -1025,6 +569,146 @@ be_local_closure(Matter_Session_get_ac, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: set_fabric_label +********************************************************************/ +be_local_closure(Matter_Session_set_fabric_label, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(fabric_label), + }), + be_str_weak(set_fabric_label), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x60080004, // 0000 GETGBL R2 G4 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x1C080500, // 0003 EQ R2 R2 K0 + 0x780A0000, // 0004 JMPF R2 #0006 + 0x90020201, // 0005 SETMBR R0 K1 R1 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: close +********************************************************************/ +be_local_closure(Matter_Session_close, /* name */ + be_nested_proto( + 9, /* 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_nested_str_weak(_persist), + /* K1 */ be_nested_str_weak(local_session_id), + /* K2 */ be_nested_str_weak(_future_local_session_id), + /* K3 */ be_nested_str_weak(initiator_session_id), + /* K4 */ be_nested_str_weak(_future_initiator_session_id), + /* K5 */ be_nested_str_weak(source_node_id), + /* K6 */ be_nested_str_weak(counter_rcv), + /* K7 */ be_nested_str_weak(reset), + /* K8 */ be_nested_str_weak(counter_snd), + /* K9 */ be_nested_str_weak(i2rkey), + /* K10 */ be_nested_str_weak(_i2r_privacy), + /* K11 */ be_nested_str_weak(r2ikey), + /* K12 */ be_nested_str_weak(attestation_challenge), + /* K13 */ be_nested_str_weak(fabric_label), + /* K14 */ be_nested_str_weak(), + /* K15 */ be_nested_str_weak(introspect), + /* K16 */ be_nested_str_weak(members), + /* K17 */ be_nested_str_weak(get), + /* K18 */ be_nested_str_weak(function), + /* K19 */ be_nested_str_weak(instance), + /* K20 */ be_const_int(0), + /* K21 */ be_nested_str_weak(_), + /* K22 */ be_const_int(1), + /* K23 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(close), + &be_const_str_solidified, + ( &(const binstruction[59]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080102, // 0001 GETMBR R2 R0 K2 + 0x90020202, // 0002 SETMBR R0 K1 R2 + 0x88080104, // 0003 GETMBR R2 R0 K4 + 0x90020602, // 0004 SETMBR R0 K3 R2 + 0x4C080000, // 0005 LDNIL R2 + 0x90020A02, // 0006 SETMBR R0 K5 R2 + 0x88080106, // 0007 GETMBR R2 R0 K6 + 0x8C080507, // 0008 GETMET R2 R2 K7 + 0x7C080200, // 0009 CALL R2 1 + 0x88080108, // 000A GETMBR R2 R0 K8 + 0x8C080507, // 000B GETMET R2 R2 K7 + 0x7C080200, // 000C CALL R2 1 + 0x4C080000, // 000D LDNIL R2 + 0x90021202, // 000E SETMBR R0 K9 R2 + 0x4C080000, // 000F LDNIL R2 + 0x90021402, // 0010 SETMBR R0 K10 R2 + 0x4C080000, // 0011 LDNIL R2 + 0x90021602, // 0012 SETMBR R0 K11 R2 + 0x4C080000, // 0013 LDNIL R2 + 0x90021802, // 0014 SETMBR R0 K12 R2 + 0x90021B0E, // 0015 SETMBR R0 K13 K14 + 0xA40A1E00, // 0016 IMPORT R2 K15 + 0x600C0010, // 0017 GETGBL R3 G16 + 0x8C100510, // 0018 GETMET R4 R2 K16 + 0x5C180000, // 0019 MOVE R6 R0 + 0x7C100400, // 001A CALL R4 2 + 0x7C0C0200, // 001B CALL R3 1 + 0xA8020018, // 001C EXBLK 0 #0036 + 0x5C100600, // 001D MOVE R4 R3 + 0x7C100000, // 001E CALL R4 0 + 0x8C140511, // 001F GETMET R5 R2 K17 + 0x5C1C0000, // 0020 MOVE R7 R0 + 0x5C200800, // 0021 MOVE R8 R4 + 0x7C140600, // 0022 CALL R5 3 + 0x60180004, // 0023 GETGBL R6 G4 + 0x5C1C0A00, // 0024 MOVE R7 R5 + 0x7C180200, // 0025 CALL R6 1 + 0x20180D12, // 0026 NE R6 R6 K18 + 0x781A000C, // 0027 JMPF R6 #0035 + 0x60180004, // 0028 GETGBL R6 G4 + 0x5C1C0A00, // 0029 MOVE R7 R5 + 0x7C180200, // 002A CALL R6 1 + 0x20180D13, // 002B NE R6 R6 K19 + 0x781A0007, // 002C JMPF R6 #0035 + 0x94180914, // 002D GETIDX R6 R4 K20 + 0x1C180D15, // 002E EQ R6 R6 K21 + 0x781A0004, // 002F JMPF R6 #0035 + 0x94180916, // 0030 GETIDX R6 R4 K22 + 0x20180D15, // 0031 NE R6 R6 K21 + 0x781A0001, // 0032 JMPF R6 #0035 + 0x4C180000, // 0033 LDNIL R6 + 0x90000806, // 0034 SETMBR R0 R4 R6 + 0x7001FFE6, // 0035 JMP #001D + 0x580C0017, // 0036 LDCONST R3 K23 + 0xAC0C0200, // 0037 CATCH R3 1 0 + 0xB0080000, // 0038 RAISE 2 R0 R0 + 0x90020001, // 0039 SETMBR R0 K0 R1 + 0x80000000, // 003A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: set_noc ********************************************************************/ @@ -1055,9 +739,9 @@ be_local_closure(Matter_Session_set_noc, /* name */ /******************************************************************** -** Solidified function: get_i2r +** Solidified function: get_mode ********************************************************************/ -be_local_closure(Matter_Session_get_i2r, /* name */ +be_local_closure(Matter_Session_get_mode, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1068,9 +752,9 @@ be_local_closure(Matter_Session_get_i2r, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(i2rkey), + /* K0 */ be_nested_str_weak(mode), }), - be_str_weak(get_i2r), + be_str_weak(get_mode), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -1082,9 +766,9 @@ be_local_closure(Matter_Session_get_i2r, /* name */ /******************************************************************** -** Solidified function: get_fabric +** Solidified function: get_ipk_epoch_key ********************************************************************/ -be_local_closure(Matter_Session_get_fabric, /* name */ +be_local_closure(Matter_Session_get_ipk_epoch_key, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1095,9 +779,9 @@ be_local_closure(Matter_Session_get_fabric, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(fabric), + /* K0 */ be_nested_str_weak(ipk_epoch_key), }), - be_str_weak(get_fabric), + be_str_weak(get_ipk_epoch_key), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -1109,35 +793,55 @@ be_local_closure(Matter_Session_get_fabric, /* name */ /******************************************************************** -** Solidified function: set_keys +** Solidified function: get_ipk_group_key ********************************************************************/ -be_local_closure(Matter_Session_set_keys, /* name */ +be_local_closure(Matter_Session_get_ipk_group_key, /* name */ be_nested_proto( - 6, /* nstack */ - 5, /* argc */ + 10, /* nstack */ + 1, /* 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(i2rkey), - /* K1 */ be_nested_str_weak(_i2r_privacy), - /* K2 */ be_nested_str_weak(r2ikey), - /* K3 */ be_nested_str_weak(attestation_challenge), - /* K4 */ be_nested_str_weak(session_timestamp), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(ipk_epoch_key), + /* K1 */ be_nested_str_weak(fabric_compressed), + /* K2 */ be_nested_str_weak(crypto), + /* K3 */ be_nested_str_weak(HKDF_SHA256), + /* K4 */ be_nested_str_weak(fromstring), + /* K5 */ be_nested_str_weak(__GROUP_KEY), + /* K6 */ be_nested_str_weak(derive), }), - be_str_weak(set_keys), + be_str_weak(get_ipk_group_key), &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x4C140000, // 0001 LDNIL R5 - 0x90020205, // 0002 SETMBR R0 K1 R5 - 0x90020402, // 0003 SETMBR R0 K2 R2 - 0x90020603, // 0004 SETMBR R0 K3 R3 - 0x90020804, // 0005 SETMBR R0 K4 R4 - 0x80000000, // 0006 RET 0 + ( &(const binstruction[25]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x74060003, // 0003 JMPT R1 #0008 + 0x88040101, // 0004 GETMBR R1 R0 K1 + 0x4C080000, // 0005 LDNIL R2 + 0x1C040202, // 0006 EQ R1 R1 R2 + 0x78060001, // 0007 JMPF R1 #000A + 0x4C040000, // 0008 LDNIL R1 + 0x80040200, // 0009 RET 1 R1 + 0xA4060400, // 000A IMPORT R1 K2 + 0x8C080303, // 000B GETMET R2 R1 K3 + 0x7C080200, // 000C CALL R2 1 + 0x600C0015, // 000D GETGBL R3 G21 + 0x7C0C0000, // 000E CALL R3 0 + 0x8C0C0704, // 000F GETMET R3 R3 K4 + 0x88140105, // 0010 GETMBR R5 R0 K5 + 0x7C0C0400, // 0011 CALL R3 2 + 0x8C100506, // 0012 GETMET R4 R2 K6 + 0x88180100, // 0013 GETMBR R6 R0 K0 + 0x881C0101, // 0014 GETMBR R7 R0 K1 + 0x5C200600, // 0015 MOVE R8 R3 + 0x5426000F, // 0016 LDINT R9 16 + 0x7C100A00, // 0017 CALL R4 5 + 0x80040800, // 0018 RET 1 R4 }) ) ); @@ -1145,9 +849,45 @@ be_local_closure(Matter_Session_set_keys, /* name */ /******************************************************************** -** Solidified function: get_noc +** Solidified function: get_pk ********************************************************************/ -be_local_closure(Matter_Session_get_noc, /* name */ +be_local_closure(Matter_Session_get_pk, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(no_private_key), + /* K1 */ be_nested_str_weak(crypto), + /* K2 */ be_nested_str_weak(random), + }), + be_str_weak(get_pk), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x74060004, // 0001 JMPT R1 #0007 + 0xA4060200, // 0002 IMPORT R1 K1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x5412001F, // 0004 LDINT R4 32 + 0x7C080400, // 0005 CALL R2 2 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88040100, // 0007 GETMBR R1 R0 K0 + 0x80040200, // 0008 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_ac +********************************************************************/ +be_local_closure(Matter_Session_get_ac, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -1158,9 +898,9 @@ be_local_closure(Matter_Session_get_noc, /* name */ NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(noc), + /* K0 */ be_nested_str_weak(attestation_challenge), }), - be_str_weak(get_noc), + be_str_weak(get_ac), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -1171,67 +911,6 @@ be_local_closure(Matter_Session_get_noc, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Session_init, /* name */ - be_nested_proto( - 6, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(__store), - /* K1 */ be_nested_str_weak(mode), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(local_session_id), - /* K4 */ be_nested_str_weak(initiator_session_id), - /* K5 */ be_nested_str_weak(counter_rcv), - /* K6 */ be_nested_str_weak(matter), - /* K7 */ be_nested_str_weak(Counter), - /* K8 */ be_nested_str_weak(counter_snd), - /* K9 */ be_nested_str_weak(_counter_insecure_rcv), - /* K10 */ be_nested_str_weak(_counter_insecure_snd), - /* K11 */ be_nested_str_weak(breadcrumb), - /* K12 */ be_nested_str_weak(int64), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020302, // 0001 SETMBR R0 K1 K2 - 0x90020602, // 0002 SETMBR R0 K3 R2 - 0x90020803, // 0003 SETMBR R0 K4 R3 - 0xB8120C00, // 0004 GETNGBL R4 K6 - 0x8C100907, // 0005 GETMET R4 R4 K7 - 0x7C100200, // 0006 CALL R4 1 - 0x90020A04, // 0007 SETMBR R0 K5 R4 - 0xB8120C00, // 0008 GETNGBL R4 K6 - 0x8C100907, // 0009 GETMET R4 R4 K7 - 0x7C100200, // 000A CALL R4 1 - 0x90021004, // 000B SETMBR R0 K8 R4 - 0xB8120C00, // 000C GETNGBL R4 K6 - 0x8C100907, // 000D GETMET R4 R4 K7 - 0x7C100200, // 000E CALL R4 1 - 0x90021204, // 000F SETMBR R0 K9 R4 - 0xB8120C00, // 0010 GETNGBL R4 K6 - 0x8C100907, // 0011 GETMET R4 R4 K7 - 0x7C100200, // 0012 CALL R4 1 - 0x90021404, // 0013 SETMBR R0 K10 R4 - 0xB8121800, // 0014 GETNGBL R4 K12 - 0x7C100000, // 0015 CALL R4 0 - 0x90021604, // 0016 SETMBR R0 K11 R4 - 0x80000000, // 0017 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: gen_CSR ********************************************************************/ @@ -1342,42 +1021,137 @@ be_local_closure(Matter_Session_gen_CSR, /* name */ /******************************************************************** -** Solidified function: set_expire_in_seconds +** Solidified function: set_persist ********************************************************************/ -be_local_closure(Matter_Session_set_expire_in_seconds, /* name */ +be_local_closure(Matter_Session_set_persist, /* name */ be_nested_proto( - 6, /* nstack */ - 3, /* argc */ + 4, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(rtc), - /* K2 */ be_nested_str_weak(utc), - /* K3 */ be_nested_str_weak(set_expire_time), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(_persist), }), - be_str_weak(set_expire_in_seconds), + be_str_weak(set_persist), &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x1C0C0203, // 0001 EQ R3 R1 R3 - 0x780E0000, // 0002 JMPF R3 #0004 - 0x80000600, // 0003 RET 0 - 0x4C0C0000, // 0004 LDNIL R3 - 0x1C0C0403, // 0005 EQ R3 R2 R3 - 0x780E0003, // 0006 JMPF R3 #000B - 0xB80E0000, // 0007 GETNGBL R3 K0 - 0x8C0C0701, // 0008 GETMET R3 R3 K1 - 0x7C0C0200, // 0009 CALL R3 1 - 0x94080702, // 000A GETIDX R2 R3 K2 - 0x8C0C0103, // 000B GETMET R3 R0 K3 - 0x00140401, // 000C ADD R5 R2 R1 - 0x7C0C0400, // 000D CALL R3 2 - 0x80000000, // 000E RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x60080017, // 0000 GETGBL R2 G23 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_icac +********************************************************************/ +be_local_closure(Matter_Session_get_icac, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(icac), + }), + be_str_weak(get_icac), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_ca +********************************************************************/ +be_local_closure(Matter_Session_set_ca, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(root_ca_certificate), + }), + be_str_weak(set_ca), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_fabric +********************************************************************/ +be_local_closure(Matter_Session_get_fabric, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(fabric), + }), + be_str_weak(get_fabric), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_i2r +********************************************************************/ +be_local_closure(Matter_Session_get_i2r, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(i2rkey), + }), + be_str_weak(get_i2r), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -1428,83 +1202,347 @@ be_local_closure(Matter_Session_has_expired, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: get_ca +********************************************************************/ +be_local_closure(Matter_Session_get_ca, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(root_ca_certificate), + }), + be_str_weak(get_ca), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_mode +********************************************************************/ +be_local_closure(Matter_Session_set_mode, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(mode), + }), + be_str_weak(set_mode), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Session_init, /* name */ + be_nested_proto( + 6, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(__store), + /* K1 */ be_nested_str_weak(mode), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(local_session_id), + /* K4 */ be_nested_str_weak(initiator_session_id), + /* K5 */ be_nested_str_weak(counter_rcv), + /* K6 */ be_nested_str_weak(matter), + /* K7 */ be_nested_str_weak(Counter), + /* K8 */ be_nested_str_weak(counter_snd), + /* K9 */ be_nested_str_weak(_counter_insecure_rcv), + /* K10 */ be_nested_str_weak(_counter_insecure_snd), + /* K11 */ be_nested_str_weak(breadcrumb), + /* K12 */ be_nested_str_weak(int64), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020302, // 0001 SETMBR R0 K1 K2 + 0x90020602, // 0002 SETMBR R0 K3 R2 + 0x90020803, // 0003 SETMBR R0 K4 R3 + 0xB8120C00, // 0004 GETNGBL R4 K6 + 0x8C100907, // 0005 GETMET R4 R4 K7 + 0x7C100200, // 0006 CALL R4 1 + 0x90020A04, // 0007 SETMBR R0 K5 R4 + 0xB8120C00, // 0008 GETNGBL R4 K6 + 0x8C100907, // 0009 GETMET R4 R4 K7 + 0x7C100200, // 000A CALL R4 1 + 0x90021004, // 000B SETMBR R0 K8 R4 + 0xB8120C00, // 000C GETNGBL R4 K6 + 0x8C100907, // 000D GETMET R4 R4 K7 + 0x7C100200, // 000E CALL R4 1 + 0x90021204, // 000F SETMBR R0 K9 R4 + 0xB8120C00, // 0010 GETNGBL R4 K6 + 0x8C100907, // 0011 GETMET R4 R4 K7 + 0x7C100200, // 0012 CALL R4 1 + 0x90021404, // 0013 SETMBR R0 K10 R4 + 0xB8121800, // 0014 GETNGBL R4 K12 + 0x7C100000, // 0015 CALL R4 0 + 0x90021604, // 0016 SETMBR R0 K11 R4 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_i2r_privacy +********************************************************************/ +be_local_closure(Matter_Session_get_i2r_privacy, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(_i2r_privacy), + /* K1 */ be_nested_str_weak(crypto), + /* K2 */ be_nested_str_weak(HKDF_SHA256), + /* K3 */ be_nested_str_weak(derive), + /* K4 */ be_nested_str_weak(get_i2r), + /* K5 */ be_nested_str_weak(fromstring), + /* K6 */ be_nested_str_weak(PrivacyKey), + }), + be_str_weak(get_i2r_privacy), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x7806000F, // 0003 JMPF R1 #0014 + 0xA4060200, // 0004 IMPORT R1 K1 + 0x8C080302, // 0005 GETMET R2 R1 K2 + 0x7C080200, // 0006 CALL R2 1 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x8C100104, // 0008 GETMET R4 R0 K4 + 0x7C100200, // 0009 CALL R4 1 + 0x60140015, // 000A GETGBL R5 G21 + 0x7C140000, // 000B CALL R5 0 + 0x60180015, // 000C GETGBL R6 G21 + 0x7C180000, // 000D CALL R6 0 + 0x8C180D05, // 000E GETMET R6 R6 K5 + 0x58200006, // 000F LDCONST R8 K6 + 0x7C180400, // 0010 CALL R6 2 + 0x541E000F, // 0011 LDINT R7 16 + 0x7C080A00, // 0012 CALL R2 5 + 0x90020002, // 0013 SETMBR R0 K0 R2 + 0x88040100, // 0014 GETMBR R1 R0 K0 + 0x80040200, // 0015 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: save +********************************************************************/ +be_local_closure(Matter_Session_save, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(__store), + /* K1 */ be_nested_str_weak(save), + }), + be_str_weak(save), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_no_expiration +********************************************************************/ +be_local_closure(Matter_Session_set_no_expiration, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(expiration), + }), + be_str_weak(set_no_expiration), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x4C040000, // 0000 LDNIL R1 + 0x90020001, // 0001 SETMBR R0 K0 R1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_keys +********************************************************************/ +be_local_closure(Matter_Session_set_keys, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* 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(i2rkey), + /* K1 */ be_nested_str_weak(_i2r_privacy), + /* K2 */ be_nested_str_weak(r2ikey), + /* K3 */ be_nested_str_weak(attestation_challenge), + /* K4 */ be_nested_str_weak(session_timestamp), + }), + be_str_weak(set_keys), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x4C140000, // 0001 LDNIL R5 + 0x90020205, // 0002 SETMBR R0 K1 R5 + 0x90020402, // 0003 SETMBR R0 K2 R2 + 0x90020603, // 0004 SETMBR R0 K3 R3 + 0x90020804, // 0005 SETMBR R0 K4 R4 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Session ********************************************************************/ be_local_class(Matter_Session, - 34, + 35, NULL, - be_nested_map(69, + be_nested_map(71, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(mode, -1), be_const_var(1) }, - { be_const_key_weak(shared_secret, 45), be_const_var(24) }, - { be_const_key_weak(set_ca, 68), be_const_closure(Matter_Session_set_ca_closure) }, - { be_const_key_weak(has_expired, -1), be_const_closure(Matter_Session_has_expired_closure) }, - { be_const_key_weak(ipk_epoch_key, 2), be_const_var(22) }, - { be_const_key_weak(breadcrumb, 34), be_const_var(17) }, - { be_const_key_weak(fromjson, -1), be_const_static_closure(Matter_Session_fromjson_closure) }, - { be_const_key_weak(counter_rcv, -1), be_const_var(8) }, - { be_const_key_weak(_Msg1, 6), be_const_var(30) }, - { be_const_key_weak(noc, -1), be_const_var(20) }, - { be_const_key_weak(__PASE, -1), be_const_int(1) }, - { be_const_key_weak(get_deviceid, -1), be_const_closure(Matter_Session_get_deviceid_closure) }, - { be_const_key_weak(_i2r_privacy, 4), be_const_var(14) }, - { be_const_key_weak(counter_snd, -1), be_const_var(9) }, - { be_const_key_weak(set_no_expiration, -1), be_const_closure(Matter_Session_set_no_expiration_closure) }, - { be_const_key_weak(_Msg2, 67), be_const_var(31) }, - { be_const_key_weak(gen_CSR, -1), be_const_closure(Matter_Session_gen_CSR_closure) }, - { be_const_key_weak(set_fabric_device, 18), be_const_closure(Matter_Session_set_fabric_device_closure) }, - { be_const_key_weak(fabric_compressed, -1), be_const_var(26) }, - { be_const_key_weak(get_fabric_compressed, 56), be_const_closure(Matter_Session_get_fabric_compressed_closure) }, - { be_const_key_weak(_counter_insecure_snd, 21), be_const_var(11) }, - { be_const_key_weak(get_noc, 64), be_const_closure(Matter_Session_get_noc_closure) }, - { be_const_key_weak(_future_local_session_id, 11), be_const_var(7) }, - { be_const_key_weak(r2ikey, -1), be_const_var(13) }, - { be_const_key_weak(get_pk, 1), be_const_closure(Matter_Session_get_pk_closure) }, - { be_const_key_weak(set_keys, -1), be_const_closure(Matter_Session_set_keys_closure) }, - { be_const_key_weak(tojson, -1), be_const_closure(Matter_Session_tojson_closure) }, - { be_const_key_weak(set_expire_time, -1), be_const_closure(Matter_Session_set_expire_time_closure) }, - { be_const_key_weak(get_i2r_privacy, -1), be_const_closure(Matter_Session_get_i2r_privacy_closure) }, - { be_const_key_weak(_persist, -1), be_const_var(32) }, - { be_const_key_weak(save, -1), be_const_closure(Matter_Session_save_closure) }, - { be_const_key_weak(root_ca_certificate, -1), be_const_var(19) }, - { be_const_key_weak(set_mode, -1), be_const_closure(Matter_Session_set_mode_closure) }, - { be_const_key_weak(get_r2i, 59), be_const_closure(Matter_Session_get_r2i_closure) }, - { be_const_key_weak(peer_node_id, -1), be_const_var(16) }, - { be_const_key_weak(__store, 23), be_const_var(0) }, - { be_const_key_weak(admin_vendor, -1), be_const_var(29) }, - { be_const_key_weak(set_ipk_epoch_key, -1), be_const_closure(Matter_Session_set_ipk_epoch_key_closure) }, - { be_const_key_weak(set_noc, -1), be_const_closure(Matter_Session_set_noc_closure) }, - { be_const_key_weak(close, -1), be_const_closure(Matter_Session_close_closure) }, - { be_const_key_weak(get_mode, -1), be_const_closure(Matter_Session_get_mode_closure) }, - { be_const_key_weak(get_ca, -1), be_const_closure(Matter_Session_get_ca_closure) }, - { be_const_key_weak(i2rkey, 50), be_const_var(12) }, - { be_const_key_weak(_future_initiator_session_id, 46), be_const_var(6) }, - { be_const_key_weak(get_ac, -1), be_const_closure(Matter_Session_get_ac_closure) }, - { be_const_key_weak(get_ca_pub, 54), be_const_closure(Matter_Session_get_ca_pub_closure) }, + { be_const_key_weak(get_ca_pub, -1), be_const_closure(Matter_Session_get_ca_pub_closure) }, { be_const_key_weak(source_node_id, -1), be_const_var(5) }, - { be_const_key_weak(resumption_id, 43), be_const_var(23) }, - { be_const_key_weak(get_ipk_epoch_key, 0), be_const_closure(Matter_Session_get_ipk_epoch_key_closure) }, - { be_const_key_weak(session_timestamp, 44), be_const_var(4) }, - { be_const_key_weak(icac, 30), be_const_var(21) }, - { be_const_key_weak(initiator_session_id, -1), be_const_var(3) }, - { be_const_key_weak(set_persist, 38), be_const_closure(Matter_Session_set_persist_closure) }, - { be_const_key_weak(__CASE, 36), be_const_int(2) }, - { be_const_key_weak(expiration, -1), be_const_var(33) }, - { be_const_key_weak(get_i2r, -1), be_const_closure(Matter_Session_get_i2r_closure) }, - { be_const_key_weak(no_private_key, 28), be_const_var(18) }, - { be_const_key_weak(admin_subject, 25), be_const_var(28) }, - { be_const_key_weak(deviceid, -1), be_const_var(27) }, - { be_const_key_weak(get_icac, 39), be_const_closure(Matter_Session_get_icac_closure) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Session_init_closure) }, - { be_const_key_weak(fabric, 16), be_const_var(25) }, + { be_const_key_weak(breadcrumb, -1), be_const_var(17) }, + { be_const_key_weak(set_expire_time, 55), be_const_closure(Matter_Session_set_expire_time_closure) }, + { be_const_key_weak(attestation_challenge, 70), be_const_var(15) }, + { be_const_key_weak(set_no_expiration, -1), be_const_closure(Matter_Session_set_no_expiration_closure) }, + { be_const_key_weak(_i2r_privacy, 51), be_const_var(14) }, { be_const_key_weak(set_expire_in_seconds, -1), be_const_closure(Matter_Session_set_expire_in_seconds_closure) }, + { be_const_key_weak(set_ipk_epoch_key, -1), be_const_closure(Matter_Session_set_ipk_epoch_key_closure) }, + { be_const_key_weak(deviceid, -1), be_const_var(27) }, + { be_const_key_weak(get_noc, -1), be_const_closure(Matter_Session_get_noc_closure) }, + { be_const_key_weak(tojson, -1), be_const_closure(Matter_Session_tojson_closure) }, + { be_const_key_weak(save, -1), be_const_closure(Matter_Session_save_closure) }, + { be_const_key_weak(get_i2r_privacy, 43), be_const_closure(Matter_Session_get_i2r_privacy_closure) }, + { be_const_key_weak(set_fabric_device, -1), be_const_closure(Matter_Session_set_fabric_device_closure) }, + { be_const_key_weak(get_deviceid, -1), be_const_closure(Matter_Session_get_deviceid_closure) }, + { be_const_key_weak(r2ikey, -1), be_const_var(13) }, + { be_const_key_weak(fromjson, 2), be_const_static_closure(Matter_Session_fromjson_closure) }, + { be_const_key_weak(set_fabric_label, -1), be_const_closure(Matter_Session_set_fabric_label_closure) }, + { be_const_key_weak(no_private_key, 50), be_const_var(18) }, + { be_const_key_weak(i2rkey, -1), be_const_var(12) }, + { be_const_key_weak(__CASE, -1), be_const_int(2) }, + { be_const_key_weak(local_session_id, 20), be_const_var(2) }, + { be_const_key_weak(set_noc, -1), be_const_closure(Matter_Session_set_noc_closure) }, + { be_const_key_weak(get_mode, 27), be_const_closure(Matter_Session_get_mode_closure) }, + { be_const_key_weak(peer_node_id, 66), be_const_var(16) }, + { be_const_key_weak(_persist, 19), be_const_var(33) }, + { be_const_key_weak(set_persist, -1), be_const_closure(Matter_Session_set_persist_closure) }, + { be_const_key_weak(initiator_session_id, -1), be_const_var(3) }, + { be_const_key_weak(set_ca, 28), be_const_closure(Matter_Session_set_ca_closure) }, + { be_const_key_weak(get_ipk_epoch_key, 41), be_const_closure(Matter_Session_get_ipk_epoch_key_closure) }, + { be_const_key_weak(_future_initiator_session_id, 22), be_const_var(6) }, + { be_const_key_weak(get_ipk_group_key, 39), be_const_closure(Matter_Session_get_ipk_group_key_closure) }, + { be_const_key_weak(get_pk, 56), be_const_closure(Matter_Session_get_pk_closure) }, + { be_const_key_weak(get_ac, -1), be_const_closure(Matter_Session_get_ac_closure) }, + { be_const_key_weak(gen_CSR, 1), be_const_closure(Matter_Session_gen_CSR_closure) }, + { be_const_key_weak(set_mode, -1), be_const_closure(Matter_Session_set_mode_closure) }, + { be_const_key_weak(resumption_id, 29), be_const_var(23) }, + { be_const_key_weak(get_icac, -1), be_const_closure(Matter_Session_get_icac_closure) }, + { be_const_key_weak(_Msg1, -1), be_const_var(31) }, + { be_const_key_weak(__PASE, -1), be_const_int(1) }, + { be_const_key_weak(get_ca, -1), be_const_closure(Matter_Session_get_ca_closure) }, + { be_const_key_weak(root_ca_certificate, -1), be_const_var(19) }, + { be_const_key_weak(expiration, -1), be_const_var(34) }, + { be_const_key_weak(get_fabric, -1), be_const_closure(Matter_Session_get_fabric_closure) }, + { be_const_key_weak(fabric_label, -1), be_const_var(28) }, + { be_const_key_weak(_future_local_session_id, -1), be_const_var(7) }, + { be_const_key_weak(close, 45), be_const_closure(Matter_Session_close_closure) }, + { be_const_key_weak(admin_vendor, 64), be_const_var(30) }, + { be_const_key_weak(icac, -1), be_const_var(21) }, + { be_const_key_weak(counter_snd, 48), be_const_var(9) }, + { be_const_key_weak(get_i2r, 63), be_const_closure(Matter_Session_get_i2r_closure) }, + { be_const_key_weak(has_expired, -1), be_const_closure(Matter_Session_has_expired_closure) }, + { be_const_key_weak(__GROUP_KEY, 12), be_nested_str_weak(GroupKey_X20v1_X2E0) }, + { be_const_key_weak(session_timestamp, -1), be_const_var(4) }, + { be_const_key_weak(shared_secret, -1), be_const_var(24) }, + { be_const_key_weak(fabric_compressed, -1), be_const_var(26) }, + { be_const_key_weak(get_fabric_compressed, 36), be_const_closure(Matter_Session_get_fabric_compressed_closure) }, + { be_const_key_weak(noc, 16), be_const_var(20) }, { be_const_key_weak(_counter_insecure_rcv, -1), be_const_var(10) }, - { be_const_key_weak(get_ipk_group_key, -1), be_const_closure(Matter_Session_get_ipk_group_key_closure) }, - { be_const_key_weak(get_fabric, 3), be_const_closure(Matter_Session_get_fabric_closure) }, - { be_const_key_weak(local_session_id, -1), be_const_var(2) }, - { be_const_key_weak(attestation_challenge, -1), be_const_var(15) }, - { be_const_key_weak(__GROUP_KEY, -1), be_nested_str_weak(GroupKey_X20v1_X2E0) }, + { be_const_key_weak(admin_subject, -1), be_const_var(29) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Session_init_closure) }, + { be_const_key_weak(ipk_epoch_key, -1), be_const_var(22) }, + { be_const_key_weak(counter_rcv, -1), be_const_var(8) }, + { be_const_key_weak(fabric, -1), be_const_var(25) }, + { be_const_key_weak(__store, 13), be_const_var(0) }, + { be_const_key_weak(mode, -1), be_const_var(1) }, + { be_const_key_weak(_counter_insecure_snd, 6), be_const_var(11) }, + { be_const_key_weak(_Msg2, 5), be_const_var(32) }, + { be_const_key_weak(set_keys, -1), be_const_closure(Matter_Session_set_keys_closure) }, + { be_const_key_weak(get_r2i, -1), be_const_closure(Matter_Session_get_r2i_closure) }, })), be_str_weak(Matter_Session) ); @@ -1518,34 +1556,6 @@ void be_load_Matter_Session_class(bvm *vm) { extern const bclass be_class_Matter_Session_Store; -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(Matter_Session_Store_every_second, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(remove_expired), - }), - be_str_weak(every_second), - &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: remove_redundant_session ********************************************************************/ @@ -1602,11 +1612,160 @@ be_local_closure(Matter_Session_Store_remove_redundant_session, /* name */ /******************************************************************** -** Solidified function: get_session_by_source_node_id +** Solidified function: init ********************************************************************/ -be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name */ +be_local_closure(Matter_Session_Store_init, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040012, // 0000 GETGBL R1 G18 + 0x7C040000, // 0001 CALL R1 0 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_session_source_id_unsecure +********************************************************************/ +be_local_closure(Matter_Session_Store_find_session_source_id_unsecure, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(get_session_by_source_node_id), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(Session), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(source_node_id), + /* K5 */ be_nested_str_weak(sessions), + /* K6 */ be_nested_str_weak(push), + /* K7 */ be_nested_str_weak(set_expire_in_seconds), + }), + be_str_weak(find_session_source_id_unsecure), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x5C140200, // 0001 MOVE R5 R1 + 0x7C0C0400, // 0002 CALL R3 2 + 0x4C100000, // 0003 LDNIL R4 + 0x1C100604, // 0004 EQ R4 R3 R4 + 0x7812000B, // 0005 JMPF R4 #0012 + 0xB8120200, // 0006 GETNGBL R4 K1 + 0x8C100902, // 0007 GETMET R4 R4 K2 + 0x5C180000, // 0008 MOVE R6 R0 + 0x581C0003, // 0009 LDCONST R7 K3 + 0x58200003, // 000A LDCONST R8 K3 + 0x7C100800, // 000B CALL R4 4 + 0x5C0C0800, // 000C MOVE R3 R4 + 0x900E0801, // 000D SETMBR R3 K4 R1 + 0x88100105, // 000E GETMBR R4 R0 K5 + 0x8C100906, // 000F GETMET R4 R4 K6 + 0x5C180600, // 0010 MOVE R6 R3 + 0x7C100400, // 0011 CALL R4 2 + 0x8C100707, // 0012 GETMET R4 R3 K7 + 0x5C180400, // 0013 MOVE R6 R2 + 0x7C100400, // 0014 CALL R4 2 + 0x80040600, // 0015 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_session +********************************************************************/ +be_local_closure(Matter_Session_Store_add_session, /* name */ be_nested_proto( 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(set_expire_in_seconds), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(push), + }), + be_str_weak(add_session), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x200C0403, // 0001 NE R3 R2 R3 + 0x780E0002, // 0002 JMPF R3 #0006 + 0x8C0C0300, // 0003 GETMET R3 R1 K0 + 0x5C140400, // 0004 MOVE R5 R2 + 0x7C0C0400, // 0005 CALL R3 2 + 0x880C0101, // 0006 GETMBR R3 R0 K1 + 0x8C0C0702, // 0007 GETMET R3 R3 K2 + 0x5C140200, // 0008 MOVE R5 R1 + 0x7C0C0400, // 0009 CALL R3 2 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(Matter_Session_Store_every_second, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(remove_expired), + }), + be_str_weak(every_second), + &be_const_str_solidified, + ( &(const binstruction[ 3]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x80000000, // 0002 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: remove_session +********************************************************************/ +be_local_closure(Matter_Session_Store_remove_session, /* name */ + be_nested_proto( + 7, /* nstack */ 2, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1615,35 +1774,31 @@ be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name * NULL, /* no sub protos */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(source_node_id), + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(remove), /* K3 */ be_const_int(1), }), - be_str_weak(get_session_by_source_node_id), + be_str_weak(remove_session), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0001, // 0002 JMPF R2 #0005 - 0x4C080000, // 0003 LDNIL R2 - 0x80040400, // 0004 RET 1 R2 - 0x6008000C, // 0005 GETGBL R2 G12 - 0x880C0100, // 0006 GETMBR R3 R0 K0 - 0x7C080200, // 0007 CALL R2 1 - 0x580C0001, // 0008 LDCONST R3 K1 - 0x88100100, // 0009 GETMBR R4 R0 K0 - 0x14140602, // 000A LT R5 R3 R2 - 0x78160007, // 000B JMPF R5 #0014 - 0x94140803, // 000C GETIDX R5 R4 R3 - 0x88140B02, // 000D GETMBR R5 R5 K2 - 0x1C140A01, // 000E EQ R5 R5 R1 - 0x78160001, // 000F JMPF R5 #0012 - 0x94140803, // 0010 GETIDX R5 R4 R3 - 0x80040A00, // 0011 RET 1 R5 - 0x000C0703, // 0012 ADD R3 R3 K3 - 0x7001FFF5, // 0013 JMP #000A - 0x80000000, // 0014 RET 0 + ( &(const binstruction[17]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x6010000C, // 0002 GETGBL R4 G12 + 0x88140101, // 0003 GETMBR R5 R0 K1 + 0x7C100200, // 0004 CALL R4 1 + 0x14100404, // 0005 LT R4 R2 R4 + 0x78120008, // 0006 JMPF R4 #0010 + 0x94100602, // 0007 GETIDX R4 R3 R2 + 0x1C100801, // 0008 EQ R4 R4 R1 + 0x78120003, // 0009 JMPF R4 #000E + 0x8C100702, // 000A GETMET R4 R3 K2 + 0x5C180400, // 000B MOVE R6 R2 + 0x7C100400, // 000C CALL R4 2 + 0x70020000, // 000D JMP #000F + 0x00080503, // 000E ADD R2 R2 K3 + 0x7001FFF1, // 000F JMP #0002 + 0x80000000, // 0010 RET 0 }) ) ); @@ -1707,6 +1862,125 @@ be_local_closure(Matter_Session_Store_remove_expired, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: save +********************************************************************/ +be_local_closure(Matter_Session_Store_save, /* name */ + be_nested_proto( + 12, /* nstack */ + 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_nested_str_weak(json), + /* K1 */ be_nested_str_weak(remove_expired), + /* K2 */ be_nested_str_weak(sessions), + /* K3 */ be_nested_str_weak(_persist), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_nested_str_weak(tojson), + /* K6 */ be_nested_str_weak(stop_iteration), + /* K7 */ be_nested_str_weak(_X5B), + /* K8 */ be_nested_str_weak(concat), + /* K9 */ be_nested_str_weak(_X2C), + /* K10 */ be_nested_str_weak(_X5D), + /* K11 */ be_nested_str_weak(string), + /* K12 */ be_nested_str_weak(FILENAME), + /* K13 */ be_nested_str_weak(w), + /* K14 */ be_nested_str_weak(write), + /* K15 */ be_nested_str_weak(close), + /* K16 */ be_nested_str_weak(tasmota), + /* K17 */ be_nested_str_weak(log), + /* K18 */ be_nested_str_weak(format), + /* K19 */ be_nested_str_weak(MTR_X3A_X20Saved_X20_X25i_X20session_X28s_X29), + /* K20 */ be_const_int(2), + /* K21 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), + /* K22 */ be_nested_str_weak(_X7C), + }), + be_str_weak(save), + &be_const_str_solidified, + ( &(const binstruction[72]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x60080012, // 0003 GETGBL R2 G18 + 0x7C080000, // 0004 CALL R2 0 + 0x600C0010, // 0005 GETGBL R3 G16 + 0x88100102, // 0006 GETMBR R4 R0 K2 + 0x7C0C0200, // 0007 CALL R3 1 + 0xA8020008, // 0008 EXBLK 0 #0012 + 0x5C100600, // 0009 MOVE R4 R3 + 0x7C100000, // 000A CALL R4 0 + 0x88140903, // 000B GETMBR R5 R4 K3 + 0x78160003, // 000C JMPF R5 #0011 + 0x8C140504, // 000D GETMET R5 R2 K4 + 0x8C1C0905, // 000E GETMET R7 R4 K5 + 0x7C1C0200, // 000F CALL R7 1 + 0x7C140400, // 0010 CALL R5 2 + 0x7001FFF6, // 0011 JMP #0009 + 0x580C0006, // 0012 LDCONST R3 K6 + 0xAC0C0200, // 0013 CATCH R3 1 0 + 0xB0080000, // 0014 RAISE 2 R0 R0 + 0x600C000C, // 0015 GETGBL R3 G12 + 0x5C100400, // 0016 MOVE R4 R2 + 0x7C0C0200, // 0017 CALL R3 1 + 0x8C100508, // 0018 GETMET R4 R2 K8 + 0x58180009, // 0019 LDCONST R6 K9 + 0x7C100400, // 001A CALL R4 2 + 0x00120E04, // 001B ADD R4 K7 R4 + 0x0010090A, // 001C ADD R4 R4 K10 + 0x5C080800, // 001D MOVE R2 R4 + 0xA8020015, // 001E EXBLK 0 #0035 + 0xA4121600, // 001F IMPORT R4 K11 + 0x60140011, // 0020 GETGBL R5 G17 + 0x8818010C, // 0021 GETMBR R6 R0 K12 + 0x581C000D, // 0022 LDCONST R7 K13 + 0x7C140400, // 0023 CALL R5 2 + 0x8C180B0E, // 0024 GETMET R6 R5 K14 + 0x5C200400, // 0025 MOVE R8 R2 + 0x7C180400, // 0026 CALL R6 2 + 0x8C180B0F, // 0027 GETMET R6 R5 K15 + 0x7C180200, // 0028 CALL R6 1 + 0xB81A2000, // 0029 GETNGBL R6 K16 + 0x8C180D11, // 002A GETMET R6 R6 K17 + 0x8C200912, // 002B GETMET R8 R4 K18 + 0x58280013, // 002C LDCONST R10 K19 + 0x5C2C0600, // 002D MOVE R11 R3 + 0x7C200600, // 002E CALL R8 3 + 0x58240014, // 002F LDCONST R9 K20 + 0x7C180600, // 0030 CALL R6 3 + 0xA8040001, // 0031 EXBLK 1 1 + 0x80040400, // 0032 RET 1 R2 + 0xA8040001, // 0033 EXBLK 1 1 + 0x70020011, // 0034 JMP #0047 + 0xAC100002, // 0035 CATCH R4 0 2 + 0x7002000E, // 0036 JMP #0046 + 0xB81A2000, // 0037 GETNGBL R6 K16 + 0x8C180D11, // 0038 GETMET R6 R6 K17 + 0x60200008, // 0039 GETGBL R8 G8 + 0x5C240800, // 003A MOVE R9 R4 + 0x7C200200, // 003B CALL R8 1 + 0x00222A08, // 003C ADD R8 K21 R8 + 0x00201116, // 003D ADD R8 R8 K22 + 0x60240008, // 003E GETGBL R9 G8 + 0x5C280A00, // 003F MOVE R10 R5 + 0x7C240200, // 0040 CALL R9 1 + 0x00201009, // 0041 ADD R8 R8 R9 + 0x58240014, // 0042 LDCONST R9 K20 + 0x7C180600, // 0043 CALL R6 3 + 0x80040400, // 0044 RET 1 R2 + 0x70020000, // 0045 JMP #0047 + 0xB0080000, // 0046 RAISE 2 R0 R0 + 0x80000000, // 0047 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: load ********************************************************************/ @@ -1830,85 +2104,11 @@ be_local_closure(Matter_Session_Store_load, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: create_session ********************************************************************/ -be_local_closure(Matter_Session_Store_init, /* name */ +be_local_closure(Matter_Session_Store_create_session, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(sessions), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040012, // 0000 GETGBL R1 G18 - 0x7C040000, // 0001 CALL R1 0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: remove_session -********************************************************************/ -be_local_closure(Matter_Session_Store_remove_session, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(remove), - /* K3 */ be_const_int(1), - }), - be_str_weak(remove_session), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x6010000C, // 0002 GETGBL R4 G12 - 0x88140101, // 0003 GETMBR R5 R0 K1 - 0x7C100200, // 0004 CALL R4 1 - 0x14100404, // 0005 LT R4 R2 R4 - 0x78120008, // 0006 JMPF R4 #0010 - 0x94100602, // 0007 GETIDX R4 R3 R2 - 0x1C100801, // 0008 EQ R4 R4 R1 - 0x78120003, // 0009 JMPF R4 #000E - 0x8C100702, // 000A GETMET R4 R3 K2 - 0x5C180400, // 000B MOVE R6 R2 - 0x7C100400, // 000C CALL R4 2 - 0x70020000, // 000D JMP #000F - 0x00080503, // 000E ADD R2 R2 K3 - 0x7001FFF1, // 000F JMP #0002 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_session -********************************************************************/ -be_local_closure(Matter_Session_Store_add_session, /* name */ - be_nested_proto( - 6, /* nstack */ + 9, /* nstack */ 3, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -1916,25 +2116,90 @@ be_local_closure(Matter_Session_Store_add_session, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(set_expire_in_seconds), - /* K1 */ be_nested_str_weak(sessions), - /* K2 */ be_nested_str_weak(push), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(get_session_by_local_session_id), + /* K1 */ be_nested_str_weak(remove_session), + /* K2 */ be_nested_str_weak(matter), + /* K3 */ be_nested_str_weak(Session), + /* K4 */ be_nested_str_weak(sessions), + /* K5 */ be_nested_str_weak(push), }), - be_str_weak(add_session), + be_str_weak(create_session), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x200C0403, // 0001 NE R3 R2 R3 - 0x780E0002, // 0002 JMPF R3 #0006 - 0x8C0C0300, // 0003 GETMET R3 R1 K0 - 0x5C140400, // 0004 MOVE R5 R2 - 0x7C0C0400, // 0005 CALL R3 2 - 0x880C0101, // 0006 GETMBR R3 R0 K1 - 0x8C0C0702, // 0007 GETMET R3 R3 K2 - 0x5C140200, // 0008 MOVE R5 R1 - 0x7C0C0400, // 0009 CALL R3 2 - 0x80000000, // 000A RET 0 + ( &(const binstruction[21]) { /* code */ + 0x8C0C0100, // 0000 GETMET R3 R0 K0 + 0x5C140200, // 0001 MOVE R5 R1 + 0x7C0C0400, // 0002 CALL R3 2 + 0x4C100000, // 0003 LDNIL R4 + 0x20100604, // 0004 NE R4 R3 R4 + 0x78120002, // 0005 JMPF R4 #0009 + 0x8C100101, // 0006 GETMET R4 R0 K1 + 0x5C180600, // 0007 MOVE R6 R3 + 0x7C100400, // 0008 CALL R4 2 + 0xB8120400, // 0009 GETNGBL R4 K2 + 0x8C100903, // 000A GETMET R4 R4 K3 + 0x5C180000, // 000B MOVE R6 R0 + 0x5C1C0200, // 000C MOVE R7 R1 + 0x5C200400, // 000D MOVE R8 R2 + 0x7C100800, // 000E CALL R4 4 + 0x5C0C0800, // 000F MOVE R3 R4 + 0x88100104, // 0010 GETMBR R4 R0 K4 + 0x8C100905, // 0011 GETMET R4 R4 K5 + 0x5C180600, // 0012 MOVE R6 R3 + 0x7C100400, // 0013 CALL R4 2 + 0x80040600, // 0014 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sessions_active +********************************************************************/ +be_local_closure(Matter_Session_Store_sessions_active, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(sessions), + /* K2 */ be_nested_str_weak(get_deviceid), + /* K3 */ be_nested_str_weak(get_fabric), + /* K4 */ be_nested_str_weak(push), + /* K5 */ be_const_int(1), + }), + be_str_weak(sessions_active), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x60040012, // 0000 GETGBL R1 G18 + 0x7C040000, // 0001 CALL R1 0 + 0x58080000, // 0002 LDCONST R2 K0 + 0x600C000C, // 0003 GETGBL R3 G12 + 0x88100101, // 0004 GETMBR R4 R0 K1 + 0x7C0C0200, // 0005 CALL R3 1 + 0x140C0403, // 0006 LT R3 R2 R3 + 0x780E000C, // 0007 JMPF R3 #0015 + 0x880C0101, // 0008 GETMBR R3 R0 K1 + 0x940C0602, // 0009 GETIDX R3 R3 R2 + 0x8C100702, // 000A GETMET R4 R3 K2 + 0x7C100200, // 000B CALL R4 1 + 0x78120005, // 000C JMPF R4 #0013 + 0x8C100703, // 000D GETMET R4 R3 K3 + 0x7C100200, // 000E CALL R4 1 + 0x78120002, // 000F JMPF R4 #0013 + 0x8C100304, // 0010 GETMET R4 R1 K4 + 0x5C180600, // 0011 MOVE R6 R3 + 0x7C100400, // 0012 CALL R4 2 + 0x00080505, // 0013 ADD R2 R2 K5 + 0x7001FFED, // 0014 JMP #0003 + 0x80040200, // 0015 RET 1 R1 }) ) ); @@ -1990,179 +2255,6 @@ be_local_closure(Matter_Session_Store_get_session_by_local_session_id, /* name /*******************************************************************/ -/******************************************************************** -** Solidified function: find_session_source_id_unsecure -********************************************************************/ -be_local_closure(Matter_Session_Store_find_session_source_id_unsecure, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(get_session_by_source_node_id), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(Session), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(source_node_id), - /* K5 */ be_nested_str_weak(sessions), - /* K6 */ be_nested_str_weak(push), - /* K7 */ be_nested_str_weak(set_expire_in_seconds), - }), - be_str_weak(find_session_source_id_unsecure), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x5C140200, // 0001 MOVE R5 R1 - 0x7C0C0400, // 0002 CALL R3 2 - 0x4C100000, // 0003 LDNIL R4 - 0x1C100604, // 0004 EQ R4 R3 R4 - 0x7812000B, // 0005 JMPF R4 #0012 - 0xB8120200, // 0006 GETNGBL R4 K1 - 0x8C100902, // 0007 GETMET R4 R4 K2 - 0x5C180000, // 0008 MOVE R6 R0 - 0x581C0003, // 0009 LDCONST R7 K3 - 0x58200003, // 000A LDCONST R8 K3 - 0x7C100800, // 000B CALL R4 4 - 0x5C0C0800, // 000C MOVE R3 R4 - 0x900E0801, // 000D SETMBR R3 K4 R1 - 0x88100105, // 000E GETMBR R4 R0 K5 - 0x8C100906, // 000F GETMET R4 R4 K6 - 0x5C180600, // 0010 MOVE R6 R3 - 0x7C100400, // 0011 CALL R4 2 - 0x8C100707, // 0012 GETMET R4 R3 K7 - 0x5C180400, // 0013 MOVE R6 R2 - 0x7C100400, // 0014 CALL R4 2 - 0x80040600, // 0015 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: save -********************************************************************/ -be_local_closure(Matter_Session_Store_save, /* name */ - be_nested_proto( - 12, /* nstack */ - 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_nested_str_weak(json), - /* K1 */ be_nested_str_weak(remove_expired), - /* K2 */ be_nested_str_weak(sessions), - /* K3 */ be_nested_str_weak(_persist), - /* K4 */ be_nested_str_weak(push), - /* K5 */ be_nested_str_weak(tojson), - /* K6 */ be_nested_str_weak(stop_iteration), - /* K7 */ be_nested_str_weak(_X5B), - /* K8 */ be_nested_str_weak(concat), - /* K9 */ be_nested_str_weak(_X2C), - /* K10 */ be_nested_str_weak(_X5D), - /* K11 */ be_nested_str_weak(string), - /* K12 */ be_nested_str_weak(FILENAME), - /* K13 */ be_nested_str_weak(w), - /* K14 */ be_nested_str_weak(write), - /* K15 */ be_nested_str_weak(close), - /* K16 */ be_nested_str_weak(tasmota), - /* K17 */ be_nested_str_weak(log), - /* K18 */ be_nested_str_weak(format), - /* K19 */ be_nested_str_weak(MTR_X3A_X20Saved_X20_X25i_X20session_X28s_X29), - /* K20 */ be_const_int(2), - /* K21 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), - /* K22 */ be_nested_str_weak(_X7C), - }), - be_str_weak(save), - &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x60080012, // 0003 GETGBL R2 G18 - 0x7C080000, // 0004 CALL R2 0 - 0x600C0010, // 0005 GETGBL R3 G16 - 0x88100102, // 0006 GETMBR R4 R0 K2 - 0x7C0C0200, // 0007 CALL R3 1 - 0xA8020008, // 0008 EXBLK 0 #0012 - 0x5C100600, // 0009 MOVE R4 R3 - 0x7C100000, // 000A CALL R4 0 - 0x88140903, // 000B GETMBR R5 R4 K3 - 0x78160003, // 000C JMPF R5 #0011 - 0x8C140504, // 000D GETMET R5 R2 K4 - 0x8C1C0905, // 000E GETMET R7 R4 K5 - 0x7C1C0200, // 000F CALL R7 1 - 0x7C140400, // 0010 CALL R5 2 - 0x7001FFF6, // 0011 JMP #0009 - 0x580C0006, // 0012 LDCONST R3 K6 - 0xAC0C0200, // 0013 CATCH R3 1 0 - 0xB0080000, // 0014 RAISE 2 R0 R0 - 0x600C000C, // 0015 GETGBL R3 G12 - 0x5C100400, // 0016 MOVE R4 R2 - 0x7C0C0200, // 0017 CALL R3 1 - 0x8C100508, // 0018 GETMET R4 R2 K8 - 0x58180009, // 0019 LDCONST R6 K9 - 0x7C100400, // 001A CALL R4 2 - 0x00120E04, // 001B ADD R4 K7 R4 - 0x0010090A, // 001C ADD R4 R4 K10 - 0x5C080800, // 001D MOVE R2 R4 - 0xA8020015, // 001E EXBLK 0 #0035 - 0xA4121600, // 001F IMPORT R4 K11 - 0x60140011, // 0020 GETGBL R5 G17 - 0x8818010C, // 0021 GETMBR R6 R0 K12 - 0x581C000D, // 0022 LDCONST R7 K13 - 0x7C140400, // 0023 CALL R5 2 - 0x8C180B0E, // 0024 GETMET R6 R5 K14 - 0x5C200400, // 0025 MOVE R8 R2 - 0x7C180400, // 0026 CALL R6 2 - 0x8C180B0F, // 0027 GETMET R6 R5 K15 - 0x7C180200, // 0028 CALL R6 1 - 0xB81A2000, // 0029 GETNGBL R6 K16 - 0x8C180D11, // 002A GETMET R6 R6 K17 - 0x8C200912, // 002B GETMET R8 R4 K18 - 0x58280013, // 002C LDCONST R10 K19 - 0x5C2C0600, // 002D MOVE R11 R3 - 0x7C200600, // 002E CALL R8 3 - 0x58240014, // 002F LDCONST R9 K20 - 0x7C180600, // 0030 CALL R6 3 - 0xA8040001, // 0031 EXBLK 1 1 - 0x80040400, // 0032 RET 1 R2 - 0xA8040001, // 0033 EXBLK 1 1 - 0x70020011, // 0034 JMP #0047 - 0xAC100002, // 0035 CATCH R4 0 2 - 0x7002000E, // 0036 JMP #0046 - 0xB81A2000, // 0037 GETNGBL R6 K16 - 0x8C180D11, // 0038 GETMET R6 R6 K17 - 0x60200008, // 0039 GETGBL R8 G8 - 0x5C240800, // 003A MOVE R9 R4 - 0x7C200200, // 003B CALL R8 1 - 0x00222A08, // 003C ADD R8 K21 R8 - 0x00201116, // 003D ADD R8 R8 K22 - 0x60240008, // 003E GETGBL R9 G8 - 0x5C280A00, // 003F MOVE R10 R5 - 0x7C240200, // 0040 CALL R9 1 - 0x00201009, // 0041 ADD R8 R8 R9 - 0x58240014, // 0042 LDCONST R9 K20 - 0x7C180600, // 0043 CALL R6 3 - 0x80040400, // 0044 RET 1 R2 - 0x70020000, // 0045 JMP #0047 - 0xB0080000, // 0046 RAISE 2 R0 R0 - 0x80000000, // 0047 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: gen_local_session_id ********************************************************************/ @@ -2213,50 +2305,48 @@ be_local_closure(Matter_Session_Store_gen_local_session_id, /* name */ /******************************************************************** -** Solidified function: create_session +** Solidified function: get_session_by_source_node_id ********************************************************************/ -be_local_closure(Matter_Session_Store_create_session, /* name */ +be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name */ be_nested_proto( - 9, /* nstack */ - 3, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(get_session_by_local_session_id), - /* K1 */ be_nested_str_weak(remove_session), - /* K2 */ be_nested_str_weak(matter), - /* K3 */ be_nested_str_weak(Session), - /* K4 */ be_nested_str_weak(sessions), - /* K5 */ be_nested_str_weak(push), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(sessions), + /* K1 */ be_const_int(0), + /* K2 */ be_nested_str_weak(source_node_id), + /* K3 */ be_const_int(1), }), - be_str_weak(create_session), + be_str_weak(get_session_by_source_node_id), &be_const_str_solidified, ( &(const binstruction[21]) { /* code */ - 0x8C0C0100, // 0000 GETMET R3 R0 K0 - 0x5C140200, // 0001 MOVE R5 R1 - 0x7C0C0400, // 0002 CALL R3 2 - 0x4C100000, // 0003 LDNIL R4 - 0x20100604, // 0004 NE R4 R3 R4 - 0x78120002, // 0005 JMPF R4 #0009 - 0x8C100101, // 0006 GETMET R4 R0 K1 - 0x5C180600, // 0007 MOVE R6 R3 - 0x7C100400, // 0008 CALL R4 2 - 0xB8120400, // 0009 GETNGBL R4 K2 - 0x8C100903, // 000A GETMET R4 R4 K3 - 0x5C180000, // 000B MOVE R6 R0 - 0x5C1C0200, // 000C MOVE R7 R1 - 0x5C200400, // 000D MOVE R8 R2 - 0x7C100800, // 000E CALL R4 4 - 0x5C0C0800, // 000F MOVE R3 R4 - 0x88100104, // 0010 GETMBR R4 R0 K4 - 0x8C100905, // 0011 GETMET R4 R4 K5 - 0x5C180600, // 0012 MOVE R6 R3 - 0x7C100400, // 0013 CALL R4 2 - 0x80040600, // 0014 RET 1 R3 + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0001, // 0002 JMPF R2 #0005 + 0x4C080000, // 0003 LDNIL R2 + 0x80040400, // 0004 RET 1 R2 + 0x6008000C, // 0005 GETGBL R2 G12 + 0x880C0100, // 0006 GETMBR R3 R0 K0 + 0x7C080200, // 0007 CALL R2 1 + 0x580C0001, // 0008 LDCONST R3 K1 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x14140602, // 000A LT R5 R3 R2 + 0x78160007, // 000B JMPF R5 #0014 + 0x94140803, // 000C GETIDX R5 R4 R3 + 0x88140B02, // 000D GETMBR R5 R5 K2 + 0x1C140A01, // 000E EQ R5 R5 R1 + 0x78160001, // 000F JMPF R5 #0012 + 0x94140803, // 0010 GETIDX R5 R4 R3 + 0x80040A00, // 0011 RET 1 R5 + 0x000C0703, // 0012 ADD R3 R3 K3 + 0x7001FFF5, // 0013 JMP #000A + 0x80000000, // 0014 RET 0 }) ) ); @@ -2269,23 +2359,24 @@ be_local_closure(Matter_Session_Store_create_session, /* name */ be_local_class(Matter_Session_Store, 1, NULL, - be_nested_map(15, + be_nested_map(16, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(every_second, 14), be_const_closure(Matter_Session_Store_every_second_closure) }, - { be_const_key_weak(remove_redundant_session, 9), be_const_closure(Matter_Session_Store_remove_redundant_session_closure) }, - { be_const_key_weak(get_session_by_source_node_id, 5), be_const_closure(Matter_Session_Store_get_session_by_source_node_id_closure) }, - { be_const_key_weak(remove_expired, -1), be_const_closure(Matter_Session_Store_remove_expired_closure) }, + { be_const_key_weak(remove_redundant_session, 15), be_const_closure(Matter_Session_Store_remove_redundant_session_closure) }, + { be_const_key_weak(get_session_by_source_node_id, 14), be_const_closure(Matter_Session_Store_get_session_by_source_node_id_closure) }, + { be_const_key_weak(gen_local_session_id, 6), be_const_closure(Matter_Session_Store_gen_local_session_id_closure) }, + { be_const_key_weak(init, 1), be_const_closure(Matter_Session_Store_init_closure) }, + { be_const_key_weak(save, -1), be_const_closure(Matter_Session_Store_save_closure) }, { be_const_key_weak(load, -1), be_const_closure(Matter_Session_Store_load_closure) }, - { be_const_key_weak(FILENAME, 11), be_nested_str_weak(_matter_sessions_X2Ejson) }, - { be_const_key_weak(remove_session, -1), be_const_closure(Matter_Session_Store_remove_session_closure) }, - { be_const_key_weak(add_session, -1), be_const_closure(Matter_Session_Store_add_session_closure) }, - { be_const_key_weak(get_session_by_local_session_id, -1), be_const_closure(Matter_Session_Store_get_session_by_local_session_id_closure) }, - { be_const_key_weak(find_session_source_id_unsecure, -1), be_const_closure(Matter_Session_Store_find_session_source_id_unsecure_closure) }, { be_const_key_weak(create_session, -1), be_const_closure(Matter_Session_Store_create_session_closure) }, - { be_const_key_weak(gen_local_session_id, -1), be_const_closure(Matter_Session_Store_gen_local_session_id_closure) }, - { be_const_key_weak(save, 10), be_const_closure(Matter_Session_Store_save_closure) }, + { be_const_key_weak(remove_expired, -1), be_const_closure(Matter_Session_Store_remove_expired_closure) }, + { be_const_key_weak(FILENAME, 4), be_nested_str_weak(_matter_sessions_X2Ejson) }, + { be_const_key_weak(every_second, 5), be_const_closure(Matter_Session_Store_every_second_closure) }, + { be_const_key_weak(remove_session, 2), be_const_closure(Matter_Session_Store_remove_session_closure) }, + { be_const_key_weak(sessions_active, -1), be_const_closure(Matter_Session_Store_sessions_active_closure) }, { be_const_key_weak(sessions, -1), be_const_var(0) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Session_Store_init_closure) }, + { be_const_key_weak(get_session_by_local_session_id, -1), be_const_closure(Matter_Session_Store_get_session_by_local_session_id_closure) }, + { be_const_key_weak(add_session, -1), be_const_closure(Matter_Session_Store_add_session_closure) }, + { be_const_key_weak(find_session_source_id_unsecure, -1), be_const_closure(Matter_Session_Store_find_session_source_id_unsecure_closure) }, })), be_str_weak(Matter_Session_Store) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h index 3132bd417..13d316a47 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h @@ -50,7 +50,7 @@ be_local_closure(Matter_TLV_item_encode, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[39]) { /* constants */ + ( &(const bvalue[41]) { /* constants */ /* K0 */ be_nested_str_weak(TLV), /* K1 */ be_nested_str_weak(typ), /* K2 */ be_nested_str_weak(BFALSE), @@ -77,23 +77,25 @@ be_local_closure(Matter_TLV_item_encode, /* name */ /* K23 */ be_const_int(2), /* K24 */ be_nested_str_weak(I8), /* K25 */ be_nested_str_weak(U8), - /* K26 */ be_nested_str_weak(int64), - /* K27 */ be_nested_str_weak(tobytes), - /* K28 */ be_nested_str_weak(FLOAT), - /* K29 */ be_nested_str_weak(setfloat), - /* K30 */ be_nested_str_weak(DOUBLE), - /* K31 */ be_nested_str_weak(value_error), - /* K32 */ be_nested_str_weak(Unsupported_X20type_X20TLV_X2EDOUBLE), - /* K33 */ be_nested_str_weak(string_X20too_X20big), - /* K34 */ be_nested_str_weak(fromstring), - /* K35 */ be_nested_str_weak(frostring), - /* K36 */ be_nested_str_weak(bytes_X20too_X20big), - /* K37 */ be_nested_str_weak(NULL), - /* K38 */ be_nested_str_weak(unsupported_X20type_X20), + /* K26 */ be_nested_str_weak(copy), + /* K27 */ be_nested_str_weak(resize), + /* K28 */ be_nested_str_weak(int64), + /* K29 */ be_nested_str_weak(tobytes), + /* K30 */ be_nested_str_weak(FLOAT), + /* K31 */ be_nested_str_weak(setfloat), + /* K32 */ be_nested_str_weak(DOUBLE), + /* K33 */ be_nested_str_weak(value_error), + /* K34 */ be_nested_str_weak(Unsupported_X20type_X20TLV_X2EDOUBLE), + /* K35 */ be_nested_str_weak(string_X20too_X20big), + /* K36 */ be_nested_str_weak(fromstring), + /* K37 */ be_nested_str_weak(frostring), + /* K38 */ be_nested_str_weak(bytes_X20too_X20big), + /* K39 */ be_nested_str_weak(NULL), + /* K40 */ be_nested_str_weak(unsupported_X20type_X20), }), be_str_weak(encode), &be_const_str_solidified, - ( &(const binstruction[345]) { /* code */ + ( &(const binstruction[361]) { /* code */ 0x88080100, // 0000 GETMBR R2 R0 K0 0x4C0C0000, // 0001 LDNIL R3 0x1C0C0203, // 0002 EQ R3 R1 R3 @@ -248,7 +250,7 @@ be_local_closure(Matter_TLV_item_encode, /* name */ 0x7C140200, // 0097 CALL R5 1 0x58180016, // 0098 LDCONST R6 K22 0x7C0C0600, // 0099 CALL R3 3 - 0x700200BC, // 009A JMP #0158 + 0x700200CC, // 009A JMP #0168 0x880C0101, // 009B GETMBR R3 R0 K1 0x88100505, // 009C GETMBR R4 R2 K5 0x1C0C0604, // 009D EQ R3 R3 R4 @@ -263,7 +265,7 @@ be_local_closure(Matter_TLV_item_encode, /* name */ 0x7C140200, // 00A6 CALL R5 1 0x58180017, // 00A7 LDCONST R6 K23 0x7C0C0600, // 00A8 CALL R3 3 - 0x700200AD, // 00A9 JMP #0158 + 0x700200BD, // 00A9 JMP #0168 0x880C0101, // 00AA GETMBR R3 R0 K1 0x88100506, // 00AB GETMBR R4 R2 K6 0x1C0C0604, // 00AC EQ R3 R3 R4 @@ -278,7 +280,7 @@ be_local_closure(Matter_TLV_item_encode, /* name */ 0x7C140200, // 00B5 CALL R5 1 0x541A0003, // 00B6 LDINT R6 4 0x7C0C0600, // 00B7 CALL R3 3 - 0x7002009E, // 00B8 JMP #0158 + 0x700200AE, // 00B8 JMP #0168 0x880C0101, // 00B9 GETMBR R3 R0 K1 0x88100518, // 00BA GETMBR R4 R2 K24 0x1C0C0604, // 00BB EQ R3 R3 R4 @@ -286,159 +288,175 @@ be_local_closure(Matter_TLV_item_encode, /* name */ 0x880C0101, // 00BD GETMBR R3 R0 K1 0x88100519, // 00BE GETMBR R4 R2 K25 0x1C0C0604, // 00BF EQ R3 R3 R4 - 0x780E000F, // 00C0 JMPF R3 #00D1 + 0x780E001F, // 00C0 JMPF R3 #00E1 0x880C0104, // 00C1 GETMBR R3 R0 K4 0x6010000F, // 00C2 GETGBL R4 G15 0x5C140600, // 00C3 MOVE R5 R3 - 0xB81A3400, // 00C4 GETNGBL R6 K26 + 0x60180015, // 00C4 GETGBL R6 G21 0x7C100400, // 00C5 CALL R4 2 - 0x74120005, // 00C6 JMPT R4 #00CD - 0xB8123400, // 00C7 GETNGBL R4 K26 - 0x60140009, // 00C8 GETGBL R5 G9 - 0x88180104, // 00C9 GETMBR R6 R0 K4 - 0x7C140200, // 00CA CALL R5 1 - 0x7C100200, // 00CB CALL R4 1 + 0x78120006, // 00C6 JMPF R4 #00CE + 0x8C10071A, // 00C7 GETMET R4 R3 K26 + 0x7C100200, // 00C8 CALL R4 1 + 0x8C10091B, // 00C9 GETMET R4 R4 K27 + 0x541A0007, // 00CA LDINT R6 8 + 0x7C100400, // 00CB CALL R4 2 0x5C0C0800, // 00CC MOVE R3 R4 - 0x8C10071B, // 00CD GETMET R4 R3 K27 - 0x7C100200, // 00CE CALL R4 1 - 0x40100204, // 00CF CONNECT R4 R1 R4 - 0x70020086, // 00D0 JMP #0158 - 0x880C0101, // 00D1 GETMBR R3 R0 K1 - 0x88100502, // 00D2 GETMBR R4 R2 K2 - 0x1C0C0604, // 00D3 EQ R3 R3 R4 - 0x740E0003, // 00D4 JMPT R3 #00D9 - 0x880C0101, // 00D5 GETMBR R3 R0 K1 - 0x88100503, // 00D6 GETMBR R4 R2 K3 - 0x1C0C0604, // 00D7 EQ R3 R3 R4 - 0x780E0000, // 00D8 JMPF R3 #00DA - 0x7002007D, // 00D9 JMP #0158 - 0x880C0101, // 00DA GETMBR R3 R0 K1 - 0x8810051C, // 00DB GETMBR R4 R2 K28 - 0x1C0C0604, // 00DC EQ R3 R3 R4 - 0x780E000D, // 00DD JMPF R3 #00EC - 0x600C000C, // 00DE GETGBL R3 G12 - 0x5C100200, // 00DF MOVE R4 R1 - 0x7C0C0200, // 00E0 CALL R3 1 - 0x8C100315, // 00E1 GETMET R4 R1 K21 - 0x5818000A, // 00E2 LDCONST R6 K10 - 0x541E0003, // 00E3 LDINT R7 4 - 0x7C100600, // 00E4 CALL R4 3 - 0x8C10031D, // 00E5 GETMET R4 R1 K29 - 0x5C180600, // 00E6 MOVE R6 R3 - 0x601C000A, // 00E7 GETGBL R7 G10 - 0x88200104, // 00E8 GETMBR R8 R0 K4 - 0x7C1C0200, // 00E9 CALL R7 1 - 0x7C100600, // 00EA CALL R4 3 - 0x7002006B, // 00EB JMP #0158 - 0x880C0101, // 00EC GETMBR R3 R0 K1 - 0x8810051E, // 00ED GETMBR R4 R2 K30 - 0x1C0C0604, // 00EE EQ R3 R3 R4 - 0x780E0001, // 00EF JMPF R3 #00F2 - 0xB0063F20, // 00F0 RAISE 1 K31 K32 - 0x70020065, // 00F1 JMP #0158 - 0x880C0101, // 00F2 GETMBR R3 R0 K1 - 0x88100510, // 00F3 GETMBR R4 R2 K16 - 0x1C0C0604, // 00F4 EQ R3 R3 R4 - 0x780E0015, // 00F5 JMPF R3 #010C - 0x600C000C, // 00F6 GETGBL R3 G12 - 0x88100104, // 00F7 GETMBR R4 R0 K4 - 0x7C0C0200, // 00F8 CALL R3 1 - 0x541200FE, // 00F9 LDINT R4 255 - 0x240C0604, // 00FA GT R3 R3 R4 - 0x780E0000, // 00FB JMPF R3 #00FD - 0xB0063F21, // 00FC RAISE 1 K31 K33 - 0x8C0C0315, // 00FD GETMET R3 R1 K21 - 0x6014000C, // 00FE GETGBL R5 G12 - 0x88180104, // 00FF GETMBR R6 R0 K4 - 0x7C140200, // 0100 CALL R5 1 - 0x58180016, // 0101 LDCONST R6 K22 - 0x7C0C0600, // 0102 CALL R3 3 - 0x600C0015, // 0103 GETGBL R3 G21 - 0x7C0C0000, // 0104 CALL R3 0 - 0x8C0C0722, // 0105 GETMET R3 R3 K34 - 0x60140008, // 0106 GETGBL R5 G8 - 0x88180104, // 0107 GETMBR R6 R0 K4 - 0x7C140200, // 0108 CALL R5 1 - 0x7C0C0400, // 0109 CALL R3 2 - 0x400C0203, // 010A CONNECT R3 R1 R3 - 0x7002004B, // 010B JMP #0158 - 0x880C0101, // 010C GETMBR R3 R0 K1 - 0x88100512, // 010D GETMBR R4 R2 K18 - 0x1C0C0604, // 010E EQ R3 R3 R4 - 0x780E0015, // 010F JMPF R3 #0126 - 0x600C000C, // 0110 GETGBL R3 G12 - 0x88100104, // 0111 GETMBR R4 R0 K4 - 0x7C0C0200, // 0112 CALL R3 1 - 0x5412FFFE, // 0113 LDINT R4 65535 - 0x240C0604, // 0114 GT R3 R3 R4 - 0x780E0000, // 0115 JMPF R3 #0117 - 0xB0063F21, // 0116 RAISE 1 K31 K33 - 0x8C0C0315, // 0117 GETMET R3 R1 K21 - 0x6014000C, // 0118 GETGBL R5 G12 - 0x88180104, // 0119 GETMBR R6 R0 K4 - 0x7C140200, // 011A CALL R5 1 - 0x58180017, // 011B LDCONST R6 K23 - 0x7C0C0600, // 011C CALL R3 3 - 0x600C0015, // 011D GETGBL R3 G21 - 0x7C0C0000, // 011E CALL R3 0 - 0x8C0C0723, // 011F GETMET R3 R3 K35 - 0x60140008, // 0120 GETGBL R5 G8 - 0x88180104, // 0121 GETMBR R6 R0 K4 - 0x7C140200, // 0122 CALL R5 1 - 0x7C0C0400, // 0123 CALL R3 2 - 0x400C0203, // 0124 CONNECT R3 R1 R3 - 0x70020031, // 0125 JMP #0158 - 0x880C0101, // 0126 GETMBR R3 R0 K1 - 0x8810050C, // 0127 GETMBR R4 R2 K12 - 0x1C0C0604, // 0128 EQ R3 R3 R4 - 0x780E000F, // 0129 JMPF R3 #013A - 0x600C000C, // 012A GETGBL R3 G12 - 0x88100104, // 012B GETMBR R4 R0 K4 - 0x7C0C0200, // 012C CALL R3 1 - 0x541200FE, // 012D LDINT R4 255 - 0x240C0604, // 012E GT R3 R3 R4 - 0x780E0000, // 012F JMPF R3 #0131 - 0xB0063F24, // 0130 RAISE 1 K31 K36 - 0x8C0C0315, // 0131 GETMET R3 R1 K21 - 0x6014000C, // 0132 GETGBL R5 G12 - 0x88180104, // 0133 GETMBR R6 R0 K4 - 0x7C140200, // 0134 CALL R5 1 - 0x58180016, // 0135 LDCONST R6 K22 - 0x7C0C0600, // 0136 CALL R3 3 - 0x880C0104, // 0137 GETMBR R3 R0 K4 - 0x400C0203, // 0138 CONNECT R3 R1 R3 - 0x7002001D, // 0139 JMP #0158 - 0x880C0101, // 013A GETMBR R3 R0 K1 - 0x8810050E, // 013B GETMBR R4 R2 K14 - 0x1C0C0604, // 013C EQ R3 R3 R4 - 0x780E000F, // 013D JMPF R3 #014E - 0x600C000C, // 013E GETGBL R3 G12 - 0x88100104, // 013F GETMBR R4 R0 K4 - 0x7C0C0200, // 0140 CALL R3 1 - 0x5412FFFE, // 0141 LDINT R4 65535 - 0x240C0604, // 0142 GT R3 R3 R4 - 0x780E0000, // 0143 JMPF R3 #0145 - 0xB0063F24, // 0144 RAISE 1 K31 K36 - 0x8C0C0315, // 0145 GETMET R3 R1 K21 - 0x6014000C, // 0146 GETGBL R5 G12 - 0x88180104, // 0147 GETMBR R6 R0 K4 - 0x7C140200, // 0148 CALL R5 1 - 0x58180017, // 0149 LDCONST R6 K23 - 0x7C0C0600, // 014A CALL R3 3 - 0x880C0104, // 014B GETMBR R3 R0 K4 - 0x400C0203, // 014C CONNECT R3 R1 R3 - 0x70020009, // 014D JMP #0158 - 0x880C0101, // 014E GETMBR R3 R0 K1 - 0x88100525, // 014F GETMBR R4 R2 K37 - 0x1C0C0604, // 0150 EQ R3 R3 R4 - 0x780E0000, // 0151 JMPF R3 #0153 - 0x70020004, // 0152 JMP #0158 - 0x600C0008, // 0153 GETGBL R3 G8 - 0x88100101, // 0154 GETMBR R4 R0 K1 - 0x7C0C0200, // 0155 CALL R3 1 - 0x000E4C03, // 0156 ADD R3 K38 R3 - 0xB0063E03, // 0157 RAISE 1 K31 R3 - 0x80040200, // 0158 RET 1 R1 + 0x70020010, // 00CD JMP #00DF + 0x6010000F, // 00CE GETGBL R4 G15 + 0x5C140600, // 00CF MOVE R5 R3 + 0xB81A3800, // 00D0 GETNGBL R6 K28 + 0x7C100400, // 00D1 CALL R4 2 + 0x78120003, // 00D2 JMPF R4 #00D7 + 0x8C10071D, // 00D3 GETMET R4 R3 K29 + 0x7C100200, // 00D4 CALL R4 1 + 0x5C0C0800, // 00D5 MOVE R3 R4 + 0x70020007, // 00D6 JMP #00DF + 0xB8123800, // 00D7 GETNGBL R4 K28 + 0x60140009, // 00D8 GETGBL R5 G9 + 0x5C180600, // 00D9 MOVE R6 R3 + 0x7C140200, // 00DA CALL R5 1 + 0x7C100200, // 00DB CALL R4 1 + 0x8C10091D, // 00DC GETMET R4 R4 K29 + 0x7C100200, // 00DD CALL R4 1 + 0x5C0C0800, // 00DE MOVE R3 R4 + 0x40100203, // 00DF CONNECT R4 R1 R3 + 0x70020086, // 00E0 JMP #0168 + 0x880C0101, // 00E1 GETMBR R3 R0 K1 + 0x88100502, // 00E2 GETMBR R4 R2 K2 + 0x1C0C0604, // 00E3 EQ R3 R3 R4 + 0x740E0003, // 00E4 JMPT R3 #00E9 + 0x880C0101, // 00E5 GETMBR R3 R0 K1 + 0x88100503, // 00E6 GETMBR R4 R2 K3 + 0x1C0C0604, // 00E7 EQ R3 R3 R4 + 0x780E0000, // 00E8 JMPF R3 #00EA + 0x7002007D, // 00E9 JMP #0168 + 0x880C0101, // 00EA GETMBR R3 R0 K1 + 0x8810051E, // 00EB GETMBR R4 R2 K30 + 0x1C0C0604, // 00EC EQ R3 R3 R4 + 0x780E000D, // 00ED JMPF R3 #00FC + 0x600C000C, // 00EE GETGBL R3 G12 + 0x5C100200, // 00EF MOVE R4 R1 + 0x7C0C0200, // 00F0 CALL R3 1 + 0x8C100315, // 00F1 GETMET R4 R1 K21 + 0x5818000A, // 00F2 LDCONST R6 K10 + 0x541E0003, // 00F3 LDINT R7 4 + 0x7C100600, // 00F4 CALL R4 3 + 0x8C10031F, // 00F5 GETMET R4 R1 K31 + 0x5C180600, // 00F6 MOVE R6 R3 + 0x601C000A, // 00F7 GETGBL R7 G10 + 0x88200104, // 00F8 GETMBR R8 R0 K4 + 0x7C1C0200, // 00F9 CALL R7 1 + 0x7C100600, // 00FA CALL R4 3 + 0x7002006B, // 00FB JMP #0168 + 0x880C0101, // 00FC GETMBR R3 R0 K1 + 0x88100520, // 00FD GETMBR R4 R2 K32 + 0x1C0C0604, // 00FE EQ R3 R3 R4 + 0x780E0001, // 00FF JMPF R3 #0102 + 0xB0064322, // 0100 RAISE 1 K33 K34 + 0x70020065, // 0101 JMP #0168 + 0x880C0101, // 0102 GETMBR R3 R0 K1 + 0x88100510, // 0103 GETMBR R4 R2 K16 + 0x1C0C0604, // 0104 EQ R3 R3 R4 + 0x780E0015, // 0105 JMPF R3 #011C + 0x600C000C, // 0106 GETGBL R3 G12 + 0x88100104, // 0107 GETMBR R4 R0 K4 + 0x7C0C0200, // 0108 CALL R3 1 + 0x541200FE, // 0109 LDINT R4 255 + 0x240C0604, // 010A GT R3 R3 R4 + 0x780E0000, // 010B JMPF R3 #010D + 0xB0064323, // 010C RAISE 1 K33 K35 + 0x8C0C0315, // 010D GETMET R3 R1 K21 + 0x6014000C, // 010E GETGBL R5 G12 + 0x88180104, // 010F GETMBR R6 R0 K4 + 0x7C140200, // 0110 CALL R5 1 + 0x58180016, // 0111 LDCONST R6 K22 + 0x7C0C0600, // 0112 CALL R3 3 + 0x600C0015, // 0113 GETGBL R3 G21 + 0x7C0C0000, // 0114 CALL R3 0 + 0x8C0C0724, // 0115 GETMET R3 R3 K36 + 0x60140008, // 0116 GETGBL R5 G8 + 0x88180104, // 0117 GETMBR R6 R0 K4 + 0x7C140200, // 0118 CALL R5 1 + 0x7C0C0400, // 0119 CALL R3 2 + 0x400C0203, // 011A CONNECT R3 R1 R3 + 0x7002004B, // 011B JMP #0168 + 0x880C0101, // 011C GETMBR R3 R0 K1 + 0x88100512, // 011D GETMBR R4 R2 K18 + 0x1C0C0604, // 011E EQ R3 R3 R4 + 0x780E0015, // 011F JMPF R3 #0136 + 0x600C000C, // 0120 GETGBL R3 G12 + 0x88100104, // 0121 GETMBR R4 R0 K4 + 0x7C0C0200, // 0122 CALL R3 1 + 0x5412FFFE, // 0123 LDINT R4 65535 + 0x240C0604, // 0124 GT R3 R3 R4 + 0x780E0000, // 0125 JMPF R3 #0127 + 0xB0064323, // 0126 RAISE 1 K33 K35 + 0x8C0C0315, // 0127 GETMET R3 R1 K21 + 0x6014000C, // 0128 GETGBL R5 G12 + 0x88180104, // 0129 GETMBR R6 R0 K4 + 0x7C140200, // 012A CALL R5 1 + 0x58180017, // 012B LDCONST R6 K23 + 0x7C0C0600, // 012C CALL R3 3 + 0x600C0015, // 012D GETGBL R3 G21 + 0x7C0C0000, // 012E CALL R3 0 + 0x8C0C0725, // 012F GETMET R3 R3 K37 + 0x60140008, // 0130 GETGBL R5 G8 + 0x88180104, // 0131 GETMBR R6 R0 K4 + 0x7C140200, // 0132 CALL R5 1 + 0x7C0C0400, // 0133 CALL R3 2 + 0x400C0203, // 0134 CONNECT R3 R1 R3 + 0x70020031, // 0135 JMP #0168 + 0x880C0101, // 0136 GETMBR R3 R0 K1 + 0x8810050C, // 0137 GETMBR R4 R2 K12 + 0x1C0C0604, // 0138 EQ R3 R3 R4 + 0x780E000F, // 0139 JMPF R3 #014A + 0x600C000C, // 013A GETGBL R3 G12 + 0x88100104, // 013B GETMBR R4 R0 K4 + 0x7C0C0200, // 013C CALL R3 1 + 0x541200FE, // 013D LDINT R4 255 + 0x240C0604, // 013E GT R3 R3 R4 + 0x780E0000, // 013F JMPF R3 #0141 + 0xB0064326, // 0140 RAISE 1 K33 K38 + 0x8C0C0315, // 0141 GETMET R3 R1 K21 + 0x6014000C, // 0142 GETGBL R5 G12 + 0x88180104, // 0143 GETMBR R6 R0 K4 + 0x7C140200, // 0144 CALL R5 1 + 0x58180016, // 0145 LDCONST R6 K22 + 0x7C0C0600, // 0146 CALL R3 3 + 0x880C0104, // 0147 GETMBR R3 R0 K4 + 0x400C0203, // 0148 CONNECT R3 R1 R3 + 0x7002001D, // 0149 JMP #0168 + 0x880C0101, // 014A GETMBR R3 R0 K1 + 0x8810050E, // 014B GETMBR R4 R2 K14 + 0x1C0C0604, // 014C EQ R3 R3 R4 + 0x780E000F, // 014D JMPF R3 #015E + 0x600C000C, // 014E GETGBL R3 G12 + 0x88100104, // 014F GETMBR R4 R0 K4 + 0x7C0C0200, // 0150 CALL R3 1 + 0x5412FFFE, // 0151 LDINT R4 65535 + 0x240C0604, // 0152 GT R3 R3 R4 + 0x780E0000, // 0153 JMPF R3 #0155 + 0xB0064326, // 0154 RAISE 1 K33 K38 + 0x8C0C0315, // 0155 GETMET R3 R1 K21 + 0x6014000C, // 0156 GETGBL R5 G12 + 0x88180104, // 0157 GETMBR R6 R0 K4 + 0x7C140200, // 0158 CALL R5 1 + 0x58180017, // 0159 LDCONST R6 K23 + 0x7C0C0600, // 015A CALL R3 3 + 0x880C0104, // 015B GETMBR R3 R0 K4 + 0x400C0203, // 015C CONNECT R3 R1 R3 + 0x70020009, // 015D JMP #0168 + 0x880C0101, // 015E GETMBR R3 R0 K1 + 0x88100527, // 015F GETMBR R4 R2 K39 + 0x1C0C0604, // 0160 EQ R3 R3 R4 + 0x780E0000, // 0161 JMPF R3 #0163 + 0x70020004, // 0162 JMP #0168 + 0x600C0008, // 0163 GETGBL R3 G8 + 0x88100101, // 0164 GETMBR R4 R0 K1 + 0x7C0C0200, // 0165 CALL R3 1 + 0x000E5003, // 0166 ADD R3 K40 R3 + 0xB0064203, // 0167 RAISE 1 K33 R3 + 0x80040200, // 0168 RET 1 R1 }) ) );