| Home · All Classes · Annotated · Functions |
The QRawModemChannel class provides raw access to a data channel. More...
#include <QRawModemChannel>
Inherits QSerialIODevice.
The QRawModemChannel class provides raw access to a data channel.
The QRawModemChannel class allows an application to directly access an AT-based modem for data, fax, video, etc. The data is delivered directly to the application for processing.
This feature is not recommended if the qtopiaphone library already has an appropriate API for the function that you wish to perform. For example, GPRS support is already built into qtopiaphone.
The raw modem channel appears to the application as a virtual serial device. Data can be read or written using the usual QIODevice methods. Modem control signals such as DTR, RTS, DCD, etc, can be queried and adjusted.
See also QPhoneLine and QRawModem.
This enum defines the reason why a channel became detached.
| Constant | Value | Description |
|---|---|---|
| QRawModemChannel::Closed | 0 | The application called QRawModemChannel::close(). |
| QRawModemChannel::Busy | 1 | The channel is busy because some other application is currently accessing it. There are typically limitations on how many channels can be active at once on a modem. Different types of channels can block each other; for example, data calls may not be possible if a GPRS session is active. The "Busy" reason code indicates that a retry at some future time may be successful. |
| QRawModemChannel::Unsupported | 2 | The requested type of channel is not supported, and further retries will also be unsuccessful. |
| QRawModemChannel::Interrupted | 3 | The channel was interrupted in some way that caused the connection to be severed; for example, a modem reset. |
This enum defines the type of raw modem channel that is requested. This is intended as a hint, because some modems need to create different channels depending upon the intended use.
| Constant | Value | Description |
|---|---|---|
| QRawModemChannel::Data | 0 | Regular data connection. |
| QRawModemChannel::Fax | 1 | Fascimile data will be sent over the channel. |
| QRawModemChannel::Video | 2 | Live streaming video will be sent over the channel. |
| QRawModemChannel::External | 3 | The data will be forwarded to an external serial port to allow a connected device to directly access the modem. |
| QRawModemChannel::Other | 4 | Some other kind of data will be sent over the channel. |
Construct a new raw modem channel object attached to parent.
Destruct a raw modem channel object.
Attach to a raw modem channel of a particular type on a particular phone line. This object will respond with the "attached()" signal once the channel is ready to accept data. The "detached()" signal will be emitted if the channel could not be established for some reason.
If flowControl is true, then the underlying implementation should handle CTS/RTS flow control on the channel automatically. If flowControl is false, then the application is responsible for flow control if it is important to its requirements.
Signal that is emitted when the channel attaches.
Determine how many bytes are currently available to be read from the raw modem channel.
Reimplemented from QIODevice.
Determine the current state of the modem channel's carrier (DCD) signal.
Reimplemented from QSerialIODevice.
Issue an AT command, cmd, on this raw modem channel, and send the response to the indicated slot on target. This is typically used to perform connection setup prior to entering data mode.
Some modems require that connection setup be performed on the main control channel, rather than the data channel. The chat() function will take care of this detail automatically.
While a chat is in progress that uses the data channel, the readyRead() signal will be suppressed. The caller should refrain from reading or writing bytes to the channel until after the chat is complete and the readyRead() signal arrives. Reading bytes from or writing bytes to the channel may interfere with the chat process.
Close a raw modem channel. It is assumed that the caller has already taken appropriate steps to inform the modem that the data call has ended (e.g. dropping DTR, sending a hangup AT command, etc).
Reimplemented from QIODevice.
Determine the current state of the modem channel's CTS signal.
Reimplemented from QSerialIODevice.
Signal that is emitted to give the reason that a channel was detached.
Discard buffered data that hasn't been written to the underlying raw modem channel yet.
Reimplemented from QSerialIODevice.
Determine the current state of the modem channel's DSR signal.
Reimplemented from QSerialIODevice.
Determine the current state of the modem channel's DTR signal.
Reimplemented from QSerialIODevice.
See also setDtr().
Flush pending data to the raw modem channel.
Read data from the raw modem channel into the buffer data. Up to maxlen bytes will be read.
Reimplemented from QIODevice.
Determine the current state of the modem channel's RTS signal.
Reimplemented from QSerialIODevice.
See also setRts().
Set the current state of the modem channel's DTR signal to value.
Reimplemented from QSerialIODevice.
See also dtr().
Set the current state of the modem channel's RTS signal to value.
Reimplemented from QSerialIODevice.
See also rts().
Write len bytes to the raw modem channel from the buffer data.
Reimplemented from QIODevice.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |