Protected Member Functions | Protected Attributes | Private Attributes | List of all members
FakeSerial Class Reference
Inheritance diagram for FakeSerial:
Inheritance graph

Protected Member Functions

virtual void SetUp ()
virtual void TearDown ()
void write_serial (const std::string &msg)

Protected Attributes

serial::Serial ser

Private Attributes

int master_fd
char * ser_name

Detailed Description

Definition at line 7 of file test_comms.cpp.

Member Function Documentation

virtual void FakeSerial::SetUp ( )

What's going on here? The posix_openpt() call establishes a pseudo terminal and gives us a fd for the other end of it. So we can connect up a Serial instance to the pty, and have full control over reading-from and writing-to the driver.

Definition at line 16 of file test_comms.cpp.

virtual void FakeSerial::TearDown ( )

Definition at line 32 of file test_comms.cpp.

void FakeSerial::write_serial ( const std::string &  msg)

Definition at line 27 of file test_comms.cpp.

Member Data Documentation

int FakeSerial::master_fd

Definition at line 41 of file test_comms.cpp.

serial::Serial FakeSerial::ser

Definition at line 38 of file test_comms.cpp.

char* FakeSerial::ser_name

Definition at line 42 of file test_comms.cpp.

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

Author(s): Mike Purvis , Alex Brown
autogenerated on Tue Feb 11 2020 03:26:50