#include <CommandStationClient.h>
|
| | CommandStationClient (Stream *logStream, CommandStationListener *commandStationLister) |
| | Constructor for the CommandStation client.
|
| |
| void | begin () |
| | Setup the CommandStation client with log stream and listener ready to connect.
|
| |
| void | setConnectionStream (Stream *connectionStream) |
| | Set the stream object used to connect to the CommandStation, call after begin() Once set, the client is flagged as connected which will initiate communication with the CommandStation.
|
| |
| void | update () |
| | Ensure client is updated regularly.
|
| |
| bool | isConnected () |
| | Check if the CommandStation client is connected.
|
| |
| DCCEXProtocol * | getClient () |
| | Get the actual DCCEXProtocol client to interact with.
|
| |
| void | joinProgTrack () |
| | Join Prog to Main.
|
| |
| void | setTrackPower (Event event) |
| | Set track power according to the provided EventType.
|
| |
◆ CommandStationClient()
| CommandStationClient::CommandStationClient |
( |
Stream * |
logStream, |
|
|
CommandStationListener * |
commandStationLister |
|
) |
| |
Constructor for the CommandStation client.
- Parameters
-
| consoleStream | Pointer to the stream for logging |
| commandStationLister | Pointer to the listener to respond to broadcasts/responses |
◆ begin()
| void CommandStationClient::begin |
( |
| ) |
|
Setup the CommandStation client with log stream and listener ready to connect.
◆ getClient()
| DCCEXProtocol * CommandStationClient::getClient |
( |
| ) |
|
Get the actual DCCEXProtocol client to interact with.
- Returns
- Pointer to the DCCEXProtocol client
◆ isConnected()
| bool CommandStationClient::isConnected |
( |
| ) |
|
Check if the CommandStation client is connected.
- Returns
- True|False
◆ joinProgTrack()
| void CommandStationClient::joinProgTrack |
( |
| ) |
|
◆ setConnectionStream()
| void CommandStationClient::setConnectionStream |
( |
Stream * |
connectionStream | ) |
|
Set the stream object used to connect to the CommandStation, call after begin() Once set, the client is flagged as connected which will initiate communication with the CommandStation.
- Parameters
-
| connectionStream | Pointer to the stream object (WiFi client or serial) |
◆ setTrackPower()
| void CommandStationClient::setTrackPower |
( |
Event |
event | ) |
|
Set track power according to the provided EventType.
- Parameters
-
| eventType | Valid Event type and data |
◆ update()
| void CommandStationClient::update |
( |
| ) |
|
Ensure client is updated regularly.
◆ _commandStationClient
| DCCEXProtocol* CommandStationClient::_commandStationClient |
|
private |
◆ _commandStationListener
◆ _connectionStream
| Stream* CommandStationClient::_connectionStream |
|
private |
◆ _isConnected
| bool CommandStationClient::_isConnected |
|
private |
◆ _lastRosterRetry
| unsigned long CommandStationClient::_lastRosterRetry |
|
private |
◆ _logStream
| Stream* CommandStationClient::_logStream |
|
private |
◆ _rosterMaxRetries
| uint8_t CommandStationClient::_rosterMaxRetries |
|
private |
◆ _rosterRetry
| uint8_t CommandStationClient::_rosterRetry |
|
private |
◆ _rosterRetryDelay
| unsigned long CommandStationClient::_rosterRetryDelay |
|
private |
The documentation for this class was generated from the following files: