Table of Contents

Interface IStepPropertyAccessHost

Namespace
Hi.MachiningSteps
Assembly
HiMech.dll

Narrow host contract for accessing the step-variable registry and registering new step variables. Exposed as a dedicated surface so pipelines that only need step-variable wiring (e.g. CsvRowSyntax) do not have to depend on the broader IMachiningService.

public interface IStepPropertyAccessHost
Extension Methods

Properties

StepPropertyAccessDictionary

Dictionary of step-property accessors keyed by property name. Used by CSV title-row processing to decide whether a column is registered already; new columns are registered via RegisterStepVariable(string, string, string, string, Func<MachiningStep, object>) (MappedStepColumns).

ConcurrentDictionary<string, PropertyAccess<MachiningStep>> StepPropertyAccessDictionary { get; }

Property Value

ConcurrentDictionary<string, PropertyAccess<MachiningStep>>

Methods

NotifyStepValuesWritten()

Values were written onto built steps outside the step-built hook (a mapping embed, the keys registered already included): a host that keeps a per-step cache of a key's value (the inspecting slot) marks it stale here. The default does nothing.

void NotifyStepValuesWritten()

RegisterStepVariable(string, string, string, string, Func<MachiningStep, object>)

Registers a step variable so downstream components (strip charts, CSV exports, scripting) can read it from MachiningStep. A key registered again in the same session takes the new definition; a key named like a built-in step property (IsBuiltInKey(string)) is not registered, nor is one the host keeps for itself (the HiNc host keeps the keys its project defines step variables or color trees under). The value is read when asked for and never stored on the step: a value written onto the step under the key wins, else variableFunc is called; a number of any numeric type (or a bool, as 1 / 0) reads as a double, anything else — and a call that throws — as no value.

void RegisterStepVariable(string key, string name, string unit, string formatString, Func<MachiningStep, object> variableFunc = null)

Parameters

key string

Unique key.

name string

Human-readable name; may equal key.

unit string

Physical unit name (PhysicsUnit); null for none, and a name that is not a unit reads as none.

formatString string

Display format string; nullable.

variableFunc Func<MachiningStep, object>

Optional value extractor; null when the key reads only a value written onto the step under the key (a script's indexer, a mapping, a training).