@@ -39,19 +39,19 @@ namespace rtos {
39
39
/* * The Queue class represents a collection of objects that are stored first by
40
40
* order of priorty, and then in first-in, first-out (FIFO) order.
41
41
*
42
- * A queue is used to when data needs to stored and then accessed in the same
43
- * order that it has been stored. The order in which they are retrieved is in
44
- * order of descending priority, if multiple elements have the same priority
42
+ * You can use a queue when you need to store data and then access it in the same
43
+ * order that it has been stored. The order in which you retrieve the data is in
44
+ * order of descending priority. If multiple elements have the same priority,
45
45
* they are retrieved in FIFO order.
46
46
*
47
- * The object type stored in the queue can be an integer, pointer, or a generic
47
+ * The object type stored in the queue can be an integer, pointer or a generic
48
48
* type given by the template parameter T.
49
49
*
50
- * @tparam T Specifies the type of elements that are stored in the queue.
51
- * @tparam queue_sz Maximum number of messages that can be stored in the queue.
50
+ * @tparam T Specifies the type of elements stored in the queue.
51
+ * @tparam queue_sz Maximum number of messages that you can store in the queue.
52
52
*
53
- * @note Memory considerations: The queue control structures will be created on
54
- * current thread's stack, both for the mbed OS and underlying RTOS
53
+ * @note Memory considerations: The queue control structures are created on the
54
+ * current thread's stack, both for the Mbed OS and underlying RTOS
55
55
* objects (static or dynamic RTOS memory pools are not being used).
56
56
*
57
57
*/
@@ -82,7 +82,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
82
82
osMessageQueueDelete (_id);
83
83
}
84
84
85
- /* * Check if the queue is empty
85
+ /* * Check if the queue is empty.
86
86
*
87
87
* @return True if the queue is empty, false if not
88
88
*
@@ -92,7 +92,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
92
92
return osMessageQueueGetCount (_id) == 0 ;
93
93
}
94
94
95
- /* * Check if the queue is full
95
+ /* * Check if the queue is full.
96
96
*
97
97
* @return True if the queue is full, false if not
98
98
*
@@ -109,19 +109,19 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
109
109
* (higher numbers indicate higher priority) on insertion.
110
110
*
111
111
* The timeout indicated by the parameter `millisec` specifies how long the
112
- * function will block waiting for the message to be inserted into the
112
+ * function blocks waiting for the message to be inserted into the
113
113
* queue.
114
114
*
115
115
* The parameter `millisec` can have the following values:
116
116
* - When the timeout is 0 (the default), the function returns instantly.
117
- * - When the timeout is osWaitForever the function will wait for an
117
+ * - When the timeout is osWaitForever, the function waits for an
118
118
* infinite time.
119
- * - For all other values the function will wait for the given number of
119
+ * - For all other values, the function waits for the given number of
120
120
* milliseconds.
121
121
*
122
122
* @param data Pointer to the element to insert into the queue.
123
123
* @param millisec Timeout for the operation to be executed, or 0 in case
124
- * of no- timeout. (default: 0)
124
+ * of no timeout. (default: 0)
125
125
* @param prio Priority of the operation or 0 in case of default.
126
126
* (default: 0)
127
127
*
@@ -132,7 +132,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
132
132
* queue in the given time.
133
133
* @a osErrorResource The message could not be inserted because
134
134
* the queue is full.
135
- * @a osErrorParameter Internal error or non-zero timeout specified
135
+ * @a osErrorParameter Internal error or nonzero timeout specified
136
136
* in an ISR.
137
137
*
138
138
* @note You may call this function from ISR context if the millisec
@@ -149,17 +149,17 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
149
149
* in the value field of the returned `osEvent` object.
150
150
*
151
151
* The timeout specified by the parameter `millisec` specifies how long the
152
- * function will wait to retrieve the message from the queue.
152
+ * function waits to retrieve the message from the queue.
153
153
*
154
154
* The timeout parameter can have the following values:
155
155
* - When the timeout is 0, the function returns instantly.
156
- * - When the timeout is osWaitForever (default), the function will wait
156
+ * - When the timeout is osWaitForever (default), the function waits
157
157
* infinite time until the message is retrieved.
158
- * - When the timeout is any other value the function will wait for th
158
+ * - When the timeout is any other value, the function waits for the
159
159
* specified time before returning a timeout error.
160
160
*
161
161
* Messages are retrieved in descending priority order. If two messages
162
- * share the same priority level they are retrieved in first-in, first-out
162
+ * share the same priority level, they are retrieved in first-in, first-out
163
163
* (FIFO) order.
164
164
*
165
165
* @param millisec Timeout value or 0 in case of no time-out.
@@ -168,7 +168,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
168
168
* @return Event information that includes the message in event. Message
169
169
* value and the status code in event.status:
170
170
* @a osEventMessage Message successfully received.
171
- * @a osOK No message is available in the queue and no
171
+ * @a osOK No message is available in the queue, and no
172
172
* timeout was specified.
173
173
* @a osEventTimeout No message was received before a timeout
174
174
* event occurred.
0 commit comments