Skip to content

Commit

Permalink
Additional reasons for the DCC output signal being disabled (bakerstu…
Browse files Browse the repository at this point in the history
…#642)

* Additional reasons for the DCC output signal being disabled.

* Updates based on some review feedback.

* Add constant definition.

* Changed constants to hex since they are bitmasks.
  • Loading branch information
bakerstu authored Aug 15, 2022
1 parent 2d7615d commit 3ef0069
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/dcc/DccOutput.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,26 @@ public:
{
/// Set as 1 during construction time, to be cleared by the application
/// when the initialization is complete.
INITIALIZATION_PENDING = 1,
INITIALIZATION_PENDING = 0x01,
/// User decided via a persistent configuration that this output should
/// not be enabled.
CONFIG_SETTING = 2,
/// not be enabled. Mutually exclusive with LOCAL_DISABLE.
CONFIG_SETTING = 0x02,
/// A local request for disabling the output. Mutually exclusive with
/// CONFIG_SETTING.
LOCAL_DISABLE = CONFIG_SETTING,
/// A network message requested global emergency off.
GLOBAL_EOFF = 4,
GLOBAL_EOFF = 0x04,
/// Short detector says this output is shorted.
SHORTED = 8,
SHORTED = 0x08,
/// The system is in thermal shutdown.
THERMAL = 16,
THERMAL = 0x10,
/// This output should be off due to the conflict between program track
/// and normal operation mode.
PGM_TRACK_LOCKOUT = 32,
PGM_TRACK_LOCKOUT = 0x20,
/// invalid incoming DCC signal
INVALID_SIGNAL_INPUT = 0x40,
/// Reserved for application specific use cases
USR1 = 0x80,
};

/// Disables the output, marking in a bitmask why.
Expand Down

0 comments on commit 3ef0069

Please sign in to comment.