Trident IoT SDK
Loading...
Searching...
No Matches
tr_cli_command_parser.h
Go to the documentation of this file.
1
10#ifndef TR_CLI_COMMAND_PARSER_H
11#define TR_CLI_COMMAND_PARSER_H
12
13#include <stdint.h>
15
25
29#define TR_ARGUMENT_PARSER_MAX_ARGS (15)
30
39void tr_cli_parse_command(const tr_command_s *cmd_table,
40 int argc,
41 char **argv);
42
54uint8_t tr_cli_get_option(int argc,
55 char *argv[],
56 char *opt_string,
57 char **ret_arg);
58
67uint64_t tr_dec_or_hex_string_to_int(const char *number_string);
68
73
74#endif // TR_CLI_COMMAND_PARSER_H
uint64_t tr_dec_or_hex_string_to_int(const char *number_string)
Converts a decimal or hexadecimal string to an integer.
void tr_cli_parse_command(const tr_command_s *cmd_table, int argc, char **argv)
Parses a command and executes the appropriate handler.
uint8_t tr_cli_get_option(int argc, char *argv[], char *opt_string, char **ret_arg)
Gets an option from the command line arguments.
Structure used for each CLI command table entry.
Definition tr_cli_command_table.h:28
common CLI command table structure