APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ConsoleDevice Class Reference

#include <ConsoleDevice.h>

Inheritance diagram for ConsoleDevice:
[legend]
Collaboration diagram for ConsoleDevice:
[legend]

Public Member Functions

 ConsoleDevice ()
 
virtual ~ConsoleDevice ()
 
virtual bool open () override
 
virtual bool close () override
 
virtual ssize_t write (const uint8_t *buf, uint16_t n) override
 
virtual ssize_t read (uint8_t *buf, uint16_t n) override
 
virtual void set_blocking (bool blocking) override
 
virtual void set_speed (uint32_t speed) override
 
- Public Member Functions inherited from SerialDevice
virtual ~SerialDevice ()
 
virtual AP_HAL::UARTDriver::flow_control get_flow_control (void)
 
virtual void set_flow_control (AP_HAL::UARTDriver::flow_control flow_control_setting)
 

Private Member Functions

bool _set_signal_handlers (void) const
 

Private Attributes

int _rd_fd = -1
 
int _wr_fd = -1
 
bool _closed = true
 

Detailed Description

Definition at line 6 of file ConsoleDevice.h.

Constructor & Destructor Documentation

◆ ConsoleDevice()

ConsoleDevice::ConsoleDevice ( )

Definition at line 12 of file ConsoleDevice.cpp.

◆ ~ConsoleDevice()

ConsoleDevice::~ConsoleDevice ( )
virtual

Definition at line 16 of file ConsoleDevice.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ _set_signal_handlers()

bool ConsoleDevice::_set_signal_handlers ( void  ) const
private

Definition at line 43 of file ConsoleDevice.cpp.

Referenced by open().

Here is the caller graph for this function:

◆ close()

bool ConsoleDevice::close ( )
overridevirtual

Implements SerialDevice.

Definition at line 21 of file ConsoleDevice.cpp.

Referenced by open(), and ~ConsoleDevice().

Here is the caller graph for this function:

◆ open()

bool ConsoleDevice::open ( )
overridevirtual

Implements SerialDevice.

Definition at line 28 of file ConsoleDevice.cpp.

Here is the call graph for this function:

◆ read()

ssize_t ConsoleDevice::read ( uint8_t *  buf,
uint16_t  n 
)
overridevirtual

Implements SerialDevice.

Definition at line 53 of file ConsoleDevice.cpp.

Here is the call graph for this function:

◆ set_blocking()

void ConsoleDevice::set_blocking ( bool  blocking)
overridevirtual

Implements SerialDevice.

Definition at line 71 of file ConsoleDevice.cpp.

Here is the call graph for this function:

◆ set_speed()

void ConsoleDevice::set_speed ( uint32_t  speed)
overridevirtual

Implements SerialDevice.

Definition at line 97 of file ConsoleDevice.cpp.

◆ write()

ssize_t ConsoleDevice::write ( const uint8_t *  buf,
uint16_t  n 
)
overridevirtual

Implements SerialDevice.

Definition at line 62 of file ConsoleDevice.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _closed

bool ConsoleDevice::_closed = true
private

Definition at line 21 of file ConsoleDevice.h.

Referenced by close(), open(), read(), and write().

◆ _rd_fd

int ConsoleDevice::_rd_fd = -1
private

Definition at line 19 of file ConsoleDevice.h.

Referenced by open(), read(), and set_blocking().

◆ _wr_fd

int ConsoleDevice::_wr_fd = -1
private

Definition at line 20 of file ConsoleDevice.h.

Referenced by open(), set_blocking(), and write().


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