Configuration System
The framework has two configuration channels: atapp YAML configuration (instance startup parameters) and Excel design configuration (numerical tables).
logic_config (YAML / atapp configuration)
src/server_frame/config/include/config/logic_config.h: the logic_config singleton parses the atapp
configuration into logic_section_cfg, containing sections such as db / router / task / telemetry /
excel. Each service injects its own config loading callback via
logic_config::set_server_instance_config_loader (see each *_main.cpp), and reload is supported.
Some fields support environment-variable expression expansion (enable_expression); see the deployment
configuration documentation and .agents/skills/configure-expression/ for the syntax.
Excel Configuration (xresloader)
Design tables live in resource/ExcelTables/ (Const.xlsx, DtMq.xlsx, Item.xlsx, Rank.xlsx, etc.), with the
conversion config at resource/excel_xml/xresconv.xml.in; xresloader (third_party/xresloader/) converts them
into binary configuration according to com.struct.*.config.proto (protos carrying the xrescode.loader
option).
Loading pipeline:
- The generated
config/excel/config_manager.*(config_manager.*.mako) parses buffers via proto reflection; excel_config_wrapper(config/src/excel_config_wrapper.cpp) handles buffer/version loaders,reload_all, version-grouped hot reload, and callbacks;- The convenient read API is generated by
config_easy_api.*.mako; business code usesexcel_config_wrapper_reload_allfor hot reload; - Each config group has an index class (
config/include/config/excel_config_*_index.h, e.g. DTMQ'sDChannelConfigure).
Service Instance Configuration
The final YAML for each instance is generated on the deployment side (atdtool renders
install/**/cfg/*.yaml.tpl, or locally gen_conf.py). Key sections:
| Section | Content |
|---|---|
atapp / atproxy | bus id, discovery (etcd), connector |
logic.db | Redis cluster/sentinel connections |
logic.router | Router object TTL, auto save interval |
logic.task | Task timeouts, etc. |
logic.telemetry | OpenTelemetry export |
logic.excel | Config loaders and grouping |