.TH "LibSerial::SerialStreamBuf" 3 "Mon Sep 14 2015" "Version 0.6.0rc3" "libserial" \" -*- nroff -*- .ad l .nh .SH NAME LibSerial::SerialStreamBuf \- This is the streambuf subclass used by \fBSerialStream\fP\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits streambuf\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBBaudRateEnum\fP { \fBBAUD_50\fP = SerialPort::BAUD_50, \fBBAUD_75\fP = SerialPort::BAUD_75, \fBBAUD_110\fP = SerialPort::BAUD_110, \fBBAUD_134\fP = SerialPort::BAUD_134, \fBBAUD_150\fP = SerialPort::BAUD_150, \fBBAUD_200\fP = SerialPort::BAUD_200, \fBBAUD_300\fP = SerialPort::BAUD_300, \fBBAUD_600\fP = SerialPort::BAUD_600, \fBBAUD_1200\fP = SerialPort::BAUD_1200, \fBBAUD_1800\fP = SerialPort::BAUD_1800, \fBBAUD_2400\fP = SerialPort::BAUD_2400, \fBBAUD_4800\fP = SerialPort::BAUD_4800, \fBBAUD_9600\fP = SerialPort::BAUD_9600, \fBBAUD_19200\fP = SerialPort::BAUD_19200, \fBBAUD_38400\fP = SerialPort::BAUD_38400, \fBBAUD_57600\fP = SerialPort::BAUD_57600, \fBBAUD_115200\fP = SerialPort::BAUD_115200, \fBBAUD_230400\fP = SerialPort::BAUD_230400, \fBBAUD_DEFAULT\fP = SerialPort::BAUD_DEFAULT, \fBBAUD_INVALID\fP = -1 }" .br .RI "\fIThe baud rates currently supported by the SUS-2 general terminal interface specification\&. \fP" .ti -1c .RI "enum \fBCharSizeEnum\fP { \fBCHAR_SIZE_5\fP = SerialPort::CHAR_SIZE_5, \fBCHAR_SIZE_6\fP = SerialPort::CHAR_SIZE_6, \fBCHAR_SIZE_7\fP = SerialPort::CHAR_SIZE_7, \fBCHAR_SIZE_8\fP = SerialPort::CHAR_SIZE_8, \fBCHAR_SIZE_DEFAULT\fP = SerialPort::CHAR_SIZE_DEFAULT, \fBCHAR_SIZE_INVALID\fP }" .br .RI "\fIThe allowed values of character sizes that can be used during the serial communication\&. \fP" .ti -1c .RI "enum \fBParityEnum\fP { \fBPARITY_EVEN\fP = SerialPort::PARITY_EVEN, \fBPARITY_ODD\fP = SerialPort::PARITY_ODD, \fBPARITY_NONE\fP = SerialPort::PARITY_NONE, \fBPARITY_DEFAULT\fP = SerialPort::PARITY_DEFAULT, \fBPARITY_INVALID\fP }" .br .RI "\fIThe allowed values of the parity associated with the serial port communications\&. \fP" .ti -1c .RI "enum \fBFlowControlEnum\fP { \fBFLOW_CONTROL_HARD\fP = SerialPort::FLOW_CONTROL_HARD, \fBFLOW_CONTROL_SOFT\fP = SerialPort::FLOW_CONTROL_SOFT, \fBFLOW_CONTROL_NONE\fP = SerialPort::FLOW_CONTROL_NONE, \fBFLOW_CONTROL_DEFAULT\fP = SerialPort::FLOW_CONTROL_DEFAULT, \fBFLOW_CONTROL_INVALID\fP }" .br .RI "\fIThe values of the flow control settings for a serial port\&. \fP" .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSerialStreamBuf\fP ()" .br .RI "\fIThe default constructor\&. \fP" .ti -1c .RI "\fB~SerialStreamBuf\fP ()" .br .RI "\fIThe destructor\&. \fP" .ti -1c .RI "bool \fBis_open\fP () const " .br .RI "\fIReturns true if a previous call to \fBopen()\fP succeeded (returned a non-null value) and there has been no intervening call to close\&. \fP" .ti -1c .RI "\fBSerialStreamBuf\fP * \fBopen\fP (const std::string filename, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)" .br .RI "\fIIf \fBis_open()\fP != \fCfalse\fP, returns a null pointer\&. \fP" .ti -1c .RI "\fBSerialStreamBuf\fP * \fBclose\fP ()" .br .RI "\fIIf \fBis_open()\fP == false, returns a null pointer\&. \fP" .ti -1c .RI "int \fBSetParametersToDefault\fP ()" .br .RI "\fIInitialize the serial communication parameters to their default values\&. \fP" .ti -1c .RI "const \fBBaudRateEnum\fP \fBSetBaudRate\fP (const \fBBaudRateEnum\fP baudRate)" .br .RI "\fIIf \fBis_open()\fP != true, return -1\&. \fP" .ti -1c .RI "const \fBBaudRateEnum\fP \fBBaudRate\fP () const " .br .RI "\fIReturn the current baud rate of the serial port\&. \fP" .ti -1c .RI "const \fBCharSizeEnum\fP \fBSetCharSize\fP (const \fBCharSizeEnum\fP charSize)" .br .RI "\fISet the character size to be used during serial communication\&. \fP" .ti -1c .RI "const \fBCharSizeEnum\fP \fBCharSize\fP () const " .br .RI "\fIReturn the character size currently being used for serial communication\&. \fP" .ti -1c .RI "short \fBSetNumOfStopBits\fP (short numOfStopBits)" .br .RI "\fISet the number of stop bits used during serial communication\&. \fP" .ti -1c .RI "short \fBNumOfStopBits\fP () const " .br .RI "\fIGet the number of stop bits being used during serial communication\&. \fP" .ti -1c .RI "const \fBParityEnum\fP \fBSetParity\fP (const \fBParityEnum\fP parityType)" .br .RI "\fISet the parity for serial communication\&. \fP" .ti -1c .RI "const \fBParityEnum\fP \fBParity\fP () const " .br .RI "\fIGet the current parity setting for the serial port\&. \fP" .ti -1c .RI "const \fBFlowControlEnum\fP \fBSetFlowControl\fP (const \fBFlowControlEnum\fP flowControlType)" .br .RI "\fIUse the specified flow control\&. \fP" .ti -1c .RI "const \fBFlowControlEnum\fP \fBFlowControl\fP () const " .br .RI "\fIReturn the current flow control setting\&. \fP" .ti -1c .RI "const short \fBSetVMin\fP (short vtime)" .br .RI "\fISet the minimum number of characters for non-canonical reads\&. \fP" .ti -1c .RI "const short \fBVMin\fP () const " .br .RI "\fIGet the VMIN value for the device\&. \fP" .ti -1c .RI "const short \fBSetVTime\fP (short vtime)" .br .RI "\fISet character buffer timeout in 10ths of a second\&. \fP" .ti -1c .RI "const short \fBVTime\fP () const " .br .RI "\fIGet the current timeout value for non-canonical reads in deciseconds\&. \fP" .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static const \fBBaudRateEnum\fP \fBDEFAULT_BAUD\fP" .br .RI "\fIThe default value of the baud rate of the serial port\&. \fP" .ti -1c .RI "static const \fBCharSizeEnum\fP \fBDEFAULT_CHAR_SIZE\fP" .br .RI "\fIThe default value of the character size used during the serial communication\&. \fP" .ti -1c .RI "static const short \fBDEFAULT_NO_OF_STOP_BITS\fP" .br .RI "\fIThe default number of stop bits used\&. \fP" .ti -1c .RI "static const \fBParityEnum\fP \fBDEFAULT_PARITY\fP" .br .RI "\fIThe default parity setting\&. \fP" .ti -1c .RI "static const \fBFlowControlEnum\fP \fBDEFAULT_FLOW_CONTROL\fP" .br .RI "\fIThe default flow control setting\&. \fP" .ti -1c .RI "static const short \fBDEFAULT_VMIN\fP" .br .RI "\fIThe default character buffer size\&. \fP" .ti -1c .RI "static const short \fBDEFAULT_VTIME\fP" .br .RI "\fIThe default character buffer timing\&. \fP" .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual std::streambuf * \fBsetbuf\fP (char_type *, std::streamsize)" .br .RI "\fIPerforms an operation that is defined separately for each class derived from streambuf\&. \fP" .ti -1c .RI "virtual std::streamsize \fBxsgetn\fP (char_type *s, std::streamsize n)" .br .RI "\fIReads upto n characters from the serial port and returns them through the character array located at s\&. \fP" .ti -1c .RI "virtual std::streamsize \fBshowmanyc\fP ()" .br .RI "\fICheck, wether input is available on the port\&. \fP" .ti -1c .RI "virtual int_type \fBunderflow\fP ()" .br .RI "\fIReads and returns the next character from the associated serial port if one otherwise returns traits::eof()\&. \fP" .ti -1c .RI "virtual int_type \fBuflow\fP ()" .br .RI "\fIReads and returns the next character from the associated serial port if one otherwise returns traits::eof()\&. \fP" .ti -1c .RI "virtual int_type \fBpbackfail\fP (int_type c=traits_type::eof())" .br .RI "\fIThis function is called when a putback of a character fails\&. \fP" .ti -1c .RI "virtual std::streamsize \fBxsputn\fP (const char_type *s, std::streamsize n)" .br .RI "\fIWrites upto n characters from the character sequence at s to the serial port associated with the buffer\&. \fP" .ti -1c .RI "virtual int_type \fBoverflow\fP (int_type c)" .br .RI "\fIWrites the specified character to the associated serial port\&. \fP" .in -1c .SS "Static Protected Attributes" .in +1c .ti -1c .RI "static const char \fBCTRL_Q\fP = 0x11" .br .RI "\fICharacter used to signal that I/O can start while using software flow control with the serial port\&. \fP" .ti -1c .RI "static const char \fBCTRL_S\fP = 0x13" .br .RI "\fICharacter used to signal that I/O should stop while using software flow control with the serial port\&. \fP" .in -1c .SS "Private Member Functions" .in +1c .ti -1c .RI "\fBSerialStreamBuf\fP (const \fBSerialStreamBuf\fP &)" .br .ti -1c .RI "\fBSerialStreamBuf\fP & \fBoperator=\fP (const \fBSerialStreamBuf\fP &)" .br .in -1c .SS "Private Attributes" .in +1c .ti -1c .RI "boost::scoped_ptr< Implementation > \fBmImpl\fP" .br .in -1c .SH "Detailed Description" .PP This is the streambuf subclass used by \fBSerialStream\fP\&. This subclass takes care of opening the serial port file in the required modes and providing the corresponding file descriptor to \fBSerialStream\fP so that various parameters associated with the serial port can be set\&. Several features of this streambuf class resemble those of std::filebuf, however this class it not made a subclass of filebuf because we need access to the file descriptor associated with the serial port and the standard filebuf does not provide access to it\&. .PP At present, this class uses unbuffered I/O and all calls to \fBsetbuf()\fP will be ignored\&. .PP \fBAuthor:\fP .RS 4 .RE .PP \fBAuthor\fP .RS 4 crayzeewulf .RE .PP \fCManish P\&. Pagey\fP .PP \fBVersion:\fP .RS 4 .RE .PP \fBId\fP .RS 4 \fBSerialStreamBuf\&.h\fP,v 1\&.9 2005-10-17 00:19:12 crayzeewulf Exp .RE .PP .PP Definition at line 38 of file SerialStreamBuf\&.h\&. .SH "Member Enumeration Documentation" .PP .SS "enum \fBLibSerial::SerialStreamBuf::BaudRateEnum\fP" .PP The baud rates currently supported by the SUS-2 general terminal interface specification\&. Note that B0 is not supported because it is not really a baud rate (it causes the modem to hang up i\&.e\&. drop DTR)\&. Use the \fBclose()\fP method instead\&. .PP \fBDeprecated\fP .RS 4 This enumeration will be removed in revision 0\&.7\&.x of libserial\&. It is here for backward compatibility with 0\&.5\&.x releases\&. Please use the corresponding enumeration from \fBSerialPort\fP class instead\&. .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fIBAUD_50 \fP\fP .TP \fB\fIBAUD_75 \fP\fP .TP \fB\fIBAUD_110 \fP\fP .TP \fB\fIBAUD_134 \fP\fP .TP \fB\fIBAUD_150 \fP\fP .TP \fB\fIBAUD_200 \fP\fP .TP \fB\fIBAUD_300 \fP\fP .TP \fB\fIBAUD_600 \fP\fP .TP \fB\fIBAUD_1200 \fP\fP .TP \fB\fIBAUD_1800 \fP\fP .TP \fB\fIBAUD_2400 \fP\fP .TP \fB\fIBAUD_4800 \fP\fP .TP \fB\fIBAUD_9600 \fP\fP .TP \fB\fIBAUD_19200 \fP\fP .TP \fB\fIBAUD_38400 \fP\fP .TP \fB\fIBAUD_57600 \fP\fP .TP \fB\fIBAUD_115200 \fP\fP .TP \fB\fIBAUD_230400 \fP\fP .TP \fB\fIBAUD_DEFAULT \fP\fP .TP \fB\fIBAUD_INVALID \fP\fP .PP Definition at line 59 of file SerialStreamBuf\&.h\&. .SS "enum \fBLibSerial::SerialStreamBuf::CharSizeEnum\fP" .PP The allowed values of character sizes that can be used during the serial communication\&. .PP \fBDeprecated\fP .RS 4 This enumeration is deprecated\&. It will be removed in version 0\&.7\&.0\&. It is here for backward compatibility with version 0\&.5\&.x\&. Please use \fBSerialPort::CharacterSize\fP instead\&. .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fICHAR_SIZE_5 \fP\fP .TP \fB\fICHAR_SIZE_6 \fP\fP .TP \fB\fICHAR_SIZE_7 \fP\fP .TP \fB\fICHAR_SIZE_8 \fP\fP .TP \fB\fICHAR_SIZE_DEFAULT \fP\fP .TP \fB\fICHAR_SIZE_INVALID \fP\fP .PP Definition at line 106 of file SerialStreamBuf\&.h\&. .SS "enum \fBLibSerial::SerialStreamBuf::FlowControlEnum\fP" .PP The values of the flow control settings for a serial port\&. .PP \fBDeprecated\fP .RS 4 This enumeration has been deprecated and will be removed in version 0\&.7\&.0\&. Please use \fBSerialPort::FlowControl\fP instead\&. .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fIFLOW_CONTROL_HARD \fP\fP .TP \fB\fIFLOW_CONTROL_SOFT \fP\fP .TP \fB\fIFLOW_CONTROL_NONE \fP\fP .TP \fB\fIFLOW_CONTROL_DEFAULT \fP\fP .TP \fB\fIFLOW_CONTROL_INVALID \fP\fP Invalid flow control setting\&. .PP Definition at line 141 of file SerialStreamBuf\&.h\&. .SS "enum \fBLibSerial::SerialStreamBuf::ParityEnum\fP" .PP The allowed values of the parity associated with the serial port communications\&. .PP \fBDeprecated\fP .RS 4 This enumeration is deprecated and will be removed in version 0\&.7\&.0\&. Please use \fBSerialPort::Parity\fP instead\&. .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fIPARITY_EVEN \fP\fP .TP \fB\fIPARITY_ODD \fP\fP .TP \fB\fIPARITY_NONE \fP\fP .TP \fB\fIPARITY_DEFAULT \fP\fP .TP \fB\fIPARITY_INVALID \fP\fP Invalid parity value\&. .PP Definition at line 124 of file SerialStreamBuf\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "LibSerial::SerialStreamBuf::SerialStreamBuf ()" .PP The default constructor\&. .SS "LibSerial::SerialStreamBuf::~SerialStreamBuf ()" .PP The destructor\&. .SS "LibSerial::SerialStreamBuf::SerialStreamBuf (const \fBSerialStreamBuf\fP &)\fC [private]\fP" .SH "Member Function Documentation" .PP .SS "const \fBBaudRateEnum\fP LibSerial::SerialStreamBuf::BaudRate () const" .PP Return the current baud rate of the serial port\&. If the baud rate is not set to a valid value then it returns BAUD_INVALID\&. .SS "const \fBCharSizeEnum\fP LibSerial::SerialStreamBuf::CharSize () const" .PP Return the character size currently being used for serial communication\&. .SS "\fBSerialStreamBuf\fP* LibSerial::SerialStreamBuf::close ()" .PP If \fBis_open()\fP == false, returns a null pointer\&. If a put area exists, calls overflow(EOF) to flush characters\&. Finally it closes the file by calling \fCstd::close(mFileDescriptor)\fP where mFileDescriptor is the value returned by the last call to \fBopen()\fP\&. .PP For the implementation of the corresponding function in class filebuf, if the last virtual member function called on \fC*this\fP (between underflow, overflow, \fCseekoff\fP, and \fCseekpos\fP) was overflow then it calls \fCa_codecvt\&.unshift\fP (possible several times) to determine a termination sequence, inserts those characters and calls overflow(EOF) again\&. However, \fBthis is not implemented here yet\fP\&. .PP \fBPostcondition\fP: \fBis_open()\fP == \fCfalse\fC\fP\fP .PP \fC\fC .PP \fBReturns:\fP .RS 4 \fCthis\fP on success, a null pointer otherwise\&. .RE .PP \fP\fP .SS "const \fBFlowControlEnum\fP LibSerial::SerialStreamBuf::FlowControl () const" .PP Return the current flow control setting\&. .SS "bool LibSerial::SerialStreamBuf::is_open () const" .PP Returns true if a previous call to \fBopen()\fP succeeded (returned a non-null value) and there has been no intervening call to close\&. .SS "short LibSerial::SerialStreamBuf::NumOfStopBits () const" .PP Get the number of stop bits being used during serial communication\&. .PP \fBReturns:\fP .RS 4 The number of stop bits\&. .RE .PP .SS "\fBSerialStreamBuf\fP* LibSerial::SerialStreamBuf::open (const std::string filename, std::ios_base::openmode mode = \fCstd::ios_base::in|std::ios_base::out\fP)" .PP If \fBis_open()\fP != \fCfalse\fP, returns a null pointer\&. Otherwise, initializes the \fCstreambuf\fP as required\&. It then opens a file, if possible, whose name is given as the string \fCfilename\fP using the system call \fCstd::open(filename\&.c_str(), flags)\fP\&. The value of parameter \fCflags\fP is obtained from the value of the parameter mode\&. At present, only \fCios_base::in\fP, \fCios_base::out\fP, and (\fCios_base::in|ios_base::out\fP) make sense for a serial port and hence all other settings result in the call to fail\&. The value of \fCflags\fP is obtained as: .br .PP \fCflags = u_flags | O_NOCTTY\fP .br .PP where \fCu_flags\fP is obtained from the following table depending on the value of the parameter mode: .PP \fB\fCin\fP\fP \fB\fCout\fP\fP \fB\fCu_flags\fP\fP + \fCO_RDONLY\fP + \fCO_WRONLY\fP + + \fCO_RDWR\fP .PP \fBReturns:\fP .RS 4 If the \fCopen\fP() system call succeeds the method returns \fCthis\fP\&. If the call fails, then it returns a null pointer\&. .RE .PP .SS "\fBSerialStreamBuf\fP& LibSerial::SerialStreamBuf::operator= (const \fBSerialStreamBuf\fP &)\fC [private]\fP" .SS "virtual int_type LibSerial::SerialStreamBuf::overflow (int_type c)\fC [protected]\fP, \fC [virtual]\fP" .PP Writes the specified character to the associated serial port\&. .PP \fBReturns:\fP .RS 4 The character c\&. .RE .PP .SS "const \fBParityEnum\fP LibSerial::SerialStreamBuf::Parity () const" .PP Get the current parity setting for the serial port\&. .PP \fBReturns:\fP .RS 4 The parity setting for the serial port\&. .RE .PP .SS "virtual int_type LibSerial::SerialStreamBuf::pbackfail (int_type c = \fCtraits_type::eof()\fP)\fC [protected]\fP, \fC [virtual]\fP" .PP This function is called when a putback of a character fails\&. This must be implemented for unbuffered I/O as all streambuf subclasses are required to provide putback of at least on character\&. .SS "const \fBBaudRateEnum\fP LibSerial::SerialStreamBuf::SetBaudRate (const \fBBaudRateEnum\fP baudRate)" .PP If \fBis_open()\fP != true, return -1\&. Otherwise, set the baud rate of the associated serial port\&. Return the baud rate on success and BAUD_INVALID on failure\&. .SS "virtual std::streambuf* LibSerial::SerialStreamBuf::setbuf (char_type *, std::streamsize)\fC [protected]\fP, \fC [virtual]\fP" .PP Performs an operation that is defined separately for each class derived from streambuf\&. The default behavior is to do nothing if gptr() is non-null and gptr()!=egptr()\&. Also, setbuf(0, 0) usually means unbuffered I/O and setbuf(p, n) means use p[0]\&.\&.\&.p[n-1] to hold the buffered characters\&. In general, this method implements the subclass's notion of getting memory for the buffered characters\&. .PP In the case of \fBSerialStreamBuf\fP, we want to keep using unbuffered I/O\&. Hence, using this method has no effect at present\&. .SS "const \fBCharSizeEnum\fP LibSerial::SerialStreamBuf::SetCharSize (const \fBCharSizeEnum\fP charSize)" .PP Set the character size to be used during serial communication\&. It returns the character size on success and CHAR_SIZE_INVALID on failure\&. .SS "const \fBFlowControlEnum\fP LibSerial::SerialStreamBuf::SetFlowControl (const \fBFlowControlEnum\fP flowControlType)" .PP Use the specified flow control\&. .SS "short LibSerial::SerialStreamBuf::SetNumOfStopBits (short numOfStopBits)" .PP Set the number of stop bits used during serial communication\&. The only valid values are 1 and 2\&. .PP \fBParameters:\fP .RS 4 \fIstop_bits\fP The number of stop bits\&. (1 or 2)\&. .RE .PP \fBReturns:\fP .RS 4 The number of stop bits or -1 on failure\&. .RE .PP .SS "int LibSerial::SerialStreamBuf::SetParametersToDefault ()" .PP Initialize the serial communication parameters to their default values\&. .SS "const \fBParityEnum\fP LibSerial::SerialStreamBuf::SetParity (const \fBParityEnum\fP parityType)" .PP Set the parity for serial communication\&. .PP \fBParameters:\fP .RS 4 \fIparity\fP The parity value\&. .RE .PP .SS "const short LibSerial::SerialStreamBuf::SetVMin (short vtime)" .PP Set the minimum number of characters for non-canonical reads\&. See VMIN in man termios(3)\&. .SS "const short LibSerial::SerialStreamBuf::SetVTime (short vtime)" .PP Set character buffer timeout in 10ths of a second\&. This applies to non-canonical reads\&. .SS "virtual std::streamsize LibSerial::SerialStreamBuf::showmanyc ()\fC [protected]\fP, \fC [virtual]\fP" .PP Check, wether input is available on the port\&. If you call \fCSerialStream::in_avail\fP, this method will be called to check for available input\&. .PP .nf while( serial_port\&.rdbuf()->in_avail() > 0 ) { serial_port\&.get(ch); \&.\&.\&. } .fi .PP .SS "virtual int_type LibSerial::SerialStreamBuf::uflow ()\fC [protected]\fP, \fC [virtual]\fP" .PP Reads and returns the next character from the associated serial port if one otherwise returns traits::eof()\&. This method is used for unbuffered I/O while \fBunderflow()\fP is called for unbuffered I/O\&. .PP \fBReturns:\fP .RS 4 The next character from the serial port\&. .RE .PP .SS "virtual int_type LibSerial::SerialStreamBuf::underflow ()\fC [protected]\fP, \fC [virtual]\fP" .PP Reads and returns the next character from the associated serial port if one otherwise returns traits::eof()\&. This method is used for buffered I/O while \fBuflow()\fP is called for unbuffered I/O\&. .PP \fBReturns:\fP .RS 4 The next character from the serial port\&. .RE .PP .SS "const short LibSerial::SerialStreamBuf::VMin () const" .PP Get the VMIN value for the device\&. This represents the minimum number of characters for non-canonical reads\&. .SS "const short LibSerial::SerialStreamBuf::VTime () const" .PP Get the current timeout value for non-canonical reads in deciseconds\&. .SS "virtual std::streamsize LibSerial::SerialStreamBuf::xsgetn (char_type * s, std::streamsize n)\fC [protected]\fP, \fC [virtual]\fP" .PP Reads upto n characters from the serial port and returns them through the character array located at s\&. .PP \fBReturns:\fP .RS 4 The number of characters actually read from the serial port\&. .RE .PP .SS "virtual std::streamsize LibSerial::SerialStreamBuf::xsputn (const char_type * s, std::streamsize n)\fC [protected]\fP, \fC [virtual]\fP" .PP Writes upto n characters from the character sequence at s to the serial port associated with the buffer\&. .PP \fBReturns:\fP .RS 4 The number of characters that were successfully written to the serial port\&. .RE .PP .SH "Member Data Documentation" .PP .SS "const char LibSerial::SerialStreamBuf::CTRL_Q = 0x11\fC [static]\fP, \fC [protected]\fP" .PP Character used to signal that I/O can start while using software flow control with the serial port\&. .PP Definition at line 428 of file SerialStreamBuf\&.h\&. .SS "const char LibSerial::SerialStreamBuf::CTRL_S = 0x13\fC [static]\fP, \fC [protected]\fP" .PP Character used to signal that I/O should stop while using software flow control with the serial port\&. .PP Definition at line 434 of file SerialStreamBuf\&.h\&. .SS "const \fBBaudRateEnum\fP LibSerial::SerialStreamBuf::DEFAULT_BAUD\fC [static]\fP" .PP The default value of the baud rate of the serial port\&. .PP \fBDeprecated\fP .RS 4 Please use \fBSerialPort::BAUD_DEFAULT\fP instead\&. .RE .PP .PP Definition at line 160 of file SerialStreamBuf\&.h\&. .SS "const \fBCharSizeEnum\fP LibSerial::SerialStreamBuf::DEFAULT_CHAR_SIZE\fC [static]\fP" .PP The default value of the character size used during the serial communication\&. .PP \fBDeprecated\fP .RS 4 Please use \fBSerialPort::CHAR_SIZE_DEFAULT\fP instead\&. .RE .PP .PP Definition at line 169 of file SerialStreamBuf\&.h\&. .SS "const \fBFlowControlEnum\fP LibSerial::SerialStreamBuf::DEFAULT_FLOW_CONTROL\fC [static]\fP" .PP The default flow control setting\&. .PP \fBDeprecated\fP .RS 4 Please use \fBSerialPort::FLOW_CONTROL_DEFAULT\fP instead\&. .RE .PP .PP Definition at line 193 of file SerialStreamBuf\&.h\&. .SS "const short LibSerial::SerialStreamBuf::DEFAULT_NO_OF_STOP_BITS\fC [static]\fP" .PP The default number of stop bits used\&. .PP \fBDeprecated\fP .RS 4 Please use \fBSerialPort::STOP_BITS_DEFAULT\fP instead\&. .RE .PP .PP Definition at line 177 of file SerialStreamBuf\&.h\&. .SS "const \fBParityEnum\fP LibSerial::SerialStreamBuf::DEFAULT_PARITY\fC [static]\fP" .PP The default parity setting\&. .PP \fBDeprecated\fP .RS 4 Please use \fBSerialPort::PARITY_DEFAULT\fP instead\&. .RE .PP .PP Definition at line 185 of file SerialStreamBuf\&.h\&. .SS "const short LibSerial::SerialStreamBuf::DEFAULT_VMIN\fC [static]\fP" .PP The default character buffer size\&. .PP \fBDeprecated\fP .RS 4 VMIN and VTIME will not be supported starting from version 0\&.7\&.0\&. Methods of \fBSerialPort\fP class provide better mechanisms for implementing read and write timeouts\&. .RE .PP .PP Definition at line 203 of file SerialStreamBuf\&.h\&. .SS "const short LibSerial::SerialStreamBuf::DEFAULT_VTIME\fC [static]\fP" .PP The default character buffer timing\&. .PP \fBDeprecated\fP .RS 4 VMIN and VTIME will not be supported starting from version 0\&.7\&.0\&. Methods of \fBSerialPort\fP class provide better mechanisms for implementing read and write timeouts\&. .RE .PP .PP Definition at line 213 of file SerialStreamBuf\&.h\&. .SS "boost::scoped_ptr LibSerial::SerialStreamBuf::mImpl\fC [private]\fP" .PP Definition at line 532 of file SerialStreamBuf\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libserial from the source code\&.