|
Open Model Railroad Network (OpenMRN)
|
Virtual base class for controlling outputs. More...
#include <DccOutput.hxx>
Public Types | |
| enum | Type : int { TRACK = 1 , PGM = 2 , LCC = 3 } |
| Enumeration describing different outputs. More... | |
| enum class | DisableReason : uint8_t { INITIALIZATION_PENDING = 0x01 , CONFIG_SETTING = 0x02 , LOCAL_DISABLE = CONFIG_SETTING , GLOBAL_EOFF = 0x04 , SHORTED = 0x08 , THERMAL = 0x10 , PGM_TRACK_LOCKOUT = 0x20 , INVALID_SIGNAL_INPUT = 0x40 , USR1 = 0x80 } |
| Values of a bit mask why we might want to disable a given DCC output. More... | |
| enum class | RailcomCutout { DISABLED = 0 , SHORT_CUTOUT = 1 , LONG_CUTOUT = 2 } |
| Defines the values for the railcom cutout enabled setting. More... | |
Public Member Functions | |
| virtual void | disable_output_for_reason (DisableReason bit)=0 |
| Disables the output, marking in a bitmask why. | |
| virtual void | clear_disable_output_for_reason (DisableReason bit)=0 |
| Removes a disable reason flag. | |
| void | override_disable_bit_for_reason (DisableReason bit, bool value) |
| Sets or clears a disable reason. | |
| virtual uint8_t | get_disable_output_reasons ()=0 |
| virtual void | set_railcom_cutout_enabled (RailcomCutout cutout)=0 |
| Specifies whether there should be a railcom cutout on this output. | |
Virtual base class for controlling outputs.
All of these functions are okay to call from interrupts (including non-kernel-compatible interrupts under FreeRTOS).
Definition at line 45 of file DccOutput.hxx.
|
strong |
Values of a bit mask why we might want to disable a given DCC output.
Definition at line 60 of file DccOutput.hxx.
|
strong |
Defines the values for the railcom cutout enabled setting.
| Enumerator | |
|---|---|
| DISABLED | Generate no railcom cutout. |
| SHORT_CUTOUT | Generate short cutout (ch1 only). |
| LONG_CUTOUT | Generate long cutout (standard size; ch1+ch2). |
Definition at line 113 of file DccOutput.hxx.
| enum DccOutput::Type : int |
Enumeration describing different outputs.
| Enumerator | |
|---|---|
| TRACK | DCC output of the integrated booster. |
| PGM | DCC output of the program track. |
| LCC | DCC output going towards the LCC cable. |
Definition at line 49 of file DccOutput.hxx.
|
pure virtual |
Removes a disable reason flag.
All the flags need to be cleared in order to enable the output.
Implemented in DccOutputImpl< HW >.
|
pure virtual |
Disables the output, marking in a bitmask why.
Implemented in DccOutputImpl< HW >.
|
pure virtual |
Implemented in DccOutputImpl< HW >.
|
inline |
Sets or clears a disable reason.
| bit | the disable reason |
| value | if true, bit set to disable output, if false, bit cleared to not disable output. |
Definition at line 97 of file DccOutput.hxx.
|
pure virtual |
Specifies whether there should be a railcom cutout on this output.
Implemented in DccOutputImpl< HW >.