Expand description
DCS/PLC template semantics: one instance per control-system convention (Yokogawa,
Honeywell, etc.), describing how that DCS expresses PID parameters and the OPC
item-name suffix convention used to derive a full tag set from a single PV tag (see
crate::tags::derive_tag).
The built-in templates are not hardcoded Rust – they are parsed from an embedded TOML
catalog (templates/builtin.toml), so adding support for a new DCS/PLC family is a data
file change, not a Rust change. See AGENTS.md’s “Community DCS/PLC template catalog”
section for the full design and contribution rationale.
Structs§
- DcsTemplate
- One DCS/PLC vendor’s conventions.
Enums§
- Template
Error - Why
DcsTemplate::validateorparse_catalogrejected a template.
Functions§
- built_
in_ templates - The DCS/PLC templates shipped by default, parsed from the embedded catalog.
- parse_
catalog - Parses a TOML catalog (the
[[template]]array-of-tables format used bytemplates/builtin.tomland the user catalog file bhtune-cli auto-loads) and validates every template it contains. Pure – takes an in-memory string and does no I/O itself; all file reading is the caller’s job (bhtune-cli’stemplate-user-catalog/template-cli), keeping this crate’s “no I/O” rule intact. - to_
catalog_ toml - Serializes
templatesas a TOML catalog in the exact[[template]]array-of-tables shapeparse_catalogreads back – the inverse operation. Used by bhtune-cli’stemplate export --format toml(a single template exports as a one-entry catalog) so the contribution loop is export -> annotate -> PR with no hand-transcription step. Pure, likeparse_catalog: writing the result to a file is the caller’s job.