C_runtime/service/c_erpc_PLCObject_client.cpp
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 08 Dec 2024 15:26:26 +0100
changeset 4065 d876242447da
parent 4058 5472b88bbc9d
permissions -rw-r--r--
IDE: fix exception when changing or resizing comments in FBD
/*
 * Generated by erpcgen 1.13.0 on Fri Nov 22 15:03:08 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;
}

uint32_t ExtendedCall(const char * method, const binary_t * argument, binary_t * answer)
{
    uint32_t result;
    result = s_BeremizPLCObjectService_client->ExtendedCall(method, argument, answer);

    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
}