Table of Contents

Class VolatileVariableReadingSyntax

Namespace
Hi.NcParsers.EvaluationSyntaxs
Assembly
HiMech.dll

Obtains values for Fanuc-style non-retained common variables (#100-#499). Reads literal numeric assignments from Parsing.Assignments.#nnn, dict-merges them with the previous block's volatile state, and writes the resulting per-block dictionary into Vars.Volatile.

Lifetime is bounded by MachiningSession: within one session the dictionary carries forward block-by-block via this syntax; session restart abandons the SyntaxPiece JSON dataflow and starts fresh. Program-end (M02/M30) clearing is handled by ProgramEndCleanSyntax.

Only literal numeric RHS values are consumed by this syntax (#124 = 15. ✓; #100 = #1 + 5 ✗). Non-literal RHS entries are left untouched in Parsing.Assignments; VariableEvaluatorSyntax resolves them and writes the result into the same per-block dictionary. The two syntaxes are decoupled — the evaluator's lookup tracebacks via SyntaxPiece linkage so it does not depend on having run before or after this syntax.

public class VolatileVariableReadingSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
Inheritance
VolatileVariableReadingSyntax
Implements
Inherited Members
Extension Methods

Constructors

VolatileVariableReadingSyntax()

Default constructor.

public VolatileVariableReadingSyntax()

VolatileVariableReadingSyntax(XElement)

Loads from an XML element produced by MakeXmlSource(string, string, bool). No state to deserialise.

public VolatileVariableReadingSyntax(XElement src)

Parameters

src XElement

Fields

VolatileMax

Inclusive upper bound of the non-retained common range (#499).

public const int VolatileMax = 499

Field Value

int

VolatileMin

Inclusive lower bound of the non-retained common range (#100).

public const int VolatileMin = 100

Field Value

int

Properties

Name

Syntax kind name (typically the concrete type name).

public string Name { get; }

Property Value

string

XName

XML element name for Generators registration.

public static string XName { get; }

Property Value

string

Methods

Build(LazyLinkedListNode<SyntaxPiece>, List<INcDependency>, NcDiagnosticProgress)

Build syntax arrangement into the syntaxPieceNode in-place.

public void Build(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, List<INcDependency> ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)

Parameters

syntaxPieceNode LazyLinkedListNode<SyntaxPiece>
ncDependencyList List<INcDependency>
ncDiagnosticProgress NcDiagnosticProgress

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