Struct minimon_cmd
Defined in File minimon.h
Struct Documentation
-
struct minimon_cmd
Representation of a single command executable in the monitor: its name, help string, execution function, etc.
Public Members
-
const char *name
The name of the command.
-
const char *alias
A short form alias of the command. Must be a substring of minimon_cmd::name.
-
const char *help
The help string for the command. Should not terminate with a period, and consist only of a single sentence.
-
void (*hook)(const char *cmdname, ...)
The main command hook function. When executed by the monitor, it is passed the name of the cmd (in case you want to use the same hook for multiple commands), and necessary arguments, which should be retrieved as needed via
va_start()
andva_arg()
.
-
struct minimon_cmd_param params[4]
Array of parameter definitions for the command.
-
const char *name