Skip to content

Commit 73eb463

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Merge branch 'deepikabhavnani-atcmd_docs' into rollup2
2 parents 4bde4c4 + a51b0a3 commit 73eb463

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

platform/ATCmdParser.h

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
8282
/**
8383
* Constructor
8484
*
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
9090
*/
9191
ATCmdParser(FileHandle *fh, const char *output_delimiter = "\r",
9292
int buffer_size = 256, int timeout = 8000, bool debug = false)
@@ -114,21 +114,24 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
114114
/**
115115
* Allows timeout to be changed between commands
116116
*
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
118119
*/
119120
void set_timeout(int timeout)
120121
{
121122
_timeout = timeout;
122123
}
123124

124125
/**
125-
* For backwards compatibility.
126+
* For backward compatibility.
126127
* @deprecated Do not use this function. This function has been replaced with set_timeout for consistency.
127128
*
128129
* Please use set_timeout(int) API only from now on.
129130
* Allows timeout to be changed between commands
130131
*
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+
*
132135
*/
133136
MBED_DEPRECATED_SINCE("mbed-os-5.5.0", "Replaced with set_timeout for consistency")
134137
void setTimeout(int timeout)
@@ -139,7 +142,7 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
139142
/**
140143
* Sets string of characters to use as line delimiters
141144
*
142-
* @param output_delimiter string of characters to use as line delimiters
145+
* @param output_delimiter String of characters to use as line delimiters
143146
*/
144147
void set_delimiter(const char *output_delimiter)
145148
{
@@ -165,20 +168,20 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
165168
/**
166169
* Allows traces from modem to be turned on or off
167170
*
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.
169172
*/
170173
void debug_on(uint8_t on)
171174
{
172175
_dbg_on = (on) ? 1 : 0;
173176
}
174177

175178
/**
176-
* For backwards compatibility.
179+
* For backward compatibility.
177180
* @deprecated Do not use this function. This function has been replaced with debug_on for consistency.
178181
*
179182
* Allows traces from modem to be turned on or off
180183
*
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.
182185
*/
183186
MBED_DEPRECATED_SINCE("mbed-os-5.5.0", "Replaced with debug_on for consistency")
184187
void debugOn(uint8_t on)
@@ -237,17 +240,17 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
237240
/**
238241
* Write an array of bytes to the underlying stream
239242
*
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
242245
* @return number of bytes written or -1 on failure
243246
*/
244247
int write(const char *data, int size);
245248

246249
/**
247250
* Read an array of bytes from the underlying stream
248251
*
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
251254
* @return number of bytes read or -1 on failure
252255
*/
253256
int read(char *data, int size);
@@ -256,8 +259,8 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
256259
* Direct printf to underlying stream
257260
* @see printf
258261
*
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
261264
* @return number of bytes written or -1 on failure
262265
*/
263266
int printf(const char *format, ...) MBED_PRINTF_METHOD(1, 2);
@@ -268,8 +271,8 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
268271
* Direct scanf on underlying stream
269272
* @see scanf
270273
*
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
273276
* @return number of bytes read or -1 on failure
274277
*/
275278
int scanf(const char *format, ...) MBED_SCANF_METHOD(1, 2);
@@ -279,8 +282,8 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
279282
/**
280283
* Attach a callback for out-of-band data
281284
*
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
284287
* @note out-of-band data is only processed during a scanf call
285288
*/
286289
void oob(const char *prefix, mbed::Callback<void()> func);
@@ -293,7 +296,7 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
293296
/**
294297
* Abort current recv
295298
*
296-
* Can be called from oob handler to interrupt the current
299+
* Can be called from out-of-band handler to interrupt the current
297300
* recv operation.
298301
*/
299302
void abort();
@@ -304,7 +307,7 @@ class ATCmdParser : private NonCopyable<ATCmdParser> {
304307
* Process out-of-band data in the receive buffer. This function
305308
* returns immediately if there is no data to process.
306309
*
307-
* @return true if oob data processed, false otherwise
310+
* @return true if out-of-band data processed, false otherwise
308311
*/
309312
bool process_oob(void);
310313
};

0 commit comments

Comments
 (0)