|
|
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. - Parameters:
-
| 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. |
- Returns:
- pointer to the received message. Note that the message memory must be freed again with posMessageFree when POSCFG_MSG_MEMORY is defined to 1. NULL is returned when no message was received within the specified time (=timeout).
Hint: NULL may also be returned when the system has not enough events. In this case, please increase the value for POSCFG_MAX_EVENTS in your poscfg.h .
- Note:
- POSCFG_FEATURE_MSGBOXES must be defined to 1 to have message box support compiled in.
POSCFG_FEATURE_MSGWAIT must be defined to 1 to have this function compiled in.
- See also:
- posMessageFree, posMessageGet, posMessageAvailable, posMessageSend, HZ, MS
|