pub struct ConverterNode {
pub name: String,
pub meta: NodeMeta,
pub p_value: String,
pub ast_to: AstNode,
pub ast_from: AstNode,
pub vars_to: Vec<FormulaVar>,
pub vars_from: Vec<FormulaVar>,
pub unit: Option<String>,
pub output: SkOutput,
pub slope: Slope,
pub predicates: PredicateRefs,
/* private fields */
}Expand description
Converter node transforming a raw register value to/from a float feature value via two formulas.
The GenICam direction names read backwards at first glance, and getting them the wrong way round is silent — the identity converter behaves the same either way. They are named after the target of the conversion:
<FormulaFrom>converts from the raw value to the feature value and is what a read evaluates. ItsTOvariable is bound top_value.<FormulaTo>converts from the feature value to the raw value and is what a write evaluates. ItsFROMvariable is bound to the incoming value andOLD, where declared, to the current raw value.
Fields§
§name: StringUnique feature name.
meta: NodeMetaShared metadata (visibility, description, tooltip, etc.).
p_value: StringName of the node providing the raw register value.
ast_to: AstNodeParsed <FormulaTo>: feature value → raw value, evaluated on write.
ast_from: AstNodeParsed <FormulaFrom>: raw value → feature value, evaluated on read.
vars_to: Vec<FormulaVar>Variable mappings for <FormulaTo> (the write direction).
vars_from: Vec<FormulaVar>Variable mappings for <FormulaFrom> (the read direction).
unit: Option<String>Optional engineering unit.
output: SkOutputDesired output type.
slope: Slope<Slope>: how the value moves with the raw one, which decides how
the raw bounds map onto this node’s.
predicates: PredicateRefsPredicate refs gating implementation / availability / lock state.