This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RL-RTX: Mailboxes - Array

Hello,

is it possible to create an array of mailboxes? I would like to use the mailbox objects as followes:

int i;
for (i = 0; i < 5; i++)
  os_mbx_wait(mbx[i], &ptr, 0x000A);

Thanks for every hint!

Best regards,
David

Parents
  • You can do it, but what do you want to accomplish? The code, as written, will wait up to 10 ticks for five different mesasges, but you won't know which message arrived and which not...

    By itself, pointer to message object can be either standalone or array element...

Reply
  • You can do it, but what do you want to accomplish? The code, as written, will wait up to 10 ticks for five different mesasges, but you won't know which message arrived and which not...

    By itself, pointer to message object can be either standalone or array element...

Children
  • Thanks!

    This code snippet is only an example. In fact i have 5 different mailboxes and in dependency of an integer index I have to read a specific mailbox like

    os_mbx_wait(mbx[i], &ptr, 0x000A);
    


    But I don't know how to use

    os_mbx_declare(...);
    os_mbx_init(...);
    


    for declaring and initializing the mailbox array.

    You know what I mean?

    Best regards!
    David