C_runtime/c_erpc_PLCObject_client.cpp
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 24 Apr 2024 02:15:33 +0200
changeset 3937 e13543d716b6
permissions -rw-r--r--
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
3937
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
/*
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
 * Generated by erpcgen 1.11.0 on Wed Mar 27 13:43:44 2024.
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
 *
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
 * AUTOGENERATED - DO NOT EDIT
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     5
 */
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     7
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
#include "c_erpc_PLCObject_client.h"
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     9
#include "erpc_PLCObject_client.hpp"
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
#include "erpc_manually_constructed.hpp"
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    11
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    12
using namespace erpc;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
using namespace std;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
using namespace erpcShim;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    17
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
BeremizPLCObjectService_client *s_BeremizPLCObjectService_client = nullptr;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
#else
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
ERPC_MANUALLY_CONSTRUCTED_STATIC(BeremizPLCObjectService_client, s_BeremizPLCObjectService_client);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    21
#endif
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    22
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    23
uint32_t AppendChunkToBlob(const binary_t * data, const binary_t * blobID, binary_t * newBlobID)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    24
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
    result = s_BeremizPLCObjectService_client->AppendChunkToBlob(data, blobID, newBlobID);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    29
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    30
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    31
uint32_t GetLogMessage(uint8_t level, uint32_t msgID, log_message * message)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    32
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    33
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
    result = s_BeremizPLCObjectService_client->GetLogMessage(level, msgID, message);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    35
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    36
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    37
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    38
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    39
uint32_t GetPLCID(PSKID * plcID)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    40
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    41
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    42
    result = s_BeremizPLCObjectService_client->GetPLCID(plcID);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    43
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    44
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    45
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    46
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    47
uint32_t GetPLCstatus(PLCstatus * status)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    48
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    49
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    50
    result = s_BeremizPLCObjectService_client->GetPLCstatus(status);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    51
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    52
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    53
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    54
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    55
uint32_t GetTraceVariables(uint32_t debugToken, TraceVariables * traces)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    56
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    57
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    58
    result = s_BeremizPLCObjectService_client->GetTraceVariables(debugToken, traces);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    59
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    60
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    61
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    62
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    63
uint32_t MatchMD5(const char * MD5, bool * match)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    64
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    65
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    66
    result = s_BeremizPLCObjectService_client->MatchMD5(MD5, match);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    67
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    68
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    69
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    70
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    71
uint32_t NewPLC(const char * md5sum, const binary_t * plcObjectBlobID, const list_extra_file_1_t * extrafiles, bool * success)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    72
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    73
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    74
    result = s_BeremizPLCObjectService_client->NewPLC(md5sum, plcObjectBlobID, extrafiles, success);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    75
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    76
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    77
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    78
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    79
uint32_t PurgeBlobs(void)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    80
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    81
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    82
    result = s_BeremizPLCObjectService_client->PurgeBlobs();
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    83
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    84
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    85
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    86
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    87
uint32_t RepairPLC(void)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    88
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    89
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    90
    result = s_BeremizPLCObjectService_client->RepairPLC();
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    91
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    92
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    93
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    94
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    95
uint32_t ResetLogCount(void)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    96
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    97
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    98
    result = s_BeremizPLCObjectService_client->ResetLogCount();
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    99
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   100
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   101
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   102
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   103
uint32_t SeedBlob(const binary_t * seed, binary_t * blobID)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   104
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   105
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   106
    result = s_BeremizPLCObjectService_client->SeedBlob(seed, blobID);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   107
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   108
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   109
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   110
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   111
uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, uint32_t * debugtoken)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   112
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   113
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   114
    result = s_BeremizPLCObjectService_client->SetTraceVariablesList(orders, debugtoken);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   115
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   116
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   117
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   118
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   119
uint32_t StartPLC(void)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   120
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   121
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   122
    result = s_BeremizPLCObjectService_client->StartPLC();
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   123
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   124
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   125
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   126
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   127
uint32_t StopPLC(bool * success)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   128
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   129
    uint32_t result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   130
    result = s_BeremizPLCObjectService_client->StopPLC(success);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   131
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   132
    return result;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   133
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   134
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   135
void initBeremizPLCObjectService_client(erpc_client_t client)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   136
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   137
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   138
    erpc_assert(s_BeremizPLCObjectService_client == nullptr);
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   139
    s_BeremizPLCObjectService_client = new BeremizPLCObjectService_client(reinterpret_cast<ClientManager *>(client));
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   140
#else
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   141
    erpc_assert(!s_BeremizPLCObjectService_client.isUsed());
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   142
    s_BeremizPLCObjectService_client.construct(reinterpret_cast<ClientManager *>(client));
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   143
#endif
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   144
}
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   145
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   146
void deinitBeremizPLCObjectService_client(void)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   147
{
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   148
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   149
    if (s_BeremizPLCObjectService_client != nullptr)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   150
    {
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   151
        delete s_BeremizPLCObjectService_client;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   152
        s_BeremizPLCObjectService_client = nullptr;
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   153
    }
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   154
#else
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   155
    s_BeremizPLCObjectService_client.destroy();
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   156
#endif
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   157
}