|
Open Model Railroad Network (OpenMRN)
|
Public Types | |
| enum | EnterServiceMode { ENTER_SERVICE_MODE } |
| enum | ExitServiceMode { EXIT_SERVICE_MODE } |
| enum | SendReset { SEND_RESET } |
| enum | SendProgrammingPacket { SEND_PROGRAMMING_PACKET } |
| enum class | Type { ENTER_SERVICE_MODE , EXIT_SERVICE_MODE , SEND_RESET , SEND_SERVICE_PACKET } |
Public Member Functions | |
| void | reset (EnterServiceMode) |
| Set up command to enter service mode. | |
| void | reset (ExitServiceMode) |
| Set up command to exit service mode. | |
| void | reset (SendReset, unsigned count) |
| Set up command to send some number of reset packets. | |
| void | reset (SendProgrammingPacket, dcc::Packet pkt, unsigned count, bool terminate_on_ack=true) |
| Set up command to send some number of service mode packets, waiting for an acknowledgement. | |
Public Member Functions inherited from CallableFlowRequestBase | |
| void | reset_base () |
| Call this from all instances of reset(...). | |
Public Attributes | |
| Type | cmd_ |
| What is the instruction to do. | |
| dcc::Packet | packetToSend_ |
| This packet will be repeated on the programming track for SEND_SERVICE_PACKET. | |
| unsigned | repeatCount_: 16 |
| How many times maximum to repeat the packet before timing out on no acknowledgement, or how many reset packets to send. | |
| unsigned | terminateOnAck_: 1 |
| Should we short-cut sending the packet repetitions when we've seen an ack. | |
| unsigned | hasAck_: 1 |
| Output arguments. These are filled by the flow upon return. | |
| unsigned | hasShortCircuit_: 1 |
| Set to 1 if the programming track has reached the current limit. | |
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. | |
Private Member Functions | |
| void | reset_base () |
| Resets all internal variables to default state. | |
Definition at line 56 of file ProgrammingTrackBackend.hxx.
| enum ProgrammingTrackRequest::EnterServiceMode |
Definition at line 58 of file ProgrammingTrackBackend.hxx.
| enum ProgrammingTrackRequest::ExitServiceMode |
Definition at line 63 of file ProgrammingTrackBackend.hxx.
| enum ProgrammingTrackRequest::SendProgrammingPacket |
Definition at line 73 of file ProgrammingTrackBackend.hxx.
| enum ProgrammingTrackRequest::SendReset |
Definition at line 68 of file ProgrammingTrackBackend.hxx.
|
strong |
Definition at line 119 of file ProgrammingTrackBackend.hxx.
|
inline |
Set up command to enter service mode.
Definition at line 79 of file ProgrammingTrackBackend.hxx.
|
inline |
Set up command to exit service mode.
Definition at line 86 of file ProgrammingTrackBackend.hxx.
|
inline |
Set up command to send some number of service mode packets, waiting for an acknowledgement.
| pkt | the DCC packet to send |
| count | number of times to send the DCC packet. This determines how long we are waiting for an acknowledgement. |
| terminate_on_ack | if true, will stop sending the packet when a service mode acknowledgement is detected instead of going all the way to count repetitions. |
Definition at line 109 of file ProgrammingTrackBackend.hxx.
|
inline |
Set up command to send some number of reset packets.
| count | number of reset packets to send. |
Definition at line 94 of file ProgrammingTrackBackend.hxx.
|
inlineprivate |
Resets all internal variables to default state.
Call at the beginning of all reset(...) functions.
Definition at line 157 of file ProgrammingTrackBackend.hxx.
| Type ProgrammingTrackRequest::cmd_ |
What is the instruction to do.
Definition at line 132 of file ProgrammingTrackBackend.hxx.
| unsigned ProgrammingTrackRequest::hasAck_ |
Output arguments. These are filled by the flow upon return.
Definition at line 147 of file ProgrammingTrackBackend.hxx.
| unsigned ProgrammingTrackRequest::hasShortCircuit_ |
Set to 1 if the programming track has reached the current limit.
Definition at line 152 of file ProgrammingTrackBackend.hxx.
| dcc::Packet ProgrammingTrackRequest::packetToSend_ |
This packet will be repeated on the programming track for SEND_SERVICE_PACKET.
Definition at line 136 of file ProgrammingTrackBackend.hxx.
| unsigned ProgrammingTrackRequest::repeatCount_ |
How many times maximum to repeat the packet before timing out on no acknowledgement, or how many reset packets to send.
Definition at line 140 of file ProgrammingTrackBackend.hxx.
| unsigned ProgrammingTrackRequest::terminateOnAck_ |
Should we short-cut sending the packet repetitions when we've seen an ack.
If 1, returns immediately upon seeing the ack.
Definition at line 144 of file ProgrammingTrackBackend.hxx.