Table of Contents

Class FanucModalMacroSyntax

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

Handles Fanuc Custom Macro B modal-call lifecycle (G66 setup, G67 cancel, and per-motion-block implicit macro invocation). The same class is registered twice in the pipeline via Phase — once in the Evaluation bundle (Setup, captures G66/G67 edges and carries the FanucModalMacro state block-to-block) and once in the PostLogic bundle (Expansion, on every motion block within an active G66 modal, inlines the macro body via the same mechanism FanucMacroCallSyntax uses).

Keeping both phases in one class makes the pairing visually explicit: readers see "G66 in one file" and the two methods (DoSetup, DoExpansion) make the lifecycle obvious. The two factory helpers (Setup, Expansion) mirror the ModalCarrySyntax.Logic / .PostLogic pattern already in the codebase.

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

Constructors

FanucModalMacroSyntax()

Parameterless instance (defaults to Setup).

public FanucModalMacroSyntax()

FanucModalMacroSyntax(XElement)

XML ctor. Reads <Phase> child element; legacy project files without it default to Setup (the pre-expansion behaviour).

public FanucModalMacroSyntax(XElement src)

Parameters

src XElement

Root element named XName.

Properties

Expansion

Factory: PostLogic-bundle instance that performs implicit motion-block expansion.

public static FanucModalMacroSyntax Expansion { get; }

Property Value

FanucModalMacroSyntax

Name

Syntax kind name (typically the concrete type name).

public string Name { get; }

Property Value

string

Phase

Pipeline phase this instance runs in. Defaults to Setup.

public FanucModalMacroSyntax.SyntaxPhase Phase { get; set; }

Property Value

FanucModalMacroSyntax.SyntaxPhase

Setup

Factory: Evaluation-bundle instance that handles G66/G67 setup + carry.

public static FanucModalMacroSyntax Setup { get; }

Property Value

FanucModalMacroSyntax

XName

XML element name used to register this syntax with XFactory.

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