![]() |
BSB Developer Docs
|
API for registering commands with a CLI shell. More...
#include <furi.h>#include <m-array.h>#include <containers/pipe.h>#include "cli_command.h"#include "cli_config.h"Go to the source code of this file.
Typedefs | |
| typedef struct CliRegistry | CliRegistry |
Functions | |
| CliRegistry * | cli_registry_alloc (void) |
Allocates a CliRegistry. | |
| CliRegistry * | cli_registry_alloc_clone (CliRegistry *source) |
Allocates a CliRegistry that is a full copy of the provided one. | |
| void | cli_registry_free (CliRegistry *registry) |
Frees a CliRegistry. | |
| void | cli_registry_add_command (CliRegistry *registry, const char *name, CliCommandFlag flags, CliCommandExecuteCallback callback, void *context) |
| Registers a command with the registry. | |
| void | cli_registry_add_command_ex (CliRegistry *registry, const char *name, CliCommandFlag flags, CliCommandExecuteCallback callback, void *context, size_t stack_size) |
| Registers a command with the registry. | |
| void | cli_registry_delete_command (CliRegistry *registry, const char *name) |
| Deletes a cli command. | |
API for registering commands with a CLI shell.
| void cli_registry_add_command | ( | CliRegistry * | registry, |
| const char * | name, | ||
| CliCommandFlag | flags, | ||
| CliCommandExecuteCallback | callback, | ||
| void * | context ) |
Registers a command with the registry.
Provides less options than the _ex counterpart.
| [in] | registry | Pointer to registry instance |
| [in] | name | Command name |
| [in] | flags | see CliCommandFlag |
| [in] | callback | Callback function |
| [in] | context | Custom context |
| void cli_registry_add_command_ex | ( | CliRegistry * | registry, |
| const char * | name, | ||
| CliCommandFlag | flags, | ||
| CliCommandExecuteCallback | callback, | ||
| void * | context, | ||
| size_t | stack_size ) |
Registers a command with the registry.
Provides more options than the non-_ex counterpart.
| [in] | registry | Pointer to registry instance |
| [in] | name | Command name |
| [in] | flags | see CliCommandFlag |
| [in] | callback | Callback function |
| [in] | context | Custom context |
| [in] | stack_size | Thread stack size |
| void cli_registry_delete_command | ( | CliRegistry * | registry, |
| const char * | name ) |
Deletes a cli command.
| [in] | registry | Pointer to registry instance |
| [in] | name | Command name |