$search
Stream for serial port, in addition to FileDescriptorStream, save old state of serial port. More...

Public Member Functions | |
| virtual void | flush () |
| Flushes stream. | |
| SerialStream (const std::string ¶ms) | |
| Create the stream and associates a file descriptor. | |
| SerialStream (const string &targetName) | |
| Parse the target name and create the corresponding serial stream. | |
| virtual | ~SerialStream () |
| Destructor, restore old serial port state. | |
Protected Attributes | |
| struct termios | oldtio |
| old serial port state | |
Private Member Functions | |
| bool | buildDCB (HANDLE sp, int speed, int bits, const std::string &parity, const std::string &stopbits, const std::string &fc) |
| Set up a DCB for the given port parameters. | |
Stream for serial port, in addition to FileDescriptorStream, save old state of serial port.
Serial port stream.
Definition at line 846 of file dashel-posix.cpp.
| Dashel::SerialStream::SerialStream | ( | const string & | targetName | ) | [inline] |
Parse the target name and create the corresponding serial stream.
Definition at line 853 of file dashel-posix.cpp.
| virtual Dashel::SerialStream::~SerialStream | ( | ) | [inline, virtual] |
Destructor, restore old serial port state.
Definition at line 995 of file dashel-posix.cpp.
| Dashel::SerialStream::SerialStream | ( | const std::string & | params | ) | [inline] |
Create the stream and associates a file descriptor.
| params | Parameter string. |
Definition at line 866 of file dashel-win32.cpp.
| bool Dashel::SerialStream::buildDCB | ( | HANDLE | sp, | |
| int | speed, | |||
| int | bits, | |||
| const std::string & | parity, | |||
| const std::string & | stopbits, | |||
| const std::string & | fc | |||
| ) | [inline, private] |
Set up a DCB for the given port parameters.
| sp | File handle to the serial port. | |
| speed | Bits per second. | |
| bits | Number of bits. | |
| parity | Parity type. | |
| stopbits | Number of stop bits. |
Definition at line 794 of file dashel-win32.cpp.
| virtual void Dashel::SerialStream::flush | ( | ) | [inline, virtual] |
Flushes stream.
Calling this function requests the stream to be flushed, this may ensure that data is written to physical media or actually sent over a wire. The exact performed function depends on the stream type and operating system.
Reimplemented from Dashel::FileDescriptorStream.
Definition at line 1000 of file dashel-posix.cpp.
struct termios Dashel::SerialStream::oldtio [protected] |
old serial port state
Definition at line 849 of file dashel-posix.cpp.