GPS Device
Loading...
Searching...
No Matches
cmd.h File Reference

Command subsystem public API. More...

#include "log.h"
Include dependency graph for cmd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CMD_INFO_ts
 Describes a single command exposed by a client. More...
struct  CMD_CLIENT_INFO_ts
 Describes a subsystem client registering with the command module. More...

Typedefs

typedef ERR_te(* CMD_HANDLER_tf) (uint32_t argc, char **argv)
 Function pointer type for a command handler.

Functions

ERR_te cmd_register (CMD_CLIENT_INFO_ts *cmd_client_info)
 Registers a client with the command subsystem.
ERR_te cmd_deregister (CMD_CLIENT_INFO_ts const *cmd_client_info)
 Deregisters a client from the command subsystem.
ERR_te cmd_execute (char *console_text)
 Parses and executes a command from a console text string.

Detailed Description

Command subsystem public API.

Author
github.com/Baksi675

This module provides a lightweight command dispatch system that allows other subsystems (clients) to register named commands accessible via a text-based console interface.

Features include:

  • Client registration and deregistration
  • Tokenized command parsing and dispatch
  • Built-in wildcard, help, version, and per-client log-level commands

Typical usage:

Version
0.1
Date
2026-01-23

Definition in file cmd.h.