CommandProcessing::Command Class Reference

Command delegate class. More...

#include <Command.h>

Collaboration diagram for CommandProcessing::Command:

Public Types

using Callback = Delegate< void(String commandLine, ReadWriteStream &commandOutput)>
 Command delegate function. More...
 

Public Member Functions

 Command (String reqName, String reqHelp, String reqGroup, Callback reqFunction)
 
 Command ()
 

Public Attributes

String name
 Command name. More...
 
String description
 Command help. More...
 
String group
 Command group. More...
 
Callback callback
 Command Delegate (function that is called when command is invoked) More...
 

Detailed Description

Command delegate class.

Member Typedef Documentation

◆ Callback

Command delegate function.

Parameters
commandLineCommand line entered by user at CLI, including command and parameters
commandOutputPointer to the CLI print stream
Note
CommandFunctionDelegate defines the structure of a function that handles individual commands
Can use standard print functions on commandOutput

Constructor & Destructor Documentation

◆ Command() [1/2]

CommandProcessing::Command::Command ( String  reqName,
String  reqHelp,
String  reqGroup,
Callback  reqFunction 
)
inline

Instantiate a command delegate

Parameters
reqNameCommand name - the text a user types to invoke the command
reqHelpHelp message shown by CLI "help" command
reqGroupThe command group to which this command belongs
reqFunctionDelegate that should be invoked (triggered) when the command is entered by a user

◆ Command() [2/2]

CommandProcessing::Command::Command ( )
inline

Member Data Documentation

◆ callback

Callback CommandProcessing::Command::callback

Command Delegate (function that is called when command is invoked)

◆ description

String CommandProcessing::Command::description

Command help.

◆ group

String CommandProcessing::Command::group

Command group.

◆ name

String CommandProcessing::Command::name

Command name.


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