Table of Contents

Interface IRuntimeVariableLookup

Namespace
Hi.NcParsers.EvaluationSyntaxs.Evaluation
Assembly
HiMech.dll

Stateless variable lookup that needs per-block runtime context — the current SyntaxPiece node (for Previous traceback into runtime-state sections like MachineCoordinateState / ProgramXyz) and the dependency list (so the lookup can read from sibling dependencies without holding a static reference).

Distinguished from IVariableLookup: that one is for long-lived dependencies that already hold their own data (parameter tables, tool-offset wrappers, retained-variable tables) and need no block context. IRuntimeVariableLookup is for context-sensitive resolutions configured declaratively on RuntimeVariableLookups.

Implementations should be brand-specific (e.g. Fanuc #5001-#5043 position reads) and return null for keys outside their range so the evaluator's chain can fall through to the next lookup.

Implementations are XML-serialised as part of VariableEvaluatorSyntax's round-trip: each impl exposes a static XName, registers itself with Generators, and implements MakeXmlSource(string, string, bool). Since impls are stateless, the typical body is just an empty element carrying the type name; brand identity is restored by XFactory dispatch.

public interface IRuntimeVariableLookup : IMakeXmlSource
Inherited Members
Extension Methods

Methods

Get(string, LazyLinkedListNode<SyntaxPiece>, IReadOnlyList<INcDependency>)

Returns the value of the variable identified by key in the context of node and dependencies, or null if the key is outside this lookup's range or the value is vacant.

double? Get(string key, LazyLinkedListNode<SyntaxPiece> node, IReadOnlyList<INcDependency> dependencies)

Parameters

key string
node LazyLinkedListNode<SyntaxPiece>
dependencies IReadOnlyList<INcDependency>

Returns

double?