APM:Libraries
Public Member Functions | Public Attributes | List of all members
BufferPrinter Class Reference
Inheritance diagram for BufferPrinter:
[legend]
Collaboration diagram for BufferPrinter:
[legend]

Public Member Functions

 BufferPrinter (char *str, size_t size)
 
size_t write (uint8_t c) override
 
size_t write (const uint8_t *buffer, size_t size) override
 
uint32_t available () override
 
int16_t read () override
 
uint32_t txspace () override
 
- Public Member Functions inherited from AP_HAL::BetterStream
virtual void printf (const char *,...) FMT_PRINTF(2
 
virtual void virtual void vprintf (const char *, va_list)
 
void print (const char *str)
 
void println (const char *str)
 
size_t write (const char *str)
 

Public Attributes

size_t _offs
 
char *const _str
 
const size_t _size
 

Detailed Description

Definition at line 14 of file Util.cpp.

Constructor & Destructor Documentation

◆ BufferPrinter()

BufferPrinter::BufferPrinter ( char *  str,
size_t  size 
)
inline

Definition at line 16 of file Util.cpp.

Member Function Documentation

◆ available()

uint32_t BufferPrinter::available ( void  )
inlineoverridevirtual

Implements AP_HAL::BetterStream.

Definition at line 39 of file Util.cpp.

◆ read()

int16_t BufferPrinter::read ( void  )
inlineoverridevirtual

Implements AP_HAL::BetterStream.

Definition at line 40 of file Util.cpp.

◆ txspace()

uint32_t BufferPrinter::txspace ( void  )
inlineoverridevirtual

Implements AP_HAL::BetterStream.

Definition at line 41 of file Util.cpp.

◆ write() [1/2]

size_t BufferPrinter::write ( uint8_t  c)
inlineoverridevirtual

Implements AP_HAL::BetterStream.

Definition at line 18 of file Util.cpp.

Referenced by AP_HAL::Util::vsnprintf(), and write().

Here is the caller graph for this function:

◆ write() [2/2]

size_t BufferPrinter::write ( const uint8_t *  buffer,
size_t  size 
)
inlineoverridevirtual

Reimplemented from AP_HAL::BetterStream.

Definition at line 27 of file Util.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _offs

size_t BufferPrinter::_offs

Definition at line 35 of file Util.cpp.

Referenced by AP_HAL::Util::vsnprintf(), and write().

◆ _size

const size_t BufferPrinter::_size

Definition at line 37 of file Util.cpp.

Referenced by write().

◆ _str

char* const BufferPrinter::_str

Definition at line 36 of file Util.cpp.

Referenced by write().


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