Table of Contents

Class SiemensUifrVariableLookup

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

Reads Sinumerik settable-frame translations (R100=$P_UIFR[1,X,TR]) from the SiemensFrameTable on the runner's effective dependency list. Self-gates on the $P_UIFR[n,axis,TR] key shape so the evaluator's RuntimeVariableLookups chain can fall through for other keys (non-TR components fall to the record-only SiemensSystemVariableSyntax path as unevaluable reads).

State-from-deps flavour: the table is resolved from dependencies on every call — never held as a field — so the lookup survives XML round-trip without a rebind path (the wrapper anti-pattern ban on IRuntimeVariableLookup).

public class SiemensUifrVariableLookup : IRuntimeVariableLookup, IMakeXmlSource
Inheritance
SiemensUifrVariableLookup
Implements
Inherited Members
Extension Methods

Constructors

SiemensUifrVariableLookup()

Default constructor.

public SiemensUifrVariableLookup()

SiemensUifrVariableLookup(XElement)

Loads from an XML element produced by MakeXmlSource(string, string, bool). Stateless — no fields to deserialise.

public SiemensUifrVariableLookup(XElement src)

Parameters

src XElement

Properties

XName

XML element name for Generators registration.

public static string XName { get; }

Property Value

string

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.

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

Parameters

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

Returns

double?

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory (or Default when factory is null). Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory