Abstract class for handling command positional arguments, to be implemented by the command classes.
More...
#include <posix/app/chilictl/common/Command.hpp>
Abstract class for handling command positional arguments, to be implemented by the command classes.
◆ Command()
ca::Command::Command |
( |
const char * |
aCommandName, |
|
|
const char * |
aHelpString |
|
) |
| |
|
inlineprotected |
◆ ~Command()
ca::Command::~Command |
( |
| ) |
|
|
inlineprotected |
◆ GetCommandName()
const char* ca::Command::GetCommandName |
( |
void |
| ) |
|
|
inline |
Get the command name of this command.
◆ GetHelpString()
const char* ca::Command::GetHelpString |
( |
void |
| ) |
|
|
inline |
Get the help string for this command.
◆ Process()
virtual ca_error ca::Command::Process |
( |
int |
argc, |
|
|
const char * |
argv[] |
|
) |
| |
|
inlinevirtual |
Run the command, processing the arguments passed in argv.
Argv contains the arguments that followed the command name, including the command name as arg0.
- Parameters
-
argc | Argument Count |
argv | Argument Vector (of length argc) |
- Returns
- ca_error value
- Return values
-
CA_ERROR_SUCCESS | Successful processing |
CA_ERROR_INVALID_ARGS | Invalid arguments passed to function |
Reimplemented in ca::Reboot, ca::Pipe, ca::List, and ca::Flash.
◆ mCommandName
const char* ca::Command::mCommandName |
|
protected |
◆ mHelpString
const char* ca::Command::mHelpString |
|
protected |
The documentation for this class was generated from the following file: