Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

IOSerial Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-console/io_serial.h>

Inheritance diagram for IOSerial:

Inheritance graph
[legend]
Collaboration diagram for IOSerial:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Parity {
  ParityNone = 0, ParityEven, ParityOdd, ParitySpace,
  ParityMark
}
enum  Flow { FlowHW = 0x01, FlowSW = 0x02 }

Public Slots

virtual void send (const QByteArray &)
virtual bool open ()
virtual void close ()
virtual void reload (const Profile &)

Public Member Functions

 IOSerial (const Profile &)
 ~IOSerial ()
virtual QString identifier () const
virtual QString name () const
int rawIO () const
void closeRawIO (int fd)
virtual QBitArray supports () const
virtual bool isConnected ()

Protected Slots

void dataArrived ()
void errorOccured ()

Protected Member Functions

int baud (int baud) const
void internDetach ()
void internAttach ()

Protected Attributes

QSocketNotifier * m_read
QSocketNotifier * m_error
QString m_device
int m_baud
int m_parity
int m_dbits
int m_sbits
int m_flow
int m_fd
bool m_connected

Member Enumeration Documentation

enum IOSerial::Flow
 

Enumeration values:
FlowHW 
FlowSW 

Definition at line 28 of file io_serial.h.

enum IOSerial::Parity
 

Enumeration values:
ParityNone 
ParityEven 
ParityOdd 
ParitySpace 
ParityMark 

Definition at line 20 of file io_serial.h.


Constructor & Destructor Documentation

IOSerial::IOSerial const Profile  ) 
 

Definition at line 10 of file io_serial.cpp.

References l, m_connected, m_error, m_fd, m_read, and reload().

IOSerial::~IOSerial  ) 
 

Definition at line 19 of file io_serial.cpp.

References close(), and m_fd.


Member Function Documentation

int IOSerial::baud int  baud  )  const [protected]
 

Definition at line 140 of file io_serial.cpp.

Referenced by open().

void IOSerial::close  )  [virtual, slot]
 

close the io

Implements IOLayer.

Reimplemented in IOBt, IOIrda, and IOModem.

Definition at line 33 of file io_serial.cpp.

References IOLayer::error(), m_connected, m_error, m_fd, m_read, IOLayer::Refuse, and tr.

Referenced by IOModem::close(), IOIrda::close(), IOBt::close(), closeRawIO(), dataArrived(), errorOccured(), and ~IOSerial().

void IOSerial::closeRawIO int  fd  )  [virtual]
 

will close the rawIO stuff and will listen to it's data again...

Reimplemented from IOLayer.

Definition at line 191 of file io_serial.cpp.

References close(), dataArrived(), errorOccured(), m_error, and m_read.

void IOSerial::dataArrived  )  [protected, slot]
 

Definition at line 161 of file io_serial.cpp.

References close(), len, m_fd, and IOLayer::received().

Referenced by closeRawIO(), internAttach(), internDetach(), open(), and rawIO().

void IOSerial::errorOccured  )  [protected, slot]
 

Definition at line 156 of file io_serial.cpp.

References close(), IOLayer::ClosedUnexpected, and IOLayer::error().

Referenced by closeRawIO(), internAttach(), internDetach(), open(), and rawIO().

QString IOSerial::identifier  )  const [virtual]
 

a small internal identifier

Implements IOLayer.

Reimplemented in IOBt, IOIrda, and IOModem.

Definition at line 174 of file io_serial.cpp.

void IOSerial::internAttach  )  [protected]
 

Definition at line 226 of file io_serial.cpp.

References dataArrived(), errorOccured(), m_error, and m_read.

Referenced by IOModem::close(), and IOModem::open().

void IOSerial::internDetach  )  [protected]
 

Definition at line 217 of file io_serial.cpp.

References dataArrived(), errorOccured(), m_error, and m_read.

Referenced by IOModem::close(), and IOModem::open().

bool IOSerial::isConnected  )  [virtual]
 

Implements IOLayer.

Definition at line 207 of file io_serial.cpp.

References m_connected.

QString IOSerial::name  )  const [virtual]
 

a short name

Implements IOLayer.

Reimplemented in IOBt, IOIrda, and IOModem.

Definition at line 178 of file io_serial.cpp.

bool IOSerial::open  )  [virtual, slot]
 

bool open

Implements IOLayer.

Reimplemented in IOBt, IOIrda, and IOModem.

Definition at line 46 of file io_serial.cpp.

References baud(), IOLayer::CouldNotOpen, dataArrived(), IOLayer::error(), errorOccured(), FALSE, FlowHW, FlowSW, m_baud, m_connected, m_dbits, m_device, m_error, m_fd, m_flow, m_parity, m_read, m_sbits, ParityEven, ParityMark, ParityOdd, ParitySpace, IOLayer::Refuse, tr, and TRUE.

Referenced by IOModem::open(), IOIrda::open(), IOBt::open(), rawIO(), and SenderUI::SenderUI().

int IOSerial::rawIO  )  const [virtual]
 

a file descriptor which opens the device for io but does not do any ioctling on it... and it'll stop listening to the before opened device

Reimplemented from IOLayer.

Definition at line 181 of file io_serial.cpp.

References dataArrived(), errorOccured(), m_device, m_error, m_read, and open().

void IOSerial::reload const Profile  )  [virtual, slot]
 

closes and reloads the settings

Implements IOLayer.

Reimplemented in IOBt, IOIrda, and IOModem.

Definition at line 130 of file io_serial.cpp.

References m_baud, m_dbits, m_device, m_flow, m_parity, m_sbits, Profile::readEntry(), Profile::readNumEntry(), SERIAL_DEFAULT_BAUD, SERIAL_DEFAULT_DBITS, SERIAL_DEFAULT_DEVICE, SERIAL_DEFAULT_FLOW, SERIAL_DEFAULT_PARITY, and SERIAL_DEFAULT_SBITS.

Referenced by IOSerial().

void IOSerial::send const QByteArray  )  [virtual, slot]
 

send a QCString to the device

Implements IOLayer.

Definition at line 25 of file io_serial.cpp.

References IOLayer::error(), m_fd, IOLayer::Refuse, tr, and write().

Referenced by SenderUI::slotSend().

QBitArray IOSerial::supports  )  const [virtual]
 

What does the IOLayer support? Bits are related to features

Implements IOLayer.

Definition at line 199 of file io_serial.cpp.


Member Data Documentation

int IOSerial::m_baud [protected]
 

Definition at line 63 of file io_serial.h.

Referenced by open(), reload(), IOModem::reload(), IOIrda::reload(), and IOBt::reload().

bool IOSerial::m_connected [protected]
 

Definition at line 69 of file io_serial.h.

Referenced by close(), IOSerial(), isConnected(), and open().

int IOSerial::m_dbits [protected]
 

Definition at line 65 of file io_serial.h.

Referenced by open(), reload(), IOModem::reload(), IOIrda::reload(), and IOBt::reload().

QString IOSerial::m_device [protected]
 

Definition at line 62 of file io_serial.h.

Referenced by open(), rawIO(), reload(), IOModem::reload(), IOIrda::reload(), and IOBt::reload().

QSocketNotifier* IOSerial::m_error [protected]
 

Definition at line 61 of file io_serial.h.

Referenced by close(), closeRawIO(), internAttach(), internDetach(), IOSerial(), open(), and rawIO().

int IOSerial::m_fd [protected]
 

Definition at line 68 of file io_serial.h.

Referenced by close(), IOModem::close(), dataArrived(), IOSerial(), open(), IOModem::open(), send(), and ~IOSerial().

int IOSerial::m_flow [protected]
 

Definition at line 67 of file io_serial.h.

Referenced by open(), reload(), IOModem::reload(), IOIrda::reload(), and IOBt::reload().

int IOSerial::m_parity [protected]
 

Definition at line 64 of file io_serial.h.

Referenced by open(), reload(), IOModem::reload(), IOIrda::reload(), and IOBt::reload().

QSocketNotifier* IOSerial::m_read [protected]
 

Definition at line 60 of file io_serial.h.

Referenced by close(), closeRawIO(), internAttach(), internDetach(), IOSerial(), open(), and rawIO().

int IOSerial::m_sbits [protected]
 

Definition at line 66 of file io_serial.h.

Referenced by open(), reload(), IOModem::reload(), IOIrda::reload(), and IOBt::reload().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:36:30 2005 for OPIE by  doxygen 1.4.2