8 #ifndef _SerialStream_h_
9 #define _SerialStream_h_
85 std::ios_base::openmode openMode =
86 std::ios::in|std::ios::out) ;
126 void Open(
const std::string fileName,
127 std::ios_base::openmode openMode =
128 std::ios_base::in | std::ios_base::out) ;
139 const bool IsOpen()
const ;
213 const short SetVMin(
short vtime ) ;
226 const short SetVTime(
short vtime ) ;
233 const short VTime() ;
297 #endif // #ifndef _SerialStream_h_
FlowControlEnum
The values of the flow control settings for a serial port.
static const ParityEnum DEFAULT_PARITY
The default parity setting.
CharSizeEnum
The allowed values of character sizes that can be used during the serial communication.
void SetBaudRate(SerialStreamBuf::BaudRateEnum baudRate)
Set the baud rate for serial communications.
const short NumOfStopBits()
Get the number of stop bits being used during serial communication.
void Open(const std::string fileName, std::ios_base::openmode openMode=std::ios_base::in|std::ios_base::out)
Open the serial port associated with the specified filename, and the specified mode, mode.
const SerialStreamBuf::BaudRateEnum BaudRate()
Get the current baud rate being used for serial communication.
const short VTime()
Get current timing of character buffer in 10th of a second.
const SerialStreamBuf::FlowControlEnum FlowControl()
Return the current flow control setting.
static const CharSizeEnum DEFAULT_CHAR_SIZE
The default value of the character size used during the serial communication.
static const FlowControlEnum DEFAULT_FLOW_CONTROL
The default flow control setting.
SerialStream & operator=(const SerialStream &)
void SetNumOfStopBits(short numOfStopBits)
Set the number of stop bits used during serial communication.
void SetParity(const SerialStreamBuf::ParityEnum parityType)
Set the parity for serial communication.
const short SetVMin(short vtime)
Set character buffer size.
const SerialStreamBuf::CharSizeEnum CharSize()
Get the character size being used for serial communication.
SerialStreamBuf * mIOBuffer
The SerialStreamBuf object that will be used by the stream to communicate with the serial port...
BaudRateEnum
The baud rates currently supported by the SUS-2 general terminal interface specification.
const short SetVTime(short vtime)
Set character buffer timing in 10th of a second.
SerialStream()
Create a new SerialStream object but do not open it.
ParityEnum
The allowed values of the parity associated with the serial port communications.
const SerialStreamBuf::ParityEnum Parity()
Get the current parity setting for the serial port.
A stream class for accessing serial ports on POSIX operating systems.
This is the streambuf subclass used by SerialStream.
virtual ~SerialStream()
The destructor.
const bool IsOpen() const
Returns true if the Stream is in a good open state, false otherwise.
const short VMin()
Get current size of character buffer.
void Close()
Close the serial port.
void SetCharSize(const SerialStreamBuf::CharSizeEnum charSize)
Set the character size associated with the serial port.
static const short DEFAULT_NO_OF_STOP_BITS
The default number of stop bits used.
static const BaudRateEnum DEFAULT_BAUD
The default value of the baud rate of the serial port.
void SetFlowControl(const SerialStreamBuf::FlowControlEnum flowControlType)
Use the specified flow control.