@@ -68,15 +68,24 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
68
68
@param data message pointer.
69
69
@param millisec timeout value or 0 in case of no time-out. (default: 0)
70
70
@param prio priority value or 0 in case of default. (default: 0)
71
- @return status code that indicates the execution status of the function.
71
+ @return status code that indicates the execution status of the function:
72
+ @a osOK the message has been put into the queue.
73
+ @a osErrorTimeout the message could not be put into the queue in the given time.
74
+ @a osErrorResource not enough space in the queue.
75
+ @a osErrorParameter internal error or non-zero timeout specified in an ISR.
72
76
*/
73
77
osStatus put (T* data, uint32_t millisec=0 , uint8_t prio=0 ) {
74
78
return osMessageQueuePut (_id, &data, prio, millisec);
75
79
}
76
80
77
- /* * Get a message or Wait for a message from a Queue.
81
+ /* * Get a message or Wait for a message from a Queue. Messages are retrieved in a descending priority order or
82
+ first in first out when the priorities are the same.
78
83
@param millisec timeout value or 0 in case of no time-out. (default: osWaitForever).
79
- @return event information that includes the message and the status code.
84
+ @return event information that includes the message in event.value and the status code in event.status:
85
+ @a osEventMessage message received.
86
+ @a osOK no message is available in the queue and no timeout was specified.
87
+ @a osEventTimeout no message has arrived during the given timeout period.
88
+ @a osErrorParameter a parameter is invalid or outside of a permitted range.
80
89
*/
81
90
osEvent get (uint32_t millisec=osWaitForever) {
82
91
osEvent event;
0 commit comments