Matter support for fabric_filtered request (for Google compatibility) (#19249)

This commit is contained in:
s-hadinger 2023-08-02 23:00:26 +02:00 committed by GitHub
parent df50a56c25
commit 76662ab236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 2058 additions and 1943 deletions

View File

@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- Support for multiple PCA9685 with extended functionality (#18805)
- Zigbee decode Aqara 0000/FF01 attribute 03 as Temperature
- Berry bytes `get` and `set` work for 3 bytes values
- Matter support for fabric_filtered request (for Google compatibility)
### Breaking Changed

View File

@ -289,18 +289,22 @@ class Matter_Commisioning_Context
import crypto
# Validate Sigma1 Destination ID, p.162
# traverse all existing fabrics
tasmota.log("MTR: SEARCHING: destinationId=" + destinationId.tohex(), 4)
if tasmota.loglevel(4)
tasmota.log("MTR: SEARCHING: destinationId=" + destinationId.tohex(), 4)
end
for fabric : self.device.sessions.fabrics
if fabric.noc == nil || fabric.fabric_id == nil || fabric.device_id == nil continue end
# compute candidateDestinationId, Section 4.13.2.4.1, “Destination Identifier”
var destinationMessage = initiatorRandom + fabric.get_ca_pub() + fabric.fabric_id + fabric.device_id
var key = fabric.get_ipk_group_key()
tasmota.log("MTR: SIGMA1: destinationMessage=" + destinationMessage.tohex(), 4)
# tasmota.log("MTR: SIGMA1: destinationMessage=" + destinationMessage.tohex(), 4)
# tasmota.log("MTR: SIGMA1: key_ipk=" + key.tohex(), 4)
var h = crypto.HMAC_SHA256(key)
h.update(destinationMessage)
var candidateDestinationId = h.out()
tasmota.log("MTR: SIGMA1: candidateDestinationId=" + candidateDestinationId.tohex(), 4)
if tasmota.loglevel(4)
tasmota.log("MTR: SIGMA1: candidateDestinationId=" + candidateDestinationId.tohex(), 4)
end
if candidateDestinationId == destinationId
return fabric
end

View File

@ -431,7 +431,7 @@ class Matter_Device
var fabric = session.get_fabric()
var fabric_id = fabric.get_fabric_id().copy().reverse().tohex()
var vendor_name = fabric.get_admin_vendor_name()
tasmota.log(format("MTR: --- Commissioning complete for Fabric '%s' (Vendor %s) ---", fabric_id, vendor_name), 2)
tasmota.log(f"MTR: --- Commissioning complete for Fabric '{fabric_id}' (Vendor {vendor_name}) ---", 2)
self.stop_basic_commissioning() # by default close commissioning when it's complete
end

View File

@ -302,6 +302,7 @@ class Matter_IM
ctx.endpoint = q.endpoint
ctx.cluster = q.cluster
ctx.attribute = q.attribute
ctx.fabric_filtered = query.fabric_filtered
ctx.status = matter.UNSUPPORTED_ATTRIBUTE #default error if returned `nil`
# expand endpoint
@ -772,8 +773,11 @@ class Matter_IM
ctx.attribute = q.attribute
attr_req.push(str(ctx))
end
tasmota.log(format("MTR: >Subscribe (%6i) %s (min=%i, max=%i, keep=%i) sub=%i",
msg.session.local_session_id, attr_req.concat(" "), sub.min_interval, sub.max_interval, query.keep_subscriptions ? 1 : 0, sub.subscription_id), 3)
tasmota.log(format("MTR: >Subscribe (%6i) %s (min=%i, max=%i, keep=%i) sub=%i fabric_filtered=%s",
msg.session.local_session_id, attr_req.concat(" "), sub.min_interval, sub.max_interval, query.keep_subscriptions ? 1 : 0, sub.subscription_id, query.fabric_filtered), 3)
if query.event_requests != nil && size(query.event_requests) > 0
tasmota.log(f"MTR: >Subscribe (%6i) event_requests_size={size(query.event_requests)}", 3)
end
var ret = self._inner_process_read_request(msg.session, query, true #-no_log-#)
# ret is of type `Matter_ReportDataMessage`

View File

@ -56,6 +56,7 @@ class Matter_Path
s += (self.cluster != nil ? format("%04X/", self.cluster) : "****/")
s += (self.attribute != nil ? format("%04X", self.attribute) : "")
s += (self.command != nil ? format("%04X", self.command) : "")
if self.fabric_filtered s += "!" end
if self.attribute == nil && self.command == nil s += "****" end
return s
except .. as e, m

View File

@ -155,7 +155,9 @@ class Matter_Plugin_Root : Matter_Plugin
if attribute == 0x0000 # ---------- NOCs / list[NOCStruct] ----------
var nocl = TLV.Matter_TLV_array() # NOCs, p.711
for loc_fabric: self.device.sessions.active_fabrics()
var fabs = ctx.fabric_filtered ? [session.get_fabric()] : self.device.sessions.active_fabrics()
for loc_fabric: fabs
if loc_fabric == nil continue end
var nocs = nocl.add_struct(nil)
nocs.add_TLV(1, TLV.B2, loc_fabric.get_noc()) # NOC
nocs.add_TLV(2, TLV.B2, loc_fabric.get_icac()) # ICAC
@ -164,7 +166,9 @@ class Matter_Plugin_Root : Matter_Plugin
return nocl
elif attribute == 0x0001 # ---------- Fabrics / list[FabricDescriptorStruct] ----------
var fabrics = TLV.Matter_TLV_array() # Fabrics, p.711
for loc_fabric: self.device.sessions.active_fabrics()
var fabs = ctx.fabric_filtered ? [session.get_fabric()] : self.device.sessions.active_fabrics()
for loc_fabric: fabs
if loc_fabric == nil continue end
var root_ca_tlv = TLV.parse(loc_fabric.get_ca())
var fab = fabrics.add_struct(nil) # encoding see p.303
fab.add_TLV(1, TLV.B2, root_ca_tlv.findsubval(9)) # RootPublicKey

View File

@ -254,7 +254,8 @@ class Matter_Session : Matter_Expirable
def get_icac() return self._fabric.icac end
def get_ipk_epoch_key() return self._fabric.ipk_epoch_key end
def get_fabric_id() return self._fabric.fabric_id end
def get_device_id() return self._fabric.device_id end
def get_fabric_index() return self._fabric ? self._fabric.fabric_index : nil end
def get_device_id() return self._fabric ? self._fabric.device_id : nil end
def get_fabric_compressed() return self._fabric.fabric_compressed end
def get_fabric_label() return self._fabric.fabric_label end
def get_admin_subject() return self._fabric.admin_subject end

View File

@ -69,18 +69,18 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
( &(const bvalue[19]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
/* K3 */ be_nested_str_weak(MTR_X3A_X20SEARCHING_X3A_X20destinationId_X3D),
/* K4 */ be_nested_str_weak(tohex),
/* K5 */ be_nested_str_weak(device),
/* K6 */ be_nested_str_weak(sessions),
/* K7 */ be_nested_str_weak(fabrics),
/* K8 */ be_nested_str_weak(noc),
/* K9 */ be_nested_str_weak(fabric_id),
/* K10 */ be_nested_str_weak(device_id),
/* K11 */ be_nested_str_weak(get_ca_pub),
/* K12 */ be_nested_str_weak(get_ipk_group_key),
/* K13 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20destinationMessage_X3D),
/* K2 */ be_nested_str_weak(loglevel),
/* K3 */ be_nested_str_weak(log),
/* K4 */ be_nested_str_weak(MTR_X3A_X20SEARCHING_X3A_X20destinationId_X3D),
/* K5 */ be_nested_str_weak(tohex),
/* K6 */ be_nested_str_weak(device),
/* K7 */ be_nested_str_weak(sessions),
/* K8 */ be_nested_str_weak(fabrics),
/* K9 */ be_nested_str_weak(noc),
/* K10 */ be_nested_str_weak(fabric_id),
/* K11 */ be_nested_str_weak(device_id),
/* K12 */ be_nested_str_weak(get_ca_pub),
/* K13 */ be_nested_str_weak(get_ipk_group_key),
/* K14 */ be_nested_str_weak(HMAC_SHA256),
/* K15 */ be_nested_str_weak(update),
/* K16 */ be_nested_str_weak(out),
@ -89,77 +89,80 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
}),
be_str_weak(find_fabric_by_destination_id),
&be_const_str_solidified,
( &(const binstruction[70]) { /* code */
( &(const binstruction[73]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x8C100902, // 0002 GETMET R4 R4 K2
0x8C180304, // 0003 GETMET R6 R1 K4
0x7C180200, // 0004 CALL R6 1
0x001A0606, // 0005 ADD R6 K3 R6
0x541E0003, // 0006 LDINT R7 4
0x7C100600, // 0007 CALL R4 3
0x60100010, // 0008 GETGBL R4 G16
0x88140105, // 0009 GETMBR R5 R0 K5
0x88140B06, // 000A GETMBR R5 R5 K6
0x88140B07, // 000B GETMBR R5 R5 K7
0x7C100200, // 000C CALL R4 1
0xA8020032, // 000D EXBLK 0 #0041
0x5C140800, // 000E MOVE R5 R4
0x7C140000, // 000F CALL R5 0
0x88180B08, // 0010 GETMBR R6 R5 K8
0x4C1C0000, // 0011 LDNIL R7
0x1C180C07, // 0012 EQ R6 R6 R7
0x741A0007, // 0013 JMPT R6 #001C
0x88180B09, // 0014 GETMBR R6 R5 K9
0x4C1C0000, // 0015 LDNIL R7
0x1C180C07, // 0016 EQ R6 R6 R7
0x741A0003, // 0017 JMPT R6 #001C
0x88180B0A, // 0018 GETMBR R6 R5 K10
0x4C1C0000, // 0019 LDNIL R7
0x1C180C07, // 001A EQ R6 R6 R7
0x781A0000, // 001B JMPF R6 #001D
0x7001FFF0, // 001C JMP #000E
0x8C180B0B, // 001D GETMET R6 R5 K11
0x7C180200, // 001E CALL R6 1
0x00180406, // 001F ADD R6 R2 R6
0x881C0B09, // 0020 GETMBR R7 R5 K9
0x00180C07, // 0021 ADD R6 R6 R7
0x881C0B0A, // 0022 GETMBR R7 R5 K10
0x00180C07, // 0023 ADD R6 R6 R7
0x8C1C0B0C, // 0024 GETMET R7 R5 K12
0x7C1C0200, // 0025 CALL R7 1
0xB8220200, // 0026 GETNGBL R8 K1
0x8C201102, // 0027 GETMET R8 R8 K2
0x8C280D04, // 0028 GETMET R10 R6 K4
0x7C280200, // 0029 CALL R10 1
0x002A1A0A, // 002A ADD R10 K13 R10
0x542E0003, // 002B LDINT R11 4
0x7C200600, // 002C CALL R8 3
0x8C20070E, // 002D GETMET R8 R3 K14
0x5C280E00, // 002E MOVE R10 R7
0x7C200400, // 002F CALL R8 2
0x8C24110F, // 0030 GETMET R9 R8 K15
0x5C2C0C00, // 0031 MOVE R11 R6
0x7C240400, // 0032 CALL R9 2
0x8C241110, // 0033 GETMET R9 R8 K16
0x7C240200, // 0034 CALL R9 1
0xB82A0200, // 0035 GETNGBL R10 K1
0x8C281502, // 0036 GETMET R10 R10 K2
0x8C301304, // 0037 GETMET R12 R9 K4
0x7C300200, // 0038 CALL R12 1
0x0032220C, // 0039 ADD R12 K17 R12
0x54360003, // 003A LDINT R13 4
0x7C280600, // 003B CALL R10 3
0x1C281201, // 003C EQ R10 R9 R1
0x782A0001, // 003D JMPF R10 #0040
0xA8040001, // 003E EXBLK 1 1
0x80040A00, // 003F RET 1 R5
0x7001FFCC, // 0040 JMP #000E
0x58100012, // 0041 LDCONST R4 K18
0xAC100200, // 0042 CATCH R4 1 0
0xB0080000, // 0043 RAISE 2 R0 R0
0x4C100000, // 0044 LDNIL R4
0x80040800, // 0045 RET 1 R4
0x541A0003, // 0003 LDINT R6 4
0x7C100400, // 0004 CALL R4 2
0x78120006, // 0005 JMPF R4 #000D
0xB8120200, // 0006 GETNGBL R4 K1
0x8C100903, // 0007 GETMET R4 R4 K3
0x8C180305, // 0008 GETMET R6 R1 K5
0x7C180200, // 0009 CALL R6 1
0x001A0806, // 000A ADD R6 K4 R6
0x541E0003, // 000B LDINT R7 4
0x7C100600, // 000C CALL R4 3
0x60100010, // 000D GETGBL R4 G16
0x88140106, // 000E GETMBR R5 R0 K6
0x88140B07, // 000F GETMBR R5 R5 K7
0x88140B08, // 0010 GETMBR R5 R5 K8
0x7C100200, // 0011 CALL R4 1
0xA8020030, // 0012 EXBLK 0 #0044
0x5C140800, // 0013 MOVE R5 R4
0x7C140000, // 0014 CALL R5 0
0x88180B09, // 0015 GETMBR R6 R5 K9
0x4C1C0000, // 0016 LDNIL R7
0x1C180C07, // 0017 EQ R6 R6 R7
0x741A0007, // 0018 JMPT R6 #0021
0x88180B0A, // 0019 GETMBR R6 R5 K10
0x4C1C0000, // 001A LDNIL R7
0x1C180C07, // 001B EQ R6 R6 R7
0x741A0003, // 001C JMPT R6 #0021
0x88180B0B, // 001D GETMBR R6 R5 K11
0x4C1C0000, // 001E LDNIL R7
0x1C180C07, // 001F EQ R6 R6 R7
0x781A0000, // 0020 JMPF R6 #0022
0x7001FFF0, // 0021 JMP #0013
0x8C180B0C, // 0022 GETMET R6 R5 K12
0x7C180200, // 0023 CALL R6 1
0x00180406, // 0024 ADD R6 R2 R6
0x881C0B0A, // 0025 GETMBR R7 R5 K10
0x00180C07, // 0026 ADD R6 R6 R7
0x881C0B0B, // 0027 GETMBR R7 R5 K11
0x00180C07, // 0028 ADD R6 R6 R7
0x8C1C0B0D, // 0029 GETMET R7 R5 K13
0x7C1C0200, // 002A CALL R7 1
0x8C20070E, // 002B GETMET R8 R3 K14
0x5C280E00, // 002C MOVE R10 R7
0x7C200400, // 002D CALL R8 2
0x8C24110F, // 002E GETMET R9 R8 K15
0x5C2C0C00, // 002F MOVE R11 R6
0x7C240400, // 0030 CALL R9 2
0x8C241110, // 0031 GETMET R9 R8 K16
0x7C240200, // 0032 CALL R9 1
0xB82A0200, // 0033 GETNGBL R10 K1
0x8C281502, // 0034 GETMET R10 R10 K2
0x54320003, // 0035 LDINT R12 4
0x7C280400, // 0036 CALL R10 2
0x782A0006, // 0037 JMPF R10 #003F
0xB82A0200, // 0038 GETNGBL R10 K1
0x8C281503, // 0039 GETMET R10 R10 K3
0x8C301305, // 003A GETMET R12 R9 K5
0x7C300200, // 003B CALL R12 1
0x0032220C, // 003C ADD R12 K17 R12
0x54360003, // 003D LDINT R13 4
0x7C280600, // 003E CALL R10 3
0x1C281201, // 003F EQ R10 R9 R1
0x782A0001, // 0040 JMPF R10 #0043
0xA8040001, // 0041 EXBLK 1 1
0x80040A00, // 0042 RET 1 R5
0x7001FFCE, // 0043 JMP #0013
0x58100012, // 0044 LDCONST R4 K18
0xAC100200, // 0045 CATCH R4 1 0
0xB0080000, // 0046 RAISE 2 R0 R0
0x4C100000, // 0047 LDNIL R4
0x80040800, // 0048 RET 1 R4
})
)
);

View File

@ -2429,7 +2429,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
),
}),
1, /* has constants */
( &(const bvalue[23]) { /* constants */
( &(const bvalue[24]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(get_active_endpoints),
/* K2 */ be_nested_str_weak(matter),
@ -2440,23 +2440,24 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
/* K7 */ be_nested_str_weak(endpoint),
/* K8 */ be_nested_str_weak(cluster),
/* K9 */ be_nested_str_weak(attribute),
/* K10 */ be_nested_str_weak(status),
/* K11 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
/* K12 */ be_nested_str_weak(get_attribute_name),
/* K13 */ be_nested_str_weak(tasmota),
/* K14 */ be_nested_str_weak(log),
/* K15 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s),
/* K16 */ be_nested_str_weak(local_session_id),
/* K17 */ be_nested_str_weak(_X20_X28),
/* K18 */ be_nested_str_weak(_X29),
/* K19 */ be_nested_str_weak(),
/* K20 */ be_const_int(3),
/* K21 */ be_nested_str_weak(process_attribute_expansion),
/* K22 */ be_nested_str_weak(stop_iteration),
/* K10 */ be_nested_str_weak(fabric_filtered),
/* K11 */ be_nested_str_weak(status),
/* K12 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
/* K13 */ be_nested_str_weak(get_attribute_name),
/* K14 */ be_nested_str_weak(tasmota),
/* K15 */ be_nested_str_weak(log),
/* K16 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s),
/* K17 */ be_nested_str_weak(local_session_id),
/* K18 */ be_nested_str_weak(_X20_X28),
/* K19 */ be_nested_str_weak(_X29),
/* K20 */ be_nested_str_weak(),
/* K21 */ be_const_int(3),
/* K22 */ be_nested_str_weak(process_attribute_expansion),
/* K23 */ be_nested_str_weak(stop_iteration),
}),
be_str_weak(_inner_process_read_request),
&be_const_str_solidified,
( &(const binstruction[93]) { /* code */
( &(const binstruction[95]) { /* code */
0x84100000, // 0000 CLOSURE R4 P0
0x88140100, // 0001 GETMBR R5 R0 K0
0x8C140B01, // 0002 GETMET R5 R5 K1
@ -2473,7 +2474,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
0x60200010, // 000D GETGBL R8 G16
0x88240506, // 000E GETMBR R9 R2 K6
0x7C200200, // 000F CALL R8 1
0xA8020046, // 0010 EXBLK 0 #0058
0xA8020048, // 0010 EXBLK 0 #005A
0x5C241000, // 0011 MOVE R9 R8
0x7C240000, // 0012 CALL R9 0
0x88281307, // 0013 GETMBR R10 R9 K7
@ -2482,74 +2483,76 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
0x901A100A, // 0016 SETMBR R6 K8 R10
0x88281309, // 0017 GETMBR R10 R9 K9
0x901A120A, // 0018 SETMBR R6 K9 R10
0xB82A0400, // 0019 GETNGBL R10 K2
0x8828150B, // 001A GETMBR R10 R10 K11
0x901A140A, // 001B SETMBR R6 K10 R10
0x88280D07, // 001C GETMBR R10 R6 K7
0x4C2C0000, // 001D LDNIL R11
0x1C28140B, // 001E EQ R10 R10 R11
0x742A0007, // 001F JMPT R10 #0028
0x88280D08, // 0020 GETMBR R10 R6 K8
0x4C2C0000, // 0021 LDNIL R11
0x1C28140B, // 0022 EQ R10 R10 R11
0x742A0003, // 0023 JMPT R10 #0028
0x88280D09, // 0024 GETMBR R10 R6 K9
0x4C2C0000, // 0025 LDNIL R11
0x1C28140B, // 0026 EQ R10 R10 R11
0x782A0029, // 0027 JMPF R10 #0052
0x88280D08, // 0028 GETMBR R10 R6 K8
0x4C2C0000, // 0029 LDNIL R11
0x2028140B, // 002A NE R10 R10 R11
0x782A001A, // 002B JMPF R10 #0047
0x88280D09, // 002C GETMBR R10 R6 K9
0x4C2C0000, // 002D LDNIL R11
0x2028140B, // 002E NE R10 R10 R11
0x782A0016, // 002F JMPF R10 #0047
0xB82A0400, // 0030 GETNGBL R10 K2
0x8C28150C, // 0031 GETMET R10 R10 K12
0x88300D08, // 0032 GETMBR R12 R6 K8
0x88340D09, // 0033 GETMBR R13 R6 K9
0x7C280600, // 0034 CALL R10 3
0xB82E1A00, // 0035 GETNGBL R11 K13
0x8C2C170E, // 0036 GETMET R11 R11 K14
0x60340018, // 0037 GETGBL R13 G24
0x5838000F, // 0038 LDCONST R14 K15
0x883C0310, // 0039 GETMBR R15 R1 K16
0x60400008, // 003A GETGBL R16 G8
0x5C440C00, // 003B MOVE R17 R6
0x7C400200, // 003C CALL R16 1
0x782A0002, // 003D JMPF R10 #0041
0x0046220A, // 003E ADD R17 K17 R10
0x00442312, // 003F ADD R17 R17 K18
0x70020000, // 0040 JMP #0042
0x58440013, // 0041 LDCONST R17 K19
0x00402011, // 0042 ADD R16 R16 R17
0x7C340600, // 0043 CALL R13 3
0x58380014, // 0044 LDCONST R14 K20
0x7C2C0600, // 0045 CALL R11 3
0x7002000A, // 0046 JMP #0052
0xB82A1A00, // 0047 GETNGBL R10 K13
0x8C28150E, // 0048 GETMET R10 R10 K14
0x60300018, // 0049 GETGBL R12 G24
0x5834000F, // 004A LDCONST R13 K15
0x88380310, // 004B GETMBR R14 R1 K16
0x603C0008, // 004C GETGBL R15 G8
0x5C400C00, // 004D MOVE R16 R6
0x7C3C0200, // 004E CALL R15 1
0x7C300600, // 004F CALL R12 3
0x58340014, // 0050 LDCONST R13 K20
0x7C280600, // 0051 CALL R10 3
0x88280100, // 0052 GETMBR R10 R0 K0
0x8C281515, // 0053 GETMET R10 R10 K21
0x5C300C00, // 0054 MOVE R12 R6
0x84340001, // 0055 CLOSURE R13 P1
0x7C280600, // 0056 CALL R10 3
0x7001FFB8, // 0057 JMP #0011
0x58200016, // 0058 LDCONST R8 K22
0xAC200200, // 0059 CATCH R8 1 0
0xB0080000, // 005A RAISE 2 R0 R0
0xA0000000, // 005B CLOSE R0
0x80040E00, // 005C RET 1 R7
0x8828050A, // 0019 GETMBR R10 R2 K10
0x901A140A, // 001A SETMBR R6 K10 R10
0xB82A0400, // 001B GETNGBL R10 K2
0x8828150C, // 001C GETMBR R10 R10 K12
0x901A160A, // 001D SETMBR R6 K11 R10
0x88280D07, // 001E GETMBR R10 R6 K7
0x4C2C0000, // 001F LDNIL R11
0x1C28140B, // 0020 EQ R10 R10 R11
0x742A0007, // 0021 JMPT R10 #002A
0x88280D08, // 0022 GETMBR R10 R6 K8
0x4C2C0000, // 0023 LDNIL R11
0x1C28140B, // 0024 EQ R10 R10 R11
0x742A0003, // 0025 JMPT R10 #002A
0x88280D09, // 0026 GETMBR R10 R6 K9
0x4C2C0000, // 0027 LDNIL R11
0x1C28140B, // 0028 EQ R10 R10 R11
0x782A0029, // 0029 JMPF R10 #0054
0x88280D08, // 002A GETMBR R10 R6 K8
0x4C2C0000, // 002B LDNIL R11
0x2028140B, // 002C NE R10 R10 R11
0x782A001A, // 002D JMPF R10 #0049
0x88280D09, // 002E GETMBR R10 R6 K9
0x4C2C0000, // 002F LDNIL R11
0x2028140B, // 0030 NE R10 R10 R11
0x782A0016, // 0031 JMPF R10 #0049
0xB82A0400, // 0032 GETNGBL R10 K2
0x8C28150D, // 0033 GETMET R10 R10 K13
0x88300D08, // 0034 GETMBR R12 R6 K8
0x88340D09, // 0035 GETMBR R13 R6 K9
0x7C280600, // 0036 CALL R10 3
0xB82E1C00, // 0037 GETNGBL R11 K14
0x8C2C170F, // 0038 GETMET R11 R11 K15
0x60340018, // 0039 GETGBL R13 G24
0x58380010, // 003A LDCONST R14 K16
0x883C0311, // 003B GETMBR R15 R1 K17
0x60400008, // 003C GETGBL R16 G8
0x5C440C00, // 003D MOVE R17 R6
0x7C400200, // 003E CALL R16 1
0x782A0002, // 003F JMPF R10 #0043
0x0046240A, // 0040 ADD R17 K18 R10
0x00442313, // 0041 ADD R17 R17 K19
0x70020000, // 0042 JMP #0044
0x58440014, // 0043 LDCONST R17 K20
0x00402011, // 0044 ADD R16 R16 R17
0x7C340600, // 0045 CALL R13 3
0x58380015, // 0046 LDCONST R14 K21
0x7C2C0600, // 0047 CALL R11 3
0x7002000A, // 0048 JMP #0054
0xB82A1C00, // 0049 GETNGBL R10 K14
0x8C28150F, // 004A GETMET R10 R10 K15
0x60300018, // 004B GETGBL R12 G24
0x58340010, // 004C LDCONST R13 K16
0x88380311, // 004D GETMBR R14 R1 K17
0x603C0008, // 004E GETGBL R15 G8
0x5C400C00, // 004F MOVE R16 R6
0x7C3C0200, // 0050 CALL R15 1
0x7C300600, // 0051 CALL R12 3
0x58340015, // 0052 LDCONST R13 K21
0x7C280600, // 0053 CALL R10 3
0x88280100, // 0054 GETMBR R10 R0 K0
0x8C281516, // 0055 GETMET R10 R10 K22
0x5C300C00, // 0056 MOVE R12 R6
0x84340001, // 0057 CLOSURE R13 P1
0x7C280600, // 0058 CALL R10 3
0x7001FFB6, // 0059 JMP #0011
0x58200017, // 005A LDCONST R8 K23
0xAC200200, // 005B CATCH R8 1 0
0xB0080000, // 005C RAISE 2 R0 R0
0xA0000000, // 005D CLOSE R0
0x80040E00, // 005E RET 1 R7
})
)
);
@ -3271,7 +3274,7 @@ be_local_closure(Matter_IM_expire_sendqueue, /* name */
********************************************************************/
be_local_closure(Matter_IM_subscribe_request, /* name */
be_nested_proto(
17, /* nstack */
18, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
@ -3279,7 +3282,7 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[30]) { /* constants */
( &(const bvalue[33]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(SubscribeRequestMessage),
/* K2 */ be_nested_str_weak(from_TLV),
@ -3298,7 +3301,7 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
/* K15 */ be_nested_str_weak(stop_iteration),
/* K16 */ be_nested_str_weak(tasmota),
/* K17 */ be_nested_str_weak(log),
/* K18 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X256i_X29_X20_X25s_X20_X28min_X3D_X25i_X2C_X20max_X3D_X25i_X2C_X20keep_X3D_X25i_X29_X20sub_X3D_X25i),
/* K18 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X256i_X29_X20_X25s_X20_X28min_X3D_X25i_X2C_X20max_X3D_X25i_X2C_X20keep_X3D_X25i_X29_X20sub_X3D_X25i_X20fabric_filtered_X3D_X25s),
/* K19 */ be_nested_str_weak(local_session_id),
/* K20 */ be_nested_str_weak(concat),
/* K21 */ be_nested_str_weak(_X20),
@ -3307,13 +3310,16 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
/* K24 */ be_const_int(1),
/* K25 */ be_const_int(0),
/* K26 */ be_nested_str_weak(subscription_id),
/* K27 */ be_const_int(3),
/* K28 */ be_nested_str_weak(_inner_process_read_request),
/* K29 */ be_nested_str_weak(send_subscribe_response),
/* K27 */ be_nested_str_weak(fabric_filtered),
/* K28 */ be_const_int(3),
/* K29 */ be_nested_str_weak(event_requests),
/* K30 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X28_X25_X256i_X29_X20event_requests_size_X3D_X25s),
/* K31 */ be_nested_str_weak(_inner_process_read_request),
/* K32 */ be_nested_str_weak(send_subscribe_response),
}),
be_str_weak(subscribe_request),
&be_const_str_solidified,
( &(const binstruction[78]) { /* code */
( &(const binstruction[98]) { /* code */
0xB80E0000, // 0000 GETNGBL R3 K0
0x8C0C0701, // 0001 GETMET R3 R3 K1
0x7C0C0200, // 0002 CALL R3 1
@ -3375,23 +3381,43 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
0x70020000, // 003A JMP #003C
0x583C0019, // 003B LDCONST R15 K25
0x8840091A, // 003C GETMBR R16 R4 K26
0x7C240E00, // 003D CALL R9 7
0x5828001B, // 003E LDCONST R10 K27
0x7C1C0600, // 003F CALL R7 3
0x8C1C011C, // 0040 GETMET R7 R0 K28
0x88240306, // 0041 GETMBR R9 R1 K6
0x5C280600, // 0042 MOVE R10 R3
0x502C0200, // 0043 LDBOOL R11 1 0
0x7C1C0800, // 0044 CALL R7 4
0x8820091A, // 0045 GETMBR R8 R4 K26
0x901E3408, // 0046 SETMBR R7 K26 R8
0x8C20011D, // 0047 GETMET R8 R0 K29
0x5C280200, // 0048 MOVE R10 R1
0x5C2C0E00, // 0049 MOVE R11 R7
0x5C300800, // 004A MOVE R12 R4
0x7C200800, // 004B CALL R8 4
0x50200200, // 004C LDBOOL R8 1 0
0x80041000, // 004D RET 1 R8
0x8844071B, // 003D GETMBR R17 R3 K27
0x7C241000, // 003E CALL R9 8
0x5828001C, // 003F LDCONST R10 K28
0x7C1C0600, // 0040 CALL R7 3
0x881C071D, // 0041 GETMBR R7 R3 K29
0x4C200000, // 0042 LDNIL R8
0x201C0E08, // 0043 NE R7 R7 R8
0x781E000E, // 0044 JMPF R7 #0054
0x601C000C, // 0045 GETGBL R7 G12
0x8820071D, // 0046 GETMBR R8 R3 K29
0x7C1C0200, // 0047 CALL R7 1
0x241C0F19, // 0048 GT R7 R7 K25
0x781E0009, // 0049 JMPF R7 #0054
0xB81E2000, // 004A GETNGBL R7 K16
0x8C1C0F11, // 004B GETMET R7 R7 K17
0x60240018, // 004C GETGBL R9 G24
0x5828001E, // 004D LDCONST R10 K30
0x602C000C, // 004E GETGBL R11 G12
0x8830071D, // 004F GETMBR R12 R3 K29
0x7C2C0200, // 0050 CALL R11 1
0x7C240400, // 0051 CALL R9 2
0x5828001C, // 0052 LDCONST R10 K28
0x7C1C0600, // 0053 CALL R7 3
0x8C1C011F, // 0054 GETMET R7 R0 K31
0x88240306, // 0055 GETMBR R9 R1 K6
0x5C280600, // 0056 MOVE R10 R3
0x502C0200, // 0057 LDBOOL R11 1 0
0x7C1C0800, // 0058 CALL R7 4
0x8820091A, // 0059 GETMBR R8 R4 K26
0x901E3408, // 005A SETMBR R7 K26 R8
0x8C200120, // 005B GETMET R8 R0 K32
0x5C280200, // 005C MOVE R10 R1
0x5C2C0E00, // 005D MOVE R11 R7
0x5C300800, // 005E MOVE R12 R4
0x7C200800, // 005F CALL R8 4
0x50200200, // 0060 LDBOOL R8 1 0
0x80041000, // 0061 RET 1 R8
})
)
);

View File

@ -19,7 +19,7 @@ be_local_closure(Matter_Path_tostring, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(),
/* K1 */ be_nested_str_weak(endpoint),
/* K2 */ be_nested_str_weak(_X5B_X2502X_X5D),
@ -30,14 +30,16 @@ be_local_closure(Matter_Path_tostring, /* name */
/* K7 */ be_nested_str_weak(attribute),
/* K8 */ be_nested_str_weak(_X2504X),
/* K9 */ be_nested_str_weak(command),
/* K10 */ be_nested_str_weak(_X2A_X2A_X2A_X2A),
/* K11 */ be_nested_str_weak(Exception_X3E_X20),
/* K12 */ be_nested_str_weak(_X2C_X20),
/* K10 */ be_nested_str_weak(fabric_filtered),
/* K11 */ be_nested_str_weak(_X21),
/* K12 */ be_nested_str_weak(_X2A_X2A_X2A_X2A),
/* K13 */ be_nested_str_weak(Exception_X3E_X20),
/* K14 */ be_nested_str_weak(_X2C_X20),
}),
be_str_weak(tostring),
&be_const_str_solidified,
( &(const binstruction[74]) { /* code */
0xA8020039, // 0000 EXBLK 0 #003B
( &(const binstruction[77]) { /* code */
0xA802003C, // 0000 EXBLK 0 #003E
0x58040000, // 0001 LDCONST R1 K0
0x88080101, // 0002 GETMBR R2 R0 K1
0x4C0C0000, // 0003 LDNIL R3
@ -83,34 +85,37 @@ be_local_closure(Matter_Path_tostring, /* name */
0x70020000, // 002B JMP #002D
0x58080000, // 002C LDCONST R2 K0
0x00040202, // 002D ADD R1 R1 R2
0x88080107, // 002E GETMBR R2 R0 K7
0x4C0C0000, // 002F LDNIL R3
0x1C080403, // 0030 EQ R2 R2 R3
0x780A0004, // 0031 JMPF R2 #0037
0x88080109, // 0032 GETMBR R2 R0 K9
0x4C0C0000, // 0033 LDNIL R3
0x1C080403, // 0034 EQ R2 R2 R3
0x780A0000, // 0035 JMPF R2 #0037
0x0004030A, // 0036 ADD R1 R1 K10
0xA8040001, // 0037 EXBLK 1 1
0x80040200, // 0038 RET 1 R1
0xA8040001, // 0039 EXBLK 1 1
0x7002000D, // 003A JMP #0049
0xAC040002, // 003B CATCH R1 0 2
0x7002000A, // 003C JMP #0048
0x600C0008, // 003D GETGBL R3 G8
0x5C100200, // 003E MOVE R4 R1
0x7C0C0200, // 003F CALL R3 1
0x000E1603, // 0040 ADD R3 K11 R3
0x000C070C, // 0041 ADD R3 R3 K12
0x60100008, // 0042 GETGBL R4 G8
0x5C140400, // 0043 MOVE R5 R2
0x7C100200, // 0044 CALL R4 1
0x000C0604, // 0045 ADD R3 R3 R4
0x80040600, // 0046 RET 1 R3
0x70020000, // 0047 JMP #0049
0xB0080000, // 0048 RAISE 2 R0 R0
0x80000000, // 0049 RET 0
0x8808010A, // 002E GETMBR R2 R0 K10
0x780A0000, // 002F JMPF R2 #0031
0x0004030B, // 0030 ADD R1 R1 K11
0x88080107, // 0031 GETMBR R2 R0 K7
0x4C0C0000, // 0032 LDNIL R3
0x1C080403, // 0033 EQ R2 R2 R3
0x780A0004, // 0034 JMPF R2 #003A
0x88080109, // 0035 GETMBR R2 R0 K9
0x4C0C0000, // 0036 LDNIL R3
0x1C080403, // 0037 EQ R2 R2 R3
0x780A0000, // 0038 JMPF R2 #003A
0x0004030C, // 0039 ADD R1 R1 K12
0xA8040001, // 003A EXBLK 1 1
0x80040200, // 003B RET 1 R1
0xA8040001, // 003C EXBLK 1 1
0x7002000D, // 003D JMP #004C
0xAC040002, // 003E CATCH R1 0 2
0x7002000A, // 003F JMP #004B
0x600C0008, // 0040 GETGBL R3 G8
0x5C100200, // 0041 MOVE R4 R1
0x7C0C0200, // 0042 CALL R3 1
0x000E1A03, // 0043 ADD R3 K13 R3
0x000C070E, // 0044 ADD R3 R3 K14
0x60100008, // 0045 GETGBL R4 G8
0x5C140400, // 0046 MOVE R5 R2
0x7C100200, // 0047 CALL R4 1
0x000C0604, // 0048 ADD R3 R3 R4
0x80040600, // 0049 RET 1 R3
0x70020000, // 004A JMP #004C
0xB0080000, // 004B RAISE 2 R0 R0
0x80000000, // 004C RET 0
})
)
);