This class defines an I/O channel that communicates via a serial port.
Overrides from class PObject
Information functions
Reading functions
Writing functions
Miscellaneous functions
Error functions
Run Time Type functions
Comparison functions
I/O functions
This class defines an I/O channel that communicates via a serial port. This is usually an RS-232 port.
enum Parity
DefaultParity
NoParity
EvenParity
OddParity
enum FlowControl
DefaultFlowControl
NoFlowControl
PSerialChannel( const PString & port, DWORD speed = 0, BYTE data = 0, Parity parity = DefaultParity, BYTE stop = 0, FlowControl inputFlow = DefaultFlowControl, FlowControl outputFlow = DefaultFlowControl )
speed - Serial port speed or baud rate. The actual values possible here are
platform dependent, but the standard value of 300, 1200, 2400, 4800,
9600, 19200, 38400 always be legal.
data - Number of data bits for serial port. The actual values possible here
are platform dependent, but 7 and 8 should always be legal.
parity - Parity for serial port. The actual values possible here are platform
dependent, but NoParity, OddParity and
EvenParity should always be legal.
stop - Number of stop bits for serial port. The actual values possible here
are platform dependent, but 1 and 2 should always be legal.
inputFlow - Flow control for data from the remote system into this conputer.
outputFlow - Flow control for data from this conputer out to remote system. PSerialChannel( PConfig & cfg )
virtual BOOL Open( PConfig & cfg )
static PStringList GetPortNames()
DWORD GetSpeed() const
BOOL SetDataBits( BYTE data )
BYTE GetDataBits() const
BOOL SetParity( Parity parity )
Parity GetParity() const
BOOL SetStopBits( BYTE stop )
BYTE GetStopBits() const
BOOL SetInputFlowControl( FlowControl flowControl )
FlowControl GetInputFlowControl() const
BOOL SetOutputFlowControl( FlowControl flowControl )
FlowControl GetOutputFlowControl() const
virtual void SaveSettings( PConfig & cfg )
void ClearDTR()
void SetRTS( BOOL state = TRUE )
void ClearRTS()
void SetBreak( BOOL state = TRUE )
void ClearBreak()
BOOL GetCTS()
BOOL GetDSR()
BOOL GetDCD()
BOOL GetRing()
Alphabetic index HTML hierarchy of classes or Java