MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
MRAS_System.h
1
//
2
// Created by Tom Danvers on 13/12/2022.
3
//
4
5
#ifndef MRAS_MRAS_SYSTEM_H
6
#define MRAS_MRAS_SYSTEM_H
7
8
#include "Subsystem.h"
9
#include "TextLogger.h"
10
#include "BuzzerInterface.h"
11
18
class
MRAS_System
{
19
private
:
26
Subsystem
* subsystems[255] = {};
27
31
uint8_t subsystem_count = 0;
32
36
static
MRAS_System
*instance;
37
41
TextLogger
* logger =
nullptr
;
42
43
BuzzerInterface
* buzzer =
nullptr
;
44
public
:
45
49
MRAS_System
(
MRAS_System
&other) =
delete
;
50
51
void
operator=(
const
MRAS_System
&) =
delete
;
52
53
MRAS_System
() =
default
;
54
61
static
MRAS_System
*
get_instance
();
62
71
bool
add_subsystem
(
Subsystem
* subsystem);
72
73
void
setup();
74
75
void
loop();
76
82
void
set_logger
(
TextLogger
*logger);
83
89
TextLogger
*
get_logger
();
90
91
void
set_buzzer(
BuzzerInterface
*buzzer);
92
98
BuzzerInterface
*
get_buzzer
();
99
};
100
101
102
#endif
//MRAS_MRAS_SYSTEM_H
BuzzerInterface
Definition:
BuzzerInterface.h:10
MRAS_System
The main class of the MRAS system.
Definition:
MRAS_System.h:18
MRAS_System::get_instance
static MRAS_System * get_instance()
Definition:
MRAS_System.cpp:9
MRAS_System::get_buzzer
BuzzerInterface * get_buzzer()
Get the Buzzer that is used to buzz.
Definition:
MRAS_System.cpp:67
MRAS_System::set_logger
void set_logger(TextLogger *logger)
Set the TextLogger that is used to log messages.
Definition:
MRAS_System.cpp:53
MRAS_System::MRAS_System
MRAS_System(MRAS_System &other)=delete
MRAS_System::add_subsystem
bool add_subsystem(Subsystem *subsystem)
Add a Subsystem to the system.
Definition:
MRAS_System.cpp:16
MRAS_System::get_logger
TextLogger * get_logger()
Get the TextLogger that is used to log messages.
Definition:
MRAS_System.cpp:58
Subsystem
Definition:
Subsystem.h:30
TextLogger
A base class for ArduinoTextLogger and NativeTextLogger.
Definition:
TextLogger.h:18
lib
shared
MRAS_System.h
Generated by
1.9.6