@@ -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
*/
@@ -84,7 +84,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
84
84
osMessageQueueDelete (_id);
85
85
}
86
86
87
- /* * Check if the queue is empty
87
+ /* * Check if the queue is empty.
88
88
*
89
89
* @return True if the queue is empty, false if not
90
90
*
@@ -95,7 +95,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
95
95
return osMessageQueueGetCount (_id) == 0 ;
96
96
}
97
97
98
- /* * Check if the queue is full
98
+ /* * Check if the queue is full.
99
99
*
100
100
* @return True if the queue is full, false if not
101
101
*
@@ -113,19 +113,19 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
113
113
* (higher numbers indicate higher priority) on insertion.
114
114
*
115
115
* The timeout indicated by the parameter `millisec` specifies how long the
116
- * function will block waiting for the message to be inserted into the
116
+ * function blocks waiting for the message to be inserted into the
117
117
* queue.
118
118
*
119
119
* The parameter `millisec` can have the following values:
120
120
* - When the timeout is 0 (the default), the function returns instantly.
121
- * - When the timeout is osWaitForever the function will wait for an
121
+ * - When the timeout is osWaitForever, the function waits for an
122
122
* infinite time.
123
- * - For all other values the function will wait for the given number of
123
+ * - For all other values, the function waits for the given number of
124
124
* milliseconds.
125
125
*
126
126
* @param data Pointer to the element to insert into the queue.
127
127
* @param millisec Timeout for the operation to be executed, or 0 in case
128
- * of no- timeout. (default: 0)
128
+ * of no timeout. (default: 0)
129
129
* @param prio Priority of the operation or 0 in case of default.
130
130
* (default: 0)
131
131
*
@@ -136,7 +136,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
136
136
* queue in the given time.
137
137
* @a osErrorResource The message could not be inserted because
138
138
* the queue is full.
139
- * @a osErrorParameter Internal error or non-zero timeout specified
139
+ * @a osErrorParameter Internal error or nonzero timeout specified
140
140
* in an ISR.
141
141
*
142
142
* @note You may call this function from ISR context if the millisec
@@ -153,17 +153,17 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
153
153
* in the value field of the returned `osEvent` object.
154
154
*
155
155
* The timeout specified by the parameter `millisec` specifies how long the
156
- * function will wait to retrieve the message from the queue.
156
+ * function waits to retrieve the message from the queue.
157
157
*
158
158
* The timeout parameter can have the following values:
159
159
* - When the timeout is 0, the function returns instantly.
160
- * - When the timeout is osWaitForever (default), the function will wait
160
+ * - When the timeout is osWaitForever (default), the function waits
161
161
* infinite time until the message is retrieved.
162
- * - When the timeout is any other value the function will wait for th
162
+ * - When the timeout is any other value, the function waits for the
163
163
* specified time before returning a timeout error.
164
164
*
165
165
* Messages are retrieved in descending priority order. If two messages
166
- * share the same priority level they are retrieved in first-in, first-out
166
+ * share the same priority level, they are retrieved in first-in, first-out
167
167
* (FIFO) order.
168
168
*
169
169
* @param millisec Timeout value or 0 in case of no time-out.
@@ -172,7 +172,7 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
172
172
* @return Event information that includes the message in event. Message
173
173
* value and the status code in event.status:
174
174
* @a osEventMessage Message successfully received.
175
- * @a osOK No message is available in the queue and no
175
+ * @a osOK No message is available in the queue, and no
176
176
* timeout was specified.
177
177
* @a osEventTimeout No message was received before a timeout
178
178
* event occurred.
0 commit comments