Synopsis
unsigned ctl_message_queue_receive(CTL_MESSAGE_QUEUE_t *q,
                                   void **message,
                                   CTL_TIMEOUT_t t,
                                   CTL_TIME_t timeout);
Description

ctl_message_queue_receive pops the oldest message in the message queue pointed to by q into the memory pointed to by message. ctl_message_queue_receive will block if no messages are available unless timeoutType is non-zero and the current time reaches the timeout value.

ctl_message_queue_receive returns zero if a timeout occurs otherwise 1.

Note

ctl_message_queue_receive must not be called from an interrupt service routine.