GPS Device
Loading...
Searching...
No Matches
cmd.h
Go to the documentation of this file.
1
29
35
36#ifndef CMD_H__
37#define CMD_H__
38
39#include "log.h"
40
47
63typedef ERR_te (*CMD_HANDLER_tf)(uint32_t argc, char **argv);
64
72typedef struct {
74 const char *const name;
75
77 const char *const help;
78
82
92typedef struct {
94 const char *const name;
95
97 const uint8_t num_cmds;
98
100 const CMD_INFO_ts *const cmds_ptr;
101
109
111
118
135ERR_te cmd_register(CMD_CLIENT_INFO_ts *cmd_client_info);
136
150ERR_te cmd_deregister(CMD_CLIENT_INFO_ts const *cmd_client_info);
151
173ERR_te cmd_execute(char *console_text);
174
176
177#endif
178
ERR_te cmd_deregister(CMD_CLIENT_INFO_ts const *cmd_client_info)
Deregisters a client from the command subsystem.
Definition cmd.c:66
ERR_te cmd_execute(char *console_text)
Parses and executes a command from a console text string.
Definition cmd.c:81
ERR_te cmd_register(CMD_CLIENT_INFO_ts *cmd_client_info)
Registers a client with the command subsystem.
Definition cmd.c:51
ERR_te(* CMD_HANDLER_tf)(uint32_t argc, char **argv)
Function pointer type for a command handler.
Definition cmd.h:63
ERR_te
Standard return type used by all public API functions.
Definition err.h:35
LOG_LEVEL_te
Log severity levels, in ascending order of severity.
Definition log.h:63
Log subsystem public API.
Describes a subsystem client registering with the command module.
Definition cmd.h:92
const uint8_t num_cmds
Definition cmd.h:97
const char *const name
Definition cmd.h:94
const CMD_INFO_ts *const cmds_ptr
Definition cmd.h:100
LOG_LEVEL_te *const log_level_ptr
Definition cmd.h:107
Describes a single command exposed by a client.
Definition cmd.h:72
const CMD_HANDLER_tf handler
Definition cmd.h:80
const char *const help
Definition cmd.h:77
const char *const name
Definition cmd.h:74