2025-12-24 18:28:20 +08:00
|
|
|
/*
|
2026-01-07 11:41:07 +08:00
|
|
|
* Generated by erpcgen 1.14.0 on Wed Dec 31 16:10:10 2025.
|
2025-12-24 18:28:20 +08:00
|
|
|
*
|
|
|
|
|
* AUTOGENERATED - DO NOT EDIT
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "c_head_service_client.h"
|
|
|
|
|
#include "head_service_client.hpp"
|
|
|
|
|
#include "erpc_manually_constructed.hpp"
|
|
|
|
|
|
|
|
|
|
using namespace erpc;
|
|
|
|
|
using namespace std;
|
|
|
|
|
using namespace erpcShim;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
|
|
|
|
|
demo_client *s_demo_client = nullptr;
|
|
|
|
|
#else
|
|
|
|
|
ERPC_MANUALLY_CONSTRUCTED_STATIC(demo_client, s_demo_client);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
int32_t add(int32_t a, int32_t b)
|
|
|
|
|
{
|
|
|
|
|
int32_t result;
|
|
|
|
|
result = s_demo_client->add(a, b);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-07 11:41:07 +08:00
|
|
|
int64_t sum_i32(const list_int32_1_t * arr)
|
|
|
|
|
{
|
|
|
|
|
int64_t result;
|
|
|
|
|
result = s_demo_client->sum_i32(arr);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 18:28:20 +08:00
|
|
|
void initdemo_client(erpc_client_t client)
|
|
|
|
|
{
|
|
|
|
|
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
|
|
|
|
|
erpc_assert(s_demo_client == nullptr);
|
|
|
|
|
s_demo_client = new demo_client(reinterpret_cast<ClientManager *>(client));
|
|
|
|
|
#else
|
|
|
|
|
erpc_assert(!s_demo_client.isUsed());
|
|
|
|
|
s_demo_client.construct(reinterpret_cast<ClientManager *>(client));
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void deinitdemo_client(void)
|
|
|
|
|
{
|
|
|
|
|
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
|
|
|
|
|
if (s_demo_client != nullptr)
|
|
|
|
|
{
|
|
|
|
|
delete s_demo_client;
|
|
|
|
|
s_demo_client = nullptr;
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
s_demo_client.destroy();
|
|
|
|
|
#endif
|
|
|
|
|
}
|