mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-11-02 23:51:38 +01:00
esp-modem(Docs): Update documentation and minor fixes
This commit is contained in:
committed by
David Cermak
parent
28433de4ad
commit
e0e65856f0
@@ -53,6 +53,19 @@ class StaticCommands;
|
||||
* @brief This class simplifies console command definition in more object wise fashion
|
||||
*/
|
||||
class ConsoleCommand {
|
||||
/**
|
||||
* @brief Common argument types to be stored internally for parsing later
|
||||
*/
|
||||
using arg_type =
|
||||
union {
|
||||
struct arg_int *intx;
|
||||
struct arg_str *str;
|
||||
struct arg_lit *lit;
|
||||
struct arg_end *end;
|
||||
void *__raw_ptr;
|
||||
bool is_null() const { return __raw_ptr; }
|
||||
};
|
||||
|
||||
friend class StaticCommands;
|
||||
public:
|
||||
/**
|
||||
@@ -91,7 +104,7 @@ private:
|
||||
void RegisterCommand(const char* command, const char* help, const std::vector<CommandArgs>& args);
|
||||
template<typename T> static constexpr size_t index_arg(CommandArgs T::*member)
|
||||
{ return ((uint8_t *)&((T*)nullptr->*member) - (uint8_t *)nullptr)/sizeof(CommandArgs); }
|
||||
std::vector<void*> arg_table;
|
||||
std::vector<arg_type> arg_table;
|
||||
int command_func(int argc, char **argv);
|
||||
|
||||
static int last_command;
|
||||
|
||||
Reference in New Issue
Block a user