| Home · All Classes · Annotated · Functions |
The QAtResultParser class provides support for parsing the response to AT modem commands More...
#include <QAtResultParser>
The QAtResultParser class provides support for parsing the response to AT modem commands
The QAtResultParser provides functions that support parsing the response from AT modem commands and unsolicited notifications.
The following example demonstrates how to parse the response to a AT+CPOL (preferred operator list) query:
QAtResultParser parser( result );
while ( parser.next( "+CPOL:" ) ) {
uint index = parser.readNumeric();
uint format = parser.readNumeric();
QString name;
if ( format == 2 ) // Numeric format.
name = QString::number( parser.readNumeric() );
else // String format.
name = parser.readString();
}
See also QAtResult.
Construct an AT modem result parser to parse the content of result. The caller will typically follow this with a call to next() to position the parser on the first line of relevant result data.
Construct an AT modem result parser and initialize it to parse the specified unsolicited notification. Notifications are expected to have the format NAME: VALUE. The next() function will be called internally to position the parser at VALUE.
Destruct this AT modem result parser.
Get the full content of the line that next() positioned us on. The line's prefix is not included in the return value.
Get the content of all lines that begin with prefix starting at the current position.
Position this AT modem result parser on the next line that begins with prefix.
Read a list of values surrounded by parentheses. This is for complex command results that cannot be parsed with readNumeric() and readString().
Read the next line of input as literal text, without looking for a prefix. This is for results from commands such as AT+CMGL which place the PDU on a line of its own.
Read a numeric value from the current line.
Read a string from the current line.
Reset this AT modem result parser to the beginning of the content.
Skip the contents of a comma-separated field in the current line.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |