Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QAtResult Class Reference
[QtBaseModule]

The QAtResult class provides access to the results of AT modem commands and unsolicited notifications More...

    #include <QAtResult>

Public Types

Public Functions


Detailed Description

The QAtResult class provides access to the results of AT modem commands and unsolicited notifications

AT commands that are sent to a modem with QAtChat::chat() result in a QAtResult object being made available to describe the result of the command when it completes.

The resultCode() method can be used to determine the exact cause of an AT modem command failure. The content() method can be used to access the response content that was returned from the command. For complex response contents, the QAtResultParser class can be used to decode the response.

See also QAtChat and QAtResultParser.


Member Type Documentation

enum QAtResult::ResultCode

Result codes for AT modem commands.

ConstantValueDescription
QAtResult::OK-1Command responded with OK
QAtResult::Connect-2Command responded with CONNECT
QAtResult::NoCarrier-3Command responded with NO CARRIER
QAtResult::Error-4Command responded with ERROR
QAtResult::NoDialtone-5Command responded with NO DIALTONE
QAtResult::Busy-6Command responded with BUSY
QAtResult::NoAnswer-7Command responded with NO ANSWER
QAtResult::Dead-8The link is dead
QAtResult::PhoneFailure0GSM 27.07 code 0: phone failure
QAtResult::NoConnectionToPhone1GSM 27.07 code 1: no connection to phone
QAtResult::PhoneAdapterLinkReserved2GSM 27.07 code 2: phone-adaptor link reserved
QAtResult::OperationNotAllowed3GSM 27.07 code 3: operation not allowed
QAtResult::OperationNotSupported4GSM 27.07 code 4: operation not supported
QAtResult::PhSimPinRequired5GSM 27.07 code 5: PH-SIM PIN required
QAtResult::PhFSimPinRequired6GSM 27.07 code 6: PH-FSIM PIN required
QAtResult::PhFSimPukRequired7GSM 27.07 code 7: PH-FSIM PUK required
QAtResult::SimNotInserted10GSM 27.07 code 10: SIM not inserted
QAtResult::SimPinRequired11GSM 27.07 code 11: SIM PIN required
QAtResult::SimPukRequired12GSM 27.07 code 12: SIM PUK required
QAtResult::SimFailure13GSM 27.07 code 13: SIM failure
QAtResult::SimBusy14GSM 27.07 code 14: SIM busy
QAtResult::SimWrong15GSM 27.07 code 15: SIM wrong
QAtResult::IncorrectPassword16GSM 27.07 code 16: incorrect password
QAtResult::SimPin2Required17GSM 27.07 code 17: SIM PIN2 required
QAtResult::SimPuk2Required18GSM 27.07 code 18: SIM PUK2 required
QAtResult::MemoryFull20GSM 27.07 code 20: memory full
QAtResult::InvalidIndex21GSM 27.07 code 21: invalid index
QAtResult::NotFound22GSM 27.07 code 22: not found
QAtResult::MemoryFailure23GSM 27.07 code 23: memory failure
QAtResult::TextStringTooLong24GSM 27.07 code 24: text string too long
QAtResult::InvalidCharsInTextString25GSM 27.07 code 25: invalid characters in text string
QAtResult::DialStringTooLong26GSM 27.07 code 26: dial string too long
QAtResult::InvalidCharsInDialString27GSM 27.07 code 27: invalid characters in dial string
QAtResult::NoNetworkService30GSM 27.07 code 30: no network service
QAtResult::NetworkTimeout31GSM 27.07 code 31: network timeout
QAtResult::NetworkNotAllowed32GSM 27.07 code 32: network not allowed - emergency calls only
QAtResult::NetPersPinRequired40GSM 27.07 code 40: network personalization PIN required
QAtResult::NetPersPukRequired41GSM 27.07 code 41: network personalization PUK required
QAtResult::NetSubsetPersPinRequired42GSM 27.07 code 42: network subset personalization PIN required
QAtResult::NetSubsetPersPukRequired43GSM 27.07 code 43: network subset personalization PUK required
QAtResult::ServProvPersPinRequired44GSM 27.07 code 44: service provider personalization PIN required
QAtResult::ServProvPersPukRequired45GSM 27.07 code 45: service provider personalization PUK required
QAtResult::CorpPersPinRequired46GSM 27.07 code 46: corporate personalization PIN required
QAtResult::CorpPersPukRequired47GSM 27.07 code 47: corporate personalization PUK required
QAtResult::HiddenKeyRequired48GSM 27.07 code 48: hidden key required
QAtResult::Unknown100GSM 27.07 code 100: unknown
QAtResult::IllegalMS103GSM 27.07 code 103: Illegal MS
QAtResult::IllegalME106GSM 27.07 code 106: Illegal ME
QAtResult::GPRSServicesNotAllowed107GSM 27.07 code 107: GPRS services not allowed
QAtResult::PLMNNotAllowed111GSM 27.07 code 111: PLMN not allowed
QAtResult::LocationAreaNotAllowed112GSM 27.07 code 112: Location area not allowed
QAtResult::RoamingNotAllowed113GSM 27.07 code 113: Roaming not allowed in this location area
QAtResult::ServiceOptionNotSupported132GSM 27.07 code 132: service option not supported
QAtResult::ServiceOptionNotSubscribed133GSM 27.07 code 133: service option not subscribed
QAtResult::ServiceOptionOutOfOrder134GSM 27.07 code 134: service option temporarily out of order
QAtResult::UnspecifiedGPRSError148GSM 27.07 code 148: unspecified GPRS error
QAtResult::PDPAuthenticationFailure149GSM 27.07 code 149: PDP authentication failure
QAtResult::InvalidMobileClass150GSM 27.07 code 150: invalid mobile class
QAtResult::VBSVGCSNotSupported151GSM 27.07 code 151: VBS/VGCS not supported by the network
QAtResult::NoServiceSubscriptionOnSim152GSM 27.07 code 152: No service subscription on SIM
QAtResult::NoSubscriptionForGroupId153GSM 27.07 code 153: No subscription for group ID
QAtResult::GroupIdNotActivatedOnSim154GSM 27.07 code 154: Group Id not activated on SIM
QAtResult::NoMatchingNotification155GSM 27.07 code 155: No matching notification
QAtResult::VBSVGCSCallAlreadyPresent156GSM 27.07 code 156: VBS/VGCS call already present
QAtResult::Congestion157GSM 27.07 code 157: Congestion
QAtResult::NetworkFailure158GSM 27.07 code 158: Network failure
QAtResult::UplinkBusy159GSM 27.07 code 159: Uplink busy
QAtResult::NoAccessRightsForSimFile160GSM 27.07 code 160: No access rights for SIM file
QAtResult::NoSubscriptionForPriority161GSM 27.07 code 161: No subscription for priority
QAtResult::OperationNotApplicable162GSM 27.07 code 162: operation not applicable or not possible
QAtResult::MEFailure300GSM 27.05 code 300: ME failure
QAtResult::SMSServiceOfMEReserved301GSM 27.05 code 301: SMS service of ME reserved
QAtResult::SMSOperationNotAllowed302GSM 27.05 code 302: operation not allowed
QAtResult::SMSOperationNotSupported303GSM 27.05 code 303: operation not supported
QAtResult::InvalidPDUModeParameter304GSM 27.05 code 304: invalid PDU mode parameter
QAtResult::InvalidTextModeParameter305GSM 27.05 code 305: invalid text mode parameter
QAtResult::USimNotInserted310GSM 27.05 code 310: (U)SIM not inserted
QAtResult::USimPinRequired311GSM 27.05 code 311: (U)SIM PIN required
QAtResult::PHUSimPinRequired312GSM 27.05 code 312: PH-(U)SIM PIN required
QAtResult::USimFailure313GSM 27.05 code 313: (U)SIM failure
QAtResult::USimBusy314GSM 27.05 code 314: (U)SIM busy
QAtResult::USimWrong315GSM 27.05 code 315: (U)SIM wrong
QAtResult::USimPukRequired316GSM 27.05 code 316: (U)SIM PUK required
QAtResult::USimPin2Required317GSM 27.05 code 317: (U)SIM PIN2 required
QAtResult::USimPuk2Required318GSM 27.05 code 318: (U)SIM PUK2 required
QAtResult::SMSMemoryFailure320GSM 27.05 code 320: memory failure
QAtResult::InvalidMemoryIndex321GSM 27.05 code 321: invalid memory index
QAtResult::SMSMemoryFull322GSM 27.05 code 322: memory full
QAtResult::SMSCAddressUnknown330GSM 27.05 code 330: SMSC address unknown
QAtResult::SMSNoNetworkService331GSM 27.05 code 331: no network service
QAtResult::SMSNetworkTimeout332GSM 27.05 code 332: network timeout
QAtResult::NoCNMAAckExpected340GSM 27.05 code 340: no +CNMA acknowledgment expected
QAtResult::UnknownError500GSM 27.05 code 500: unknown error


Member Function Documentation

QAtResult::QAtResult ()

Construct a new QAtResult object. The result() will be OK, and the content() empty.

QAtResult::QAtResult ( const QAtResult & other )

Construct a copy of other.

QAtResult::~QAtResult ()

Destruct this QAtResult object.

void QAtResult::append ( const QString & value )

Append value to the current content, after a line terminator.

See also content() and setContent().

QString QAtResult::content () const

Returns the content that was returned with an AT command's result.

See also setContent() and append().

bool QAtResult::ok () const

Returns true if this result indicates a successful command; false otherwise. Success is indicated when resultCode() returns either QAtResult::OK or QAtResult::Connect. All other result codes indicate failure.

See also resultCode().

QString QAtResult::result () const

Returns the result line that terminated the command's response. This is usually a string such as OK, ERROR, +CME ERROR: N, and so on.

The resultCode() function is a better way to determine why a command failed, but sometimes it is necessary to parse the text result line. For example, for CONNECT baudrate, the caller may be interested in the baud rate.

See also setResult(), resultCode(), and ok().

QAtResult::ResultCode QAtResult::resultCode () const

Returns the numeric result code associated with result().

Extended error codes are only possible if the appropriate modem error mode has been enabled (e.g. with the AT+CMEE=1 command). Otherwise most errors will simply be reported as QAtResult::Error.

See also setResultCode(), result(), and ok().

void QAtResult::setContent ( const QString & value )

Sets the content that was returned with an AT command's result to value.

See also content() and append().

void QAtResult::setResult ( const QString & value )

Sets the result line that terminated the command's response to value. This will also update resultCode() to reflect the appropriate code.

See also result() and resultCode().

void QAtResult::setResultCode ( QAtResult::ResultCode value )

Sets the numeric result code to value, and update result() to reflect the value.

See also resultCode() and result().

void QAtResult::setUserData ( QAtResult::UserData * value )

Sets the user data associated with this result object to value.

See also userData().

QAtResult::UserData * QAtResult::userData () const

Returns the user data associated with this result object.

See also setUserData().

QString QAtResult::verboseResult () const

Returns a more verbose version of result(), suitable for debug output. Many modems report extended errors by number (e.g. +CME ERROR: 4), which can be difficult to use when diagnosing problems. This function returns a string that is more suitable for diagnostic output than result(). If result() is already verbose, it will be returned as-is.

See also result().

QAtResult & QAtResult::operator= ( const QAtResult & other )

Assign the contents of other to this object.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3