#include <qextserialport.h>
Lista de todos los miembros.
Clases |
struct | PortSettings |
Tipos públicos |
enum | BaudRateType {
BAUD50,
BAUD75,
BAUD110,
BAUD134,
BAUD150,
BAUD200,
BAUD300,
BAUD600,
BAUD1200,
BAUD1800,
BAUD2400,
BAUD4800,
BAUD9600,
BAUD14400,
BAUD19200,
BAUD38400,
BAUD56000,
BAUD57600,
BAUD76800,
BAUD115200,
BAUD128000,
BAUD256000
} |
enum | DataBitsType { DATA_5,
DATA_6,
DATA_7,
DATA_8
} |
enum | ParityType {
PAR_NONE,
PAR_ODD,
PAR_EVEN,
PAR_MARK,
PAR_SPACE
} |
enum | StopBitsType { STOP_1,
STOP_1_5,
STOP_2
} |
enum | FlowType { FLOW_OFF,
FLOW_HARDWARE,
FLOW_XONXOFF
} |
Métodos públicos |
| QextSerialPort (const QString &name="") |
virtual | ~QextSerialPort () |
virtual bool | open (int mode=0) |
virtual void | close () |
virtual void | flush () |
QIODevice::Offset | size () const |
bool | at (QIODevice::Offset) |
virtual Q_LONG | readBlock (char *data, Q_ULONG maxSize) |
virtual Q_LONG | writeBlock (const char *data, Q_ULONG size) |
int | getch () |
int | putch (int) |
int | ungetch (int) |
Q_ULONG | bytesAvailable () const |
void | setName (const QString &name) |
QString | name () |
virtual void | setBaudRate (BaudRateType) |
virtual void | setDataBits (DataBitsType) |
virtual void | setParity (ParityType) |
virtual void | setStopBits (StopBitsType) |
void | setFlowControl (FlowType) |
void | setTimeout (unsigned long=0, unsigned long=0) |
BaudRateType | baudRate () const |
DataBitsType | setDataBits () const |
ParityType | setParity () const |
StopBitsType | setStopBits () const |
FlowType | setFlowControl () const |
void | setRts (bool set=TRUE) |
void | setDtr (bool set=TRUE) |
bool | cts () const |
bool | dsr () const |
bool | dcd () const |
bool | ri () const |
Atributos protegidos |
QFile * | Posix_File |
struct termios | Posix_CommConfig |
QString | Name |
PortSettings | Settings |
Documentación de las enumeraciones miembro de la clase
- Valores de enumeraciones:
BAUD50 |
|
BAUD75 |
|
BAUD110 |
|
BAUD134 |
|
BAUD150 |
|
BAUD200 |
|
BAUD300 |
|
BAUD600 |
|
BAUD1200 |
|
BAUD1800 |
|
BAUD2400 |
|
BAUD4800 |
|
BAUD9600 |
|
BAUD14400 |
|
BAUD19200 |
|
BAUD38400 |
|
BAUD56000 |
|
BAUD57600 |
|
BAUD76800 |
|
BAUD115200 |
|
BAUD128000 |
|
BAUD256000 |
|
- Valores de enumeraciones:
DATA_5 |
|
DATA_6 |
|
DATA_7 |
|
DATA_8 |
|
- Valores de enumeraciones:
FLOW_OFF |
|
FLOW_HARDWARE |
|
FLOW_XONXOFF |
|
- Valores de enumeraciones:
PAR_NONE |
|
PAR_ODD |
|
PAR_EVEN |
|
PAR_MARK |
|
PAR_SPACE |
|
- Valores de enumeraciones:
-
Documentación del constructor y destructor
QextSerialPort::QextSerialPort |
( |
const QString & |
name = "" | ) |
|
QextSerialPort::~QextSerialPort |
( |
| ) |
[virtual] |
Documentación de las funciones miembro
Virtual function that sets the I/O device position to pos. Returns TRUE if the position was successfully set, i.e. pos is within range and the seek was successful; otherwise returns FALSE.
- Ver también:
- size()
Reimplementado de QIODevice.
Q_ULONG QextSerialPort::bytesAvailable |
( |
| ) |
const |
void QextSerialPort::close |
( |
void |
| ) |
[virtual] |
Closes the I/O device.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- open()
Implementa QIODevice.
bool QextSerialPort::cts |
( |
| ) |
const |
bool QextSerialPort::dcd |
( |
| ) |
const |
bool QextSerialPort::dsr |
( |
| ) |
const |
void QextSerialPort::flush |
( |
| ) |
[virtual] |
Flushes an open I/O device.
This virtual function must be reimplemented by all subclasses.
Implementa QIODevice.
int QextSerialPort::getch |
( |
| ) |
[virtual] |
Reads a single byte/character from the I/O device.
Returns the byte/character read, or -1 if the end of the I/O device has been reached.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- putch(), ungetch()
Implementa QIODevice.
bool QextSerialPort::open |
( |
int |
mode = 0 | ) |
[virtual] |
Opens the I/O device using the specified mode. Returns TRUE if the device was successfully opened; otherwise returns FALSE.
The mode parameter mode must be an OR'ed combination of the following flags. Mode flags Meaning IO_Raw
specifies raw (unbuffered) file access. IO_ReadOnly
opens a file in read-only mode. IO_WriteOnly
opens a file in write-only mode. IO_ReadWrite
opens a file in read/write mode. IO_Append
sets the file index to the end of the file. IO_Truncate
truncates the file. IO_Translate
enables carriage returns and linefeed translation for text files under MS-DOS, Windows and Macintosh. On Unix systems this flag has no effect. Use with caution as it will also transform every linefeed written to the file into a CRLF pair. This is likely to corrupt your file if you write write binary data. Cannot be combined with IO_Raw
.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- close()
Implementa QIODevice.
int QextSerialPort::putch |
( |
int |
ch | ) |
[virtual] |
Writes the character ch to the I/O device.
Returns ch, or -1 if an error occurred.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- getch(), ungetch()
Implementa QIODevice.
Q_LONG QextSerialPort::readBlock |
( |
char * |
data, |
|
|
Q_ULONG |
maxlen |
|
) |
| [virtual] |
Reads at most maxlen bytes from the I/O device into data and returns the number of bytes actually read.
This function should return -1 if a fatal error occurs and should return 0 if there are no bytes to read.
The device must be opened for reading, and data must not be 0.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- writeBlock() isOpen() isReadable()
Implementa QIODevice.
bool QextSerialPort::ri |
( |
| ) |
const |
void QextSerialPort::setBaudRate |
( |
BaudRateType |
baudRate | ) |
[virtual] |
void QextSerialPort::setDataBits |
( |
DataBitsType |
dataBits | ) |
[virtual] |
void QextSerialPort::setDtr |
( |
bool |
set = TRUE | ) |
|
void QextSerialPort::setFlowControl |
( |
FlowType |
flow | ) |
|
FlowType QextSerialPort::setFlowControl |
( |
| ) |
const [inline] |
void QextSerialPort::setName |
( |
const QString & |
name | ) |
|
void QextSerialPort::setParity |
( |
ParityType |
parity | ) |
[virtual] |
ParityType QextSerialPort::setParity |
( |
| ) |
const [inline] |
void QextSerialPort::setRts |
( |
bool |
set = TRUE | ) |
|
void QextSerialPort::setStopBits |
( |
StopBitsType |
stopBits | ) |
[virtual] |
void QextSerialPort::setTimeout |
( |
unsigned long |
sec = 0 , |
|
|
unsigned long |
millisec = 0 |
|
) |
| |
Virtual function that returns the size of the I/O device.
- Ver también:
- at()
Implementa QIODevice.
int QextSerialPort::ungetch |
( |
int |
ch | ) |
[virtual] |
Puts the character ch back into the I/O device and decrements the index position if it is not zero.
This function is normally called to "undo" a getch() operation.
Returns ch, or -1 if an error occurred.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- getch(), putch()
Implementa QIODevice.
Q_LONG QextSerialPort::writeBlock |
( |
const char * |
data, |
|
|
Q_ULONG |
len |
|
) |
| [virtual] |
Writes len bytes from data to the I/O device and returns the number of bytes actually written.
This function should return -1 if a fatal error occurs.
This virtual function must be reimplemented by all subclasses.
- Ver también:
- readBlock()
Implementa QIODevice.
Documentación de los datos miembro
La documentación para esta clase fue generada a partir de los siguientes ficheros: