Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QSerialIODeviceMultiplexer Class Reference
[QtBaseModule]

The QSerialIODeviceMultiplexer class provides a base class for serial device multiplexing on AT-based modems. More...

    #include <QSerialIODeviceMultiplexer>

Inherits QObject.

Inherited by QGsm0710Multiplexer, QMultiPortMultiplexer, and QNullSerialIODeviceMultiplexer.

Public Functions

  • 29 public functions inherited from QObject

Static Public Members

  • bool chat ( QSerialIODevice * device, const QString & cmd )
  • QString chatWithResponse ( QSerialIODevice * device, const QString & cmd )
  • QSerialIODeviceMultiplexer * create ( QSerialIODevice * device = 0 )
  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 1 public type inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QSerialIODeviceMultiplexer class provides a base class for serial device multiplexing on AT-based modems.

A multiplexer manages one or more channels, identified by their names. The standard names are:

primaryPrimary AT command channel.
secondarySecondary AT command channel for slow AT commands. Should return the same as primary if there is no explicit secondary channel on the modem.
dataData channel for GPRS and similar data sessions. Should return null if there is no explicit data channel on the modem.
datasetupChannel for data call setup commands. Should return null if data is null.

Sometimes these channels may overlap. For example, datasetup may be the same as data if data call setup should be sent on the same channel as the data itself; or it may be the same as primary if data call setup should be sent on the primary AT command channel.

If a channel is not supported, the channel() method returns null. The primary and secondary channels must always be supported, even if they are the same.

Auxiliary channels can be created and released dynamically. The channel name should begin with aux. The rest of the name gives an indication as to the type of auxiliary data: auxdata, auxvideo, etc. The multiplexer may return a pre-defined channel (e.g. data) if the number of channels on the multiplexer is limited. The QSerialIODevice::isOpen() method can be used to determine if the channel is already in use, or is free for auxiliary traffic.

Several standard multiplexer implementations are provided with Qtopia:

QGsm0710MultiplexerImplementation of 3GPP TS 07.10/27.010 multiplexing.
QMultiPortMultiplexerImplementation of multiplexing over several serial ports, where each port corresponds to a single channel.
QNullSerialIODeviceMultiplexerNull multiplexer with a single channel wrapped around a serial port, for modems that do not support proper multiplexing.

New multiplexer implementations can be added using a multiplexer plug-in. See the Tutorial: Writing a Multiplexer Plug-in for more information on how to write a multiplexer plug-in.

See also QGsm0710Multiplexer, QMultiPortMultiplexer, QNullSerialIODeviceMultiplexer, and QSerialIODeviceMultiplexerPlugin.


Member Function Documentation

QSerialIODeviceMultiplexer::QSerialIODeviceMultiplexer ( QObject * parent = 0 )

Construct a new multiplexer attached to parent.

QSerialIODeviceMultiplexer::~QSerialIODeviceMultiplexer ()

Destruct a multiplexer.

QSerialIODevice * QSerialIODeviceMultiplexer::channel ( const QString & name )   [pure virtual]

Returns the serial device corresponding the channel name. If the indicated channel does not exist, it should be created if possible. Some multiplexers may not be able to create all types of channels, and will return null for unsupported channels. All multiplexers must support at least primary and secondary.

bool QSerialIODeviceMultiplexer::chat ( QSerialIODevice * device, const QString & cmd )   [static]

Sends cmd to the specified serial device and wait for the response. Returns true if the command responds with OK, or false if the command responds with an error or it times out.

This function is typically used by multiplexing plug-ins to turn on multiplexing prior to creating a subclass of QSerialIODeviceMultiplexer.

See also chatWithResponse().

QString QSerialIODeviceMultiplexer::chatWithResponse ( QSerialIODevice * device, const QString & cmd )   [static]

Sends cmd to the specified serial device and wait for the response. Returns a null string if the command fails or times out, or the contents of the command's response if OK.

This function can be used to issue commands such as AT+CGMI where the caller is interested in the text of the response.

See also chat().

QSerialIODeviceMultiplexer * QSerialIODeviceMultiplexer::create ( QSerialIODevice * device = 0 )   [static]

Create a multiplexer for handling the communications traffic on device. If device is null, a default device handler will be created based on the QTOPIA_PHONE_DEVICE setting.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web