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

The main class of the MRAS system. More...

#include <MRAS_System.h>

Collaboration diagram for MRAS_System:
Collaboration graph

Public Member Functions

 MRAS_System (MRAS_System &other)=delete
 
void operator= (const MRAS_System &)=delete
 
bool add_subsystem (Subsystem *subsystem)
 Add a Subsystem to the system.
 
void setup ()
 
void loop ()
 
void set_logger (TextLogger *logger)
 Set the TextLogger that is used to log messages.
 
TextLoggerget_logger ()
 Get the TextLogger that is used to log messages.
 
void set_buzzer (BuzzerInterface *buzzer)
 
BuzzerInterfaceget_buzzer ()
 Get the Buzzer that is used to buzz.
 

Static Public Member Functions

static MRAS_Systemget_instance ()
 

Detailed Description

The main class of the MRAS system.

This class is the main class of the MRAS system. It is a singleton class that is responsible for managing all of the Subsystems. For more information, see the Software Architecture Overview page.

Constructor & Destructor Documentation

◆ MRAS_System()

MRAS_System::MRAS_System ( MRAS_System other)
delete

Singletons should not be cloneable

Member Function Documentation

◆ add_subsystem()

bool MRAS_System::add_subsystem ( Subsystem subsystem)

Add a Subsystem to the system.

Parameters
subsystemA pointer to the Subsystem to add
Returns
true If the Subsystem was successfully added
false If the Subsystem was not successfully added (e.g. if the maximum number of Subsystems has been reached)

◆ get_buzzer()

BuzzerInterface * MRAS_System::get_buzzer ( )

Get the Buzzer that is used to buzz.

Returns
Buzzer* A pointer to the Buzz

◆ get_instance()

MRAS_System * MRAS_System::get_instance ( )
static

This is the static method that controls the access to the singleton instance. On the first run, it creates a singleton object and places it into the static field. On subsequent runs, it returns the client existing object stored in the static field.

◆ get_logger()

TextLogger * MRAS_System::get_logger ( )

Get the TextLogger that is used to log messages.

Returns
TextLogger* A pointer to the TextLogger that is used to log messages

◆ set_logger()

void MRAS_System::set_logger ( TextLogger logger)

Set the TextLogger that is used to log messages.

Parameters
loggerA pointer to the TextLogger that is used to log messages

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