DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
/home/runner/work/DCCEXSimpleThrottle/DCCEXSimpleThrottle/AppConfiguration.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 * © 2023 Peter Cole
4 *
5 * This is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * It is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this code. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef APPCONFIGURATION_H
20#define APPCONFIGURATION_H
21
22#include "AppOrchestrator.h"
23#include "Button.h"
27#include "ConnectionManager.h"
28#include "Defines.h"
29#include "EventManager.h"
30#include "MenuManager.h"
31#include "RotaryEncoder.h"
32#include "ThrottleScreen.h"
33#include "U8G2SH1106Display.h"
34
38public:
41
44 void initialise();
45
49
53
57
61
65
69
73
77
78private:
89
92
93#ifdef WIFI_ENABLED
94 uint8_t _commandStationCount;
95 CommandStationDetails _commandStationList[COMMANDSTATION_COUNT];
96
98 void _initialiseCommandStationArray();
99
103 IPAddress _convertIP(const char *ipAddressString);
104#endif // WIFI_ENABLED
105
107#if defined(ARDUINO_BLUEPILL_F103C8)
108 void _disableJTAG();
109#endif // BLUEPILL
110};
111
112#endif // APPCONFIGURATION_H
Class to perform all application configuration on startup All interfaces, menus, and other applicatio...
Definition AppConfiguration.h:37
ConnectionManager * getConnectionManager()
Get the connection manager.
Definition AppConfiguration.cpp:68
ThrottleScreen * _throttleScreen
Definition AppConfiguration.h:87
CommandStationClient * getCommandStationClient()
Get the CommandStation client.
Definition AppConfiguration.cpp:72
AppOrchestrator * getAppOrchestrator()
Get the application orchestrator associated with the config.
Definition AppConfiguration.cpp:66
AppOrchestrator * _appOrchestrator
Definition AppConfiguration.h:88
CommandStationClient * _commandStationClient
Definition AppConfiguration.h:86
UserSelectionInterface * getUserSelectionInterface()
Get the user selection interface associated with the config.
Definition AppConfiguration.cpp:60
CommandStationListener * _commandStationListener
Definition AppConfiguration.h:85
DisplayInterface * _displayInterface
Definition AppConfiguration.h:81
void _registerEventSubscriptions()
Register all required event subscriptions, called by initialise()
Definition AppConfiguration.cpp:74
EventManager * getEventManager()
Get the event manager instance associated with the config.
Definition AppConfiguration.cpp:64
MenuManager * getMenuManager()
Get the menu manager.
Definition AppConfiguration.cpp:70
ConnectionManager * _connectionManager
Definition AppConfiguration.h:83
DisplayInterface * getDisplayInterface()
Get the display interface associated with the config.
Definition AppConfiguration.cpp:62
EventManager * _eventManager
Definition AppConfiguration.h:82
void initialise()
Start all associated user interfaces and instantiate all objects EventManager registrations are done ...
Definition AppConfiguration.cpp:42
UserConfirmationInterface * _userConfirmationInterface
Definition AppConfiguration.h:79
UserConfirmationInterface * getUserConfirmationInterface()
Get the user confirmation interface associated with the config.
Definition AppConfiguration.cpp:58
AppConfiguration()
Constructor for the app configuration object.
Definition AppConfiguration.cpp:21
MenuManager * _menuManager
Definition AppConfiguration.h:84
UserSelectionInterface * _userSelectionInterface
Definition AppConfiguration.h:80
This class is for the overall application orchestration to coordinate all the user interactions,...
Definition AppOrchestrator.h:47
Definition CommandStationClient.h:27
Class to manage broadcasts and responses from the CommandStation.
Definition CommandStationListener.h:27
Class to manage all WiFi and serial connections used to connect to a CommandStation.
Definition ConnectionManager.h:30
Interface class to abstract construction of what is displayed on screen from the physical implementat...
Definition DisplayInterface.h:29
Class to centrally manage all events for the application Exposes methods to register subscribers that...
Definition EventManager.h:28
Definition MenuManager.h:30
Definition ThrottleScreen.h:26
Interface class to abstract user confirmation actions from physical implementations All physical user...
Definition UserConfirmationInterface.h:29
Interface class to abstract user selection actions from physical implementations All physical user se...
Definition UserSelectionInterface.h:31
#define COMMANDSTATION_COUNT
Definition myConfig.example.h:10