Class to manage broadcasts and responses from the CommandStation.
More...
#include <CommandStationListener.h>
|
| CommandStationListener (EventManager *eventManager) |
| Consructor for the CommandStation listener.
|
|
void | receivedRosterList () override |
| Respond to receiving the roster list which updates the roster menu.
|
|
void | receivedLocoUpdate (Loco *loco) override |
| Respond to receiving an update for a loco to update the throttle screen.
|
|
void | receivedLocoBroadcast (int address, int speed, Direction direction, int functionMap) override |
| Respond to receiving a loco broadcast to update throttle screen for non-roster locos.
|
|
void | receivedTrackPower (TrackPower powerState) override |
| Respond to receiving a track power state broadcast to update the throttle screen.
|
|
void | receivedReadLoco (int address) override |
| Respond to receiving the loco address read from the programming track If valid (not -1), sets this as the loco controlled by the throttle.
|
|
Class to manage broadcasts and responses from the CommandStation.
◆ CommandStationListener()
CommandStationListener::CommandStationListener |
( |
EventManager * |
eventManager | ) |
|
Consructor for the CommandStation listener.
- Parameters
-
eventManager | Pointer to the event manager |
◆ receivedLocoBroadcast()
void CommandStationListener::receivedLocoBroadcast |
( |
int |
address, |
|
|
int |
speed, |
|
|
Direction |
direction, |
|
|
int |
functionMap |
|
) |
| |
|
override |
Respond to receiving a loco broadcast to update throttle screen for non-roster locos.
- Parameters
-
address | DCC address of the loco |
speed | Current speed 0 - 126 |
direction | Current direction |
functionMap | Current function map of states |
◆ receivedLocoUpdate()
void CommandStationListener::receivedLocoUpdate |
( |
Loco * |
loco | ) |
|
|
override |
Respond to receiving an update for a loco to update the throttle screen.
- Parameters
-
loco | Pointer to the loco address the update is related to |
◆ receivedReadLoco()
void CommandStationListener::receivedReadLoco |
( |
int |
address | ) |
|
|
override |
Respond to receiving the loco address read from the programming track If valid (not -1), sets this as the loco controlled by the throttle.
- Parameters
-
address | DCC address of the loco on the programming track, -1 if not read |
◆ receivedRosterList()
void CommandStationListener::receivedRosterList |
( |
| ) |
|
|
override |
Respond to receiving the roster list which updates the roster menu.
◆ receivedTrackPower()
void CommandStationListener::receivedTrackPower |
( |
TrackPower |
powerState | ) |
|
|
override |
Respond to receiving a track power state broadcast to update the throttle screen.
- Parameters
-
powerState | [PowerOff|PowerOn|PowerUnknown] |
◆ _eventManager
The documentation for this class was generated from the following files: