@@ -82,11 +82,11 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
82
82
/* *
83
83
* Constructor
84
84
*
85
- * @param fh A FileHandle to a digital interface to use for AT commands
86
- * @param output_delimiter end of command line termination
87
- * @param buffer_size size of internal buffer for transaction
88
- * @param timeout timeout of the connection
89
- * @param debug turns on/off debug output for AT commands
85
+ * @param fh A FileHandle to the digital interface, used for AT commands
86
+ * @param output_delimiter End of command- line termination
87
+ * @param buffer_size Size of internal buffer for transaction
88
+ * @param timeout Timeout of the connection
89
+ * @param debug Turns on/off debug output for AT commands
90
90
*/
91
91
ATCmdParser (FileHandle *fh, const char *output_delimiter = " \r " ,
92
92
int buffer_size = 256 , int timeout = 8000 , bool debug = false )
@@ -114,21 +114,24 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
114
114
/* *
115
115
* Allows timeout to be changed between commands
116
116
*
117
- * @param timeout timeout of the connection
117
+ * @param timeout ATCmdParser APIs (read/write/send/recv ..etc) throw an
118
+ * error if no response is received in `timeout` duration
118
119
*/
119
120
void set_timeout (int timeout)
120
121
{
121
122
_timeout = timeout;
122
123
}
123
124
124
125
/* *
125
- * For backwards compatibility.
126
+ * For backward compatibility.
126
127
* @deprecated Do not use this function. This function has been replaced with set_timeout for consistency.
127
128
*
128
129
* Please use set_timeout(int) API only from now on.
129
130
* Allows timeout to be changed between commands
130
131
*
131
- * @param timeout timeout of the connection
132
+ * @param timeout ATCmdParser APIs (read/write/send/recv ..etc) throw an
133
+ * error if no response is received in `timeout` duration
134
+ *
132
135
*/
133
136
MBED_DEPRECATED_SINCE (" mbed-os-5.5.0" , " Replaced with set_timeout for consistency" )
134
137
void setTimeout (int timeout)
@@ -139,7 +142,7 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
139
142
/* *
140
143
* Sets string of characters to use as line delimiters
141
144
*
142
- * @param output_delimiter string of characters to use as line delimiters
145
+ * @param output_delimiter String of characters to use as line delimiters
143
146
*/
144
147
void set_delimiter (const char *output_delimiter)
145
148
{
@@ -165,20 +168,20 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
165
168
/* *
166
169
* Allows traces from modem to be turned on or off
167
170
*
168
- * @param on set as 1 to turn on traces and vice versa.
171
+ * @param on Set as 1 to turn on traces and vice versa.
169
172
*/
170
173
void debug_on (uint8_t on)
171
174
{
172
175
_dbg_on = (on) ? 1 : 0 ;
173
176
}
174
177
175
178
/* *
176
- * For backwards compatibility.
179
+ * For backward compatibility.
177
180
* @deprecated Do not use this function. This function has been replaced with debug_on for consistency.
178
181
*
179
182
* Allows traces from modem to be turned on or off
180
183
*
181
- * @param on set as 1 to turn on traces and vice versa.
184
+ * @param on Set as 1 to turn on traces and vice versa.
182
185
*/
183
186
MBED_DEPRECATED_SINCE (" mbed-os-5.5.0" , " Replaced with debug_on for consistency" )
184
187
void debugOn (uint8_t on)
@@ -237,17 +240,17 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
237
240
/* *
238
241
* Write an array of bytes to the underlying stream
239
242
*
240
- * @param data the array of bytes to write
241
- * @param size number of bytes to write
243
+ * @param data The array of bytes to write
244
+ * @param size Number of bytes to write
242
245
* @return number of bytes written or -1 on failure
243
246
*/
244
247
int write (const char *data, int size);
245
248
246
249
/* *
247
250
* Read an array of bytes from the underlying stream
248
251
*
249
- * @param data the destination for the read bytes
250
- * @param size number of bytes to read
252
+ * @param data The buffer for filling the read bytes
253
+ * @param size Number of bytes to read
251
254
* @return number of bytes read or -1 on failure
252
255
*/
253
256
int read (char *data, int size);
@@ -256,8 +259,8 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
256
259
* Direct printf to underlying stream
257
260
* @see printf
258
261
*
259
- * @param format format string to pass to printf
260
- * @param ... arguments to printf
262
+ * @param format Format string to pass to printf
263
+ * @param ... Variable arguments to printf
261
264
* @return number of bytes written or -1 on failure
262
265
*/
263
266
int printf (const char *format, ...) MBED_PRINTF_METHOD(1 , 2 );
@@ -268,8 +271,8 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
268
271
* Direct scanf on underlying stream
269
272
* @see scanf
270
273
*
271
- * @param format format string to pass to scanf
272
- * @param ... arguments to scanf
274
+ * @param format Format string to pass to scanf
275
+ * @param ... Variable arguments to scanf
273
276
* @return number of bytes read or -1 on failure
274
277
*/
275
278
int scanf (const char *format, ...) MBED_SCANF_METHOD(1 , 2 );
@@ -279,8 +282,8 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
279
282
/* *
280
283
* Attach a callback for out-of-band data
281
284
*
282
- * @param prefix string on when to initiate callback
283
- * @param func callback to call when string is read
285
+ * @param prefix String on when to initiate callback
286
+ * @param func Callback to call when string is read
284
287
* @note out-of-band data is only processed during a scanf call
285
288
*/
286
289
void oob (const char *prefix, mbed::Callback<void ()> func);
@@ -293,7 +296,7 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
293
296
/* *
294
297
* Abort current recv
295
298
*
296
- * Can be called from oob handler to interrupt the current
299
+ * Can be called from out-of-band handler to interrupt the current
297
300
* recv operation.
298
301
*/
299
302
void abort ();
@@ -304,7 +307,7 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
304
307
* Process out-of-band data in the receive buffer. This function
305
308
* returns immediately if there is no data to process.
306
309
*
307
- * @return true if oob data processed, false otherwise
310
+ * @return true if out-of-band data processed, false otherwise
308
311
*/
309
312
bool process_oob (void );
310
313
};
0 commit comments