C_runtime/erpc_PLCObject_client.cpp
changeset 4043 b217fb367574
parent 4032 1ffff67678ad
child 4044 2a4b8b59d165
--- a/C_runtime/erpc_PLCObject_client.cpp	Tue Nov 19 23:52:04 2024 +0100
+++ b/C_runtime/erpc_PLCObject_client.cpp	Fri Nov 22 16:31:51 2024 +0100
@@ -1,5 +1,5 @@
 /*
- * Generated by erpcgen 1.12.0 on Mon May 20 17:54:19 2024.
+ * Generated by erpcgen 1.12.0 on Mon Oct 28 15:10:14 2024.
  *
  * AUTOGENERATED - DO NOT EDIT
  */
@@ -1213,3 +1213,74 @@
 
     return result;
 }
+
+// BeremizPLCObjectService interface ExtendedCall function client shim.
+uint32_t BeremizPLCObjectService_client::ExtendedCall(const char * method, const binary_t * argument, binary_t * answer)
+{
+    erpc_status_t err = kErpcStatus_Success;
+
+    uint32_t result;
+
+#if ERPC_PRE_POST_ACTION
+    pre_post_action_cb preCB = m_clientManager->getPreCB();
+    if (preCB)
+    {
+        preCB();
+    }
+#endif
+
+    // Get a new request.
+    RequestContext request = m_clientManager->createRequest(false);
+
+    // Encode the request.
+    Codec * codec = request.getCodec();
+
+    if (codec == NULL)
+    {
+        err = kErpcStatus_MemoryError;
+    }
+    else
+    {
+        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_ExtendedCallId, request.getSequence());
+
+        {
+            uint32_t method_len = strlen((const char*)method);
+
+            codec->writeString(method_len, (const char*)method);
+        }
+
+        write_binary_t_struct(codec, argument);
+
+        // Send message to server
+        // Codec status is checked inside this function.
+        m_clientManager->performRequest(request);
+
+        read_binary_t_struct(codec, answer);
+
+        codec->read(result);
+
+        err = codec->getStatus();
+    }
+
+    // Dispose of the request.
+    m_clientManager->releaseRequest(request);
+
+    // Invoke error handler callback function
+    m_clientManager->callErrorHandler(err, m_ExtendedCallId);
+
+#if ERPC_PRE_POST_ACTION
+    pre_post_action_cb postCB = m_clientManager->getPostCB();
+    if (postCB)
+    {
+        postCB();
+    }
+#endif
+
+
+    if (err != kErpcStatus_Success)
+    {
+        result = 0xFFFFFFFFU;
+    }
+
+    return result;
+}