C_runtime/c_erpc_PLCObject_client.cpp
author Edouard Tisserant <edouard@beremiz.fr>
Thu, 19 Sep 2024 12:06:53 +0200
changeset 4016 9e4a3a3ea5c0
parent 3946 8815b44be31e
permissions -rw-r--r--
MQTT: fix invocation of json_scanf (use pointers, not values...)
/*
 * Generated by erpcgen 1.12.0 on Mon May 20 17:54:19 2024.
 *
 * AUTOGENERATED - DO NOT EDIT
 */


#include "c_erpc_PLCObject_client.h"
#include "erpc_PLCObject_client.hpp"
#include "erpc_manually_constructed.hpp"

using namespace erpc;
using namespace std;
using namespace erpcShim;


#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
BeremizPLCObjectService_client *s_BeremizPLCObjectService_client = nullptr;
#else
ERPC_MANUALLY_CONSTRUCTED_STATIC(BeremizPLCObjectService_client, s_BeremizPLCObjectService_client);
#endif

uint32_t AppendChunkToBlob(const binary_t * data, const binary_t * blobID, binary_t * newBlobID)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->AppendChunkToBlob(data, blobID, newBlobID);

    return result;
}

uint32_t GetLogMessage(uint8_t level, uint32_t msgID, log_message * message)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->GetLogMessage(level, msgID, message);

    return result;
}

uint32_t GetPLCID(PSKID * plcID)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->GetPLCID(plcID);

    return result;
}

uint32_t GetPLCstatus(PLCstatus * status)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->GetPLCstatus(status);

    return result;
}

uint32_t GetTraceVariables(uint32_t debugToken, TraceVariables * traces)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->GetTraceVariables(debugToken, traces);

    return result;
}

uint32_t MatchMD5(const char * MD5, bool * match)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->MatchMD5(MD5, match);

    return result;
}

uint32_t NewPLC(const char * md5sum, const binary_t * plcObjectBlobID, const list_extra_file_1_t * extrafiles, bool * success)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->NewPLC(md5sum, plcObjectBlobID, extrafiles, success);

    return result;
}

uint32_t PurgeBlobs(void)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->PurgeBlobs();

    return result;
}

uint32_t RepairPLC(void)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->RepairPLC();

    return result;
}

uint32_t ResetLogCount(void)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->ResetLogCount();

    return result;
}

uint32_t SeedBlob(const binary_t * seed, binary_t * blobID)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->SeedBlob(seed, blobID);

    return result;
}

uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->SetTraceVariablesList(orders, debugtoken);

    return result;
}

uint32_t StartPLC(void)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->StartPLC();

    return result;
}

uint32_t StopPLC(bool * success)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->StopPLC(success);

    return result;
}

void initBeremizPLCObjectService_client(erpc_client_t client)
{
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
    erpc_assert(s_BeremizPLCObjectService_client == nullptr);
    s_BeremizPLCObjectService_client = new BeremizPLCObjectService_client(reinterpret_cast<ClientManager *>(client));
#else
    erpc_assert(!s_BeremizPLCObjectService_client.isUsed());
    s_BeremizPLCObjectService_client.construct(reinterpret_cast<ClientManager *>(client));
#endif
}

void deinitBeremizPLCObjectService_client(void)
{
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
    if (s_BeremizPLCObjectService_client != nullptr)
    {
        delete s_BeremizPLCObjectService_client;
        s_BeremizPLCObjectService_client = nullptr;
    }
#else
    s_BeremizPLCObjectService_client.destroy();
#endif
}