Functions | |
| NANOEXT void *POSCALL | nosMessageAlloc (UINT_t msgSize) |
| NANOEXT void POSCALL | nosMessageFree (void *buf) |
| NANOEXT VAR_t POSCALL | nosMessageSend (void *buf, NOSTASK_t taskhandle) |
| NANOEXT void *POSCALL | nosMessageGet (void) |
| NANOEXT void *POSCALL | nosMessageWait (UINT_t timeoutticks) |
| NANOEXT VAR_t POSCALL | nosMessageAvailable (void) |
| NANOEXT void* POSCALL nosMessageAlloc | ( | UINT_t | msgSize | ) |
Message box function. Allocates a new message buffer. To increase the execution speed, it is recommended to set POSCFG_MSG_MEMORY to 1. Otherwise, nosMessageAlloc will need to call nosMemAlloc to allocate memory (and this is possibly slower than the pico]OS internal message allocator).
Usually the sending task would allocate a new message buffer, fill in its data and send it via nosMessageSend to the receiving task. The receiving task is responsible for freeing the message buffer again.
| msgSize | size of the requested message buffer in bytes. |
| NANOEXT VAR_t POSCALL nosMessageAvailable | ( | 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.
| NANOEXT void POSCALL nosMessageFree | ( | 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. |
| NANOEXT void* POSCALL nosMessageGet | ( | 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. The message buffer must have been allocated by calling nosMessageAlloc before. | |
| taskhandle | handle to the task to send the message to. |
| NANOEXT void* POSCALL nosMessageWait | ( | 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