Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::MemoryConfigClientRequest Struct Reference
Inheritance diagram for openlcb::MemoryConfigClientRequest:
CallableFlowRequestBase

Public Types

enum  ReadCmd { READ }
 
enum  ReadStreamCmd { READ_STREAM }
 
enum  ReadPartCmd { READ_PART }
 
enum  ReadPartStreamCmd { READ_PART_STREAM }
 
enum  WriteCmd { WRITE }
 
enum  UpdateCompleteCmd { UPDATE_COMPLETE }
 
enum  RebootCmd { REBOOT }
 
enum  FactoryResetCmd { FACTORY_RESET }
 
enum  FreezeCmd { FREEZE }
 
enum  UnfreezeCmd { UNFREEZE }
 
enum  Command : uint8_t {
  CMD_READ , CMD_READ_PART , CMD_WRITE , CMD_META_REQUEST ,
  CMD_FACTORY_RESET
}
 

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.
 

Detailed Description

Definition at line 48 of file MemoryConfigClient.hxx.

Member Enumeration Documentation

◆ Command

enum openlcb::MemoryConfigClientRequest::Command : uint8_t

Definition at line 262 of file MemoryConfigClient.hxx.

◆ FactoryResetCmd

enum openlcb::MemoryConfigClientRequest::FactoryResetCmd

Definition at line 85 of file MemoryConfigClient.hxx.

◆ FreezeCmd

enum openlcb::MemoryConfigClientRequest::FreezeCmd

Definition at line 90 of file MemoryConfigClient.hxx.

◆ ReadCmd

enum openlcb::MemoryConfigClientRequest::ReadCmd

Definition at line 50 of file MemoryConfigClient.hxx.

◆ ReadPartCmd

enum openlcb::MemoryConfigClientRequest::ReadPartCmd

Definition at line 60 of file MemoryConfigClient.hxx.

◆ ReadPartStreamCmd

enum openlcb::MemoryConfigClientRequest::ReadPartStreamCmd

Definition at line 65 of file MemoryConfigClient.hxx.

◆ ReadStreamCmd

enum openlcb::MemoryConfigClientRequest::ReadStreamCmd

Definition at line 55 of file MemoryConfigClient.hxx.

◆ RebootCmd

enum openlcb::MemoryConfigClientRequest::RebootCmd

Definition at line 80 of file MemoryConfigClient.hxx.

◆ UnfreezeCmd

enum openlcb::MemoryConfigClientRequest::UnfreezeCmd

Definition at line 95 of file MemoryConfigClient.hxx.

◆ UpdateCompleteCmd

enum openlcb::MemoryConfigClientRequest::UpdateCompleteCmd

Definition at line 75 of file MemoryConfigClient.hxx.

◆ WriteCmd

enum openlcb::MemoryConfigClientRequest::WriteCmd

Definition at line 70 of file MemoryConfigClient.hxx.

Member Function Documentation

◆ reset() [1/10]

void openlcb::MemoryConfigClientRequest::reset ( FactoryResetCmd  ,
NodeHandle  d 
)
inline

Sets up a command to send a Factory Reset request to a remote node.

Parameters
FactoryResetCmdpolymorphic matching arg; always set to FACTORY_RESET.
dis the destination node

Definition at line 217 of file MemoryConfigClient.hxx.

◆ reset() [2/10]

void openlcb::MemoryConfigClientRequest::reset ( FreezeCmd  ,
NodeHandle  d,
uint8_t  space 
)
inline

Sets up a command to send a Freeze request to a remote node.

Parameters
FreezeCmdpolymorphic matching arg; always set to FREEZE.
dis the destination node
spaceis the memry space to freeze.

Definition at line 233 of file MemoryConfigClient.hxx.

◆ reset() [3/10]

void openlcb::MemoryConfigClientRequest::reset ( ReadCmd  ,
NodeHandle  d,
uint8_t  space,
std::function< void(MemoryConfigClientRequest *)>  cb = nullptr 
)
inline

Sets up a command to read an entire memory space.

Parameters
ReadCmdpolymorphic matching arg; always set to READ.
dis the destination node to query
spaceis the memory space to read out
cbif specified, will be called inline multiple times during the processing as more data arrives.

Definition at line 106 of file MemoryConfigClient.hxx.

◆ reset() [4/10]

void openlcb::MemoryConfigClientRequest::reset ( ReadPartCmd  ,
NodeHandle  d,
uint8_t  space,
unsigned  offset,
unsigned  size 
)
inline

Sets up a command to read a part of a memory space.

Parameters
ReadPartCmdpolymorphic matching arg; always set to READ_PART.
dis the destination node to query
spaceis the memory space to read out
offsetif the address of the first byte to read
sizeis the number of bytes to read

Definition at line 138 of file MemoryConfigClient.hxx.

◆ reset() [5/10]

void openlcb::MemoryConfigClientRequest::reset ( ReadPartStreamCmd  ,
NodeHandle  d,
uint8_t  space,
unsigned  offset,
unsigned  size 
)
inline

Sets up a command to read a part of a memory space using stream transport.

Parameters
ReadPartStreamCmdpolymorphic matching arg; always set to READ_PART.
dis the destination node to query
spaceis the memory space to read out
offsetif the address of the first byte to read
sizeis the number of bytes to read

Definition at line 158 of file MemoryConfigClient.hxx.

◆ reset() [6/10]

void openlcb::MemoryConfigClientRequest::reset ( ReadStreamCmd  ,
NodeHandle  d,
uint8_t  space,
std::function< void(MemoryConfigClientRequest *)>  cb = nullptr 
)
inline

Sets up a command to read an entire memory space using stream transport.

Parameters
ReadStreamCmdpolymorphic matching arg; always set to READ.
dis the destination node to query
spaceis the memory space to read out
cbif specified, will be called inline multiple times during the processing as more data arrives.

Definition at line 125 of file MemoryConfigClient.hxx.

◆ reset() [7/10]

void openlcb::MemoryConfigClientRequest::reset ( RebootCmd  ,
NodeHandle  d 
)
inline

Sets up a command to send a Reboot request to a remote node.

Parameters
RebootCmdpolymorphic matching arg; always set to REBOOT.
dis the destination node

Definition at line 202 of file MemoryConfigClient.hxx.

◆ reset() [8/10]

void openlcb::MemoryConfigClientRequest::reset ( UnfreezeCmd  ,
NodeHandle  d,
uint8_t  space 
)
inline

Sets up a command to send a Unfreeze request to a remote node.

Parameters
UnfreezeCmdpolymorphic matching arg; always set to UNFREEZE.
dis the destination node
spaceis the memry space to unfreeze.

Definition at line 250 of file MemoryConfigClient.hxx.

◆ reset() [9/10]

void openlcb::MemoryConfigClientRequest::reset ( UpdateCompleteCmd  ,
NodeHandle  d 
)
inline

Sets up a command to send an Update Complete request to a remote node.

Parameters
UpdateCompleteCmdpolymorphic matching arg; always set to UPDATE_COMPLETE.
dis the destination node

Definition at line 187 of file MemoryConfigClient.hxx.

◆ reset() [10/10]

void openlcb::MemoryConfigClientRequest::reset ( WriteCmd  ,
NodeHandle  d,
uint8_t  space,
unsigned  offset,
string  data 
)
inline

Sets up a command to write a part of a memory space.

Parameters
WriteCmdpolymorphic matching arg; always set to WRITE.
dis the destination node to write to
spaceis the memory space to write to
offsetif the address of the first byte to write
datais the data to write

Definition at line 171 of file MemoryConfigClient.hxx.

◆ reset_base()

void openlcb::MemoryConfigClientRequest::reset_base ( )
inline

Helper function invoked at every other reset call.

Definition at line 272 of file MemoryConfigClient.hxx.

Member Data Documentation

◆ address

unsigned openlcb::MemoryConfigClientRequest::address

Definition at line 285 of file MemoryConfigClient.hxx.

◆ cmd

Command openlcb::MemoryConfigClientRequest::cmd

Definition at line 282 of file MemoryConfigClient.hxx.

◆ dst

NodeHandle openlcb::MemoryConfigClientRequest::dst

Node to send the request to.

Definition at line 288 of file MemoryConfigClient.hxx.

◆ memory_space

uint8_t openlcb::MemoryConfigClientRequest::memory_space

Definition at line 283 of file MemoryConfigClient.hxx.

◆ payload

string openlcb::MemoryConfigClientRequest::payload

Definition at line 289 of file MemoryConfigClient.hxx.

◆ progressCb

std::function<void(MemoryConfigClientRequest *)> openlcb::MemoryConfigClientRequest::progressCb

Callback to execute as progress is being made.

Definition at line 291 of file MemoryConfigClient.hxx.

◆ size

unsigned openlcb::MemoryConfigClientRequest::size

Definition at line 286 of file MemoryConfigClient.hxx.

◆ use_stream

bool openlcb::MemoryConfigClientRequest::use_stream

Definition at line 284 of file MemoryConfigClient.hxx.


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