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

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

#include <TractionThrottleInterface.hxx>

Inheritance diagram for openlcb::TractionThrottleInput:
CallableFlowRequestBase

Public Types

enum  Command {
  CMD_SET_DST , CMD_ASSIGN_TRAIN , CMD_RELEASE_TRAIN , CMD_LOAD_STATE ,
  CMD_CONSIST_ADD , CMD_CONSIST_DEL , CMD_CONSIST_QRY
}
 

Public Member Functions

void reset (const TractionThrottleCommands::SetDst &, const NodeID &dst)
 Sets the destination node to send messages to without sending assign commands to that train node.
 
void reset (const TractionThrottleCommands::AssignTrain &, const NodeID &dst, bool listen)
 
void reset (const TractionThrottleCommands::ReleaseTrain &)
 
void reset (const TractionThrottleCommands::LoadState &)
 
void reset (const TractionThrottleCommands::ConsistAdd &, NodeID slave, uint8_t flags)
 
void reset (const TractionThrottleCommands::ConsistDel &, NodeID slave)
 
void reset (const TractionThrottleCommands::ConsistQry &)
 
void reset (const TractionThrottleCommands::ConsistQry &, uint8_t ofs)
 
- Public Member Functions inherited from CallableFlowRequestBase
void reset_base ()
 Call this from all instances of reset(...).
 

Public Attributes

Command cmd
 
NodeID dst
 For assign, this carries the destination node ID.
 
uint8_t flags
 Contains the flags for the consist listener.
 
uint8_t replyCause
 For assign controller reply REJECTED, this is 1 for controller refused connection, 2 fortrain refused connection.
 
uint8_t consistCount
 Total number of entries in the consisting list.
 
uint8_t consistIndex
 Index of the entry in the consisting list that needs to be returned.
 
- 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 TractionThrottle class.

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

Definition at line 91 of file TractionThrottleInterface.hxx.

Member Enumeration Documentation

◆ Command

enum openlcb::TractionThrottleInput::Command

Definition at line 93 of file TractionThrottleInterface.hxx.

Member Function Documentation

◆ reset() [1/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::AssignTrain &  ,
const NodeID dst,
bool  listen 
)
inline

Definition at line 112 of file TractionThrottleInterface.hxx.

◆ reset() [2/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::ConsistAdd &  ,
NodeID  slave,
uint8_t  flags 
)
inline

Definition at line 130 of file TractionThrottleInterface.hxx.

◆ reset() [3/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::ConsistDel &  ,
NodeID  slave 
)
inline

Definition at line 138 of file TractionThrottleInterface.hxx.

◆ reset() [4/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::ConsistQry &  )
inline

Definition at line 144 of file TractionThrottleInterface.hxx.

◆ reset() [5/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::ConsistQry &  ,
uint8_t  ofs 
)
inline

Definition at line 150 of file TractionThrottleInterface.hxx.

◆ reset() [6/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::LoadState &  )
inline

Definition at line 125 of file TractionThrottleInterface.hxx.

◆ reset() [7/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::ReleaseTrain &  )
inline

Definition at line 120 of file TractionThrottleInterface.hxx.

◆ reset() [8/8]

void openlcb::TractionThrottleInput::reset ( const TractionThrottleCommands::SetDst &  ,
const NodeID dst 
)
inline

Sets the destination node to send messages to without sending assign commands to that train node.

Definition at line 106 of file TractionThrottleInterface.hxx.

Member Data Documentation

◆ cmd

Command openlcb::TractionThrottleInput::cmd

Definition at line 157 of file TractionThrottleInterface.hxx.

◆ consistCount

uint8_t openlcb::TractionThrottleInput::consistCount

Total number of entries in the consisting list.

Definition at line 169 of file TractionThrottleInterface.hxx.

◆ consistIndex

uint8_t openlcb::TractionThrottleInput::consistIndex

Index of the entry in the consisting list that needs to be returned.

Definition at line 171 of file TractionThrottleInterface.hxx.

◆ dst

NodeID openlcb::TractionThrottleInput::dst

For assign, this carries the destination node ID.

For consisting requests, this is an in-out argument.

Definition at line 160 of file TractionThrottleInterface.hxx.

◆ flags

uint8_t openlcb::TractionThrottleInput::flags

Contains the flags for the consist listener.

Specified for Attach requests, and filled for Query responses.

Definition at line 163 of file TractionThrottleInterface.hxx.

◆ replyCause

uint8_t openlcb::TractionThrottleInput::replyCause

For assign controller reply REJECTED, this is 1 for controller refused connection, 2 fortrain refused connection.

Definition at line 167 of file TractionThrottleInterface.hxx.


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