30 #ifndef PTLIB_SERIALCHANNEL_H
31 #define PTLIB_SERIALCHANNEL_H
42 #elif HAVE_SYS_TERMIOS_H
43 #include <sys/termios.h>
134 #endif // P_CONFIG_FILE
193 #endif // P_CONFIG_FILE
316 #endif // P_CONFIG_FILE
390 #include "msos/ptlib/serchan.h"
392 #include "unix/ptlib/serchan.h"
397 #endif // PTLIB_SERIALCHANNEL_H
Set the port for software or XON/XOFF flow control.
Definition: serchan.h:86
Set the port to generate parity and make it odd.
Definition: serchan.h:72
virtual void SaveSettings(PConfig &cfg)
Save the current port settings into the configuration file.
virtual PBoolean Open(const PString &port, DWORD speed=0, BYTE data=0, Parity parity=DefaultParity, BYTE stop=0, FlowControl inputFlow=DefaultFlowControl, FlowControl outputFlow=DefaultFlowControl)
Open a serial channal.
void ClearBreak()
Clear the break condition of the serial port.
A class representing a configuration for the application.
Definition: config.h:62
virtual PString GetName() const =0
Get the platform and I/O channel type name of the channel.
This class defines an I/O channel that communicates via a serial port.
Definition: serchan.h:53
Set the port for hardware or RTS/CTS flow control.
Definition: serchan.h:88
PBoolean GetDCD()
Get the Data Carrier Detect signal of the serial port.
Set the port for no flow control.
Definition: serchan.h:84
DWORD GetSpeed() const
Get the speed (baud rate) of the serial channel.
Parity GetParity() const
Get the parity of the serial port.
BYTE GetStopBits() const
Get the stop bits (1 or 2) of the serial port.
FlowControl
Configuration of serial port flow control options.
Definition: serchan.h:80
PBoolean SetParity(Parity parity)
Set the parity of the serial port.
void SetDTR(PBoolean state=true)
Set the Data Terminal Ready signal of the serial port.
void ClearRTS()
Clear the Request To Send signal of the serial port.
PBoolean SetStopBits(BYTE stop)
Set the stop bits (1 or 2) of the serial port.
PBoolean GetCTS()
Get the Clear To Send signal of the serial port.
Abstract class defining I/O channel semantics.
Definition: channel.h:103
Set the port for no parity bit.
Definition: serchan.h:68
bool PBoolean
Definition: object.h:174
PSerialChannel()
Create a new serial channel object, but do not open it.
PBoolean SetOutputFlowControl(FlowControl flowControl)
Set the flow control (handshaking) protocol of the output to the serial port.
BYTE GetDataBits() const
Get the data bits (5, 6, 7 or 8) of the serial port.
The character string class.
Definition: pstring.h:108
FlowControl GetInputFlowControl() const
Get the flow control (handshaking) protocol of the input to the serial port.
Set the port parity bit to mark only.
Definition: serchan.h:74
PBoolean GetDSR()
Get the Data Set Ready signal of the serial port.
Set the port parity bit to space only.
Definition: serchan.h:76
Parity
Configuration of serial port parity options.
Definition: serchan.h:64
This is a list collection class of PString objects.
Definition: pstring.h:2562
Set the port to generate parity and make it even.
Definition: serchan.h:70
void SetBreak(PBoolean state=true)
Set the break condition of the serial port.
FlowControl GetOutputFlowControl() const
Get the flow control (handshaking) protocol of the output from the serial port.
void ClearDTR()
Clear the Data Terminal Ready signal of the serial port.
Use the default flow control, ie do not change it.
Definition: serchan.h:82
Use the default parity, ie do not change it.
Definition: serchan.h:66
static PStringList GetPortNames()
Get a list of the available serial ports.
PBoolean SetInputFlowControl(FlowControl flowControl)
Set the flow control (handshaking) protocol of the input to the serial port.
PBoolean GetRing()
Get the Ring Indicator signal of the serial port.
PBoolean SetDataBits(BYTE data)
Set the data bits (5, 6, 7 or 8) of the serial port.
~PSerialChannel()
Close the serial channel on destruction.
void SetRTS(PBoolean state=true)
Set the Request To Send signal of the serial port.
PBoolean SetSpeed(DWORD speed)
Set the speed (baud rate) of the serial channel.