pub struct DcsTemplate {Show 27 fields
pub name: String,
pub revert_mode: bool,
pub proportional_type: ProportionalType,
pub integral_type: IntegralType,
pub integral_unit: TimeUnit,
pub derivative_type: DerivativeType,
pub derivative_unit: TimeUnit,
pub process_variable_suffix: String,
pub manipulated_variable_suffix: String,
pub setpoint_variable_suffix: String,
pub controller_direction_suffix: String,
pub controller_mode_suffix: String,
pub mode_attribute_suffix: String,
pub upper_pv_range_suffix: String,
pub lower_pv_range_suffix: String,
pub upper_mv_range_suffix: String,
pub lower_mv_range_suffix: String,
pub proportional_constant_suffix: String,
pub integral_constant_suffix: String,
pub derivative_constant_suffix: String,
pub mode_manual_value: String,
pub mode_auto_value: String,
pub mode_attribute_program_value: Option<String>,
pub controller_action_direct_value: String,
pub versions: Vec<String>,
pub description: Option<String>,
pub source: Option<String>,
}Expand description
One DCS/PLC vendor’s conventions.
Fields§
§name: String§revert_mode: boolIf true, the controller mode is switched back to its original mode (e.g. Auto/Cascade) after a completed MRFT test. Has no effect if the loop was already in Manual at test start.
proportional_type: ProportionalType§integral_type: IntegralType§integral_unit: TimeUnit§derivative_type: DerivativeType§derivative_unit: TimeUnit§process_variable_suffix: StringOPC item-name suffixes, combined with a PV tag’s path prefix by
crate::tags::derive_tag to fill in the rest of the tag set. An empty suffix
means the corresponding tag is not applicable for this DCS (e.g. some DCS families
have no mode-attribute concept).
manipulated_variable_suffix: String§setpoint_variable_suffix: String§controller_direction_suffix: String§controller_mode_suffix: String§mode_attribute_suffix: String§upper_pv_range_suffix: String§lower_pv_range_suffix: String§upper_mv_range_suffix: String§lower_mv_range_suffix: String§proportional_constant_suffix: String§integral_constant_suffix: String§derivative_constant_suffix: String§mode_manual_value: StringThe DCS-specific raw values a Mode tag holds for Manual/Auto.
mode_auto_value: String§mode_attribute_program_value: Option<String>The raw value a Mode Attribute tag holds when in “Program” mode (permits external
OPC writes). None when the DCS has no mode-attribute concept.
controller_action_direct_value: StringThe raw value a Controller Direction tag holds when the controller is Direct
acting; see crate::direction::ControllerDirection::from_raw_tag_value.
versions: Vec<String>DCS/PLC releases this mapping is known to apply to (e.g. ["R5", "R6"]), in each
vendor’s own version-naming convention rather than a normalized scheme. A newer
release that changes tag conventions gets its own template entry with its own
name and versions list – never an edit to this one in place, since sites still
running the older release depend on the existing mapping (see
docs/dcs-templates.md). May be empty for a contribution whose version coverage
isn’t yet known; name is what makes a template unique, not versions.
description: Option<String>Free-text description of the control system this template targets.
source: Option<String>Citation for where this mapping came from (a manual, a field deployment). Provenance, not a correctness guarantee – there is deliberately no separate “verified” trust field; everything accepted into the catalog is treated as verified, and real mapping errors are fixed as bugs when they surface.
Implementations§
Source§impl DcsTemplate
impl DcsTemplate
Sourcepub fn validate(&self) -> Result<(), TemplateError>
pub fn validate(&self) -> Result<(), TemplateError>
Validates cross-field invariants a data file can’t express on its own: a name, a PV
suffix, and an MV suffix are always required (without them tag derivation is
impossible); a mode suffix requires both a manual and an auto value; a
mode-attribute suffix requires its program value. Mirrors LoopConfig::validate’s
rationale (see AGENTS.md’s “Live-plant safety hardening”) – a half-configured
template should fail loudly at parse/import time, not mid-tune against a live loop.
Called on every template parsed from the embedded catalog
(parse_catalog), an imported file, or the user catalog.
Trait Implementations§
Source§impl Clone for DcsTemplate
impl Clone for DcsTemplate
Source§fn clone(&self) -> DcsTemplate
fn clone(&self) -> DcsTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for DcsTemplate
impl ComposeSchema for DcsTemplate
Source§impl Debug for DcsTemplate
impl Debug for DcsTemplate
Source§impl<'de> Deserialize<'de> for DcsTemplate
impl<'de> Deserialize<'de> for DcsTemplate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for DcsTemplate
impl JsonSchema for DcsTemplate
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for DcsTemplate
impl PartialEq for DcsTemplate
Source§fn eq(&self, other: &DcsTemplate) -> bool
fn eq(&self, other: &DcsTemplate) -> bool
self and other values to be equal, and is used by ==.