T-Box Basic dev
Loading...
Searching...
No Matches
cli.h File Reference

T-Box CLI 业务模块接口 More...

#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  tbox_cli_argument_t
 CLI 命令参数定义。 More...
struct  tbox_cli_command_t
 CLI 命令定义。 More...
struct  tbox_cli_module_t
 CLI 业务模块定义。 More...
struct  tbox_cli_module_set_t
 动态加载的 CLI 模块集合。 More...

Macros

#define TBOX_CLI_MODULE_ABI_VERSION   2U
 CLI 业务模块 ABI 版本。

Typedefs

typedef int(* tbox_cli_handler_t) (size_t argument_count, const char *arguments[])
 CLI 命令处理函数。
typedef int(* tbox_cli_pre_init_t) (void)
 CLI 模块初始化函数。
typedef int(* tbox_cli_deinit_t) (void)
 CLI 模块反初始化函数。

Functions

const tbox_cli_module_set_ttbox_cli_get_modules (void)
 获取业务模块集合

Detailed Description

T-Box CLI 业务模块接口

Version
1.0.0
Date
2026-07-13

Typedef Documentation

◆ tbox_cli_deinit_t

typedef int(* tbox_cli_deinit_t) (void)

CLI 模块反初始化函数。

Returns
TBOX_OK 成功,其他值失败。

◆ tbox_cli_handler_t

typedef int(* tbox_cli_handler_t) (size_t argument_count, const char *arguments[])

CLI 命令处理函数。

Parameters
argument_count命令参数数量。
arguments按命令参数定义顺序排列的参数值数组。
Returns
0 表示成功,其他值表示失败。

◆ tbox_cli_pre_init_t

typedef int(* tbox_cli_pre_init_t) (void)

CLI 模块初始化函数。

Returns
TBOX_OK 成功,其他值失败。

Function Documentation

◆ tbox_cli_get_modules()

const tbox_cli_module_set_t * tbox_cli_get_modules ( void )

获取业务模块集合

Returns
生命周期覆盖整个进程的业务模块集合