Public Member Functions | List of all members
ecl::SerialStream Class Reference

Convenience class for Serial TextStream definitions. More...

#include <serial_stream.hpp>

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

Public Member Functions

 SerialStream ()
 Default constructor, underlying device must be manually opened. More...
 
 SerialStream (const std::string &port_name, const BaudRate &baud_rate=BaudRate_115200, const DataBits &data_bits=DataBits_8, const StopBits &stop_bits=StopBits_1, const Parity &parity=NoParity)
 Convenience constructor for serial text streams. More...
 
virtual ~SerialStream ()
 
- Public Member Functions inherited from ecl::TextStream< Serial >
virtual ~TextStream ()
 

Detailed Description

Convenience class for Serial TextStream definitions.

This class provides a convenient handle for both writing and opening TextStream<Serial> objects. It has no further functionality.

See also
TextStream.

Definition at line 48 of file serial_stream.hpp.

Constructor & Destructor Documentation

◆ SerialStream() [1/2]

ecl::SerialStream::SerialStream ( )
inline

Default constructor, underlying device must be manually opened.

This must open the device manually via device().open() as you would do if using a TextStream.

Definition at line 64 of file serial_stream.hpp.

◆ SerialStream() [2/2]

ecl::SerialStream::SerialStream ( const std::string &  port_name,
const BaudRate baud_rate = BaudRate_115200,
const DataBits data_bits = DataBits_8,
const StopBits stop_bits = StopBits_1,
const Parity parity = NoParity 
)
inline

Convenience constructor for serial text streams.

This constructor enables RAII style construction of the underlying device (this makes it distinct from a generic TextStream<Serial> object).

Parameters
port_name: the device name.
baud_rate: baud rate.
data_bits: the number of bits in a single message byte.
stop_bits: the number of bits after the data used for error checking.
parity: the parity used for checksums.
Exceptions
StandardException: throws if the connection failed to open.

Definition at line 79 of file serial_stream.hpp.

◆ ~SerialStream()

virtual ecl::SerialStream::~SerialStream ( )
inlinevirtual

Definition at line 91 of file serial_stream.hpp.


The documentation for this class was generated from the following file:


ecl_streams
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:48