Class FanucPositionVariableLookup
- Namespace
- Hi.NcParsers.Dependencys.Fanuc
- Assembly
- HiMech.dll
Fanuc-style position system variables read from the previous block's runtime-state JSON sections:
#5001-#5003Block-end position X/Y/Z (workpiece) → previous block's ProgramXyz.#5021-#5023Current machine position X/Y/Z → previous block's MachineCoordinateState.#5041-#5043Current absolute position X/Y/Z → previous block's ProgramXyz.
Stateless. Configured on
RuntimeVariableLookups rather than
NcDependencyList because the read needs the block node for
Previous access — there is no
long-lived dependency object that owns this data.
public sealed class FanucPositionVariableLookup : IRuntimeVariableLookup, IMakeXmlSource
- Inheritance
-
FanucPositionVariableLookup
- Implements
- Inherited Members
- Extension Methods
Constructors
FanucPositionVariableLookup()
Default constructor.
public FanucPositionVariableLookup()
FanucPositionVariableLookup(XElement)
Loads from an XML element produced by MakeXmlSource(string, string, bool). Stateless — no fields to deserialise.
public FanucPositionVariableLookup(XElement src)
Parameters
srcXElement
Fields
AbsoluteXyzBase
Inclusive lower bound of the absolute XYZ position range (#5041).
public const int AbsoluteXyzBase = 5041
Field Value
BlockEndXyzBase
Inclusive lower bound of the block-end XYZ position range (#5001).
public const int BlockEndXyzBase = 5001
Field Value
MachineCoordXyzBase
Inclusive lower bound of the machine-coordinate XYZ position range (#5021).
public const int MachineCoordXyzBase = 5021
Field Value
Properties
XName
XML element name for Generators registration.
public static string XName { get; }
Property Value
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
keystringnodeLazyLinkedListNode<SyntaxPiece>dependenciesIReadOnlyList<INcDependency>
Returns
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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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
factoryXFactory