|
LCC Fusion Project 1.0
LCC Automation
|
#include <DccCmdMonitor.h>
Public Types | |
| enum | COMMAND_TYPE { ALL , SPEED , FUNCTION , TURNOUT_BOARD , TURNOUT_OUTPUT , SIGNAL , CV } |
Public Member Functions | |
| DccCmdMonitor (int dcc_interrupt_pin) | |
| void | init (Track track) |
| void | process () |
| bool | getMsg (COMMAND_TYPE type, char *msg, uint8_t *nBytes) |
| bool | get (COMMAND_TYPE type, uint16_t addr, uint8_t *param3, uint8_t *param4) |
| void | startMonitor (uint16_t addr) |
| void | stopMonitor (uint16_t addr) |
Private Member Functions | |
| void | remove (COMMAND_TYPE type, uint16_t addr) |
| bool | isMonitored (uint16_t addr) |
class for monitoring DCC commands
MONITOR_PRINT_DCC_COMMANDS Definition at line 83 of file DccCmdMonitor.h.
indicates the type of DCC command being monitored
| Enumerator | |
|---|---|
| ALL | indicates all types of DCC commands |
| SPEED | indicates DCC Speed command |
| FUNCTION | indicates DCC Function (FN) command |
| TURNOUT_BOARD | indicates DCC Turnout Board command |
| TURNOUT_OUTPUT | |
| SIGNAL | indicates DCC Signal command |
| CV | indicates DCC CV change command |
Definition at line 86 of file DccCmdMonitor.h.
|
inline |
DccCmdMonitor constructor
| dcc_interrupt_pin | is the ESP32 interrupt pin for the DCC signal |
Definition at line 115 of file DccCmdMonitor.h.
|
inline |
Obtains a queued Dcc command
| type | indicates the type of Dcc command | |
| addr | indicates the DCC address of the command | |
| [out] | param3 | command specific data |
| [out] | param4 | command specific data |
Definition at line 166 of file DccCmdMonitor.h.

|
inline |
Obtains a queued Dcc command formmatted as a message < d parms >
| type | indicates the type of Dcc command | |
| [in,out] | msg | points at buffer to hold returned message |
| [out] | nBytes | number of bytes in the message |
Definition at line 147 of file DccCmdMonitor.h.

|
inline |
Initialize the object by invoking NmraDcc object init()
Definition at line 124 of file DccCmdMonitor.h.

|
inlineprivate |
checks to see if a DCC addr is being monitored
| addr | is the DCC address |
Definition at line 251 of file DccCmdMonitor.h.
|
inline |
Process possible DCC commands queued by invoking object NmraDcc object process()
Definition at line 137 of file DccCmdMonitor.h.

|
inlineprivate |
delete a queued command
| type | indicates the type of Dcc command |
| addr | indicates the DCC address of the command |
Definition at line 237 of file DccCmdMonitor.h.

|
inline |
starts monitoring for commands of specified DCC addr on track associated with this object
| addr | is the address to start monitoring |
Definition at line 217 of file DccCmdMonitor.h.
|
inline |
stops monitoring for commands of specified DCC addr
| addr | is the address to stop monitoring |
Definition at line 224 of file DccCmdMonitor.h.