MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / sendReceivedInt32

Function sendReceivedInt32

test/test_lists/test_lists_server_impl.cpp:29–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27////////////////////////////////////////////////////////////////////////////////
28
29list_int32_1_t *sendReceivedInt32(const list_int32_1_t *received_list)
30{
31 list_int32_1_t *send_list = (list_int32_1_t *)erpc_malloc(sizeof(list_int32_1_t));
32 send_list->elementsCount = received_list->elementsCount;
33 int32_t *list_s = send_list->elements = (int32_t *)erpc_malloc(send_list->elementsCount * sizeof(int32_t));
34 int32_t *list_r = received_list->elements;
35
36 for (uint32_t i = 0; i < send_list->elementsCount; ++i)
37 {
38 *list_s = 2 * (*list_r);
39 ++list_s;
40 ++list_r;
41 }
42 return send_list;
43}
44
45list_int32_2_t *sendReceived2Int32(const list_int32_2_t *received_list)
46{

Callers 4

sendReceivedInt32Method · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 1

erpc_mallocFunction · 0.50

Tested by

no test coverage detected