Hi,
I'm trying to setup a communication framework between cores using MessageQ module, where I need to dynamically allocate a message for being sent. At runtime I need to define the type of data as well as the lenght or size of the data to be sent. However, I see that in MessageQ you need to define a struct where the first field is the MessageQ_MsgHeader and then you define extra elements for extending the message, but you have to define statically the the type and the lenght of the data, like the following example:
Typedef struct myMsg {
MessageQ_MsgHeader header;
int data;
} myMsg;
Then my question is how is the best way to use messageQ for sending messages where the type and the lenght is not statically defined? Should I send a pointer to other buffer instead of allocation memory in the message for the data itself?, if so what is the best way to reserve this extra buffer (Heap*Buf) and how to define the data type dinamically.
Thanks,
Miguel