Liu Song’s Projects


~/Projects/Tasmota

git clone https://code.lsong.org/Tasmota

Commit

Commit
5c9c4e6dad2a9156cc27240d331a0e68bf024878
Author
s-hadinger <49731213+[email protected]>
Date
2023-07-06 22:15:37 +0200 +0200
Diffstat
 lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be | 25 
 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h | 120 

Matter increase logs in save_fabrics (#19060)


diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be b/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be
index 0627eb6fcb09f980ab775dd89fa1ad568fc12696..0c979bb3048778ac15fd92669b655879fd2e7d0a 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be
@@ -311,27 +311,28 @@   #############################################################
   def save_fabrics()
     import json
 #
-  # includes the parent fabric as first element
-    var sessions_saved = 0
-
-# for compilation
 # This program is distributed in the hope that it will be useful,
+# This program is free software: you can redistribute it and/or modify
-# for compilation
+  var device                      # device root object
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
-class Matter_Expirable end
+  var sessions
 #
-# This program is distributed in the hope that it will be useful,
+# This program is free software: you can redistribute it and/or modify
+  var sessions
 #
+# Matter_Session_Store.be - Support for Matter Session Store
 # Copyright (C) 2023  Stephan Hadinger & Theo Arends
-# This program is distributed in the hope that it will be useful,
+# Matter_Session_Store.be - Support for Matter Session Store
-class Matter_Expirable end
 # Matter_Session_Store.be - Support for Matter Session Store
+  def add_fabric(fabric)
-class Matter_Expirable end
+# Matter_Session_Store.be - Support for Matter Session Store
 # Copyright (C) 2023  Stephan Hadinger & Theo Arends
+# This program is free software: you can redistribute it and/or modify
-#
 # This program is free software: you can redistribute it and/or modify
+# (at your option) any later version.
+      var fabs_size = size(fabs)
+      fabs = "[" + fabs.concat(",") + "]"
 #
-# This program is distributed in the hope that it will be useful,
 # This program is free software: you can redistribute it and/or modify
       var f = open(self._FABRICS, "w")
       f.write(fabs)




diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h
index 13f83bca6fe54a32e592f3056d113e868eb9d7fa..662023413a1d1d5927134da146865bdc00fbd0df 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h
@@ -1197,99 +1197,102 @@     be_str_weak(save_fabrics),
     &be_const_str_solidified,
     ( &(const binstruction[86]) {  /* code */
       0xA4060000,  //  0000  IMPORT	R1	K0
+      0x7C0C0200,  //  0003  CALL	R3	1
 extern const bclass be_class_Matter_Session_Store;
-/* Solidification of Matter_Session_Store.h */
+/********************************************************************
 
+/********************************************************************
+\********************************************************************/
 extern const bclass be_class_Matter_Session_Store;
-/* Solidification of Matter_Session_Store.h */
 extern const bclass be_class_Matter_Session_Store;
-** Solidified function: remove_redundant_fabric
 /********************************************************************
-** Solidified function: remove_redundant_fabric
+
 ** Solidified function: create_fabric
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
+    ( &(const binstruction[22]) {  /* code */
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 /* Solidification of Matter_Session_Store.h */
+/********************************************************************
 be_local_closure(Matter_Session_Store_remove_redundant_fabric,   /* name */
-/********************************************************************\
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 * Generated code, don't edit                                         *
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
+\********************************************************************/
+
 /********************************************************************\
-\********************************************************************/
+#include "be_constobj.h"
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 #include "be_constobj.h"
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 extern const bclass be_class_Matter_Session_Store;
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 /********************************************************************
+/********************************************************************
 extern const bclass be_class_Matter_Session_Store;
-/********************************************************************\
 ** Solidified function: create_fabric
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 /* Solidification of Matter_Session_Store.h */
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 /********************************************************************\
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 * Generated code, don't edit                                         *
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 \********************************************************************/
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 #include "be_constobj.h"
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 extern const bclass be_class_Matter_Session_Store;
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 /********************************************************************
-    7,                          /* nstack */
+      0x780E0012,  //  0005  JMPF	R3	#0019
 ** Solidified function: create_fabric
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 /* Solidification of Matter_Session_Store.h */
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 /********************************************************************\
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 * Generated code, don't edit                                         *
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 \********************************************************************/
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 #include "be_constobj.h"
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 extern const bclass be_class_Matter_Session_Store;
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 /********************************************************************
-    ( &(const bvalue[ 6]) {     /* constants */
+      0x880C0101,  //  0006  GETMBR	R3	R0	K1
 ** Solidified function: create_fabric
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 /* Solidification of Matter_Session_Store.h */
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 /********************************************************************\
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 * Generated code, don't edit                                         *
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 \********************************************************************/
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 #include "be_constobj.h"
-    /* K0   */  be_const_int(0),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 
-      0x00140B0D,  //  002A  ADD	R5	R5	K13
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 extern const bclass be_class_Matter_Session_Store;
-      0x88100100,  //  0009  GETMBR	R4	R0	K0
-      0xA8020016,  //  002C  EXBLK	0	#0044
       0x60140011,  //  002D  GETGBL	R5	G17
       0x8818010E,  //  002E  GETMBR	R6	R0	K14
       0x581C000F,  //  002F  LDCONST	R7	K15
@@ -1313,39 +1316,38 @@       0x8C180D17,  //  0040  GETMET	R6	R6	K23
       0x7C180200,  //  0041  CALL	R6	1
       0xA8040001,  //  0042  EXBLK	1	1
       0x70020010,  //  0043  JMP		#0055
-extern const bclass be_class_Matter_Session_Store;
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 /********************************************************************
-* Generated code, don't edit                                         *
       0x7002000D,  //  0045  JMP		#0054
-      0xB81E2400,  //  0046  GETNGBL	R7	K18
-      0x8C1C0F13,  //  0047  GETMET	R7	R7	K19
-      0x60240008,  //  0048  GETGBL	R9	G8
-      0x5C280A00,  //  0049  MOVE	R10	R5
-    /* K3   */  be_nested_str_weak(device_id),
+      0x940C0602,  //  0007  GETIDX	R3	R3	R2
 ** Solidified function: create_fabric
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
 /* Solidification of Matter_Session_Store.h */
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
 /********************************************************************\
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
 * Generated code, don't edit                                         *
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
 \********************************************************************/
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
 #include "be_constobj.h"
-extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
+/* Solidification of Matter_Session_Store.h */
 
+      0x20100601,  //  0008  NE	R4	R3	R1
 extern const bclass be_class_Matter_Session_Store;
 ** Solidified function: create_fabric
-extern const bclass be_class_Matter_Session_Store;
+    0,                          /* has sup protos */
+      0x00180C07,  //  0050  ADD	R6	R6	R7
+      0x581C001A,  //  0051  LDCONST	R7	K26
+      0x7C100600,  //  0052  CALL	R4	3
       0x70020000,  //  0053  JMP		#0055
       0xB0080000,  //  0054  RAISE	2	R0	R0
       0x80000000,  //  0055  RET	0