Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::DccAccyProducerInput Struct Reference

Request structure used to send requests to the DccAccyProducer class. More...

#include <DccAccyProducer.hxx>

Inheritance diagram for openlcb::DccAccyProducerInput:
CallableFlowRequestBase

Public Types

enum  Command { CMD_QUERY , CMD_SET }
 Possible subflow commands. More...
 

Public Member Functions

void reset (const DccAccyProducerCommands::Query &, const uint16_t address)
 Reset method for CMD_QUERY.
 
void reset (const DccAccyProducerCommands::Set &, const uint16_t address, bool value)
 Reset method for CMD_SET.
 
- Public Member Functions inherited from CallableFlowRequestBase
void reset_base ()
 Call this from all instances of reset(...).
 

Public Attributes

Command cmd_
 subflow command
 
uint16_t address_
 DCC accessory address.
 
bool value_
 DCC accessory address value.
 
- Public Attributes inherited from CallableFlowRequestBase
int resultCode
 If high bits are zero, this is a 16-bit OpenLCB result code.
 
BarrierNotifiable done
 Used internally by the invoke_subflow mechanism of StateFlow to notify the calling flow upon completion.
 

Detailed Description

Request structure used to send requests to the DccAccyProducer class.

Contains parametrized reset calls for properly supporting StateFlowBase::invoke_subflow_and_wait() syntax.

Definition at line 69 of file DccAccyProducer.hxx.

Member Enumeration Documentation

◆ Command

Possible subflow commands.

Enumerator
CMD_QUERY 

state query

CMD_SET 

state set/change

Definition at line 72 of file DccAccyProducer.hxx.

Member Function Documentation

◆ reset() [1/2]

void openlcb::DccAccyProducerInput::reset ( const DccAccyProducerCommands::Query ,
const uint16_t  address 
)
inline

Reset method for CMD_QUERY.

Parameters
addressDCC accessory decoder address

Definition at line 80 of file DccAccyProducer.hxx.

◆ reset() [2/2]

void openlcb::DccAccyProducerInput::reset ( const DccAccyProducerCommands::Set ,
const uint16_t  address,
bool  value 
)
inline

Reset method for CMD_SET.

Parameters
addressDCC accessory decoder address
valuedesired value to command

Definition at line 90 of file DccAccyProducer.hxx.

Member Data Documentation

◆ address_

uint16_t openlcb::DccAccyProducerInput::address_

DCC accessory address.

Definition at line 99 of file DccAccyProducer.hxx.

◆ cmd_

Command openlcb::DccAccyProducerInput::cmd_

subflow command

Definition at line 98 of file DccAccyProducer.hxx.

◆ value_

bool openlcb::DccAccyProducerInput::value_

DCC accessory address value.

Definition at line 100 of file DccAccyProducer.hxx.


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