Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
DccOutputImpl< HW > Class Template Reference

Default implementation class of the DccOutput that proxies the calls to a hardware-specific static structure. More...

#include <DccOutput.hxx>

Inheritance diagram for DccOutputImpl< HW >:
DccOutput

Public Member Functions

void disable_output_for_reason (DisableReason bit) override
 Disables the output, marking in a bitmask why.
 
void clear_disable_output_for_reason (DisableReason bit) override
 Removes a disable reason flag.
 
void set_railcom_cutout_enabled (RailcomCutout cutout) override
 Specifies whether there should be a railcom cutout on this output.
 
uint8_t get_disable_output_reasons () override
 
- Public Member Functions inherited from DccOutput
void override_disable_bit_for_reason (DisableReason bit, bool value)
 Sets or clears a disable reason.
 

Static Public Member Functions

static constexpr DccOutputinstance ()
 

Static Private Attributes

static const DccOutputImpl< HW > instance_
 Default instance to be used.
 

Additional Inherited Members

- Public Types inherited from DccOutput
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...
 

Detailed Description

template<class HW>
class DccOutputImpl< HW >

Default implementation class of the DccOutput that proxies the calls to a hardware-specific static structure.

Definition at line 135 of file DccOutput.hxx.

Constructor & Destructor Documentation

◆ DccOutputImpl()

template<class HW >
constexpr DccOutputImpl< HW >::DccOutputImpl ( )
inlineconstexpr

Definition at line 138 of file DccOutput.hxx.

Member Function Documentation

◆ clear_disable_output_for_reason()

template<class HW >
void DccOutputImpl< HW >::clear_disable_output_for_reason ( DisableReason  bit)
inlineoverridevirtual

Removes a disable reason flag.

All the flags need to be cleared in order to enable the output.

Implements DccOutput.

Definition at line 149 of file DccOutput.hxx.

◆ disable_output_for_reason()

template<class HW >
void DccOutputImpl< HW >::disable_output_for_reason ( DisableReason  bit)
inlineoverridevirtual

Disables the output, marking in a bitmask why.

Implements DccOutput.

Definition at line 143 of file DccOutput.hxx.

◆ get_disable_output_reasons()

template<class HW >
uint8_t DccOutputImpl< HW >::get_disable_output_reasons ( )
inlineoverridevirtual
Returns
Bitmask of all currently set disable reasons.

Implements DccOutput.

Definition at line 161 of file DccOutput.hxx.

◆ instance()

template<class HW >
static constexpr DccOutput * DccOutputImpl< HW >::instance ( )
inlinestaticconstexpr
Returns
the default instance created during initialization.

Definition at line 167 of file DccOutput.hxx.

◆ set_railcom_cutout_enabled()

template<class HW >
void DccOutputImpl< HW >::set_railcom_cutout_enabled ( RailcomCutout  cutout)
inlineoverridevirtual

Specifies whether there should be a railcom cutout on this output.

Implements DccOutput.

Definition at line 155 of file DccOutput.hxx.

Member Data Documentation

◆ instance_

template<class HW >
const DccOutputImpl< HW > DccOutputImpl< HW >::instance_
staticprivate

Default instance to be used.

Allocates the storage by the linker for the static default instance.

Definition at line 175 of file DccOutput.hxx.


The documentation for this class was generated from the following file: