MT7697 API Reference  LinkIt SDK v4
cmd_s Struct Reference

The MiniCLI command declaration structure. More...

#include <cli.h>

Data Fields

char * cmd
 Command string. More...
 
char * help
 Type '?' to retrieve help message. More...
 
cli_cmd_handler_t fptr
 The function pointer to call when an input string matches with the command in MiniCLI engine. More...
 
cmd_tsub
 Sub-commands. More...
 

Detailed Description

The MiniCLI command declaration structure.

The strcut cmd_s is defined to aggregate function pointer, help messsage and sub-commands for MiniCLI engine.

Note
Prefixing an ASCII value 01 to help message will effectively hide the command from user.
Warning
To reduce code size, duplicate commands are not detected by MiniCLI engine. It is developer's task to ensure there is no duplication in the command declaration.

Field Documentation

char* cmd

Command string.

The function pointer to call when an input string matches with the command in MiniCLI engine.

char* help

Type '?' to retrieve help message.

cmd_t* sub

Sub-commands.


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