IPC buffer sizes

Hello,

I am trying to créate an application that it shall receive and send large buffers of information in C.

My first approach was to use void pointers and to pass the size, but I realized that API files do not support this.

My next approach was to try to define a buffer of uint8 with a size enough to fit all my needs (let’s say 20000), something like this:
FUNCTION le_result_t SendData(
uint8 data[20000],
);

My concern is if I use this SenData function, specifying a size of the buffer of 5 bytes, will legato only use this 5 bytes to pass the information? Or will it créate a buffer of size 20000 and then only use the 5 specified bytes?

Is there any limitation of size to be taken into accound for this kind of operations?

Hi @wololo,
I think it will allocate the buffer of size what will be mentioned in the .api file. i.e., it will allocate the buffer size of 20000 bytes.

You can try with the simple application sending the buffer using IPC with some very big size like 500000 or 50000000 bytes, application will will not work throwing the error “failed with errno 90” or application will stop immediately.

Regards,
Muralidhara N.