Table of Contents

Class SiemensNamedVariableLookup

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

Reads Sinumerik named program variables (_X_HOME) from Vars.Named. Self-gates on the named-identifier key shape so the evaluator's RuntimeVariableLookups chain can fall through for other keys. Sibling of the Fanuc VolatileVariableLookup with the same single-step traceback: SiemensNamedVariableReadingSyntax dict-merges every block's Vars.Named into the next block, so the entry — if it exists — is on the current block or the immediately previous one.

Stateless and dependency-free — instances are interchangeable.

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

Constructors

SiemensNamedVariableLookup()

Default constructor.

public SiemensNamedVariableLookup()

SiemensNamedVariableLookup(XElement)

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

public SiemensNamedVariableLookup(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