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

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 ( )
inlineprotectedvirtual

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 ( )
inlineprotectedvirtual

Definition at line 32 of file test_comms.cpp.

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

Definition at line 27 of file test_comms.cpp.

Member Data Documentation

int FakeSerial::master_fd
private

Definition at line 41 of file test_comms.cpp.

serial::Serial FakeSerial::ser
protected

Definition at line 38 of file test_comms.cpp.

char* FakeSerial::ser_name
private

Definition at line 42 of file test_comms.cpp.


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


um6
Author(s): Mike Purvis
autogenerated on Thu Sep 26 2019 03:18:02