DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
/home/runner/work/DCCEXSimpleThrottle/DCCEXSimpleThrottle/EventStructure.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 *
4 * This is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this code. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef EVENTSTRUCTURE_H
19#define EVENTSTRUCTURE_H
20
21#include <Arduino.h>
22#include <DCCEXProtocol.h>
23
40
56
100
111
112#endif // EVENTSTRUCTURE_H
EventType
Enum containing all the event types that subscribers can listen for, and publishers can publish Liste...
Definition EventStructure.h:26
@ ReceivedRosterList
Definition EventStructure.h:28
@ ToggleTrackPower
Definition EventStructure.h:35
@ SetPowerProg
Definition EventStructure.h:38
@ ReceivedLocoUpdate
Definition EventStructure.h:31
@ SetPowerMain
Definition EventStructure.h:37
@ ReadLocoAddress
Definition EventStructure.h:30
@ ReceivedReadLoco
Definition EventStructure.h:34
@ ReceivedTrackPower
Definition EventStructure.h:33
@ LocoSelected
Definition EventStructure.h:29
@ JoinProgTrack
Definition EventStructure.h:36
@ CommandStationSelected
Definition EventStructure.h:27
@ ReceivedLocoBroadcast
Definition EventStructure.h:32
Structure to enable supporting EventData that has various different types Byte - caters for 8 bit uns...
Definition EventStructure.h:66
TrackPower trackPowerValue
Definition EventStructure.h:74
EventData(uint8_t value)
Constructor for events with a uint8_t parameter.
Definition EventStructure.h:80
Loco * locoValue
Definition EventStructure.h:73
DataType dataType
Definition EventStructure.h:68
EventData()
Constructor for events with no data or parameters.
Definition EventStructure.h:91
int intValue
Definition EventStructure.h:72
EventData(TrackPower value)
Constructor for events containing track power.
Definition EventStructure.h:94
uint8_t byteValue
Definition EventStructure.h:71
EventData(LocoBroadcast value)
Constructor for events containing loco broadcasts.
Definition EventStructure.h:98
EventData(int value)
Constructor for events with an int parameter.
Definition EventStructure.h:84
DataType
Definition EventStructure.h:67
EventData(Loco *value)
Constructor for events with a Loco pointer.
Definition EventStructure.h:88
LocoBroadcast locoBroadcastValue
Definition EventStructure.h:75
Structure for each Event that is published.
Definition EventStructure.h:102
EventData eventData
Definition EventStructure.h:104
EventType eventType
Definition EventStructure.h:103
Event(EventType eventType, EventData eventData)
Constructor for each event.
Definition EventStructure.h:109
Structure for data from a Loco broadcast.
Definition EventStructure.h:42
int address
Definition EventStructure.h:43
Direction direction
Definition EventStructure.h:45
int functionMap
Definition EventStructure.h:46
LocoBroadcast(int address, int speed, Direction direction, int functionMap)
Constructor for LocoBroadcast data.
Definition EventStructure.h:53
int speed
Definition EventStructure.h:44