ost::SerialPort(3) | Library Functions Manual | ost::SerialPort(3) |
NAME¶
ost::SerialPort - The serial port is an internal class which is attached to and then serviced by a specified SerialService thread.SYNOPSIS¶
#include <serial.h> Inherits ost::Serial, and ost::TimerPort.Public Member Functions¶
void setTimer (timeout_t timeout=0)
Protected Member Functions¶
SerialPort (SerialService *svc, const char *name)
Friends¶
class SerialService
Additional Inherited Members¶
Detailed Description¶
The serial port is an internal class which is attached to and then serviced by a specified SerialService thread.David Sugar dyfet@ostel.com base class for
thread pool serviced serial I/O.
Constructor & Destructor Documentation¶
ost::SerialPort::SerialPort (SerialService *svc, const char *name) [protected]¶
Construct a tty serial port for a named serial device. Parameters:svc pool thread object.
name of tty port.
virtual ost::SerialPort::~SerialPort () [protected], [virtual]¶
Disconnect the Serial Port from the service pool thread and shutdown the port.Member Function Documentation¶
virtual void ost::SerialPort::disconnect (void) [protected], [virtual]¶
Called by the service thread when an exception has occured such as a hangup.virtual void ost::SerialPort::expired (void) [protected], [virtual]¶
Called by the service thread when the objects timer has expired.bool ost::SerialPort::getDetectOutput (void) const [inline], [protected]¶
Get the current state of the DetectOutput flag.bool ost::SerialPort::getDetectPending (void) const [inline], [protected]¶
Get the current state of the DetectPending flag.void ost::SerialPort::incTimer (timeout_ttimeout)¶
Derived incTimer to notify the service thread pool of a change in expected timeout. This allows SerialService to reschedule all timers. Reimplemented from ost::TimerPort.int ost::SerialPort::input (void *buf, intlen) [inline], [protected]¶
Receive 'input' for pending data from the serial port. This is not a public member since it's meant to support internal protocols rather than direct external access to the device. Returns:number of bytes received.
Parameters:
buf address of buffer to input.
len of input buffer used.
int ost::SerialPort::output (void *buf, intlen) [inline], [protected]¶
Transmit 'send' data to the serial port. This is not public since it's meant to support internal protocols rather than direct public access to the device. Returns:number of bytes send.
Parameters:
buf address of buffer to send.
len of bytes to send.
virtual void ost::SerialPort::output (void) [protected], [virtual]¶
Perform when output is available for sending data.virtual void ost::SerialPort::pending (void) [protected], [virtual]¶
Called by the service thread when input data is pending for this tty port. Effected by setPacketInput and by setLineInput.void ost::SerialPort::setDetectOutput (bool) [protected]¶
Used to indicate if output ready monitoring should be performed by the service thread.void ost::SerialPort::setDetectPending (bool) [protected]¶
Used to indicate if the service thread should monitor pending data for us.void ost::SerialPort::setTimer (timeout_ttimeout = 0)¶
Derived setTimer to notify the service thread pool of changes in expected timeout. This allows SerialService to reschedule all timers. Parameters:timeout in milliseconds.
Friends And Related Function Documentation¶
friend class SerialService [friend]¶
Author¶
Generated automatically by Doxygen for GNU CommonC++ from the source code.Sat Jun 23 2012 | GNU CommonC++ |