Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
withrottle::Defs Struct Reference

The interface definitions for WiThrottle. More...

#include <Defs.hxx>

Static Public Member Functions

static string get_init_string ()
 Get the init command string.
 
static string get_function_status_string (const char *loco, int number, bool state)
 Get the function status string.
 
static string get_loco_status_string (openlcb::TractionThrottle *throttle, const char *loco)
 Get the locomotive status command string.
 

Static Public Attributes

static constexpr const int DEFAULT_PORT = 12090
 
static constexpr const char * PROTOCOL_VERSION = "VN2.0"
 Protocol version string.
 
static constexpr const char * TRACK_POWER_OFF = "PPA0"
 Track power on string.
 
static constexpr const char * TRACK_POWER_ON = "PPA1"
 Track power off string.
 
static constexpr const char * TRACK_POWER_UNKNOWN = "PPA2"
 Track power unknown string.
 
static constexpr const char * HEARTBEAT_TIMEOUT = "*10"
 Heartbeat timeout string.
 

Detailed Description

The interface definitions for WiThrottle.

Definition at line 138 of file withrottle/Defs.hxx.

Member Function Documentation

◆ get_function_status_string()

static string withrottle::Defs::get_function_status_string ( const char *  loco,
int  number,
bool  state 
)
inlinestatic

Get the function status string.

Parameters
locoWiThrottle train handle string
numberfunction number
statefunction state
Returns
function status string

Definition at line 182 of file withrottle/Defs.hxx.

◆ get_init_string()

static string withrottle::Defs::get_init_string ( )
inlinestatic

Get the init command string.

Returns
init string

Definition at line 159 of file withrottle/Defs.hxx.

◆ get_loco_status_string()

static string withrottle::Defs::get_loco_status_string ( openlcb::TractionThrottle throttle,
const char *  loco 
)
inlinestatic

Get the locomotive status command string.

Parameters
throttleOpenLCB assigned openLCB throttle
Returns
locomotive status string

Definition at line 207 of file withrottle/Defs.hxx.

Member Data Documentation

◆ DEFAULT_PORT

constexpr const int withrottle::Defs::DEFAULT_PORT = 12090
staticconstexpr

Definition at line 140 of file withrottle/Defs.hxx.

◆ HEARTBEAT_TIMEOUT

constexpr const char* withrottle::Defs::HEARTBEAT_TIMEOUT = "*10"
staticconstexpr

Heartbeat timeout string.

Definition at line 154 of file withrottle/Defs.hxx.

◆ PROTOCOL_VERSION

constexpr const char* withrottle::Defs::PROTOCOL_VERSION = "VN2.0"
staticconstexpr

Protocol version string.

Definition at line 142 of file withrottle/Defs.hxx.

◆ TRACK_POWER_OFF

constexpr const char* withrottle::Defs::TRACK_POWER_OFF = "PPA0"
staticconstexpr

Track power on string.

Definition at line 145 of file withrottle/Defs.hxx.

◆ TRACK_POWER_ON

constexpr const char* withrottle::Defs::TRACK_POWER_ON = "PPA1"
staticconstexpr

Track power off string.

Definition at line 148 of file withrottle/Defs.hxx.

◆ TRACK_POWER_UNKNOWN

constexpr const char* withrottle::Defs::TRACK_POWER_UNKNOWN = "PPA2"
staticconstexpr

Track power unknown string.

Definition at line 151 of file withrottle/Defs.hxx.


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