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

RIL 不可变启动配置 More...

#include <stdbool.h>
#include <stdint.h>
#include "ril_backend.h"

Go to the source code of this file.

Data Structures

struct  ril_apn_config_t
 一路 APN 的启动配置 More...
struct  ril_probe_config_t
 一个可被多路 APN 共用的探测目标 More...
struct  ril_health_config_t
 网络健康检查和恢复配置 More...
struct  ril_config_t
 tbox_rild 启动时一次性读取的配置快照 More...

Macros

#define RIL_CONFIG_MAX_APNS   8U
 最大 APN 配置数量
#define RIL_CONFIG_MAX_PROBES   8U
 最大网络探测目标数量
#define RIL_CONFIG_APN_NAME_MAX   RIL_BACKEND_APN_MAX
 APN 名称容量,包含结尾 NUL.
#define RIL_CONFIG_APN_TYPE_MAX   RIL_BACKEND_APN_TYPE_MAX
 APN 类型容量,包含结尾 NUL.
#define RIL_CONFIG_USERNAME_MAX   RIL_BACKEND_USERNAME_MAX
 APN 用户名容量,包含结尾 NUL.
#define RIL_CONFIG_PASSWORD_MAX   RIL_BACKEND_PASSWORD_MAX
 APN 密码容量,包含结尾 NUL.
#define RIL_CONFIG_PROBE_HOST_MAX   256U
 网络探测目标地址容量,包含结尾 NUL
#define RIL_CONFIG_RESET_LIMIT_MAX   100U
 模组复位次数配置上限
#define RIL_CONFIG_DIAL_TIMEOUT_DEFAULT_MS   30000U
 默认异步拨号超时,单位毫秒
#define RIL_CONFIG_HEALTH_INTERVAL_DEFAULT_MS   10000U
 默认网络健康检查周期,单位毫秒
#define RIL_CONFIG_HEALTH_TIMEOUT_DEFAULT_MS   3000U
 默认单目标探测超时,单位毫秒
#define RIL_CONFIG_HEALTH_FAIL_DEFAULT   3U
 默认连续探测失败阈值
#define RIL_CONFIG_HEALTH_COOLDOWN_DEFAULT_SEC   30U
 默认恢复冷却时间,单位秒
#define RIL_CONFIG_HEALTH_RESET_DEFAULT   3U
 默认模组复位次数上限

Enumerations

enum  ril_config_probe_mode_t { RIL_CONFIG_PROBE_NONE = 0 , RIL_CONFIG_PROBE_TCP , RIL_CONFIG_PROBE_ICMP }
 网络探测方式 More...

Functions

int ril_config_load (ril_config_t *config)
 读取并校验 RIL 启动配置。

Detailed Description

RIL 不可变启动配置

Version
1.0.0
Date
2026-07-17

Enumeration Type Documentation

◆ ril_config_probe_mode_t

网络探测方式

Enumerator
RIL_CONFIG_PROBE_NONE 

不执行网络探测

RIL_CONFIG_PROBE_TCP 

TCP 连接探测

RIL_CONFIG_PROBE_ICMP 

ICMP 回显探测

Function Documentation

◆ ril_config_load()

int ril_config_load ( ril_config_t * config)

读取并校验 RIL 启动配置。

仅在全部配置有效时更新 config。

Parameters
config输出配置快照。
Returns
TBOX_OK 成功,其他值失败。