| Home · All Classes · Annotated · Functions |
The QAtChat class provides a simple mechanism for sending AT commands to modems More...
#include <QAtChat>
Inherits QObject.
The QAtChat class provides a simple mechanism for sending AT commands to modems
The QAtChat interface provides a simple mechanism for sending AT commands to modems and retrieving the responses to those commands. It can be preferable to manually processing the raw binary data from a serial device.
QAtChat are obtained by calling QSerialIODevice::atchat().
See also QSerialIODevice.
Abort an ATD command. Usually just sends and empty line to the modem, but some modems use need ATH instead.
Signal that is emitted when a call-related notification such as CONNECT, NO CARRIER, BUSY, etc occurs, but which was not associated with a corresponding ATD command. The type parameter is the text of the notification.
Send command to the underlying device. If the command fails, the caller will not be notified.
This is an overloaded member function, provided for convenience.
Send command to the underlying device. When the command finishes, notify slot on target. The slot has the signature done(bool,QAtResult&). The boolean parameter indicates if the command succeeded or not, and the QAtResult parameter contains the full result data.
The optional data parameter can be used to pass extra user data that will be made available to the target slot in the QAtResult::userData() field.
Send command to the underlying device, followed by pdu on the next line. When the command finishes, notify slot on target.
The pdu will be transmitted in hexadecimal, followed by a CTRL-Z.
The optional data parameter can be used to pass extra user data that will be made available to the target slot in the QAtResult::userData() field.
See also chat().
Signal that is emitted when the link is detected to be dead.
See also deadTimeout() and setDeadTimeout().
Get the current link dead detection timeout in milliseconds. If this object sends a command to the link and it does not receive a response within the specified time, it will emit the dead() signal. If the value is -1 (the default), the link dead detection timeout will be disabled.
When the link dead detection timeout expires, all pending commands will fail with QAtResult::Dead as the result code.
See also setDeadTimeout() and dead().
Signal that is emitted when a PDU notification such as +CMT, +CDS, or +CBM arrives. The type parameter contains the type and PDU length (e.g. +CBM: 88), and the pdu parameter contains the binary data for the PDU.
Register type as an unsolicited notification on this object. Whenever a line is received from the modem that starts with type, the indicated slot on target will be called. The slot has the signature notification(const QString&). The entire notification, including the type prefix, will be passed to the slot.
If mayBeCommand is true, then the notification type may sometimes appear as a command result. When it does, the command's completion slot should be called, not the unsolicited notification slot. An example is +CREG:, which can appear in response to an AT+CREG command, or as an unsolicited notification.
Request that the next line from the modem be delivered to slot on target. This is used to collect up extra lines of data on an unsoliticited response. The slot takes a single QString parameter.
Resume the AT chat process after a suspension. Any data that is currently in the buffer will be processed for unsolicited notifications.
See also suspend().
Send command directly to the modem without waiting for a response, and without waiting for any existing commands to complete. This is typically used to send ATH to a modem to abort an ATD command.
Set +CPIN as a terminator for the AT+CPIN? command. Needed on some modems that do not send OK.
Set the link dead detection timeout to msec milliseconds. If this object sends a command to the link and it does not receive a response within the specified time, it will emit the dead() signal. If msec is -1, the link dead detection timeout will be disabled.
When the link dead detection timeout expires, all pending commands will fail with QAtResult::Dead as the result code.
See also deadTimeout() and dead().
Set the characters to use in debug output to from, to, notify, and unknown. The defaults are F, T, N, and ?. The caller may wish to use different sets on separate channels so that it is clear from the debug output which channel is being used.
Suspend the AT chat process from the underlying device so that read() and write() can be used to process binary data. Call resume() to restart the AT chat process after the binary data.
See also resume().
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |