prcv_mbf
ER_UINT prcv_mbf (ID mbfid, VP msg);
- There is a message in the message buffer.
This service call takes out the oldest message from the message buffer and stores the message to the area specified by msg and return the size of the message. As a result, the size of available space in the target message buffer increases by the amount calculated by the following expression.
This service call takes out the oldest message from the message buffer and stores the message to the area specified by msg and return the size of the message. As a result, the size of available space in the target message buffer increases by the amount calculated by the following expression.
In addition, this service call repeats the following processing until task in the transmission wait queue is lost or it becomes impossible to store the message in the message buffer.
- When there is a task in the transmission wait queue and there is available space in the message buffer for the message specified by the task in the top of the transmission wait queue, the task is unlinked from the transmission wait queue and moves from the WAITING state (message transmission wait state) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state. As a result, the size of available space in the target message buffer decreases by the amount calculated by the following expression.
- There is no message in the message buffer and there is a task in the transmission wait queue.
This service call stores the message specified by the task in the top of the transmission wait queue to the area pointed by the parameter msg. As a result, the task is unlinked from the transmission wait queue and moves from the WAITING state (message transmission wait state) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note, this situation is caused only when the size of the message buffer is 0.
This service call stores the message specified by the task in the top of the transmission wait queue to the area pointed by the parameter msg. As a result, the task is unlinked from the transmission wait queue and moves from the WAITING state (message transmission wait state) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note, this situation is caused only when the size of the message buffer is 0.
- There is no message in the message buffer and there is no task in the transmission wait queue.
This service call returns "E_TMOUT".
This service call returns "E_TMOUT".
Note The maximum message size is defined at creating the message buffer. The size of the area pointed by msg must be not less than the maximum message size.