RiCOSResult RiCOSMessageQueue_put( RiCOSMessageQueue *const me, gen_ptr message, RiCBoolean fromISR);
me
The RiCOSMessageQueue to which to add the message
message
The message to be added to the queue
fromISR
A Boolean value that determines whether the message being added was generated from an interrupt service routine (ISR)
RiCOSResult RiCOSMessageQueue_put(
RiCOSMessageQueue * const me, gen_ptr message,
RiCBoolean fromISR)
{
static gen_ptr NULL_VAL = NULL;
int timeout = WAIT_FOREVER;
int priority = MSG_PRI_NORMAL;
if (message == NULL) message = NULL_VAL;
if (fromISR) {
timeout = NO_WAIT;
priority = MSG_PRI_URGENT;
}
return (msgQSend(me->hVxMQ, (char*)&message,
sizeof(message), timeout, priority) == OK);
}