Dashel::SerialStream Class Reference

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

Inheritance diagram for Dashel::SerialStream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void flush ()
 Flushes stream.
 SerialStream (const std::string &params)
 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.

Detailed Description

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

Serial port stream.

Definition at line 766 of file dashel-posix.cpp.


Constructor & Destructor Documentation

Dashel::SerialStream::SerialStream ( const string &  targetName  )  [inline]

Parse the target name and create the corresponding serial stream.

Definition at line 773 of file dashel-posix.cpp.

virtual Dashel::SerialStream::~SerialStream (  )  [inline, virtual]

Destructor, restore old serial port state.

Definition at line 889 of file dashel-posix.cpp.

Dashel::SerialStream::SerialStream ( const std::string &  params  )  [inline]

Create the stream and associates a file descriptor.

Parameters:
params Parameter string.

Definition at line 909 of file dashel-win32.cpp.


Member Function Documentation

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.

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 837 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 894 of file dashel-posix.cpp.


Member Data Documentation

struct termios Dashel::SerialStream::oldtio [protected]

old serial port state

Definition at line 769 of file dashel-posix.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:16 2011