ERPC: fix SetTraceVariablesList interface
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 14 May 2024 14:22:32 +0200
changeset 3941 09aa8a10026c
parent 3940 934bd46a7500
child 3943 5df2cbc1cd1a
ERPC: fix SetTraceVariablesList interface

This fix debug not suspending when having no variables, and other debug error being not reported.
C_runtime/c_erpc_PLCObject_client.cpp
C_runtime/c_erpc_PLCObject_client.h
C_runtime/c_erpc_PLCObject_server.cpp
C_runtime/c_erpc_PLCObject_server.h
C_runtime/erpc_PLCObject_client.cpp
C_runtime/erpc_PLCObject_client.hpp
C_runtime/erpc_PLCObject_common.h
C_runtime/erpc_PLCObject_common.hpp
C_runtime/erpc_PLCObject_interface.cpp
C_runtime/erpc_PLCObject_interface.hpp
C_runtime/erpc_PLCObject_server.cpp
C_runtime/erpc_PLCObject_server.hpp
erpc_interface/__init__.py
erpc_interface/erpc_PLCObject.erpc
erpc_interface/erpc_PLCObject/__init__.py
erpc_interface/erpc_PLCObject/client.py
erpc_interface/erpc_PLCObject/common.py
erpc_interface/erpc_PLCObject/interface.py
erpc_interface/erpc_PLCObject/server.py
runtime/PLCObject.py
--- a/C_runtime/c_erpc_PLCObject_client.cpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/c_erpc_PLCObject_client.cpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -108,7 +108,7 @@
     return result;
 }
 
-uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken)
+uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken)
 {
     uint32_t result;
     result = s_BeremizPLCObjectService_client->SetTraceVariablesList(orders, debugtoken);
--- a/C_runtime/c_erpc_PLCObject_client.h	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/c_erpc_PLCObject_client.h	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -64,7 +64,7 @@
 
 uint32_t SeedBlob(const binary_t * seed, binary_t * blobID);
 
-uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken);
+uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken);
 
 uint32_t StartPLC(void);
 
--- a/C_runtime/c_erpc_PLCObject_server.cpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/c_erpc_PLCObject_server.cpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -109,7 +109,7 @@
             return result;
         }
 
-        uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken)
+        uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken)
         {
             uint32_t result;
             result = ::SetTraceVariablesList(orders, debugtoken);
--- a/C_runtime/c_erpc_PLCObject_server.h	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/c_erpc_PLCObject_server.h	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -65,7 +65,7 @@
 
 uint32_t SeedBlob(const binary_t * seed, binary_t * blobID);
 
-uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken);
+uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken);
 
 uint32_t StartPLC(void);
 
--- a/C_runtime/erpc_PLCObject_client.cpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_client.cpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -1026,7 +1026,7 @@
 }
 
 // BeremizPLCObjectService interface SetTraceVariablesList function client shim.
-uint32_t BeremizPLCObjectService_client::SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken)
+uint32_t BeremizPLCObjectService_client::SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken)
 {
     erpc_status_t err = kErpcStatus_Success;
 
--- a/C_runtime/erpc_PLCObject_client.hpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_client.hpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -44,7 +44,7 @@
 
         virtual uint32_t SeedBlob(const binary_t * seed, binary_t * blobID);
 
-        virtual uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken);
+        virtual uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken);
 
         virtual uint32_t StartPLC(void);
 
--- a/C_runtime/erpc_PLCObject_common.h	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_common.h	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
--- a/C_runtime/erpc_PLCObject_common.hpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_common.hpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
--- a/C_runtime/erpc_PLCObject_interface.cpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_interface.cpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
--- a/C_runtime/erpc_PLCObject_interface.hpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_interface.hpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -58,7 +58,7 @@
 
         virtual uint32_t SeedBlob(const binary_t * seed, binary_t * blobID) = 0;
 
-        virtual uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken) = 0;
+        virtual uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken) = 0;
 
         virtual uint32_t StartPLC(void) = 0;
 
--- a/C_runtime/erpc_PLCObject_server.cpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_server.cpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -1182,7 +1182,7 @@
     {
         codec->updateStatus(kErpcStatus_MemoryError);
     }
-    uint32_t debugtoken;
+    int32_t debugtoken;
     uint32_t result;
 
     // startReadMessage() was already called before this shim was invoked.
--- a/C_runtime/erpc_PLCObject_server.hpp	Sat May 11 19:27:28 2024 +0200
+++ b/C_runtime/erpc_PLCObject_server.hpp	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
+ * Generated by erpcgen 1.11.0 on Tue May 14 10:14:58 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
--- a/erpc_interface/__init__.py	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/__init__.py	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 #
-# Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
+# Generated by erpcgen 1.11.0 on Tue May 14 10:15:38 2024.
 #
 # AUTOGENERATED - DO NOT EDIT
 #
--- a/erpc_interface/erpc_PLCObject.erpc	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/erpc_PLCObject.erpc	Tue May 14 14:22:32 2024 +0200
@@ -65,7 +65,7 @@
     RepairPLC() -> uint32
     ResetLogCount() -> uint32
     SeedBlob(in binary seed, out binary blobID) -> uint32
-    SetTraceVariablesList(in list<trace_order> orders, out uint32 debugtoken) -> uint32
+    SetTraceVariablesList(in list<trace_order> orders, out int32 debugtoken) -> uint32
     StartPLC() -> uint32
     StopPLC(out bool success) -> uint32
 }
--- a/erpc_interface/erpc_PLCObject/__init__.py	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/erpc_PLCObject/__init__.py	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 #
-# Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
+# Generated by erpcgen 1.11.0 on Tue May 14 10:15:38 2024.
 #
 # AUTOGENERATED - DO NOT EDIT
 #
--- a/erpc_interface/erpc_PLCObject/client.py	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/erpc_PLCObject/client.py	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 #
-# Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
+# Generated by erpcgen 1.11.0 on Tue May 14 10:15:38 2024.
 #
 # AUTOGENERATED - DO NOT EDIT
 #
@@ -255,7 +255,7 @@
 
         # Send request and process reply.
         self._clientManager.perform_request(request)
-        debugtoken.value = codec.read_uint32()
+        debugtoken.value = codec.read_int32()
         _result = codec.read_uint32()
         return _result
 
--- a/erpc_interface/erpc_PLCObject/common.py	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/erpc_PLCObject/common.py	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 #
-# Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
+# Generated by erpcgen 1.11.0 on Tue May 14 10:15:38 2024.
 #
 # AUTOGENERATED - DO NOT EDIT
 #
--- a/erpc_interface/erpc_PLCObject/interface.py	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/erpc_PLCObject/interface.py	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 #
-# Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
+# Generated by erpcgen 1.11.0 on Tue May 14 10:15:38 2024.
 #
 # AUTOGENERATED - DO NOT EDIT
 #
--- a/erpc_interface/erpc_PLCObject/server.py	Sat May 11 19:27:28 2024 +0200
+++ b/erpc_interface/erpc_PLCObject/server.py	Tue May 14 14:22:32 2024 +0200
@@ -1,5 +1,5 @@
 #
-# Generated by erpcgen 1.11.0 on Mon Jan 22 16:49:00 2024.
+# Generated by erpcgen 1.11.0 on Tue May 14 10:15:38 2024.
 #
 # AUTOGENERATED - DO NOT EDIT
 #
@@ -305,7 +305,7 @@
             sequence=sequence))
         if debugtoken.value is None:
             raise ValueError("debugtoken.value is None")
-        codec.write_uint32(debugtoken.value)
+        codec.write_int32(debugtoken.value)
         codec.write_uint32(_result)
 
     def _handle_StartPLC(self, sequence, codec):
--- a/runtime/PLCObject.py	Sat May 11 19:27:28 2024 +0200
+++ b/runtime/PLCObject.py	Tue May 14 14:22:32 2024 +0200
@@ -734,7 +734,7 @@
                 return self.DebugToken
         else:
             self._suspendDebug(True)
-        return 5 # DEBUG_SUSPENDED
+        return -5 # DEBUG_SUSPENDED
 
     def _TracesSwap(self):
         self.LastSwapTrace = time()