|
Open Model Railroad Network (OpenMRN)
|
This structure represents a single output channel for a DCC command station. More...
#include <DccOutput.hxx>
Static Public Member Functions | |
| static bool | need_railcom_cutout () |
| Called by the driver to decide whether to make this channel participate in the railcom cutout. | |
| static bool | should_be_enabled () |
| Called once after the railcom cutout is done to decide whether this output should be reenabled. | |
| static void | clear_disable_reason (DccOutput::DisableReason bit) |
| Clears a disable reason. | |
Static Public Attributes | |
| static std::atomic_uint_least8_t | outputDisableReasons_ |
| Bitmask of why this output should be disabled. | |
| static std::atomic_uint_least8_t | isRailcomCutoutEnabled_ |
| 0 if we should not produce a railcom cutout; 1 for short cutout; 2 for regular cutout. | |
| static uint8_t | isRailcomCutoutActive_ |
| 1 if we are in a railcom cutout currently. | |
Static Protected Member Functions | |
| static void | set_disable_reason_impl (DccOutput::DisableReason bit) |
| Set one bit in the disable reasons bit field. | |
Private Member Functions | |
| DccOutputHw () | |
| Private constructor. | |
This structure represents a single output channel for a DCC command station.
The DCC driver uses these structures, with the business logic filled in by the hardware implementor.
| OUTPUT_NUMBER | 0,1,... the number of outputs. Each output is independently controlled. |
Definition at line 187 of file DccOutput.hxx.
|
private |
Private constructor.
These objects cannot be initialized and must only have static members.
|
inlinestatic |
Clears a disable reason.
If all disable reasons are clear, the output will be enabled by the DCC driver at the beginning of the next packet.
Definition at line 222 of file DccOutput.hxx.
|
inlinestatic |
Called by the driver to decide whether to make this channel participate in the railcom cutout.
Definition at line 208 of file DccOutput.hxx.
|
inlinestaticprotected |
Set one bit in the disable reasons bit field.
This is protected, because the implementation / child class should have a composite function that sets the bit and disables the output in one call.
Definition at line 231 of file DccOutput.hxx.
|
inlinestatic |
Called once after the railcom cutout is done to decide whether this output should be reenabled.
Definition at line 215 of file DccOutput.hxx.
|
static |
1 if we are in a railcom cutout currently.
Set and cleared by the driver before calling the start/stop railcom cutout functions.
Definition at line 204 of file DccOutput.hxx.
|
static |
0 if we should not produce a railcom cutout; 1 for short cutout; 2 for regular cutout.
Set by the application and read by the DCC driver.
Definition at line 200 of file DccOutput.hxx.
|
static |
Bitmask of why this output should be disabled.
If zero, the output should be enabled. If non-zero, the output should be disabled. A variety of system components own one bit in this bitmask each; see { } These bits are all set by the application. The DCC Driver will only read this variable, and enable the output if all bits are zero.
Definition at line 196 of file DccOutput.hxx.