|
Open Model Railroad Network (OpenMRN)
|
Public Member Functions | |
| void | reset (ReadCmd, NodeHandle d, uint8_t space, std::function< void(MemoryConfigClientRequest *)> cb=nullptr) |
| Sets up a command to read an entire memory space. | |
| void | reset (ReadStreamCmd, NodeHandle d, uint8_t space, std::function< void(MemoryConfigClientRequest *)> cb=nullptr) |
| Sets up a command to read an entire memory space using stream transport. | |
| void | reset (ReadPartCmd, NodeHandle d, uint8_t space, unsigned offset, unsigned size) |
| Sets up a command to read a part of a memory space. | |
| void | reset (ReadPartStreamCmd, NodeHandle d, uint8_t space, unsigned offset, unsigned size) |
| Sets up a command to read a part of a memory space using stream transport. | |
| void | reset (WriteCmd, NodeHandle d, uint8_t space, unsigned offset, string data) |
| Sets up a command to write a part of a memory space. | |
| void | reset (UpdateCompleteCmd, NodeHandle d) |
| Sets up a command to send an Update Complete request to a remote node. | |
| void | reset (RebootCmd, NodeHandle d) |
| Sets up a command to send a Reboot request to a remote node. | |
| void | reset (FactoryResetCmd, NodeHandle d) |
| Sets up a command to send a Factory Reset request to a remote node. | |
| void | reset (FreezeCmd, NodeHandle d, uint8_t space) |
| Sets up a command to send a Freeze request to a remote node. | |
| void | reset (UnfreezeCmd, NodeHandle d, uint8_t space) |
| Sets up a command to send a Unfreeze request to a remote node. | |
| void | reset_base () |
| Helper function invoked at every other reset call. | |
Public Member Functions inherited from CallableFlowRequestBase | |
| void | reset_base () |
| Call this from all instances of reset(...). | |
Public Attributes | |
| Command | cmd |
| uint8_t | memory_space |
| bool | use_stream |
| unsigned | address |
| unsigned | size |
| NodeHandle | dst |
| Node to send the request to. | |
| string | payload |
| std::function< void(MemoryConfigClientRequest *)> | progressCb |
| Callback to execute as progress is being made. | |
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. | |
Definition at line 48 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::Command : uint8_t |
Definition at line 262 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::FactoryResetCmd |
Definition at line 85 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::FreezeCmd |
Definition at line 90 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::ReadCmd |
Definition at line 50 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::ReadPartCmd |
Definition at line 60 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::ReadPartStreamCmd |
Definition at line 65 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::ReadStreamCmd |
Definition at line 55 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::RebootCmd |
Definition at line 80 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::UnfreezeCmd |
Definition at line 95 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::UpdateCompleteCmd |
Definition at line 75 of file MemoryConfigClient.hxx.
| enum openlcb::MemoryConfigClientRequest::WriteCmd |
Definition at line 70 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to send a Factory Reset request to a remote node.
| FactoryResetCmd | polymorphic matching arg; always set to FACTORY_RESET. |
| d | is the destination node |
Definition at line 217 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to send a Freeze request to a remote node.
| FreezeCmd | polymorphic matching arg; always set to FREEZE. |
| d | is the destination node |
| space | is the memry space to freeze. |
Definition at line 233 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to read an entire memory space.
| ReadCmd | polymorphic matching arg; always set to READ. |
| d | is the destination node to query |
| space | is the memory space to read out |
| cb | if specified, will be called inline multiple times during the processing as more data arrives. |
Definition at line 106 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to read a part of a memory space.
| ReadPartCmd | polymorphic matching arg; always set to READ_PART. |
| d | is the destination node to query |
| space | is the memory space to read out |
| offset | if the address of the first byte to read |
| size | is the number of bytes to read |
Definition at line 138 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to read a part of a memory space using stream transport.
| ReadPartStreamCmd | polymorphic matching arg; always set to READ_PART. |
| d | is the destination node to query |
| space | is the memory space to read out |
| offset | if the address of the first byte to read |
| size | is the number of bytes to read |
Definition at line 158 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to read an entire memory space using stream transport.
| ReadStreamCmd | polymorphic matching arg; always set to READ. |
| d | is the destination node to query |
| space | is the memory space to read out |
| cb | if specified, will be called inline multiple times during the processing as more data arrives. |
Definition at line 125 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to send a Reboot request to a remote node.
| RebootCmd | polymorphic matching arg; always set to REBOOT. |
| d | is the destination node |
Definition at line 202 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to send a Unfreeze request to a remote node.
| UnfreezeCmd | polymorphic matching arg; always set to UNFREEZE. |
| d | is the destination node |
| space | is the memry space to unfreeze. |
Definition at line 250 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to send an Update Complete request to a remote node.
| UpdateCompleteCmd | polymorphic matching arg; always set to UPDATE_COMPLETE. |
| d | is the destination node |
Definition at line 187 of file MemoryConfigClient.hxx.
|
inline |
Sets up a command to write a part of a memory space.
| WriteCmd | polymorphic matching arg; always set to WRITE. |
| d | is the destination node to write to |
| space | is the memory space to write to |
| offset | if the address of the first byte to write |
| data | is the data to write |
Definition at line 171 of file MemoryConfigClient.hxx.
|
inline |
Helper function invoked at every other reset call.
Definition at line 272 of file MemoryConfigClient.hxx.
| unsigned openlcb::MemoryConfigClientRequest::address |
Definition at line 285 of file MemoryConfigClient.hxx.
| Command openlcb::MemoryConfigClientRequest::cmd |
Definition at line 282 of file MemoryConfigClient.hxx.
| NodeHandle openlcb::MemoryConfigClientRequest::dst |
Node to send the request to.
Definition at line 288 of file MemoryConfigClient.hxx.
| uint8_t openlcb::MemoryConfigClientRequest::memory_space |
Definition at line 283 of file MemoryConfigClient.hxx.
| string openlcb::MemoryConfigClientRequest::payload |
Definition at line 289 of file MemoryConfigClient.hxx.
| std::function<void(MemoryConfigClientRequest *)> openlcb::MemoryConfigClientRequest::progressCb |
Callback to execute as progress is being made.
Definition at line 291 of file MemoryConfigClient.hxx.
| unsigned openlcb::MemoryConfigClientRequest::size |
Definition at line 286 of file MemoryConfigClient.hxx.
| bool openlcb::MemoryConfigClientRequest::use_stream |
Definition at line 284 of file MemoryConfigClient.hxx.