C_runtime/service/erpc_PLCObject_client.cpp
author Edouard Tisserant <edouard.tisserant@gmail.com>
Tue, 03 Dec 2024 21:26:52 +0100
changeset 4058 5472b88bbc9d
permissions -rw-r--r--
C runtime: move generated erpc interface in separate "service" directory
4058
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
/*
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
 * Generated by erpcgen 1.13.0 on Fri Nov 22 15:03:08 2024.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
 *
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
 * AUTOGENERATED - DO NOT EDIT
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     5
 */
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     7
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     9
#include "erpc_port.h"
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    11
#include "erpc_codec.hpp"
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    12
#include "erpc_PLCObject_client.hpp"
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
#include "erpc_manually_constructed.hpp"
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
#if 11300 != ERPC_VERSION_NUMBER
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
#error "The generated shim code version is different to the rest of eRPC code."
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    17
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
using namespace erpc;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
using namespace std;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    21
using namespace erpcShim;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    22
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    23
//! @brief Function to write struct binary_t
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    24
static void write_binary_t_struct(erpc::Codec * codec, const binary_t * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
//! @brief Function to write struct extra_file
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
static void write_extra_file_struct(erpc::Codec * codec, const extra_file * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    29
//! @brief Function to write struct list_extra_file_1_t
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    30
static void write_list_extra_file_1_t_struct(erpc::Codec * codec, const list_extra_file_1_t * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    31
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    32
//! @brief Function to write struct trace_order
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    33
static void write_trace_order_struct(erpc::Codec * codec, const trace_order * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    35
//! @brief Function to write struct list_trace_order_1_t
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    36
static void write_list_trace_order_1_t_struct(erpc::Codec * codec, const list_trace_order_1_t * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    37
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    38
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    39
// Write struct binary_t function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    40
static void write_binary_t_struct(erpc::Codec * codec, const binary_t * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    41
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    42
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    43
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    44
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    45
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    46
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    47
    codec->writeBinary(data->dataLength, data->data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    48
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    49
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    50
// Write struct extra_file function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    51
static void write_extra_file_struct(erpc::Codec * codec, const extra_file * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    52
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    53
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    54
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    55
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    56
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    57
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    58
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    59
        uint32_t fname_len = strlen((const char*)data->fname);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    60
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    61
        codec->writeString(fname_len, (const char*)data->fname);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    62
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    63
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    64
    write_binary_t_struct(codec, &(data->blobID));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    65
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    66
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    67
// Write struct list_extra_file_1_t function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    68
static void write_list_extra_file_1_t_struct(erpc::Codec * codec, const list_extra_file_1_t * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    69
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    70
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    71
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    72
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    73
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    74
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    75
    codec->startWriteList(data->elementsCount);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    76
    for (uint32_t listCount = 0U; listCount < data->elementsCount; ++listCount)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    77
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    78
        write_extra_file_struct(codec, &(data->elements[listCount]));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    79
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    80
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    81
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    82
// Write struct trace_order function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    83
static void write_trace_order_struct(erpc::Codec * codec, const trace_order * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    84
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    85
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    86
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    87
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    88
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    89
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    90
    codec->write(data->idx);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    91
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    92
    write_binary_t_struct(codec, &(data->force));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    93
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    94
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    95
// Write struct list_trace_order_1_t function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    96
static void write_list_trace_order_1_t_struct(erpc::Codec * codec, const list_trace_order_1_t * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    97
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    98
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    99
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   100
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   101
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   102
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   103
    codec->startWriteList(data->elementsCount);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   104
    for (uint32_t listCount = 0U; listCount < data->elementsCount; ++listCount)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   105
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   106
        write_trace_order_struct(codec, &(data->elements[listCount]));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   107
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   108
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   109
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   110
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   111
//! @brief Function to read struct binary_t
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   112
static void read_binary_t_struct(erpc::Codec * codec, binary_t * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   113
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   114
//! @brief Function to read struct log_message
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   115
static void read_log_message_struct(erpc::Codec * codec, log_message * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   116
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   117
//! @brief Function to read struct PSKID
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   118
static void read_PSKID_struct(erpc::Codec * codec, PSKID * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   119
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   120
//! @brief Function to read struct PLCstatus
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   121
static void read_PLCstatus_struct(erpc::Codec * codec, PLCstatus * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   122
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   123
//! @brief Function to read struct trace_sample
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   124
static void read_trace_sample_struct(erpc::Codec * codec, trace_sample * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   125
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   126
//! @brief Function to read struct TraceVariables
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   127
static void read_TraceVariables_struct(erpc::Codec * codec, TraceVariables * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   128
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   129
//! @brief Function to read struct list_trace_sample_1_t
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   130
static void read_list_trace_sample_1_t_struct(erpc::Codec * codec, list_trace_sample_1_t * data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   131
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   132
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   133
// Read struct binary_t function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   134
static void read_binary_t_struct(erpc::Codec * codec, binary_t * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   135
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   136
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   137
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   138
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   139
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   140
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   141
    uint8_t * data_local;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   142
    codec->readBinary(data->dataLength, &data_local);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   143
    if (data->dataLength > 0)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   144
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   145
    data->data = (uint8_t *) erpc_malloc(data->dataLength * sizeof(uint8_t));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   146
        if (data->data == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   147
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   148
            codec->updateStatus(kErpcStatus_MemoryError);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   149
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   150
        else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   151
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   152
            memcpy(data->data, data_local, data->dataLength);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   153
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   154
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   155
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   156
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   157
        data->data = NULL;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   158
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   159
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   160
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   161
// Read struct log_message function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   162
static void read_log_message_struct(erpc::Codec * codec, log_message * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   163
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   164
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   165
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   166
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   167
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   168
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   169
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   170
        uint32_t msg_len;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   171
        char * msg_local;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   172
        codec->readString(msg_len, &msg_local);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   173
        data->msg = (char*) erpc_malloc((msg_len + 1) * sizeof(char));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   174
        if ((data->msg == NULL) || (msg_local == NULL))
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   175
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   176
            codec->updateStatus(kErpcStatus_MemoryError);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   177
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   178
        else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   179
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   180
            memcpy(data->msg, msg_local, msg_len);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   181
            (data->msg)[msg_len] = 0;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   182
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   183
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   184
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   185
    codec->read(data->tick);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   186
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   187
    codec->read(data->sec);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   188
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   189
    codec->read(data->nsec);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   190
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   191
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   192
// Read struct PSKID function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   193
static void read_PSKID_struct(erpc::Codec * codec, PSKID * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   194
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   195
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   196
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   197
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   198
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   199
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   200
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   201
        uint32_t ID_len;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   202
        char * ID_local;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   203
        codec->readString(ID_len, &ID_local);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   204
        data->ID = (char*) erpc_malloc((ID_len + 1) * sizeof(char));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   205
        if ((data->ID == NULL) || (ID_local == NULL))
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   206
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   207
            codec->updateStatus(kErpcStatus_MemoryError);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   208
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   209
        else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   210
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   211
            memcpy(data->ID, ID_local, ID_len);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   212
            (data->ID)[ID_len] = 0;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   213
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   214
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   215
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   216
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   217
        uint32_t PSK_len;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   218
        char * PSK_local;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   219
        codec->readString(PSK_len, &PSK_local);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   220
        data->PSK = (char*) erpc_malloc((PSK_len + 1) * sizeof(char));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   221
        if ((data->PSK == NULL) || (PSK_local == NULL))
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   222
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   223
            codec->updateStatus(kErpcStatus_MemoryError);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   224
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   225
        else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   226
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   227
            memcpy(data->PSK, PSK_local, PSK_len);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   228
            (data->PSK)[PSK_len] = 0;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   229
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   230
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   231
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   232
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   233
// Read struct PLCstatus function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   234
static void read_PLCstatus_struct(erpc::Codec * codec, PLCstatus * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   235
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   236
    int32_t _tmp_local_i32;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   237
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   238
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   239
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   240
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   241
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   242
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   243
    codec->read(_tmp_local_i32);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   244
    data->PLCstatus = static_cast<PLCstatus_enum>(_tmp_local_i32);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   245
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   246
    for (uint32_t arrayCount0 = 0U; arrayCount0 < 4U; ++arrayCount0)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   247
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   248
        codec->read(data->logcounts[arrayCount0]);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   249
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   250
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   251
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   252
// Read struct trace_sample function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   253
static void read_trace_sample_struct(erpc::Codec * codec, trace_sample * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   254
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   255
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   256
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   257
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   258
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   259
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   260
    codec->read(data->tick);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   261
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   262
    read_binary_t_struct(codec, &(data->TraceBuffer));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   263
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   264
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   265
// Read struct TraceVariables function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   266
static void read_TraceVariables_struct(erpc::Codec * codec, TraceVariables * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   267
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   268
    int32_t _tmp_local_i32;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   269
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   270
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   271
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   272
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   273
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   274
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   275
    codec->read(_tmp_local_i32);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   276
    data->PLCstatus = static_cast<PLCstatus_enum>(_tmp_local_i32);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   277
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   278
    read_list_trace_sample_1_t_struct(codec, &(data->traces));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   279
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   280
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   281
// Read struct list_trace_sample_1_t function implementation
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   282
static void read_list_trace_sample_1_t_struct(erpc::Codec * codec, list_trace_sample_1_t * data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   283
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   284
    if(NULL == data)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   285
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   286
        return;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   287
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   288
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   289
    codec->startReadList(data->elementsCount);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   290
    data->elements = (trace_sample *) erpc_malloc(data->elementsCount * sizeof(trace_sample));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   291
    if ((data->elements == NULL) && (data->elementsCount > 0))
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   292
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   293
        codec->updateStatus(kErpcStatus_MemoryError);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   294
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   295
    for (uint32_t listCount = 0U; listCount < data->elementsCount; ++listCount)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   296
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   297
        read_trace_sample_struct(codec, &(data->elements[listCount]));
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   298
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   299
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   300
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   301
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   302
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   303
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   304
BeremizPLCObjectService_client::BeremizPLCObjectService_client(ClientManager *manager)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   305
:m_clientManager(manager)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   306
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   307
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   308
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   309
BeremizPLCObjectService_client::~BeremizPLCObjectService_client()
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   310
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   311
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   312
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   313
// BeremizPLCObjectService interface AppendChunkToBlob function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   314
uint32_t BeremizPLCObjectService_client::AppendChunkToBlob(const binary_t * data, const binary_t * blobID, binary_t * newBlobID)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   315
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   316
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   317
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   318
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   319
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   320
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   321
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   322
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   323
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   324
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   325
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   326
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   327
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   328
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   329
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   330
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   331
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   332
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   333
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   334
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   335
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   336
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   337
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   338
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   339
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   340
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_AppendChunkToBlobId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   341
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   342
        write_binary_t_struct(codec, data);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   343
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   344
        write_binary_t_struct(codec, blobID);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   345
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   346
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   347
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   348
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   349
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   350
        read_binary_t_struct(codec, newBlobID);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   351
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   352
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   353
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   354
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   355
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   356
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   357
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   358
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   359
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   360
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   361
    m_clientManager->callErrorHandler(err, m_AppendChunkToBlobId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   362
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   363
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   364
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   365
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   366
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   367
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   368
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   369
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   370
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   371
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   372
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   373
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   374
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   375
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   376
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   377
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   378
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   379
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   380
// BeremizPLCObjectService interface GetLogMessage function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   381
uint32_t BeremizPLCObjectService_client::GetLogMessage(uint8_t level, uint32_t msgID, log_message * message)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   382
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   383
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   384
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   385
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   386
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   387
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   388
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   389
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   390
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   391
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   392
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   393
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   394
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   395
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   396
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   397
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   398
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   399
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   400
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   401
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   402
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   403
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   404
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   405
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   406
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   407
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_GetLogMessageId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   408
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   409
        codec->write(level);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   410
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   411
        codec->write(msgID);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   412
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   413
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   414
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   415
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   416
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   417
        read_log_message_struct(codec, message);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   418
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   419
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   420
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   421
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   422
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   423
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   424
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   425
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   426
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   427
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   428
    m_clientManager->callErrorHandler(err, m_GetLogMessageId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   429
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   430
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   431
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   432
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   433
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   434
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   435
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   436
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   437
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   438
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   439
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   440
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   441
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   442
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   443
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   444
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   445
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   446
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   447
// BeremizPLCObjectService interface GetPLCID function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   448
uint32_t BeremizPLCObjectService_client::GetPLCID(PSKID * plcID)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   449
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   450
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   451
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   452
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   453
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   454
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   455
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   456
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   457
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   458
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   459
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   460
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   461
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   462
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   463
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   464
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   465
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   466
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   467
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   468
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   469
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   470
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   471
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   472
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   473
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   474
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_GetPLCIDId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   475
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   476
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   477
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   478
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   479
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   480
        read_PSKID_struct(codec, plcID);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   481
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   482
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   483
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   484
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   485
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   486
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   487
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   488
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   489
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   490
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   491
    m_clientManager->callErrorHandler(err, m_GetPLCIDId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   492
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   493
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   494
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   495
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   496
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   497
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   498
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   499
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   500
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   501
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   502
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   503
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   504
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   505
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   506
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   507
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   508
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   509
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   510
// BeremizPLCObjectService interface GetPLCstatus function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   511
uint32_t BeremizPLCObjectService_client::GetPLCstatus(PLCstatus * status)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   512
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   513
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   514
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   515
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   516
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   517
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   518
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   519
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   520
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   521
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   522
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   523
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   524
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   525
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   526
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   527
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   528
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   529
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   530
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   531
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   532
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   533
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   534
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   535
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   536
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   537
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_GetPLCstatusId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   538
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   539
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   540
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   541
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   542
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   543
        read_PLCstatus_struct(codec, status);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   544
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   545
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   546
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   547
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   548
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   549
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   550
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   551
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   552
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   553
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   554
    m_clientManager->callErrorHandler(err, m_GetPLCstatusId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   555
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   556
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   557
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   558
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   559
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   560
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   561
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   562
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   563
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   564
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   565
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   566
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   567
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   568
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   569
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   570
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   571
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   572
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   573
// BeremizPLCObjectService interface GetTraceVariables function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   574
uint32_t BeremizPLCObjectService_client::GetTraceVariables(uint32_t debugToken, TraceVariables * traces)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   575
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   576
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   577
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   578
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   579
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   580
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   581
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   582
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   583
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   584
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   585
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   586
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   587
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   588
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   589
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   590
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   591
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   592
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   593
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   594
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   595
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   596
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   597
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   598
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   599
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   600
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_GetTraceVariablesId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   601
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   602
        codec->write(debugToken);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   603
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   604
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   605
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   606
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   607
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   608
        read_TraceVariables_struct(codec, traces);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   609
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   610
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   611
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   612
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   613
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   614
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   615
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   616
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   617
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   618
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   619
    m_clientManager->callErrorHandler(err, m_GetTraceVariablesId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   620
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   621
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   622
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   623
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   624
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   625
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   626
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   627
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   628
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   629
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   630
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   631
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   632
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   633
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   634
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   635
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   636
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   637
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   638
// BeremizPLCObjectService interface MatchMD5 function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   639
uint32_t BeremizPLCObjectService_client::MatchMD5(const char * MD5, bool * match)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   640
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   641
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   642
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   643
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   644
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   645
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   646
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   647
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   648
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   649
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   650
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   651
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   652
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   653
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   654
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   655
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   656
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   657
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   658
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   659
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   660
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   661
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   662
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   663
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   664
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   665
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_MatchMD5Id, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   666
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   667
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   668
            uint32_t MD5_len = strlen((const char*)MD5);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   669
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   670
            codec->writeString(MD5_len, (const char*)MD5);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   671
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   672
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   673
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   674
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   675
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   676
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   677
        codec->read(*match);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   678
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   679
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   680
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   681
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   682
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   683
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   684
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   685
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   686
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   687
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   688
    m_clientManager->callErrorHandler(err, m_MatchMD5Id);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   689
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   690
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   691
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   692
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   693
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   694
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   695
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   696
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   697
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   698
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   699
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   700
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   701
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   702
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   703
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   704
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   705
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   706
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   707
// BeremizPLCObjectService interface NewPLC function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   708
uint32_t BeremizPLCObjectService_client::NewPLC(const char * md5sum, const binary_t * plcObjectBlobID, const list_extra_file_1_t * extrafiles, bool * success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   709
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   710
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   711
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   712
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   713
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   714
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   715
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   716
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   717
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   718
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   719
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   720
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   721
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   722
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   723
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   724
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   725
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   726
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   727
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   728
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   729
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   730
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   731
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   732
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   733
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   734
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_NewPLCId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   735
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   736
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   737
            uint32_t md5sum_len = strlen((const char*)md5sum);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   738
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   739
            codec->writeString(md5sum_len, (const char*)md5sum);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   740
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   741
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   742
        write_binary_t_struct(codec, plcObjectBlobID);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   743
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   744
        write_list_extra_file_1_t_struct(codec, extrafiles);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   745
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   746
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   747
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   748
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   749
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   750
        codec->read(*success);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   751
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   752
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   753
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   754
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   755
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   756
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   757
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   758
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   759
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   760
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   761
    m_clientManager->callErrorHandler(err, m_NewPLCId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   762
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   763
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   764
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   765
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   766
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   767
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   768
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   769
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   770
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   771
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   772
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   773
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   774
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   775
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   776
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   777
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   778
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   779
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   780
// BeremizPLCObjectService interface PurgeBlobs function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   781
uint32_t BeremizPLCObjectService_client::PurgeBlobs(void)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   782
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   783
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   784
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   785
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   786
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   787
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   788
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   789
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   790
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   791
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   792
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   793
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   794
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   795
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   796
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   797
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   798
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   799
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   800
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   801
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   802
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   803
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   804
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   805
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   806
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   807
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_PurgeBlobsId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   808
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   809
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   810
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   811
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   812
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   813
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   814
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   815
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   816
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   817
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   818
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   819
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   820
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   821
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   822
    m_clientManager->callErrorHandler(err, m_PurgeBlobsId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   823
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   824
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   825
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   826
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   827
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   828
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   829
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   830
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   831
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   832
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   833
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   834
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   835
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   836
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   837
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   838
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   839
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   840
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   841
// BeremizPLCObjectService interface RepairPLC function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   842
uint32_t BeremizPLCObjectService_client::RepairPLC(void)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   843
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   844
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   845
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   846
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   847
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   848
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   849
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   850
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   851
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   852
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   853
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   854
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   855
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   856
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   857
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   858
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   859
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   860
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   861
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   862
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   863
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   864
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   865
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   866
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   867
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   868
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_RepairPLCId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   869
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   870
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   871
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   872
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   873
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   874
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   875
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   876
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   877
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   878
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   879
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   880
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   881
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   882
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   883
    m_clientManager->callErrorHandler(err, m_RepairPLCId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   884
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   885
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   886
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   887
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   888
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   889
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   890
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   891
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   892
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   893
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   894
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   895
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   896
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   897
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   898
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   899
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   900
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   901
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   902
// BeremizPLCObjectService interface ResetLogCount function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   903
uint32_t BeremizPLCObjectService_client::ResetLogCount(void)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   904
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   905
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   906
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   907
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   908
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   909
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   910
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   911
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   912
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   913
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   914
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   915
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   916
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   917
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   918
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   919
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   920
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   921
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   922
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   923
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   924
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   925
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   926
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   927
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   928
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   929
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_ResetLogCountId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   930
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   931
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   932
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   933
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   934
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   935
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   936
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   937
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   938
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   939
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   940
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   941
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   942
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   943
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   944
    m_clientManager->callErrorHandler(err, m_ResetLogCountId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   945
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   946
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   947
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   948
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   949
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   950
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   951
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   952
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   953
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   954
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   955
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   956
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   957
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   958
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   959
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   960
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   961
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   962
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   963
// BeremizPLCObjectService interface SeedBlob function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   964
uint32_t BeremizPLCObjectService_client::SeedBlob(const binary_t * seed, binary_t * blobID)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   965
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   966
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   967
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   968
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   969
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   970
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   971
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   972
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   973
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   974
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   975
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   976
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   977
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   978
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   979
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   980
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   981
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   982
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   983
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   984
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   985
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   986
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   987
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   988
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   989
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   990
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_SeedBlobId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   991
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   992
        write_binary_t_struct(codec, seed);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   993
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   994
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   995
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   996
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   997
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   998
        read_binary_t_struct(codec, blobID);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   999
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1000
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1001
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1002
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1003
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1004
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1005
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1006
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1007
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1008
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1009
    m_clientManager->callErrorHandler(err, m_SeedBlobId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1010
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1011
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1012
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1013
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1014
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1015
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1016
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1017
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1018
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1019
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1020
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1021
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1022
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1023
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1024
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1025
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1026
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1027
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1028
// BeremizPLCObjectService interface SetTraceVariablesList function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1029
uint32_t BeremizPLCObjectService_client::SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1030
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1031
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1032
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1033
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1034
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1035
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1036
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1037
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1038
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1039
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1040
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1041
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1042
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1043
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1044
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1045
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1046
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1047
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1048
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1049
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1050
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1051
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1052
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1053
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1054
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1055
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_SetTraceVariablesListId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1056
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1057
        write_list_trace_order_1_t_struct(codec, orders);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1058
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1059
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1060
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1061
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1062
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1063
        codec->read(*debugtoken);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1064
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1065
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1066
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1067
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1068
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1069
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1070
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1071
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1072
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1073
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1074
    m_clientManager->callErrorHandler(err, m_SetTraceVariablesListId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1075
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1076
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1077
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1078
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1079
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1080
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1081
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1082
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1083
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1084
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1085
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1086
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1087
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1088
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1089
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1090
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1091
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1092
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1093
// BeremizPLCObjectService interface StartPLC function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1094
uint32_t BeremizPLCObjectService_client::StartPLC(void)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1095
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1096
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1097
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1098
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1099
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1100
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1101
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1102
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1103
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1104
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1105
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1106
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1107
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1108
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1109
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1110
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1111
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1112
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1113
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1114
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1115
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1116
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1117
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1118
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1119
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1120
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_StartPLCId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1121
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1122
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1123
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1124
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1125
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1126
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1127
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1128
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1129
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1130
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1131
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1132
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1133
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1134
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1135
    m_clientManager->callErrorHandler(err, m_StartPLCId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1136
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1137
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1138
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1139
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1140
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1141
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1142
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1143
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1144
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1145
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1146
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1147
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1148
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1149
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1150
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1151
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1152
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1153
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1154
// BeremizPLCObjectService interface StopPLC function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1155
uint32_t BeremizPLCObjectService_client::StopPLC(bool * success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1156
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1157
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1158
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1159
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1160
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1161
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1162
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1163
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1164
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1165
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1166
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1167
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1168
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1169
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1170
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1171
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1172
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1173
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1174
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1175
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1176
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1177
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1178
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1179
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1180
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1181
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_StopPLCId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1182
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1183
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1184
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1185
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1186
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1187
        codec->read(*success);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1188
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1189
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1190
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1191
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1192
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1193
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1194
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1195
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1196
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1197
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1198
    m_clientManager->callErrorHandler(err, m_StopPLCId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1199
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1200
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1201
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1202
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1203
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1204
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1205
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1206
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1207
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1208
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1209
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1210
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1211
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1212
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1213
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1214
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1215
}
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1216
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1217
// BeremizPLCObjectService interface ExtendedCall function client shim.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1218
uint32_t BeremizPLCObjectService_client::ExtendedCall(const char * method, const binary_t * argument, binary_t * answer)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1219
{
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1220
    erpc_status_t err = kErpcStatus_Success;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1221
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1222
    uint32_t result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1223
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1224
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1225
    pre_post_action_cb preCB = m_clientManager->getPreCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1226
    if (preCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1227
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1228
        preCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1229
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1230
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1231
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1232
    // Get a new request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1233
    RequestContext request = m_clientManager->createRequest(false);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1234
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1235
    // Encode the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1236
    Codec * codec = request.getCodec();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1237
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1238
    if (codec == NULL)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1239
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1240
        err = kErpcStatus_MemoryError;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1241
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1242
    else
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1243
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1244
        codec->startWriteMessage(message_type_t::kInvocationMessage, m_serviceId, m_ExtendedCallId, request.getSequence());
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1245
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1246
        {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1247
            uint32_t method_len = strlen((const char*)method);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1248
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1249
            codec->writeString(method_len, (const char*)method);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1250
        }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1251
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1252
        write_binary_t_struct(codec, argument);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1253
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1254
        // Send message to server
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1255
        // Codec status is checked inside this function.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1256
        m_clientManager->performRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1257
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1258
        read_binary_t_struct(codec, answer);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1259
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1260
        codec->read(result);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1261
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1262
        err = codec->getStatus();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1263
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1264
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1265
    // Dispose of the request.
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1266
    m_clientManager->releaseRequest(request);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1267
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1268
    // Invoke error handler callback function
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1269
    m_clientManager->callErrorHandler(err, m_ExtendedCallId);
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1270
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1271
#if ERPC_PRE_POST_ACTION
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1272
    pre_post_action_cb postCB = m_clientManager->getPostCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1273
    if (postCB)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1274
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1275
        postCB();
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1276
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1277
#endif
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1278
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1279
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1280
    if (err != kErpcStatus_Success)
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1281
    {
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1282
        result = 0xFFFFFFFFU;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1283
    }
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1284
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1285
    return result;
5472b88bbc9d C runtime: move generated erpc interface in separate "service" directory
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
  1286
}