Matter better logging for subscriptions (#18275)

This commit is contained in:
s-hadinger 2023-03-26 23:20:14 +02:00 committed by GitHub
parent 25b9bef597
commit 9c01c3f6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 235 additions and 132 deletions

View File

@ -90,7 +90,7 @@ class Matter_Device
self.plugins.push(matter.Plugin_OnOff(self, 1, 0#-tasmota relay 1-#))
# self.plugins.push(matter.Plugin_OnOff(self, 2, 1#-tasmota relay 2-#))
# self.plugins.push(matter.Plugin_Light3(self, 1))
# self.plugins.push(matter.Plugin_Temp_Sensor(self, 1, "ESP32#Temperature"))
# self.plugins.push(matter.Plugin_Temp_Sensor(self, 10, "ESP32#Temperature"))
# for now read sensors every 5 seconds
tasmota.add_cron("*/5 * * * * *", def () self.trigger_read_sensors() end, "matter_sensors_5s")

View File

@ -168,9 +168,10 @@ class Matter_IM
var status = val.findsubval(0, 0xFF)
var message = self.find_sendqueue_by_exchangeid(msg.exchange_id)
if status == matter.SUCCESS
tasmota.log("MTR: >Status_OK", 2) # don't show 'SUCCESS' to not overflow logs with non-information
if message
return message.status_ok_received(msg) # re-arm the sending of next packets for the same exchange
else
tasmota.log("MTR: >Status_OK", 2) # don't show 'SUCCESS' to not overflow logs with non-information
end
else
# error
@ -307,8 +308,21 @@ class Matter_IM
end
tasmota.log("MTR: received SubscribeRequestMessage=" + str(query), 3)
var sub = self.subs.new_subscription(msg.session, query)
tasmota.log("MTR: >Subscribe sub_id=" + str(sub.subscription_id), 2)
# expand a string with all attributes requested
var attr_req = []
var ctx = matter.Path()
for q:query.attributes_requests
ctx.endpoint = q.endpoint
ctx.cluster = q.cluster
ctx.attribute = q.attribute
attr_req.push(str(ctx))
end
tasmota.log(string.format("MTR: >Subscribe %s (min=%i, max=%i) sub_id=%i",
attr_req.concat(" "), sub.min_interval, sub.max_interval, sub.subscription_id), 2)
var ret = self._inner_process_read_request(msg.session, query)
# ret is of type `Matter_ReportDataMessage`
ret.subscription_id = sub.subscription_id # enrich with subscription id TODO

View File

@ -292,6 +292,8 @@ class Matter_IM_ReportDataSubscribed : Matter_IM_ReportData
# ack received for previous message, proceed to next (if any)
# return true if we manage the ack ourselves, false if it needs to be done upper
def status_ok_received(msg)
import string
# tasmota.log(string.format("MTR: >Sub_OK sub_id="+str(self.sub.subscription_id)), 2)
if self.report_data_phase
return super(self).status_ok_received(msg)
else
@ -376,7 +378,9 @@ class Matter_IM_SubscribeResponse : Matter_IM_ReportData
# Status ok received
def status_ok_received(msg)
import string
# once we receive ack, open flow for subscriptions
tasmota.log(string.format("MTR: >Sub_OK sub_id="+str(self.sub.subscription_id)), 2)
return super(self).status_ok_received(msg)
end

View File

@ -96,10 +96,12 @@ class Matter_IM_Subscription
# we received a complete ack for previous message, rearm
def re_arm()
import string
self.wait_status = false
var now = tasmota.millis()
self.expiration = now + (self.max_interval - self.MAX_INTERVAL_MARGIN) * 1000
self.not_before = now + self.min_interval * 1000 - 1
tasmota.log(string.format("MTR: >Sub_Done sub_id="+str(self.subscription_id)), 2)
end
# signal that an attribute was updated, to add to the list of reportable

View File

@ -479,7 +479,7 @@ be_local_closure(Matter_IM_process_write_request, /* name */
********************************************************************/
be_local_closure(Matter_IM_subscribe_request, /* name */
be_nested_proto(
12, /* nstack */
17, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
@ -487,7 +487,7 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[18]) { /* constants */
( &(const bvalue[30]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(SubscribeRequestMessage),
@ -501,15 +501,27 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
/* K10 */ be_nested_str_weak(MTR_X3A_X20received_X20SubscribeRequestMessage_X3D),
/* K11 */ be_const_int(3),
/* K12 */ be_nested_str_weak(new_subscription),
/* K13 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20sub_id_X3D),
/* K14 */ be_nested_str_weak(subscription_id),
/* K15 */ be_const_int(2),
/* K16 */ be_nested_str_weak(_inner_process_read_request),
/* K17 */ be_nested_str_weak(send_subscribe_response),
/* K13 */ be_nested_str_weak(Path),
/* K14 */ be_nested_str_weak(attributes_requests),
/* K15 */ be_nested_str_weak(endpoint),
/* K16 */ be_nested_str_weak(cluster),
/* K17 */ be_nested_str_weak(attribute),
/* K18 */ be_nested_str_weak(push),
/* K19 */ be_nested_str_weak(stop_iteration),
/* K20 */ be_nested_str_weak(format),
/* K21 */ be_nested_str_weak(MTR_X3A_X20_X3ESubscribe_X20_X25s_X20_X28min_X3D_X25i_X2C_X20max_X3D_X25i_X29_X20sub_id_X3D_X25i),
/* K22 */ be_nested_str_weak(concat),
/* K23 */ be_nested_str_weak(_X20),
/* K24 */ be_nested_str_weak(min_interval),
/* K25 */ be_nested_str_weak(max_interval),
/* K26 */ be_nested_str_weak(subscription_id),
/* K27 */ be_const_int(2),
/* K28 */ be_nested_str_weak(_inner_process_read_request),
/* K29 */ be_nested_str_weak(send_subscribe_response),
}),
be_str_weak(subscribe_request),
&be_const_str_solidified,
( &(const binstruction[47]) { /* code */
( &(const binstruction[78]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x8C100902, // 0002 GETMET R4 R4 K2
@ -536,27 +548,58 @@ be_local_closure(Matter_IM_subscribe_request, /* name */
0x881C0307, // 0017 GETMBR R7 R1 K7
0x5C200800, // 0018 MOVE R8 R4
0x7C140600, // 0019 CALL R5 3
0xB81A1000, // 001A GETNGBL R6 K8
0x8C180D09, // 001B GETMET R6 R6 K9
0x60200008, // 001C GETGBL R8 G8
0x88240B0E, // 001D GETMBR R9 R5 K14
0x7C200200, // 001E CALL R8 1
0x00221A08, // 001F ADD R8 K13 R8
0x5824000F, // 0020 LDCONST R9 K15
0x7C180600, // 0021 CALL R6 3
0x8C180110, // 0022 GETMET R6 R0 K16
0x88200307, // 0023 GETMBR R8 R1 K7
0x5C240800, // 0024 MOVE R9 R4
0x7C180600, // 0025 CALL R6 3
0x881C0B0E, // 0026 GETMBR R7 R5 K14
0x901A1C07, // 0027 SETMBR R6 K14 R7
0x8C1C0111, // 0028 GETMET R7 R0 K17
0x5C240200, // 0029 MOVE R9 R1
0x5C280C00, // 002A MOVE R10 R6
0x5C2C0A00, // 002B MOVE R11 R5
0x7C1C0800, // 002C CALL R7 4
0x501C0200, // 002D LDBOOL R7 1 0
0x80040E00, // 002E RET 1 R7
0x60180012, // 001A GETGBL R6 G18
0x7C180000, // 001B CALL R6 0
0xB81E0200, // 001C GETNGBL R7 K1
0x8C1C0F0D, // 001D GETMET R7 R7 K13
0x7C1C0200, // 001E CALL R7 1
0x60200010, // 001F GETGBL R8 G16
0x8824090E, // 0020 GETMBR R9 R4 K14
0x7C200200, // 0021 CALL R8 1
0xA802000D, // 0022 EXBLK 0 #0031
0x5C241000, // 0023 MOVE R9 R8
0x7C240000, // 0024 CALL R9 0
0x8828130F, // 0025 GETMBR R10 R9 K15
0x901E1E0A, // 0026 SETMBR R7 K15 R10
0x88281310, // 0027 GETMBR R10 R9 K16
0x901E200A, // 0028 SETMBR R7 K16 R10
0x88281311, // 0029 GETMBR R10 R9 K17
0x901E220A, // 002A SETMBR R7 K17 R10
0x8C280D12, // 002B GETMET R10 R6 K18
0x60300008, // 002C GETGBL R12 G8
0x5C340E00, // 002D MOVE R13 R7
0x7C300200, // 002E CALL R12 1
0x7C280400, // 002F CALL R10 2
0x7001FFF1, // 0030 JMP #0023
0x58200013, // 0031 LDCONST R8 K19
0xAC200200, // 0032 CATCH R8 1 0
0xB0080000, // 0033 RAISE 2 R0 R0
0xB8221000, // 0034 GETNGBL R8 K8
0x8C201109, // 0035 GETMET R8 R8 K9
0x8C280714, // 0036 GETMET R10 R3 K20
0x58300015, // 0037 LDCONST R12 K21
0x8C340D16, // 0038 GETMET R13 R6 K22
0x583C0017, // 0039 LDCONST R15 K23
0x7C340400, // 003A CALL R13 2
0x88380B18, // 003B GETMBR R14 R5 K24
0x883C0B19, // 003C GETMBR R15 R5 K25
0x88400B1A, // 003D GETMBR R16 R5 K26
0x7C280C00, // 003E CALL R10 6
0x582C001B, // 003F LDCONST R11 K27
0x7C200600, // 0040 CALL R8 3
0x8C20011C, // 0041 GETMET R8 R0 K28
0x88280307, // 0042 GETMBR R10 R1 K7
0x5C2C0800, // 0043 MOVE R11 R4
0x7C200600, // 0044 CALL R8 3
0x88240B1A, // 0045 GETMBR R9 R5 K26
0x90223409, // 0046 SETMBR R8 K26 R9
0x8C24011D, // 0047 GETMET R9 R0 K29
0x5C2C0200, // 0048 MOVE R11 R1
0x5C301000, // 0049 MOVE R12 R8
0x5C340A00, // 004A MOVE R13 R5
0x7C240800, // 004B CALL R9 4
0x50240200, // 004C LDBOOL R9 1 0
0x80041200, // 004D RET 1 R9
})
)
);
@ -621,11 +664,11 @@ be_local_closure(Matter_IM_process_status_response, /* name */
/* K4 */ be_nested_str_weak(exchange_id),
/* K5 */ be_nested_str_weak(matter),
/* K6 */ be_nested_str_weak(SUCCESS),
/* K7 */ be_nested_str_weak(tasmota),
/* K8 */ be_nested_str_weak(log),
/* K9 */ be_nested_str_weak(MTR_X3A_X20_X3EStatus_OK),
/* K10 */ be_const_int(2),
/* K11 */ be_nested_str_weak(status_ok_received),
/* K7 */ be_nested_str_weak(status_ok_received),
/* K8 */ be_nested_str_weak(tasmota),
/* K9 */ be_nested_str_weak(log),
/* K10 */ be_nested_str_weak(MTR_X3A_X20_X3EStatus_OK),
/* K11 */ be_const_int(2),
/* K12 */ be_nested_str_weak(format),
/* K13 */ be_nested_str_weak(MTR_X3A_X20_X3EStatus_X20_X20_X20_X20ERROR_X20_X3D_X200x_X2502X),
/* K14 */ be_nested_str_weak(status_error_received),
@ -633,7 +676,7 @@ be_local_closure(Matter_IM_process_status_response, /* name */
}),
be_str_weak(process_status_response),
&be_const_str_solidified,
( &(const binstruction[40]) { /* code */
( &(const binstruction[41]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0x8C100501, // 0001 GETMET R4 R2 K1
0x58180002, // 0002 LDCONST R6 K2
@ -645,35 +688,36 @@ be_local_closure(Matter_IM_process_status_response, /* name */
0xB81A0A00, // 0008 GETNGBL R6 K5
0x88180D06, // 0009 GETMBR R6 R6 K6
0x1C180806, // 000A EQ R6 R4 R6
0x781A000A, // 000B JMPF R6 #0017
0xB81A0E00, // 000C GETNGBL R6 K7
0x8C180D08, // 000D GETMET R6 R6 K8
0x58200009, // 000E LDCONST R8 K9
0x5824000A, // 000F LDCONST R9 K10
0x7C180600, // 0010 CALL R6 3
0x78160003, // 0011 JMPF R5 #0016
0x8C180B0B, // 0012 GETMET R6 R5 K11
0x5C200200, // 0013 MOVE R8 R1
0x7C180400, // 0014 CALL R6 2
0x80040C00, // 0015 RET 1 R6
0x7002000E, // 0016 JMP #0026
0xB81A0E00, // 0017 GETNGBL R6 K7
0x8C180D08, // 0018 GETMET R6 R6 K8
0x8C20070C, // 0019 GETMET R8 R3 K12
0x5828000D, // 001A LDCONST R10 K13
0x5C2C0800, // 001B MOVE R11 R4
0x7C200600, // 001C CALL R8 3
0x5824000A, // 001D LDCONST R9 K10
0x7C180600, // 001E CALL R6 3
0x78160005, // 001F JMPF R5 #0026
0x8C180B0E, // 0020 GETMET R6 R5 K14
0x5C200200, // 0021 MOVE R8 R1
0x7C180400, // 0022 CALL R6 2
0x8C18010F, // 0023 GETMET R6 R0 K15
0x88200304, // 0024 GETMBR R8 R1 K4
0x7C180400, // 0025 CALL R6 2
0x50180000, // 0026 LDBOOL R6 0 0
0x80040C00, // 0027 RET 1 R6
0x781A000B, // 000B JMPF R6 #0018
0x78160004, // 000C JMPF R5 #0012
0x8C180B07, // 000D GETMET R6 R5 K7
0x5C200200, // 000E MOVE R8 R1
0x7C180400, // 000F CALL R6 2
0x80040C00, // 0010 RET 1 R6
0x70020004, // 0011 JMP #0017
0xB81A1000, // 0012 GETNGBL R6 K8
0x8C180D09, // 0013 GETMET R6 R6 K9
0x5820000A, // 0014 LDCONST R8 K10
0x5824000B, // 0015 LDCONST R9 K11
0x7C180600, // 0016 CALL R6 3
0x7002000E, // 0017 JMP #0027
0xB81A1000, // 0018 GETNGBL R6 K8
0x8C180D09, // 0019 GETMET R6 R6 K9
0x8C20070C, // 001A GETMET R8 R3 K12
0x5828000D, // 001B LDCONST R10 K13
0x5C2C0800, // 001C MOVE R11 R4
0x7C200600, // 001D CALL R8 3
0x5824000B, // 001E LDCONST R9 K11
0x7C180600, // 001F CALL R6 3
0x78160005, // 0020 JMPF R5 #0027
0x8C180B0E, // 0021 GETMET R6 R5 K14
0x5C200200, // 0022 MOVE R8 R1
0x7C180400, // 0023 CALL R6 2
0x8C18010F, // 0024 GETMET R6 R0 K15
0x88200304, // 0025 GETMBR R8 R1 K4
0x7C180400, // 0026 CALL R6 2
0x50180000, // 0027 LDBOOL R6 0 0
0x80040C00, // 0028 RET 1 R6
})
)
);

View File

@ -926,7 +926,7 @@ be_local_closure(Matter_IM_ReportDataSubscribed_ack_received, /* name */
********************************************************************/
be_local_closure(Matter_IM_ReportDataSubscribed_status_ok_received, /* name */
be_nested_proto(
5, /* nstack */
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@ -934,32 +934,34 @@ be_local_closure(Matter_IM_ReportDataSubscribed_status_ok_received, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(report_data_phase),
/* K1 */ be_nested_str_weak(status_ok_received),
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(report_data_phase),
/* K2 */ be_nested_str_weak(status_ok_received),
}),
be_str_weak(status_ok_received),
&be_const_str_solidified,
( &(const binstruction[19]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x780A0007, // 0001 JMPF R2 #000A
0x60080003, // 0002 GETGBL R2 G3
0x5C0C0000, // 0003 MOVE R3 R0
0x7C080200, // 0004 CALL R2 1
0x8C080501, // 0005 GETMET R2 R2 K1
0x5C100200, // 0006 MOVE R4 R1
0x7C080400, // 0007 CALL R2 2
0x80040400, // 0008 RET 1 R2
0x70020007, // 0009 JMP #0012
0x60080003, // 000A GETGBL R2 G3
0x5C0C0000, // 000B MOVE R3 R0
0x7C080200, // 000C CALL R2 1
0x8C080501, // 000D GETMET R2 R2 K1
0x4C100000, // 000E LDNIL R4
0x7C080400, // 000F CALL R2 2
0x50080000, // 0010 LDBOOL R2 0 0
0x80040400, // 0011 RET 1 R2
0x80000000, // 0012 RET 0
( &(const binstruction[20]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x880C0101, // 0001 GETMBR R3 R0 K1
0x780E0007, // 0002 JMPF R3 #000B
0x600C0003, // 0003 GETGBL R3 G3
0x5C100000, // 0004 MOVE R4 R0
0x7C0C0200, // 0005 CALL R3 1
0x8C0C0702, // 0006 GETMET R3 R3 K2
0x5C140200, // 0007 MOVE R5 R1
0x7C0C0400, // 0008 CALL R3 2
0x80040600, // 0009 RET 1 R3
0x70020007, // 000A JMP #0013
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0702, // 000E GETMET R3 R3 K2
0x4C140000, // 000F LDNIL R5
0x7C0C0400, // 0010 CALL R3 2
0x500C0000, // 0011 LDBOOL R3 0 0
0x80040600, // 0012 RET 1 R3
0x80000000, // 0013 RET 0
})
)
);
@ -1250,7 +1252,7 @@ be_local_closure(Matter_IM_SubscribeResponse_init, /* name */
********************************************************************/
be_local_closure(Matter_IM_SubscribeResponse_status_ok_received, /* name */
be_nested_proto(
5, /* nstack */
9, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@ -1258,19 +1260,39 @@ be_local_closure(Matter_IM_SubscribeResponse_status_ok_received, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(status_ok_received),
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
/* K3 */ be_nested_str_weak(format),
/* K4 */ be_nested_str_weak(MTR_X3A_X20_X3ESub_OK_X20_X20_X20_X20sub_id_X3D),
/* K5 */ be_nested_str_weak(sub),
/* K6 */ be_nested_str_weak(subscription_id),
/* K7 */ be_const_int(2),
/* K8 */ be_nested_str_weak(status_ok_received),
}),
be_str_weak(status_ok_received),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x60080003, // 0000 GETGBL R2 G3
0x5C0C0000, // 0001 MOVE R3 R0
0x7C080200, // 0002 CALL R2 1
0x8C080500, // 0003 GETMET R2 R2 K0
0x5C100200, // 0004 MOVE R4 R1
0x7C080400, // 0005 CALL R2 2
0x80040400, // 0006 RET 1 R2
( &(const binstruction[19]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0xB80E0200, // 0001 GETNGBL R3 K1
0x8C0C0702, // 0002 GETMET R3 R3 K2
0x8C140503, // 0003 GETMET R5 R2 K3
0x601C0008, // 0004 GETGBL R7 G8
0x88200105, // 0005 GETMBR R8 R0 K5
0x88201106, // 0006 GETMBR R8 R8 K6
0x7C1C0200, // 0007 CALL R7 1
0x001E0807, // 0008 ADD R7 K4 R7
0x7C140400, // 0009 CALL R5 2
0x58180007, // 000A LDCONST R6 K7
0x7C0C0600, // 000B CALL R3 3
0x600C0003, // 000C GETGBL R3 G3
0x5C100000, // 000D MOVE R4 R0
0x7C0C0200, // 000E CALL R3 1
0x8C0C0708, // 000F GETMET R3 R3 K8
0x5C140200, // 0010 MOVE R5 R1
0x7C0C0400, // 0011 CALL R3 2
0x80040600, // 0012 RET 1 R3
})
)
);

View File

@ -11,7 +11,7 @@ extern const bclass be_class_Matter_IM_Subscription;
********************************************************************/
be_local_closure(Matter_IM_Subscription_re_arm, /* name */
be_nested_proto(
4, /* nstack */
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -19,39 +19,56 @@ be_local_closure(Matter_IM_Subscription_re_arm, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(wait_status),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(millis),
/* K3 */ be_nested_str_weak(expiration),
/* K4 */ be_nested_str_weak(max_interval),
/* K5 */ be_nested_str_weak(MAX_INTERVAL_MARGIN),
/* K6 */ be_nested_str_weak(not_before),
/* K7 */ be_nested_str_weak(min_interval),
/* K8 */ be_const_int(1),
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(wait_status),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(millis),
/* K4 */ be_nested_str_weak(expiration),
/* K5 */ be_nested_str_weak(max_interval),
/* K6 */ be_nested_str_weak(MAX_INTERVAL_MARGIN),
/* K7 */ be_nested_str_weak(not_before),
/* K8 */ be_nested_str_weak(min_interval),
/* K9 */ be_const_int(1),
/* K10 */ be_nested_str_weak(log),
/* K11 */ be_nested_str_weak(format),
/* K12 */ be_nested_str_weak(MTR_X3A_X20_X3ESub_Done_X20_X20sub_id_X3D),
/* K13 */ be_nested_str_weak(subscription_id),
/* K14 */ be_const_int(2),
}),
be_str_weak(re_arm),
&be_const_str_solidified,
( &(const binstruction[19]) { /* code */
0x50040000, // 0000 LDBOOL R1 0 0
0x90020001, // 0001 SETMBR R0 K0 R1
0xB8060200, // 0002 GETNGBL R1 K1
0x8C040302, // 0003 GETMET R1 R1 K2
0x7C040200, // 0004 CALL R1 1
0x88080104, // 0005 GETMBR R2 R0 K4
( &(const binstruction[30]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x50080000, // 0001 LDBOOL R2 0 0
0x90020202, // 0002 SETMBR R0 K1 R2
0xB80A0400, // 0003 GETNGBL R2 K2
0x8C080503, // 0004 GETMET R2 R2 K3
0x7C080200, // 0005 CALL R2 1
0x880C0105, // 0006 GETMBR R3 R0 K5
0x04080403, // 0007 SUB R2 R2 R3
0x540E03E7, // 0008 LDINT R3 1000
0x08080403, // 0009 MUL R2 R2 R3
0x00080202, // 000A ADD R2 R1 R2
0x90020602, // 000B SETMBR R0 K3 R2
0x88080107, // 000C GETMBR R2 R0 K7
0x540E03E7, // 000D LDINT R3 1000
0x08080403, // 000E MUL R2 R2 R3
0x00080202, // 000F ADD R2 R1 R2
0x04080508, // 0010 SUB R2 R2 K8
0x90020C02, // 0011 SETMBR R0 K6 R2
0x80000000, // 0012 RET 0
0x88100106, // 0007 GETMBR R4 R0 K6
0x040C0604, // 0008 SUB R3 R3 R4
0x541203E7, // 0009 LDINT R4 1000
0x080C0604, // 000A MUL R3 R3 R4
0x000C0403, // 000B ADD R3 R2 R3
0x90020803, // 000C SETMBR R0 K4 R3
0x880C0108, // 000D GETMBR R3 R0 K8
0x541203E7, // 000E LDINT R4 1000
0x080C0604, // 000F MUL R3 R3 R4
0x000C0403, // 0010 ADD R3 R2 R3
0x040C0709, // 0011 SUB R3 R3 K9
0x90020E03, // 0012 SETMBR R0 K7 R3
0xB80E0400, // 0013 GETNGBL R3 K2
0x8C0C070A, // 0014 GETMET R3 R3 K10
0x8C14030B, // 0015 GETMET R5 R1 K11
0x601C0008, // 0016 GETGBL R7 G8
0x8820010D, // 0017 GETMBR R8 R0 K13
0x7C1C0200, // 0018 CALL R7 1
0x001E1807, // 0019 ADD R7 K12 R7
0x7C140400, // 001A CALL R5 2
0x5818000E, // 001B LDCONST R6 K14
0x7C0C0600, // 001C CALL R3 3
0x80000000, // 001D RET 0
})
)
);