Functions | |
| POSEXTERN void *POSCALL | posMessageAlloc (void) |
| POSEXTERN void POSCALL | posMessageFree (void *buf) |
| POSEXTERN VAR_t POSCALL | posMessageSend (void *buf, POSTASK_t taskhandle) |
| POSEXTERN void *POSCALL | posMessageGet (void) |
| POSEXTERN VAR_t POSCALL | posMessageAvailable (void) |
| POSEXTERN void *POSCALL | posMessageWait (UINT_t timeoutticks) |
| POSEXTERN void* POSCALL posMessageAlloc | ( | void | ) |
Message box function. Allocates a new message buffer. The maximum buffer size is set at compilation time by the define POSCFG_MSG_BUFSIZE. Usually the sending task would allocate a new message buffer, fill in its data and send it via posMessageSend to the receiving task.
| POSEXTERN VAR_t POSCALL posMessageAvailable | ( | void | ) |
Message box function. Tests if a new message is available in the message box. This function can be used to prevent the task from blocking.
| POSEXTERN void POSCALL posMessageFree | ( | void * | buf | ) |
Message box function. Frees a message buffer again. Usually the receiving task would call this function after it has processed a message to free the message buffer again.
| buf | pointer to the message buffer that is no more used. |
| POSEXTERN void* POSCALL posMessageGet | ( | void | ) |
Message box function. Gets a new message from the message box. If no message is available, the task blocks until a new message is received.
Message box function. Sends a message to a task.
| buf | pointer to the message to send. If POSCFG_MSG_MEMORY is defined to 1, this pointer must point to the buffer that was allocated with posMessageAlloc. Note that this parameter must not be NULL. Exception: POSCFG_MSG_MEMORY = 0 and POSCFG_FEATURE_MSGWAIT = 0. | |
| taskhandle | handle to the task to send the message to. |
| POSEXTERN void* POSCALL posMessageWait | ( | UINT_t | timeoutticks | ) |
Message box function. Gets a new message from the message box. If no message is available, the task blocks until a new message is received or the timeout has been reached.
| timeoutticks | timeout in timer ticks (see HZ define and MS macro). If this parameter is set to zero, the function immediately returns. If this parameter is set to INFINITE, the function will never time out. |
1.5.4