MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
ArduinoTextLogger Class Reference

A TextLogger that logs to the Arduino Serial connection. More...

#include <ArduinoTextLogger.h>

Inheritance diagram for ArduinoTextLogger:
Inheritance graph
Collaboration diagram for ArduinoTextLogger:
Collaboration graph

Public Member Functions

 ArduinoTextLogger (uint8_t id, long baud)
 Construct a new Arduino Text Logger object.
 
void _log (const char *fmt, va_list args) override
 Log a message to the Arduino Serial connection.
 
int8_t setup () override
 Set up the Serial connection.
 
int8_t loop () override
 Do nothing.
 
- Public Member Functions inherited from TextLogger
virtual SUBSYSTEM_NO_MESSAGE_HANDLER void _log (const char *fmt, va_list args)=0
 
 Subsystem (uint8_t id)
 
- Public Member Functions inherited from Subsystem
virtual const char * get_name ()=0
 
virtual int8_t setup ()=0
 
virtual int8_t loop ()=0
 
uint8_t get_id () const
 
int8_t get_status () const
 
int8_t self_test () const
 
bool add_subscriber (Subsystem *subscriber)
 
 Subsystem (uint8_t id)
 

Additional Inherited Members

- Protected Member Functions inherited from Subsystem
void log (const char fmt[],...)
 
virtual void on_message (SystemMessage *msg)=0
 
void publish (SystemMessage *msg)
 
- Static Protected Member Functions inherited from Subsystem
static void buzzer (uint16_t frequency, uint32_t duration, bool block=false)
 
- Protected Attributes inherited from Subsystem
int8_t status = 0
 
int8_t self_test_result = -1
 

Detailed Description

A TextLogger that logs to the Arduino Serial connection.

This class handles the setup of the Serial connection and the logging of messages to the Serial connection

Constructor & Destructor Documentation

◆ ArduinoTextLogger()

ArduinoTextLogger::ArduinoTextLogger ( uint8_t  id,
long  baud 
)
inlineexplicit

Construct a new Arduino Text Logger object.

Parameters
idThe ID of the logger
baudThe baud rate of the Serial connection

Member Function Documentation

◆ _log()

void ArduinoTextLogger::_log ( const char *  fmt,
va_list  args 
)
overridevirtual

Log a message to the Arduino Serial connection.

Parameters
fmtThe format string
argsThe arguments to the format string

Implements TextLogger.

◆ loop()

int8_t ArduinoTextLogger::loop ( )
inlineoverridevirtual

Do nothing.

Returns
int8_t 0 on success

Implements Subsystem.

◆ setup()

int8_t ArduinoTextLogger::setup ( )
inlineoverridevirtual

Set up the Serial connection.

Returns
int8_t 0 on success

Implements Subsystem.


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