Zigbee Protocol Controller 1.6.0
|
Unify Stdin interface for other applications. More...
Modules | |
Unfiy Attribute Store Commands | |
Set of Attribute Store commands available by default with the stdin console. | |
Unfiy Attribute Resolver Commands | |
Set of Attribute Resolver commands available by default with the stdin console. | |
Unfiy Attribute Store Commands | |
Set of Attribute Store commands available by default with the stdin console. | |
Typedefs | |
using | handle_args_t = std::vector< std::string > |
Arguments type. More... | |
using | handler_func = sl_status_t(*)(const handle_args_t &arg) |
Handler function callback type. More... | |
using | command_map_t = std::map< std::string, std::pair< std::string, handler_func > > |
Command map object, used to register a set of functions to handle incoming commands. More... | |
Functions | |
void | uic_stdin_add_commands (const command_map_t &append_commands) |
Add commands to command line interface This function is used at compile time to add commands to command line interface. More... | |
void | uic_stdin_set_prompt_string (const std::string &des_prompt_string) |
Set prompt string for command line interface This function sets the prompt string for the CLI. More... | |
int | uic_stdin_get_output_fd () |
Get stdout file number. More... | |
sl_status_t | uic_stdin_handle_command (const char *command) |
Run a command manually from CLI. More... | |
sl_status_t | unify_stdin_attribute_store_log_node (attribute_store_node_t node, bool print_total_child_count=false, bool print_only_n_node=false) |
Pretty-print a tree of nodes in attribute store. Show nodes' ID, data type and value in a similar fashion to tree command. More... | |
sl_status_t | uic_stdin_setup () |
Unify interface to Contiki STDIN feature. More... | |
int | uic_stdin_teardown () |
Tear down the CLI. More... | |
Unify Stdin interface for other applications.
Functions enabling adding commands to the CLI and integrating applications speific command prompt.
using command_map_t = std::map<std::string, std::pair<std::string, handler_func> > |
Command map object, used to register a set of functions to handle incoming commands.
using handle_args_t = std::vector<std::string> |
Arguments type.
using handler_func = sl_status_t (*)(const handle_args_t &arg) |
Handler function callback type.
arg | Arguments of a command |
void uic_stdin_add_commands | ( | const command_map_t & | append_commands | ) |
Add commands to command line interface This function is used at compile time to add commands to command line interface.
append_commands | Dictionary with a command name, command usage and a function pointer to command functionality |
int uic_stdin_get_output_fd | ( | ) |
Get stdout file number.
sl_status_t uic_stdin_handle_command | ( | const char * | command | ) |
Run a command manually from CLI.
void uic_stdin_set_prompt_string | ( | const std::string & | des_prompt_string | ) |
Set prompt string for command line interface This function sets the prompt string for the CLI.
des_prompt_string | The desired prompt string |
sl_status_t uic_stdin_setup | ( | ) |
Unify interface to Contiki STDIN feature.
Contains setup logic for Unify and some code that would normally be part of the Contiki main loop.
Unify STDIN makes it possible to integrate CLI commands to an existing CLI system running in the Unify part. When integrating Unify in an application the Unify will start a CLI by default.
The Contiki code has been modified to remove the usual STDIN setup logic.
Start and setup CLI process in Unify other.
Starts the CLI process and enables other applications to interface the same CLI.
int uic_stdin_teardown | ( | ) |
Tear down the CLI.
Tear down CLI and restore the normal terminal.
sl_status_t unify_stdin_attribute_store_log_node | ( | attribute_store_node_t | node, |
bool | print_total_child_count = false , |
||
bool | print_only_n_node = false |
||
) |
Pretty-print a tree of nodes in attribute store. Show nodes' ID, data type and value in a similar fashion to tree command.
node | A root node to print its attributes and children. |
print_total_child_count | Print the number of children for each node. |
print_only_n_node | Limit the number of nodes printed. |