rename XFactory.Regs to XFactory.Generators.

This commit is contained in:
iamboss 2026-05-23 21:23:06 +08:00
parent 8b285cc863
commit 058003f395
155 changed files with 16416 additions and 1261 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -11,9 +11,9 @@
"dependencies": {
"AvalonEdit": "6.3.0.90",
"FontAwesome.Sharp": "6.3.0",
"Hi.WpfPlus": "3.1.138",
"HiNc": "3.1.171",
"HiNc-Resource": "3.1.53",
"Hi.WpfPlus": "3.1.139",
"HiNc": "3.1.172",
"HiNc-Resource": "3.1.54",
"Serilog.Extensions.Hosting": "10.0.0",
"Serilog.Sinks.Console": "6.1.1",
"Serilog.Sinks.File": "7.0.0",
@ -1676,36 +1676,36 @@
}
}
},
"Hi.WpfPlus/3.1.138": {
"Hi.WpfPlus/3.1.139": {
"dependencies": {
"HiDisp": "3.1.144"
"HiDisp": "3.1.145"
},
"runtime": {
"lib/net10.0-windows7.0/Hi.WpfPlus.dll": {
"assemblyVersion": "3.1.138.0",
"fileVersion": "3.1.138.0"
"assemblyVersion": "3.1.139.0",
"fileVersion": "3.1.139.0"
}
}
},
"HiCbtr/3.1.141": {
"HiCbtr/3.1.142": {
"dependencies": {
"HiDisp": "3.1.144"
"HiDisp": "3.1.145"
},
"runtime": {
"lib/net10.0/HiCbtr.dll": {
"assemblyVersion": "3.1.141.0",
"fileVersion": "3.1.141.0"
"assemblyVersion": "3.1.142.0",
"fileVersion": "3.1.142.0"
}
}
},
"HiDisp/3.1.144": {
"HiDisp/3.1.145": {
"dependencies": {
"HiGeom": "3.1.133"
"HiGeom": "3.1.134"
},
"runtime": {
"lib/net10.0/HiDisp.dll": {
"assemblyVersion": "3.1.144.0",
"fileVersion": "3.1.144.0"
"assemblyVersion": "3.1.145.0",
"fileVersion": "3.1.145.0"
}
},
"native": {
@ -1723,7 +1723,7 @@
}
}
},
"HiGeom/3.1.133": {
"HiGeom/3.1.134": {
"dependencies": {
"Google.Protobuf": "3.28.3",
"Grpc.AspNetCore": "2.66.0",
@ -1733,8 +1733,8 @@
},
"runtime": {
"lib/net10.0/HiGeom.dll": {
"assemblyVersion": "3.1.133.0",
"fileVersion": "3.1.133.0"
"assemblyVersion": "3.1.134.0",
"fileVersion": "3.1.134.0"
}
},
"resources": {
@ -1746,27 +1746,27 @@
}
}
},
"HiLicense/3.1.134": {
"HiLicense/3.1.135": {
"dependencies": {
"HiGeom": "3.1.133"
"HiGeom": "3.1.134"
},
"runtime": {
"lib/net10.0/HiLicense.dll": {
"assemblyVersion": "3.1.134.0",
"fileVersion": "3.1.134.0"
"assemblyVersion": "3.1.135.0",
"fileVersion": "3.1.135.0"
}
}
},
"HiMech/3.1.152": {
"HiMech/3.1.153": {
"dependencies": {
"CommandLineParser": "2.9.1",
"HiCbtr": "3.1.141",
"HiCbtr": "3.1.142",
"Microsoft.CodeAnalysis.CSharp.Scripting": "5.3.0"
},
"runtime": {
"lib/net10.0/HiMech.dll": {
"assemblyVersion": "3.1.152.0",
"fileVersion": "3.1.152.0"
"assemblyVersion": "3.1.153.0",
"fileVersion": "3.1.153.0"
}
},
"resources": {
@ -1781,21 +1781,21 @@
}
}
},
"HiNc/3.1.171": {
"HiNc/3.1.172": {
"dependencies": {
"Dapper": "2.1.35",
"Google.Protobuf": "3.28.3",
"Grpc.AspNetCore": "2.66.0",
"Grpc.Net.Client": "2.66.0",
"HiLicense": "3.1.134",
"HiMech": "3.1.152",
"HiUniNc": "3.1.148",
"HiLicense": "3.1.135",
"HiMech": "3.1.153",
"HiUniNc": "3.1.149",
"Microsoft.Data.Sqlite": "9.0.0"
},
"runtime": {
"lib/net10.0/HiNc.dll": {
"assemblyVersion": "3.1.171.0",
"fileVersion": "3.1.171.0"
"assemblyVersion": "3.1.172.0",
"fileVersion": "3.1.172.0"
}
},
"resources": {
@ -1807,22 +1807,22 @@
}
}
},
"HiNc-Resource/3.1.53": {
"HiNc-Resource/3.1.54": {
"runtime": {
"lib/net10.0/HiNc-Resource.dll": {
"assemblyVersion": "3.1.53.0",
"fileVersion": "3.1.53.0"
"assemblyVersion": "3.1.54.0",
"fileVersion": "3.1.54.0"
}
}
},
"HiUniNc/3.1.148": {
"HiUniNc/3.1.149": {
"dependencies": {
"HiMech": "3.1.152"
"HiMech": "3.1.153"
},
"runtime": {
"lib/net10.0/HiUniNc.dll": {
"assemblyVersion": "3.1.148.0",
"fileVersion": "3.1.148.0"
"assemblyVersion": "3.1.149.0",
"fileVersion": "3.1.149.0"
}
}
},
@ -2257,68 +2257,68 @@
"path": "grpc.net.common/2.66.0",
"hashPath": "grpc.net.common.2.66.0.nupkg.sha512"
},
"Hi.WpfPlus/3.1.138": {
"Hi.WpfPlus/3.1.139": {
"type": "package",
"serviceable": true,
"sha512": "sha512-S0unmDU1xgOP9zT11Dnp5HRFFtmHjvChbpLRKgIVXtmbrax04V0vbRFJ5EYjF/OAuk/fwxvzyZqxMx3hfNVNtw==",
"path": "hi.wpfplus/3.1.138",
"hashPath": "hi.wpfplus.3.1.138.nupkg.sha512"
"sha512": "sha512-muLHNPY6TJ3BwVr7cQ4tp98ZmQ085OrmgbqVltpRbJmWNxq7bZtI1BHo/3VtermjeO0YNbDMFjpLNH8fp2XM3A==",
"path": "hi.wpfplus/3.1.139",
"hashPath": "hi.wpfplus.3.1.139.nupkg.sha512"
},
"HiCbtr/3.1.141": {
"HiCbtr/3.1.142": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IgsFEmpPFvprsMHIO+t7nn2xTGtffOV0bA70uTB5jjQl7n70U+EEWUxWBejMImSrq/kCxJ2SM3IH/XDpTSalAg==",
"path": "hicbtr/3.1.141",
"hashPath": "hicbtr.3.1.141.nupkg.sha512"
"sha512": "sha512-yK0EWRkv0YWPJ1SsZLfYBDCOsJat/XpjTqLhLYreQFPp+5zTHd/6Uf6gjC8yIcHOAH4VjSCxvOQlMk7eVtG3wQ==",
"path": "hicbtr/3.1.142",
"hashPath": "hicbtr.3.1.142.nupkg.sha512"
},
"HiDisp/3.1.144": {
"HiDisp/3.1.145": {
"type": "package",
"serviceable": true,
"sha512": "sha512-+I/W1mu90sUyk2HOzVW9PnPzO5QMH8i/wTD5Op8VzUe8nViMqjeS+DZzugwlzkh1eJB+WagdhJJGVQEd8yhWNA==",
"path": "hidisp/3.1.144",
"hashPath": "hidisp.3.1.144.nupkg.sha512"
"sha512": "sha512-q6/RU5BeXcr88a4vhTqWes7UIcT9kapJm5viEdpDfn8cTldkLoVF+JXjlX62ksX28lYhynwYtOGsDRMucLCUqg==",
"path": "hidisp/3.1.145",
"hashPath": "hidisp.3.1.145.nupkg.sha512"
},
"HiGeom/3.1.133": {
"HiGeom/3.1.134": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gqt1/MR+c2+K22T4vsVL9g5+GH5ldNg/CvYokFAReFYR8tS44MFvjePQskfBmm8r6uXFY2ROPCm5YS5pPY98RQ==",
"path": "higeom/3.1.133",
"hashPath": "higeom.3.1.133.nupkg.sha512"
"sha512": "sha512-Frf5//Zbo9YsCT5pdiAsvBwPOtsch1/hCKW17BatWcWwmSk98xC6hfDsDRGMSImN74kjA61U8RUlGicLJA/0Gw==",
"path": "higeom/3.1.134",
"hashPath": "higeom.3.1.134.nupkg.sha512"
},
"HiLicense/3.1.134": {
"HiLicense/3.1.135": {
"type": "package",
"serviceable": true,
"sha512": "sha512-d5eOvZXfZqfFJ5tPTkMJX5OEmRy8eyyspeMZmw4o4IeY1ukwYSJ+WA7evLfXRofYP8nfu4raqow8lOZKmp8sEg==",
"path": "hilicense/3.1.134",
"hashPath": "hilicense.3.1.134.nupkg.sha512"
"sha512": "sha512-5V4h8L9B/w0Xs7rpzXjomboCg6lXmmwIOrcOhLAuLxQ0PDNjnV4hWust3F9YRX9gJfbgx3dokZTV73LQ9lc2mg==",
"path": "hilicense/3.1.135",
"hashPath": "hilicense.3.1.135.nupkg.sha512"
},
"HiMech/3.1.152": {
"HiMech/3.1.153": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HNlLKzACdE7Vj9Qa2PrBBUAkYVts8BlaqdWaUfXxLfJICp/GJVXUTah5v3E8O5KC0m7byNMLdzYTabJW4stZ5A==",
"path": "himech/3.1.152",
"hashPath": "himech.3.1.152.nupkg.sha512"
"sha512": "sha512-ojwLuEpicGegECy32QVng4h/VF7Kv3IljgWfyCnzHmRf9qVoFV09tu/zYAHLBL+TErWkYH+r+uduwuIWssBRQA==",
"path": "himech/3.1.153",
"hashPath": "himech.3.1.153.nupkg.sha512"
},
"HiNc/3.1.171": {
"HiNc/3.1.172": {
"type": "package",
"serviceable": true,
"sha512": "sha512-4Tj/+E9aoLRrnAdUuMYyjVYNAe7k4AQzyGzw3nH2VDB2pTd/Yq3WxC2MY/3nzRo0BHK1Y2SgEkQ6mPpiYybung==",
"path": "hinc/3.1.171",
"hashPath": "hinc.3.1.171.nupkg.sha512"
"sha512": "sha512-dyofOqXS8u8PoGzORwc7seSNrRxv5bITEtiZikfrUPHxDojTg/M9toGBEQsN8/zEURLiUPBdVgNY/s2VayoxLg==",
"path": "hinc/3.1.172",
"hashPath": "hinc.3.1.172.nupkg.sha512"
},
"HiNc-Resource/3.1.53": {
"HiNc-Resource/3.1.54": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NbpAR+5LY9MSssCftrRsfBz++U162vLgdaFpme3YMcTF9IKJsjRCvRXPdxsLIRrnMG8Ud9uUzwNEnYjYnTtxdg==",
"path": "hinc-resource/3.1.53",
"hashPath": "hinc-resource.3.1.53.nupkg.sha512"
"sha512": "sha512-1hq99sqP6aySFTDzqwZb4eZygMyGbSBnfenBqSXyBYKA1JZN4Mb+154ODdBsIkKrjNuvFtwZxdyr0VDglM8hqw==",
"path": "hinc-resource/3.1.54",
"hashPath": "hinc-resource.3.1.54.nupkg.sha512"
},
"HiUniNc/3.1.148": {
"HiUniNc/3.1.149": {
"type": "package",
"serviceable": true,
"sha512": "sha512-F+yFQh3VvWluPb2u6bR0XZNNjqCFgL/nMhAY0qAsOSA49b9mstzax9JGTb1u7RHf0V1+meDVhkS1MD4ZmSLBNQ==",
"path": "hiuninc/3.1.148",
"hashPath": "hiuninc.3.1.148.nupkg.sha512"
"sha512": "sha512-jI/paWFfoCRiFl7Sz06GIhDk+Lip1c7TfZGXlgsp7aJdISA3bwPvEDHCrJeoCd2EjNEQapMZvUxXS4EFaKhwoQ==",
"path": "hiuninc/3.1.149",
"hashPath": "hiuninc.3.1.149.nupkg.sha512"
},
"MathNet.Numerics/5.0.0": {
"type": "package",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -632,6 +632,59 @@ materialization in lock-step with syntax/semantic processing).</p>
<a id="Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_" data-uid="Hi.Common.Collections.LazyLinkedList`1.ReplaceSource*"></a>
<h3 id="Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__" data-uid="Hi.Common.Collections.LazyLinkedList`1.ReplaceSource(System.Collections.Generic.IEnumerable{`0})">
ReplaceSource(IEnumerable&lt;T&gt;)
</h3>
<div class="markdown level1 summary"><p>Replaces the current source's remaining items with <code class="paramref">src</code>.
Discards anything the old source had queued (it is disposed); the next
on-demand materialization (triggered by <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Next">Next</a>
on the present tail or <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_First">First</a> on an empty list) yields from
<code class="paramref">src</code> only. Already-materialized nodes — including the
present tail — are unaffected, so this is the natural way to redirect
future execution from the current tail onwards (for example, a GOTO
that re-segments the file from the target N{seq} line: the GOTO host
block stays materialized as the predecessor, and the post-target
re-segmentation becomes the new source while the original between-here-
and-EOF source is dropped).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ReplaceSource(IEnumerable&lt;T&gt; src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</dt>
<dd><p>The new source. Yielded from on the next materialization.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0___remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>Constraint: same as <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_PrependSource_System_Collections_Generic_IEnumerable__0__">PrependSource(IEnumerable&lt;T&gt;)</a> — the present tail is
the splice point. Differs from <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_PrependSource_System_Collections_Generic_IEnumerable__0__">PrependSource(IEnumerable&lt;T&gt;)</a> in that the
old source's untouched tail is NOT preserved after <code class="paramref">src</code>
runs out; <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a> drops it. Use <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_PrependSource_System_Collections_Generic_IEnumerable__0__">PrependSource(IEnumerable&lt;T&gt;)</a>
for inline expansion (M98 / G65) where the caller's tail must resume
after the inlined body; use <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a> for control-flow
redirection (GOTO, M99 P{seq}) where the original tail is no longer
reachable.</p>
</div>
</article>

View File

@ -2,9 +2,9 @@
<html>
<head>
<meta charset="utf-8">
<title>Delegate XFactory.GenByXElementDelegate | HiAPI-C# 2025 </title>
<title>Delegate XFactory.XGeneratorDelegate | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Delegate XFactory.GenByXElementDelegate | HiAPI-C# 2025 ">
<meta name="title" content="Delegate XFactory.XGeneratorDelegate | HiAPI-C# 2025 ">
<meta name="description" content="Delegate for generating objects from XML elements with relative file path.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
@ -84,12 +84,12 @@
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.Common.XmlUtils.XFactory.GenByXElementDelegate">
<article data-uid="Hi.Common.XmlUtils.XFactory.XGeneratorDelegate">
<h1 id="Hi_Common_XmlUtils_XFactory_GenByXElementDelegate" data-uid="Hi.Common.XmlUtils.XFactory.GenByXElementDelegate" class="text-break">
Delegate XFactory.GenByXElementDelegate
<h1 id="Hi_Common_XmlUtils_XFactory_XGeneratorDelegate" data-uid="Hi.Common.XmlUtils.XFactory.XGeneratorDelegate" class="text-break">
Delegate XFactory.XGeneratorDelegate
</h1>
<div class="facts text-secondary">
@ -102,7 +102,7 @@ Delegate XFactory.GenByXElementDelegate
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public delegate object XFactory.GenByXElementDelegate(XElement src, string baseDirectory, string relFile, IProgress&lt;object&gt; progress, object[] res)</code></pre>
<pre><code class="lang-csharp hljs">public delegate object XFactory.XGeneratorDelegate(XElement src, string baseDirectory, string relFile, IProgress&lt;object&gt; progress, object[] res)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@ -164,7 +164,7 @@ Delegate XFactory.GenByXElementDelegate
<h2 id="Hi_Common_XmlUtils_XFactory_GenByXElementDelegate_remarks">Remarks</h2>
<h2 id="Hi_Common_XmlUtils_XFactory_XGeneratorDelegate_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>Note that the design pattern of seperating BaseDirectory and RelativePath is for easy data package moving.
The pattern assume the BaseDirectory can be changed if all the content in the BaseDirectory is changed to the destinate directory.</p>
</div>

View File

@ -148,7 +148,7 @@ Class XFactory
<h2 id="Hi_Common_XmlUtils_XFactory_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>Generator functions must be added to <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> to enable the factory to create objects from XML.</p>
<div class="markdown level0 remarks"><p>Generator functions must be added to <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> to enable the factory to create objects from XML.</p>
</div>
@ -156,10 +156,10 @@ Class XFactory
</h2>
<a id="Hi_Common_XmlUtils_XFactory_Regs_" data-uid="Hi.Common.XmlUtils.XFactory.Regs*"></a>
<a id="Hi_Common_XmlUtils_XFactory_Generators_" data-uid="Hi.Common.XmlUtils.XFactory.Generators*"></a>
<h3 id="Hi_Common_XmlUtils_XFactory_Regs" data-uid="Hi.Common.XmlUtils.XFactory.Regs">
Regs
<h3 id="Hi_Common_XmlUtils_XFactory_Generators" data-uid="Hi.Common.XmlUtils.XFactory.Generators">
Generators
</h3>
@ -168,7 +168,7 @@ Class XFactory
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Dictionary&lt;string, XFactory.GenByXElementDelegate&gt; Regs { get; set; }</code></pre>
<pre><code class="lang-csharp hljs">public static Dictionary&lt;string, XFactory.XGeneratorDelegate&gt; Generators { get; set; }</code></pre>
</div>
@ -177,7 +177,7 @@ Class XFactory
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.<a class="xref" href="Hi.Common.XmlUtils.XFactory.GenByXElementDelegate.html">GenByXElementDelegate</a>&gt;</dt>
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.<a class="xref" href="Hi.Common.XmlUtils.XFactory.XGeneratorDelegate.html">XGeneratorDelegate</a>&gt;</dt>
<dd></dd>
</dl>

View File

@ -140,7 +140,7 @@ Delegates
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.Common.XmlUtils.XFactory.GenByXElementDelegate.html">XFactory.GenByXElementDelegate</a></dt>
<dt><a class="xref" href="Hi.Common.XmlUtils.XFactory.XGeneratorDelegate.html">XFactory.XGeneratorDelegate</a></dt>
<dd><p>Delegate for generating objects from XML elements with relative file path.</p>
</dd>
</dl>

View File

@ -201,6 +201,37 @@ Class SessionProgress
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_MachiningProcs_SessionProgress__ctor_" data-uid="Hi.MachiningProcs.SessionProgress.#ctor*"></a>
<h3 id="Hi_MachiningProcs_SessionProgress__ctor" data-uid="Hi.MachiningProcs.SessionProgress.#ctor">
SessionProgress()
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance with default settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public SessionProgress()</code></pre>
</div>
<h2 class="section" id="properties">Properties
</h2>

View File

@ -456,7 +456,7 @@ to retrieve the brand.</p>
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -0,0 +1,531 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucGotoIterationDependency | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucGotoIterationDependency | HiAPI-C# 2025 ">
<meta name="description" content="Watchdog for Fanuc Custom Macro B GOTO loops. Holds a limit (XML-persisted user config — the soft cap above which the upcoming FanucGotoSyntax stops firing and emits a warning) plus a runtime per-target hit counter ( — not serialised, cleared at session start by ). The dependency is syntax-managed: FanucGotoSyntax reads the limit, increments the counter, and decides whether to fire. There is no host Func provider — the dep is placed in rather than because nothing outside the syntax pipeline writes it; is a plain method call the runner invokes, not a host-wired Func. The counter key is (FileName, TargetN) where FileName is the source-level file path of the block containing the GOTO (the relative path form carried on — same form used by IndexedFileLine labels). Source-level keying means multiple inline invocations of the same subprogram pool their counts (they ARE the same source-code GOTO), while two different files with their own N100 stay isolated (they ARE different jumps). Default is 1000 — a runaway-loop guard, not a precise iteration budget. Legitimate macro loops (multi-hole drill matrices, calibration sweeps) sit well below this; truly infinite loops hit the limit fast. Projects with batch-style macros that legitimately need higher counts can raise the value in the project XML.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency">
<h1 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency" class="text-break">
Class FanucGotoIterationDependency
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Dependencys.html">Dependencys</a>.<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Watchdog for Fanuc Custom Macro B GOTO loops. Holds a
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> limit (XML-persisted user config —
the soft cap above which the upcoming
<code>FanucGotoSyntax</code> stops firing and emits a warning) plus a
runtime per-target hit counter (<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget">CountByTarget</a> — not
serialised, cleared at session start by
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_RunControlLines_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_MachiningProcs_MachiningSession_Hi_MachiningProcs_SessionProgress_System_Threading_CancellationToken_">RunControlLines(string, IEnumerable&lt;string&gt;, MachiningSession, SessionProgress, CancellationToken)</a>).</p>
<p>
The dependency is syntax-managed: <code>FanucGotoSyntax</code> reads the
limit, increments the counter, and decides whether to fire. There is
no host <code>Func</code> provider — the dep is placed in
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.html">Hi.NcParsers.Dependencys.Fanuc</a> rather than
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.html">Hi.NcParsers.Dependencys.SystemWired</a> because nothing outside the
syntax pipeline writes it; <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_Reset">Reset()</a> is a plain method call
the runner invokes, not a host-wired Func.
</p>
<p>
The counter key is <code>(FileName, TargetN)</code> where <code>FileName</code>
is the source-level file path of the block containing the GOTO (the
relative path form carried on <a class="xref" href="Hi.NcParsers.Sentence.html#Hi_NcParsers_Sentence_FilePath">FilePath</a> — same
form used by <code>IndexedFileLine</code> labels). Source-level keying means
multiple inline invocations of the same subprogram pool their counts
(they ARE the same source-code GOTO), while two different files with
their own N100 stay isolated (they ARE different jumps).
</p>
<p>
Default <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> is 1000 — a runaway-loop
guard, not a precise iteration budget. Legitimate macro loops
(multi-hole drill matrices, calibration sweeps) sit well below this;
truly infinite loops hit the limit fast. Projects with batch-style
macros that legitimately need higher counts can raise the value in
the project XML.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucGotoIterationDependency : INcDependency, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucGotoIterationDependency</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency__ctor_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.#ctor*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency__ctor" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.#ctor">
FanucGotoIterationDependency()
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance with the default limit and an empty counter.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucGotoIterationDependency()</code></pre>
</div>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency__ctor_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.#ctor*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.#ctor(System.Xml.Linq.XElement)">
FanucGotoIterationDependency(XElement)
</h3>
<div class="markdown level1 summary"><p>Loads <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> from XML produced by <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>; absent element falls back to <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_DefaultMaxIterationsPerTarget">DefaultMaxIterationsPerTarget</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucGotoIterationDependency(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>Root element named <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_XName">XName</a>.</p>
</dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_DefaultMaxIterationsPerTarget" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.DefaultMaxIterationsPerTarget">
DefaultMaxIterationsPerTarget
</h3>
<div class="markdown level1 summary"><p>Default for <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a>. Sized as a
runaway-loop guard: legitimate Fanuc macros (drill grids,
calibration sweeps) stay well below, while truly unbounded loops
hit it fast.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const int DefaultMaxIterationsPerTarget = 1000</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.CountByTarget*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.CountByTarget">
CountByTarget
</h3>
<div class="markdown level1 summary"><p>Per-target hit counter keyed by <code>(FileName, TargetN)</code>.
Runtime-only; not serialised. Cleared by <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_Reset">Reset()</a> on
the session-init edge so a brand-preset runner reused across
sessions does not leak counts.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Dictionary&lt;(string FileName, int TargetN), int&gt; CountByTarget { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-system.string,system.int32-.filename">FileName</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-system.string,system.int32-.targetn">TargetN</a>), <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.MaxIterationsPerTarget*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.MaxIterationsPerTarget">
MaxIterationsPerTarget
</h3>
<div class="markdown level1 summary"><p>Soft cap on consecutive fires of any single GOTO target within
one source file (see <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget">CountByTarget</a> for the keying).
Above this, the consuming syntax should emit a warning and
suppress the redirect on the over-limit block; subsequent blocks
flow through naturally.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int MaxIterationsPerTarget { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_XName_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.XName*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_XName" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name used to register this dependency with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MakeXmlSource_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_Reset_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.Reset*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_Reset" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.Reset">
Reset()
</h3>
<div class="markdown level1 summary"><p>Clears <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget">CountByTarget</a>; leaves <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> untouched.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Reset()</code></pre>
</div>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -111,7 +111,7 @@ long-lived dependency object that owns this data.
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public sealed class FanucPositionVariableLookup : IRuntimeVariableLookup</code></pre>
<pre><code class="lang-csharp hljs">public sealed class FanucPositionVariableLookup : IRuntimeVariableLookup, IMakeXmlSource</code></pre>
</div>
@ -129,6 +129,7 @@ long-lived dependency object that owns this data.
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
@ -186,6 +187,69 @@ long-lived dependency object that owns this data.
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup__ctor_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup__ctor" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.#ctor">
FanucPositionVariableLookup()
</h3>
<div class="markdown level1 summary"><p>Default constructor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucPositionVariableLookup()</code></pre>
</div>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup__ctor_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.#ctor(System.Xml.Linq.XElement)">
FanucPositionVariableLookup(XElement)
</h3>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.html#Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. Stateless — no fields to deserialise.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucPositionVariableLookup(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
@ -283,6 +347,42 @@ long-lived dependency object that owns this data.
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup_XName_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.XName*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup_XName" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
@ -331,6 +431,57 @@ this lookup's range or the value is vacant.</p>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup_MakeXmlSource_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_Dependencys_Fanuc_FanucPositionVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucToolOffsetVariableLookup | HiAPI-C# 2025 ">
<meta name="description" content="Fanuc-side adapter that exposes a wrapped as an following Fanuc Memory C tool offset addressing: #2001+N → effective height of offset N (geometry wear). The underlying stays brand-neutral — Heidenhain / Siemens can use the same storage with different addressing by registering their own adapter alongside the table. Holds a reference to the table rather than owning data so writes through the table show up immediately in lookups via this adapter.">
<meta name="description" content="Fanuc-side adapter that exposes a wrapped (resolved at call time from the dependency list) as an following Fanuc Memory C tool offset addressing: #2001+N → effective height of offset N (geometry wear). The underlying stays brand-neutral — Heidenhain / Siemens can use the same storage with different addressing by registering their own adapter alongside the table. Stateless: holds no reference of its own and resolves the table from the per-call dependencies list, so XML round-trip is trivial (an empty element). Registered on a brand preset&#39;s VariableEvaluatorSyntax.RuntimeVariableLookups, not on — the wrapper owns no long-lived data, only the Fanuc-style id addressing scheme. The underlying still lives in NcDependencyList as the data dependency.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -98,21 +98,30 @@ Class FanucToolOffsetVariableLookup
</div>
<div class="markdown summary"><p>Fanuc-side adapter that exposes a wrapped <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a>
as an <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IVariableLookup.html">IVariableLookup</a> following Fanuc Memory C tool offset
addressing: <code>#2001+N → effective height of offset N</code>
(resolved at call time from the dependency list) as an
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a> following Fanuc Memory C tool
offset addressing: <code>#2001+N → effective height of offset N</code>
(geometry wear).</p>
<p>
The underlying <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> stays brand-neutral —
Heidenhain / Siemens can use the same storage with different addressing
by registering their own adapter alongside the table. Holds a reference
to the table rather than owning data so writes through the table show
up immediately in lookups via this adapter.
by registering their own adapter alongside the table. Stateless: holds
no reference of its own and resolves the table from the per-call
<code>dependencies</code> list, so XML round-trip is trivial (an empty element).
</p>
<p>
Registered on a brand preset's
VariableEvaluatorSyntax.RuntimeVariableLookups, not on
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcDependencyList">NcDependencyList</a> — the wrapper owns no
long-lived data, only the Fanuc-style id addressing scheme. The
underlying <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> still lives in
<code>NcDependencyList</code> as the data dependency.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucToolOffsetVariableLookup : INcDependency, IMakeXmlSource, IVariableLookup</code></pre>
<pre><code class="lang-csharp hljs">public sealed class FanucToolOffsetVariableLookup : IRuntimeVariableLookup, IMakeXmlSource</code></pre>
</div>
@ -129,9 +138,8 @@ up immediately in lookups via this adapter.
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a></div>
<div><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
<div><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IVariableLookup.html">IVariableLookup</a></div>
</dd>
</dl>
@ -151,9 +159,6 @@ up immediately in lookups via this adapter.
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
@ -203,7 +208,7 @@ up immediately in lookups via this adapter.
</h3>
<div class="markdown level1 summary"><p>Empty constructor for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a> deserialisation; <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.html#Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Table">Table</a> must be set explicitly.</p>
<div class="markdown level1 summary"><p>Default constructor.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -223,38 +228,6 @@ up immediately in lookups via this adapter.
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup__ctor_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup__ctor_Hi_NcParsers_Dependencys_Generic_ToolOffsetTable_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.#ctor(Hi.NcParsers.Dependencys.Generic.ToolOffsetTable)">
FanucToolOffsetVariableLookup(ToolOffsetTable)
</h3>
<div class="markdown level1 summary"><p>Wraps the given <code class="paramref">table</code> so it can serve Fanuc-style <code>#2001+</code> reads.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucToolOffsetVariableLookup(ToolOffsetTable table)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>table</code> <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup__ctor_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.#ctor(System.Xml.Linq.XElement)">
@ -262,7 +235,7 @@ up immediately in lookups via this adapter.
</h3>
<div class="markdown level1 summary"><p>Loads from XML produced by <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.html#Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>; <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.html#Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Table">Table</a> is rebound by the runner after deserialisation.</p>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.html#Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. Stateless — no fields to deserialise.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -357,38 +330,6 @@ up immediately in lookups via this adapter.
</h2>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Table_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.Table*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Table" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.Table">
Table
</h3>
<div class="markdown level1 summary"><p>Underlying brand-neutral tool offset storage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ToolOffsetTable Table { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_XName_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.XName*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_XName" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.XName">
@ -396,7 +337,7 @@ up immediately in lookups via this adapter.
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -427,24 +368,30 @@ up immediately in lookups via this adapter.
<a id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Get_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.Get*"></a>
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Get_System_String_" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.Get(System.String)">
Get(string)
<h3 id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Get_System_String_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_IReadOnlyList_Hi_NcParsers_Dependencys_INcDependency__" data-uid="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.Get(System.String,Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.IReadOnlyList{Hi.NcParsers.Dependencys.INcDependency})">
Get(string, LazyLinkedListNode&lt;SyntaxPiece&gt;, IReadOnlyList&lt;INcDependency&gt;)
</h3>
<div class="markdown level1 summary"><p>Returns the value of the variable identified by <code class="paramref">key</code>
(e.g. <code>&quot;#124&quot;</code>), or <code>null</code> if vacant or unknown to this lookup.</p>
in the context of <code class="paramref">node</code> and
<code class="paramref">dependencies</code>, or <code>null</code> if the key is outside
this lookup's range or the value is vacant.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public double? Get(string key)</code></pre>
<pre><code class="lang-csharp hljs">public double? Get(string key, LazyLinkedListNode&lt;SyntaxPiece&gt; node, IReadOnlyList&lt;INcDependency&gt; dependencies)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>node</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>dependencies</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>&gt;</dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
@ -459,10 +406,12 @@ up immediately in lookups via this adapter.
<h4 class="section" id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Get_System_String__remarks">Remarks</h4>
<h4 class="section" id="Hi_NcParsers_Dependencys_Fanuc_FanucToolOffsetVariableLookup_Get_System_String_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_IReadOnlyList_Hi_NcParsers_Dependencys_INcDependency___remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>Routes <code>#2001-#2200</code> to
<a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html#Hi_NcParsers_Dependencys_Generic_ToolOffsetTable_GetToolHeightOffset_mm_System_Int32_">GetToolHeightOffset_mm(int)</a>; other
keys return <code>null</code> so the evaluator's lookup chain falls through.</p>
<a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html#Hi_NcParsers_Dependencys_Generic_ToolOffsetTable_GetToolHeightOffset_mm_System_Int32_">GetToolHeightOffset_mm(int)</a> on the
<a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> found in <code class="paramref">dependencies</code>;
other keys return <code>null</code> so the evaluator's lookup chain falls
through.</p>
</div>

View File

@ -94,6 +94,43 @@
<h3 id="classes">
Classes
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html">FanucGotoIterationDependency</a></dt>
<dd><p>Watchdog for Fanuc Custom Macro B GOTO loops. Holds a
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> limit (XML-persisted user config —
the soft cap above which the upcoming
<code>FanucGotoSyntax</code> stops firing and emits a warning) plus a
runtime per-target hit counter (<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget">CountByTarget</a> — not
serialised, cleared at session start by
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_RunControlLines_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_MachiningProcs_MachiningSession_Hi_MachiningProcs_SessionProgress_System_Threading_CancellationToken_">RunControlLines(string, IEnumerable&lt;string&gt;, MachiningSession, SessionProgress, CancellationToken)</a>).</p>
<p>
The dependency is syntax-managed: <code>FanucGotoSyntax</code> reads the
limit, increments the counter, and decides whether to fire. There is
no host <code>Func</code> provider — the dep is placed in
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.html">Hi.NcParsers.Dependencys.Fanuc</a> rather than
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.html">Hi.NcParsers.Dependencys.SystemWired</a> because nothing outside the
syntax pipeline writes it; <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_Reset">Reset()</a> is a plain method call
the runner invokes, not a host-wired Func.
</p>
<p>
The counter key is <code>(FileName, TargetN)</code> where <code>FileName</code>
is the source-level file path of the block containing the GOTO (the
relative path form carried on <a class="xref" href="Hi.NcParsers.Sentence.html#Hi_NcParsers_Sentence_FilePath">FilePath</a> — same
form used by <code>IndexedFileLine</code> labels). Source-level keying means
multiple inline invocations of the same subprogram pool their counts
(they ARE the same source-code GOTO), while two different files with
their own N100 stay isolated (they ARE different jumps).
</p>
<p>
Default <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> is 1000 — a runaway-loop
guard, not a precise iteration budget. Legitimate macro loops
(multi-hole drill matrices, calibration sweeps) sit well below this;
truly infinite loops hit the limit fast. Projects with batch-style
macros that legitimately need higher counts can raise the value in
the project XML.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucParameterTable.html">FanucParameterTable</a></dt>
<dd><p>Fanuc controller parameter table.
@ -118,15 +155,24 @@ long-lived dependency object that owns this data.
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.html">FanucToolOffsetVariableLookup</a></dt>
<dd><p>Fanuc-side adapter that exposes a wrapped <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a>
as an <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IVariableLookup.html">IVariableLookup</a> following Fanuc Memory C tool offset
addressing: <code>#2001+N → effective height of offset N</code>
(resolved at call time from the dependency list) as an
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a> following Fanuc Memory C tool
offset addressing: <code>#2001+N → effective height of offset N</code>
(geometry wear).</p>
<p>
The underlying <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> stays brand-neutral —
Heidenhain / Siemens can use the same storage with different addressing
by registering their own adapter alongside the table. Holds a reference
to the table rather than owning data so writes through the table show
up immediately in lookups via this adapter.
by registering their own adapter alongside the table. Stateless: holds
no reference of its own and resolves the table from the per-call
<code>dependencies</code> list, so XML round-trip is trivial (an empty element).
</p>
<p>
Registered on a brand preset's
VariableEvaluatorSyntax.RuntimeVariableLookups, not on
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcDependencyList">NcDependencyList</a> — the wrapper owns no
long-lived data, only the Fanuc-style id addressing scheme. The
underlying <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> still lives in
<code>NcDependencyList</code> as the data dependency.
</p>
</dd>
</dl>

View File

@ -0,0 +1,322 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class CallStackUtil | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class CallStackUtil | HiAPI-C# 2025 ">
<meta name="description" content="Push / pop helpers for the per-block section. Both produce a fresh deep-cloned ready to stamp onto an inlined piece (push site) or onto an M99 return block (pop site); the caller is responsible for deep-cloning again if it distributes the same stamp across multiple pieces of an L-repetition. Pairs with at the Logic stage: explicit push / pop writes seed the section at frame boundaries, ModalCarry copies it forward to every block in between so each block is self-contained for cache-dump readers and downstream consumers (notably M99 P{seq} reading the top frame&#39;s ).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil" class="text-break">
Class CallStackUtil
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Push / pop helpers for the per-block <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> section.
Both produce a fresh deep-cloned <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a> ready to
stamp onto an inlined piece (push site) or onto an M99 return block
(pop site); the caller is responsible for deep-cloning again if it
distributes the same stamp across multiple pieces of an L-repetition.</p>
<p>
Pairs with <a class="xref" href="Hi.NcParsers.PostLogicSyntaxs.ModalCarrySyntax.html">ModalCarrySyntax</a> at the
Logic stage: explicit push / pop writes seed the section at frame
boundaries, ModalCarry copies it forward to every block in between
so each block is self-contained for cache-dump readers and downstream
consumers (notably M99 <code>P{seq}</code> reading the top frame's
<a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html#Hi_NcParsers_Keywords_CallFrame_CallerFilePath">CallerFilePath</a>).
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class CallStackUtil</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">CallStackUtil</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil_BuildPoppedCallStack_" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.BuildPoppedCallStack*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil_BuildPoppedCallStack_System_Text_Json_Nodes_JsonObject_" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.BuildPoppedCallStack(System.Text.Json.Nodes.JsonObject)">
BuildPoppedCallStack(JsonObject)
</h3>
<div class="markdown level1 summary"><p>Builds the post-pop <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> section to stamp onto
an M99 return block. Reads the M99 block's currently-carried
stack, deep-clones it, and drops the top frame. Returns
<code>null</code> when there was no frame to pop (M99 in main file with
no caller — the runner treats this as program-end via the implicit
fall-through; no stamp is needed).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static JsonObject BuildPoppedCallStack(JsonObject hostJson)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>hostJson</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd><p>The M99 block's JSON object (post-carry, before this pop runs).</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil_BuildPushedCallStack_" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.BuildPushedCallStack*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil_BuildPushedCallStack_System_Text_Json_Nodes_JsonObject_System_String_" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.BuildPushedCallStack(System.Text.Json.Nodes.JsonObject,System.String)">
BuildPushedCallStack(JsonObject, string)
</h3>
<div class="markdown level1 summary"><p>Builds the post-push <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> section to stamp onto
every inlined-body piece of a call. Reads the host block's current
stack (defaulting to empty when absent — main-frame caller),
deep-clones it, and appends a new <a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html">CallFrame</a> whose
<a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html#Hi_NcParsers_Keywords_CallFrame_CallerFilePath">CallerFilePath</a> records where the call
originated. The returned <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a> can be safely
deep-cloned by the caller for each piece in an L-repetition.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static JsonObject BuildPushedCallStack(JsonObject hostJson, string callerFilePath)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>hostJson</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd><p>The call-host block's JSON object.</p>
</dd>
<dt><code>callerFilePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Project-relative path of the host file (typically <a class="xref" href="Hi.NcParsers.Sentence.html#Hi_NcParsers_Sentence_FilePath">FilePath</a> on the host piece).</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil_GetTopCallerFilePath_" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.GetTopCallerFilePath*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_CallStackUtil_GetTopCallerFilePath_System_Text_Json_Nodes_JsonObject_" data-uid="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.GetTopCallerFilePath(System.Text.Json.Nodes.JsonObject)">
GetTopCallerFilePath(JsonObject)
</h3>
<div class="markdown level1 summary"><p>Returns the top frame's <a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html#Hi_NcParsers_Keywords_CallFrame_CallerFilePath">CallerFilePath</a>
from the given block's <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> section, or
<code>null</code> when the stack is empty or absent (block is in the
main frame).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string GetTopCallerFilePath(JsonObject hostJson)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>hostJson</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Interface IRuntimeVariableLookup | HiAPI-C# 2025 ">
<meta name="description" content="Stateless variable lookup that needs per-block runtime context — the current node (for traceback into runtime-state sections like MachineCoordinateState / ProgramXyz) and the dependency list (so the lookup can read from sibling dependencies without holding a static reference). Distinguished from : that one is for long-lived dependencies that already hold their own data (parameter tables, tool-offset wrappers, retained-variable tables) and need no block context. IRuntimeVariableLookup is for context-sensitive resolutions configured declaratively on . Implementations should be brand-specific (e.g. Fanuc #5001-#5043 position reads) and return null for keys outside their range so the evaluator&#39;s chain can fall through to the next lookup.">
<meta name="description" content="Stateless variable lookup that needs per-block runtime context — the current node (for traceback into runtime-state sections like MachineCoordinateState / ProgramXyz) and the dependency list (so the lookup can read from sibling dependencies without holding a static reference). Distinguished from : that one is for long-lived dependencies that already hold their own data (parameter tables, tool-offset wrappers, retained-variable tables) and need no block context. IRuntimeVariableLookup is for context-sensitive resolutions configured declaratively on . Implementations should be brand-specific (e.g. Fanuc #5001-#5043 position reads) and return null for keys outside their range so the evaluator&#39;s chain can fall through to the next lookup. Implementations are XML-serialised as part of &#39;s round-trip: each impl exposes a static XName, registers itself with , and implements . Since impls are stateless, the typical body is just an empty element carrying the type name; brand identity is restored by XFactory dispatch.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -115,11 +115,19 @@ Implementations should be brand-specific (e.g. Fanuc <code>#5001-#5043</code>
position reads) and return <code>null</code> for keys outside their range so
the evaluator's chain can fall through to the next lookup.
</p>
<p>
Implementations are XML-serialised as part of
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>'s round-trip: each impl exposes a
static <code>XName</code>, registers itself with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a>,
and implements <a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html#Hi_Common_XmlUtils_IMakeXmlSource_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. Since impls
are stateless, the typical body is just an empty element carrying the
type name; brand identity is restored by XFactory dispatch.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface IRuntimeVariableLookup</code></pre>
<pre><code class="lang-csharp hljs">public interface IRuntimeVariableLookup : IMakeXmlSource</code></pre>
</div>
@ -128,6 +136,13 @@ the evaluator's chain can fall through to the next lookup.
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html#Hi_Common_XmlUtils_IMakeXmlSource_MakeXmlSource_System_String_System_String_System_Boolean_">IMakeXmlSource.MakeXmlSource(string, string, bool)</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class LocalVariableLookup | HiAPI-C# 2025 ">
<meta name="description" content="Reads Fanuc-style local macro variables (#1-#33) from Vars.Local on the current JSON, walking until the entry is found. Self-gates the id range so the evaluator&#39;s chain can fall through to the next lookup for out-of-range keys. Stateless and dependency-free — instances are interchangeable.">
<meta name="description" content="Reads Fanuc-style local macro variables (#1-#33) from Vars.Local on the current JSON, falling back to the immediately previous block when they share the same id. Self-gates the id range so the evaluator&#39;s chain can fall through to the next lookup for out-of-range keys. Two-step lookup (mirrors ): the current block sees writes that stamped at inline time (the call-line argument bindings) and writes that applied on this block before the lookup runs; the previous block (frame-checked) supplies body-internal writes from the prior block in the same macro frame. Looking past the previous block is unnecessary because the reader carries forward block-by-block within a frame. Frame isolation via : a previous block whose frame id differs from the current block&#39;s is skipped — a macro body&#39;s body-internal locals are invisible to the caller after return, and the caller&#39;s main-frame locals are invisible inside the macro. M98/M198 subprogram inlining () deliberately does not stamp on its inlined blocks, so the callee inherits the caller&#39;s frame and sees the caller&#39;s locals — matching real Fanuc M98 semantics. Stateless and dependency-free — instances are interchangeable.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -99,18 +99,40 @@ Class LocalVariableLookup
<div class="markdown summary"><p>Reads Fanuc-style local macro variables (<code>#1-#33</code>) from
<code>Vars.Local</code> on the current <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> JSON,
walking <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Previous">Previous</a> until the entry
is found. Self-gates the id range so the evaluator's
falling back to the immediately previous block when they share the
same <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id. Self-gates the id range
so the evaluator's
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a> chain can
fall through to the next lookup for out-of-range keys.</p>
<p>
Two-step lookup (mirrors <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.html">VolatileVariableLookup</a>): the
current block sees writes that <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>
stamped at inline time (the call-line argument bindings) and writes
that <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a>
applied on this block before the lookup runs; the previous block
(frame-checked) supplies body-internal writes from the prior block in
the same macro frame. Looking past the previous block is unnecessary
because the reader carries forward block-by-block within a frame.
</p>
<p>
Frame isolation via <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a>: a previous
block whose frame id differs from the current block's is skipped —
a macro body's body-internal locals are invisible to the caller after
return, and the caller's main-frame locals are invisible inside the
macro. M98/M198 subprogram inlining
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>) deliberately
does <i>not</i> stamp <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> on its
inlined blocks, so the callee inherits the caller's frame and sees
the caller's locals — matching real Fanuc M98 semantics.
</p>
<p>
Stateless and dependency-free — instances are interchangeable.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class LocalVariableLookup : IRuntimeVariableLookup</code></pre>
<pre><code class="lang-csharp hljs">public class LocalVariableLookup : IRuntimeVariableLookup, IMakeXmlSource</code></pre>
</div>
@ -128,6 +150,7 @@ Stateless and dependency-free — instances are interchangeable.
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
@ -188,6 +211,69 @@ Stateless and dependency-free — instances are interchangeable.
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.#ctor">
LocalVariableLookup()
</h3>
<div class="markdown level1 summary"><p>Default constructor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public LocalVariableLookup()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.#ctor(System.Xml.Linq.XElement)">
LocalVariableLookup(XElement)
</h3>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. Stateless — no fields to deserialise.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public LocalVariableLookup(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
@ -254,6 +340,42 @@ Stateless and dependency-free — instances are interchangeable.
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
@ -302,6 +424,57 @@ this lookup's range or the value is vacant.</p>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_LocalVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class NcBinaryExpr | HiAPI-C# 2025 ">
<meta name="description" content="Binary arithmetic on two operands (+ - * / or MOD).">
<meta name="description" content="Binary operation on two operands. Covers arithmetic (+ - * / / MOD), comparison (EQ NE GT GE LT LE, yielding 1.0 / 0.0), and logical bitwise (AND OR XOR, operands truncated to ).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -97,7 +97,11 @@ Class NcBinaryExpr
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Binary arithmetic on two operands (<code>+ - * /</code> or <code>MOD</code>).</p>
<div class="markdown summary"><p>Binary operation on two operands. Covers arithmetic
(<code>+ - * /</code> / <code>MOD</code>), comparison
(<code>EQ NE GT GE LT LE</code>, yielding <code>1.0</code> / <code>0.0</code>), and
logical bitwise (<code>AND OR XOR</code>, operands truncated to
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>).</p>
</div>
<div class="markdown conceptual"></div>
@ -190,7 +194,11 @@ Class NcBinaryExpr
</h3>
<div class="markdown level1 summary"><p>Binary arithmetic on two operands (<code>+ - * /</code> or <code>MOD</code>).</p>
<div class="markdown level1 summary"><p>Binary operation on two operands. Covers arithmetic
(<code>+ - * /</code> / <code>MOD</code>), comparison
(<code>EQ NE GT GE LT LE</code>, yielding <code>1.0</code> / <code>0.0</code>), and
logical bitwise (<code>AND OR XOR</code>, operands truncated to
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>).</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -148,10 +148,35 @@ Enum NcBinaryOp
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Add"><code>Add = 0</code></dt>
<dd><p><code>a + b</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_And"><code>And = 11</code></dt>
<dd><p><code>a AND b</code> — bitwise AND on operands truncated to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>.
Non-finite or out-of-range operands surface <code>Arithmetic&ndash;MathError</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Divide"><code>Divide = 3</code></dt>
<dd><p><code>a / b</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Eq"><code>Eq = 5</code></dt>
<dd><p><code>a EQ b</code> — equal; yields <code>1.0</code> (true) or <code>0.0</code> (false).</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Ge"><code>Ge = 8</code></dt>
<dd><p><code>a GE b</code> — greater than or equal; yields <code>1.0</code> or <code>0.0</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Gt"><code>Gt = 7</code></dt>
<dd><p><code>a GT b</code> — greater than; yields <code>1.0</code> or <code>0.0</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Le"><code>Le = 10</code></dt>
<dd><p><code>a LE b</code> — less than or equal; yields <code>1.0</code> or <code>0.0</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Lt"><code>Lt = 9</code></dt>
<dd><p><code>a LT b</code> — less than; yields <code>1.0</code> or <code>0.0</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Mod"><code>Mod = 4</code></dt>
@ -160,10 +185,24 @@ Enum NcBinaryOp
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Multiply"><code>Multiply = 2</code></dt>
<dd><p><code>a * b</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Ne"><code>Ne = 6</code></dt>
<dd><p><code>a NE b</code> — not equal; yields <code>1.0</code> or <code>0.0</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Or"><code>Or = 12</code></dt>
<dd><p><code>a OR b</code> — bitwise OR on operands truncated to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>.
Non-finite or out-of-range operands surface <code>Arithmetic&ndash;MathError</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Subtract"><code>Subtract = 1</code></dt>
<dd><p><code>a - b</code>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcBinaryOp_Xor"><code>Xor = 13</code></dt>
<dd><p><code>a XOR b</code> — bitwise XOR on operands truncated to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>.
Non-finite or out-of-range operands surface <code>Arithmetic&ndash;MathError</code>.</p>
</dd>
</dl>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class NcExpressionEvaluator | HiAPI-C# 2025 ">
<meta name="description" content="Walks an AST and produces an . Resolves #nnn via an ; built-in function names are matched case-insensitively against a fixed table. Phase-1 supports: SIN COS TAN ASIN ACOS ATAN SQRT ABS ROUND FIX FUP LN EXP POW. Trigonometric arguments and results are in degrees, matching Fanuc Custom Macro B convention. Unknown function names surface as ; arity mismatches as ; division / MOD by zero and domain errors (e.g. SQRT[-1]) as ; vacant operands as .">
<meta name="description" content="Walks an AST and produces an . Resolves #nnn via an ; built-in function names are matched case-insensitively against a fixed table. Phase-1 supports: SIN COS TAN ASIN ACOS ATAN SQRT ABS ROUND FIX FUP LN EXP POW. Trigonometric arguments and results are in degrees, matching Fanuc Custom Macro B convention. Unknown function names surface as ; arity mismatches as ; division / MOD by zero and domain errors (e.g. SQRT[-1]) as ; vacant operands as . Numeric domain &amp;amp; type conventions. All values are IEEE 754 — there is no separate bool / int type at runtime. Comparison ops (EQ NE GT GE LT LE) yield 1.0 (true) or 0.0 (false), using strict double equality / ordering (NaN compares as IEEE specifies — NaN EQ NaN is 0.0). Logical ops (AND OR XOR) truncate each operand to a 64-bit signed integer ( then cast to ) before applying the bitwise operation; non-finite or out-of-range operands surface rather than silently wrapping. Truthiness at caller-side IF / WHILE gates is value != 0 — any non-zero value (bit, float, comparator result) is true.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -109,6 +109,20 @@ Fanuc Custom Macro B convention. Unknown function names surface as
errors (e.g. <code>SQRT[-1]</code>) as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpressionEvaluator.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcExpressionEvaluator_MathErrorCode">MathErrorCode</a>; vacant
operands as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpressionEvaluator.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcExpressionEvaluator_VacantErrorCode">VacantErrorCode</a>.
</p>
<p>
<b>Numeric domain &amp; type conventions.</b> All values are IEEE 754
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> — there is no separate bool / int type at runtime.
Comparison ops (<code>EQ NE GT GE LT LE</code>) yield <code>1.0</code> (true) or
<code>0.0</code> (false), using strict double equality / ordering (NaN
compares as IEEE specifies — <code>NaN EQ NaN</code> is <code>0.0</code>). Logical
ops (<code>AND OR XOR</code>) truncate each operand to a 64-bit signed
integer (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.math.truncate#system-math-truncate(system-double)">Truncate(double)</a> then cast to
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>) before applying the bitwise operation; non-finite
or out-of-range operands surface <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpressionEvaluator.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcExpressionEvaluator_MathErrorCode">MathErrorCode</a> rather
than silently wrapping. Truthiness at caller-side <code>IF / WHILE</code>
gates is <code>value != 0</code> — any non-zero value (bit, float, comparator
result) is true.
</p>
</div>
<div class="markdown conceptual"></div>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class NcExpressionParser | HiAPI-C# 2025 ">
<meta name="description" content="Recursive-descent parser for Fanuc Custom Macro B value expressions. Pure: takes a string, produces an AST. Performs no variable lookup and no evaluation. Grammar (highest precedence last): expr := term ((&#39;+&#39; | &#39;-&#39;) term)* term := factor ((&#39;*&#39; | &#39;/&#39; | &#39;MOD&#39;) factor)* factor := (&#39;+&#39; | &#39;-&#39;)? primary primary := number | &#39;#&#39; integer | &#39;#&#39; &#39;[&#39; expr &#39;]&#39; | &#39;[&#39; expr &#39;]&#39; | ident &#39;[&#39; arglist &#39;]&#39; (&#39;/&#39; &#39;[&#39; expr &#39;]&#39;)? arglist := expr (&#39;,&#39; expr)* Function names are case-insensitive (SIN = sin); whitespace is skipped between tokens. The &#39;/&#39; &#39;[&#39; expr &#39;]&#39; tail captures the dual-bracket form Fanuc uses for ATAN[a]/[b]; non-ATAN callers that happen to use it produce a function with an extra arg, which the evaluator rejects with an arity error.">
<meta name="description" content="Recursive-descent parser for Fanuc Custom Macro B value expressions. Pure: takes a string, produces an AST. Performs no variable lookup and no evaluation. Grammar (lowest precedence at top): expr := or-expr or-expr := and-expr ((&#39;OR&#39; | &#39;XOR&#39;) and-expr)* and-expr := cmp-expr (&#39;AND&#39; cmp-expr)* cmp-expr := add-expr ((&#39;EQ&#39; | &#39;NE&#39; | &#39;GT&#39; | &#39;GE&#39; | &#39;LT&#39; | &#39;LE&#39;) add-expr)* add-expr := term ((&#39;+&#39; | &#39;-&#39;) term)* term := factor ((&#39;*&#39; | &#39;/&#39; | &#39;MOD&#39;) factor)* factor := (&#39;+&#39; | &#39;-&#39;)? primary primary := number | &#39;#&#39; integer | &#39;#&#39; &#39;[&#39; expr &#39;]&#39; | &#39;[&#39; expr &#39;]&#39; | ident &#39;[&#39; arglist &#39;]&#39; (&#39;/&#39; &#39;[&#39; expr &#39;]&#39;)? arglist := expr (&#39;,&#39; expr)* Function names and keyword operators (MOD, EQ NE GT GE LT LE, AND OR XOR) are case-insensitive (SIN = sin, EQ = eq); each keyword requires a non-identifier character on its right boundary so EQ1 is not the EQ operator followed by 1. Whitespace is skipped between tokens. The &#39;/&#39; &#39;[&#39; expr &#39;]&#39; tail captures the dual-bracket form Fanuc uses for ATAN[a]/[b]; non-ATAN callers that happen to use it produce a function with an extra arg, which the evaluator rejects with an arity error. Operator precedence intentionally puts boolean / logical layers below arithmetic so #1 + 1 GT 0 parses as (#1 + 1) GT 0 and #1 GT 0 AND #2 LT 10 parses as (#1 GT 0) AND (#2 LT 10), matching the Fanuc Custom Macro B spec for IF [..] GOTO / IF [..] THEN / WHILE [..] DO conditions.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -100,22 +100,37 @@ Class NcExpressionParser
<div class="markdown summary"><p>Recursive-descent parser for Fanuc Custom Macro B value expressions.
Pure: takes a string, produces an <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpr.html">NcExpr</a> AST. Performs no
variable lookup and no evaluation.</p>
<p>Grammar (highest precedence last):</p>
<pre><code class="lang-csharp">expr := term (('+' | '-') term)*
term := factor (('*' | '/' | 'MOD') factor)*
factor := ('+' | '-')? primary
primary := number
| '#' integer
| '#' '[' expr ']'
| '[' expr ']'
| ident '[' arglist ']' ('/' '[' expr ']')?
arglist := expr (',' expr)*</code></pre>
<p>Grammar (lowest precedence at top):</p>
<pre><code class="lang-csharp">expr := or-expr
or-expr := and-expr (('OR' | 'XOR') and-expr)*
and-expr := cmp-expr ('AND' cmp-expr)*
cmp-expr := add-expr (('EQ' | 'NE' | 'GT' | 'GE' | 'LT' | 'LE') add-expr)*
add-expr := term (('+' | '-') term)*
term := factor (('*' | '/' | 'MOD') factor)*
factor := ('+' | '-')? primary
primary := number
| '#' integer
| '#' '[' expr ']'
| '[' expr ']'
| ident '[' arglist ']' ('/' '[' expr ']')?
arglist := expr (',' expr)*</code></pre>
<p>
Function names are case-insensitive (<code>SIN</code> = <code>sin</code>); whitespace
is skipped between tokens. The <code>'/' '[' expr ']'</code> tail captures the
dual-bracket form Fanuc uses for <code>ATAN[a]/[b]</code>; non-ATAN callers that
happen to use it produce a function with an extra arg, which the evaluator
rejects with an arity error.
Function names and keyword operators (<code>MOD</code>, <code>EQ NE GT GE LT LE</code>,
<code>AND OR XOR</code>) are case-insensitive (<code>SIN</code> = <code>sin</code>,
<code>EQ</code> = <code>eq</code>); each keyword requires a non-identifier character
on its right boundary so <code>EQ1</code> is not the <code>EQ</code> operator
followed by <code>1</code>. Whitespace is skipped between tokens. The
<code>'/' '[' expr ']'</code> tail captures the dual-bracket form Fanuc uses
for <code>ATAN[a]/[b]</code>; non-ATAN callers that happen to use it produce a
function with an extra arg, which the evaluator rejects with an arity
error.
</p>
<p>
Operator precedence intentionally puts boolean / logical layers below
arithmetic so <code>#1 + 1 GT 0</code> parses as <code>(#1 + 1) GT 0</code> and
<code>#1 GT 0 AND #2 LT 10</code> parses as <code>(#1 GT 0) AND (#2 LT 10)</code>,
matching the Fanuc Custom Macro B spec for <code>IF [..] GOTO</code> /
<code>IF [..] THEN</code> / <code>WHILE [..] DO</code> conditions.
</p>
</div>
<div class="markdown conceptual"></div>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class VolatileVariableLookup | HiAPI-C# 2025 ">
<meta name="description" content="Reads Fanuc-style non-retained common variables (#100-#499) from Vars.Volatile on the current JSON, walking until the entry is found. Self-gates the id range so the evaluator&#39;s chain can fall through to the next lookup for out-of-range keys. Stateless and dependency-free — instances are interchangeable. Reads use the same dict-merge carry that writes; the two stay decoupled (read side here; write side in the reader).">
<meta name="description" content="Reads Fanuc-style non-retained common variables (#100-#499) from Vars.Volatile. Self-gates the id range so the evaluator&#39;s chain can fall through to the next lookup for out-of-range keys. Single-step lookup: already dict-merges every block&#39;s Vars.Volatile into the next block, so the entry — if it exists — must be on the current block (when this lookup runs after the reader) or on the immediately previous block (when this lookup runs before the reader on the same block, which is the Fanuc preset&#39;s order — evaluator first, reader second). No arbitrary walk-back: such a walk would be defensive overkill given the reader&#39;s carry guarantee. Stateless and dependency-free — instances are interchangeable. Reads stay decoupled from the reader (read side here; write side in the reader).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -98,22 +98,29 @@ Class VolatileVariableLookup
</div>
<div class="markdown summary"><p>Reads Fanuc-style non-retained common variables (<code>#100-#499</code>)
from <code>Vars.Volatile</code> on the current <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>
JSON, walking <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Previous">Previous</a> until the
entry is found. Self-gates the id range so the evaluator's
from <code>Vars.Volatile</code>. Self-gates the id range so the evaluator's
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a> chain can
fall through to the next lookup for out-of-range keys.</p>
<p>
Stateless and dependency-free — instances are interchangeable.
Reads use the same dict-merge carry that
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> writes; the two stay
decoupled (read side here; write side in the reader).
Single-step lookup: <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> already
dict-merges every block's <code>Vars.Volatile</code> into the next block, so
the entry — if it exists — must be on the current block (when this
lookup runs after the reader) or on the immediately previous block
(when this lookup runs before the reader on the same block, which is
the Fanuc preset's order — evaluator first, reader second). No
arbitrary walk-back: such a walk would be defensive overkill given
the reader's carry guarantee.
</p>
<p>
Stateless and dependency-free — instances are interchangeable. Reads
stay decoupled from the reader (read side here; write side in the
reader).
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class VolatileVariableLookup : IRuntimeVariableLookup</code></pre>
<pre><code class="lang-csharp hljs">public class VolatileVariableLookup : IRuntimeVariableLookup, IMakeXmlSource</code></pre>
</div>
@ -131,6 +138,7 @@ decoupled (read side here; write side in the reader).
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
@ -191,6 +199,105 @@ decoupled (read side here; write side in the reader).
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.#ctor">
VolatileVariableLookup()
</h3>
<div class="markdown level1 summary"><p>Default constructor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public VolatileVariableLookup()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.#ctor(System.Xml.Linq.XElement)">
VolatileVariableLookup(XElement)
</h3>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. Stateless — no fields to deserialise.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public VolatileVariableLookup(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
@ -239,6 +346,57 @@ this lookup's range or the value is vacant.</p>
<a id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Evaluation_VolatileVariableLookup_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>

View File

@ -98,18 +98,44 @@ Classes
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.html">LocalVariableLookup</a></dt>
<dd><p>Reads Fanuc-style local macro variables (<code>#1-#33</code>) from
<code>Vars.Local</code> on the current <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> JSON,
walking <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Previous">Previous</a> until the entry
is found. Self-gates the id range so the evaluator's
falling back to the immediately previous block when they share the
same <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id. Self-gates the id range
so the evaluator's
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a> chain can
fall through to the next lookup for out-of-range keys.</p>
<p>
Two-step lookup (mirrors <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.html">VolatileVariableLookup</a>): the
current block sees writes that <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>
stamped at inline time (the call-line argument bindings) and writes
that <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a>
applied on this block before the lookup runs; the previous block
(frame-checked) supplies body-internal writes from the prior block in
the same macro frame. Looking past the previous block is unnecessary
because the reader carries forward block-by-block within a frame.
</p>
<p>
Frame isolation via <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a>: a previous
block whose frame id differs from the current block's is skipped —
a macro body's body-internal locals are invisible to the caller after
return, and the caller's main-frame locals are invisible inside the
macro. M98/M198 subprogram inlining
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>) deliberately
does <i>not</i> stamp <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> on its
inlined blocks, so the callee inherits the caller's frame and sees
the caller's locals — matching real Fanuc M98 semantics.
</p>
<p>
Stateless and dependency-free — instances are interchangeable.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcBinaryExpr.html">NcBinaryExpr</a></dt>
<dd><p>Binary arithmetic on two operands (<code>+ - * /</code> or <code>MOD</code>).</p>
<dd><p>Binary operation on two operands. Covers arithmetic
(<code>+ - * /</code> / <code>MOD</code>), comparison
(<code>EQ NE GT GE LT LE</code>, yielding <code>1.0</code> / <code>0.0</code>), and
logical bitwise (<code>AND OR XOR</code>, operands truncated to
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>).</p>
</dd>
</dl>
<dl class="jumplist">
@ -133,6 +159,20 @@ Fanuc Custom Macro B convention. Unknown function names surface as
errors (e.g. <code>SQRT[-1]</code>) as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpressionEvaluator.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcExpressionEvaluator_MathErrorCode">MathErrorCode</a>; vacant
operands as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpressionEvaluator.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcExpressionEvaluator_VacantErrorCode">VacantErrorCode</a>.
</p>
<p>
<b>Numeric domain &amp; type conventions.</b> All values are IEEE 754
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> — there is no separate bool / int type at runtime.
Comparison ops (<code>EQ NE GT GE LT LE</code>) yield <code>1.0</code> (true) or
<code>0.0</code> (false), using strict double equality / ordering (NaN
compares as IEEE specifies — <code>NaN EQ NaN</code> is <code>0.0</code>). Logical
ops (<code>AND OR XOR</code>) truncate each operand to a 64-bit signed
integer (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.math.truncate#system-math-truncate(system-double)">Truncate(double)</a> then cast to
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>) before applying the bitwise operation; non-finite
or out-of-range operands surface <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpressionEvaluator.html#Hi_NcParsers_EvaluationSyntaxs_Evaluation_NcExpressionEvaluator_MathErrorCode">MathErrorCode</a> rather
than silently wrapping. Truthiness at caller-side <code>IF / WHILE</code>
gates is <code>value != 0</code> — any non-zero value (bit, float, comparator
result) is true.
</p>
</dd>
</dl>
<dl class="jumplist">
@ -140,22 +180,37 @@ operands as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcEx
<dd><p>Recursive-descent parser for Fanuc Custom Macro B value expressions.
Pure: takes a string, produces an <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcExpr.html">NcExpr</a> AST. Performs no
variable lookup and no evaluation.</p>
<p>Grammar (highest precedence last):</p>
<pre><code class="lang-csharp">expr := term (('+' | '-') term)*
term := factor (('*' | '/' | 'MOD') factor)*
factor := ('+' | '-')? primary
primary := number
| '#' integer
| '#' '[' expr ']'
| '[' expr ']'
| ident '[' arglist ']' ('/' '[' expr ']')?
arglist := expr (',' expr)*</code></pre>
<p>Grammar (lowest precedence at top):</p>
<pre><code class="lang-csharp">expr := or-expr
or-expr := and-expr (('OR' | 'XOR') and-expr)*
and-expr := cmp-expr ('AND' cmp-expr)*
cmp-expr := add-expr (('EQ' | 'NE' | 'GT' | 'GE' | 'LT' | 'LE') add-expr)*
add-expr := term (('+' | '-') term)*
term := factor (('*' | '/' | 'MOD') factor)*
factor := ('+' | '-')? primary
primary := number
| '#' integer
| '#' '[' expr ']'
| '[' expr ']'
| ident '[' arglist ']' ('/' '[' expr ']')?
arglist := expr (',' expr)*</code></pre>
<p>
Function names are case-insensitive (<code>SIN</code> = <code>sin</code>); whitespace
is skipped between tokens. The <code>'/' '[' expr ']'</code> tail captures the
dual-bracket form Fanuc uses for <code>ATAN[a]/[b]</code>; non-ATAN callers that
happen to use it produce a function with an extra arg, which the evaluator
rejects with an arity error.
Function names and keyword operators (<code>MOD</code>, <code>EQ NE GT GE LT LE</code>,
<code>AND OR XOR</code>) are case-insensitive (<code>SIN</code> = <code>sin</code>,
<code>EQ</code> = <code>eq</code>); each keyword requires a non-identifier character
on its right boundary so <code>EQ1</code> is not the <code>EQ</code> operator
followed by <code>1</code>. Whitespace is skipped between tokens. The
<code>'/' '[' expr ']'</code> tail captures the dual-bracket form Fanuc uses
for <code>ATAN[a]/[b]</code>; non-ATAN callers that happen to use it produce a
function with an extra arg, which the evaluator rejects with an arity
error.
</p>
<p>
Operator precedence intentionally puts boolean / logical layers below
arithmetic so <code>#1 + 1 GT 0</code> parses as <code>(#1 + 1) GT 0</code> and
<code>#1 GT 0 AND #2 LT 10</code> parses as <code>(#1 GT 0) AND (#2 LT 10)</code>,
matching the Fanuc Custom Macro B spec for <code>IF [..] GOTO</code> /
<code>IF [..] THEN</code> / <code>WHILE [..] DO</code> conditions.
</p>
</dd>
</dl>
@ -191,16 +246,23 @@ is then <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.NcIndire
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.VolatileVariableLookup.html">VolatileVariableLookup</a></dt>
<dd><p>Reads Fanuc-style non-retained common variables (<code>#100-#499</code>)
from <code>Vars.Volatile</code> on the current <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>
JSON, walking <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Previous">Previous</a> until the
entry is found. Self-gates the id range so the evaluator's
from <code>Vars.Volatile</code>. Self-gates the id range so the evaluator's
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a> chain can
fall through to the next lookup for out-of-range keys.</p>
<p>
Stateless and dependency-free — instances are interchangeable.
Reads use the same dict-merge carry that
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> writes; the two stay
decoupled (read side here; write side in the reader).
Single-step lookup: <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> already
dict-merges every block's <code>Vars.Volatile</code> into the next block, so
the entry — if it exists — must be on the current block (when this
lookup runs after the reader) or on the immediately previous block
(when this lookup runs before the reader on the same block, which is
the Fanuc preset's order — evaluator first, reader second). No
arbitrary walk-back: such a walk would be defensive overkill given
the reader's carry guarantee.
</p>
<p>
Stateless and dependency-free — instances are interchangeable. Reads
stay decoupled from the reader (read side here; write side in the
reader).
</p>
</dd>
</dl>
@ -237,6 +299,14 @@ Implementations should be brand-specific (e.g. Fanuc <code>#5001-#5043</code>
position reads) and return <code>null</code> for keys outside their range so
the evaluator's chain can fall through to the next lookup.
</p>
<p>
Implementations are XML-serialised as part of
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>'s round-trip: each impl exposes a
static <code>XName</code>, registers itself with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a>,
and implements <a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html#Hi_Common_XmlUtils_IMakeXmlSource_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. Since impls
are stateless, the typical body is just an empty element carrying the
type name; brand identity is restored by XFactory dispatch.
</p>
</dd>
</dl>
<dl class="jumplist">

View File

@ -0,0 +1,526 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucGotoSyntax | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucGotoSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Resolves Fanuc Custom Macro B GOTO control flow. Triggered by Parsing.FanucGoto (written by ); decides whether to fire, and on fire calls on layers[0] with the re-segmented file content starting at the matching N{target} label. The host block stays materialised (so cache dumps still see the GOTO call site); execution naturally continues from the new source once the pipeline pulls the next block. Both unconditional GOTO &amp;lt;n&amp;gt; and conditional IF [&amp;lt;expr&amp;gt;] GOTO &amp;lt;n&amp;gt; are implemented. The conditional form leans on &#39;s pass-2 tree walk to substitute Parsing.FanucGoto.Condition with a numeric when the expression evaluates successfully — then reads the node polymorphically. Truthy non-zero fires the redirect; zero falls through silently; a still-string (unresolved) Condition emits FanucGoto--ConditionNotEvaluated and falls through. Pipeline placement: tail of the Fanuc / Mazak / Syntec Evaluation bundle. Must run after so any #&amp;lt;var&amp;gt; in the target N (e.g. GOTO #1) has been substituted to a literal in Parsing.FanucGoto.N. Reader syntaxes ( etc.) are independent — they touch Parsing.Assignments, not Parsing.FanucGoto. Label scanning uses two hosted helper syntaxes — CommentSyntax and IndexSyntax — applied to each candidate block in turn so the predicate IndexNote.Number == target matches the same way the Parsing bundle would. Both are XML-IO-able so API customers can swap them (e.g. for a controller variant using ;-style comments or a different head symbol). Defaults match Fanuc: and with the &quot;N&quot; symbol.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax" class="text-break">
Class FanucGotoSyntax
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Resolves Fanuc Custom Macro B GOTO control flow.
Triggered by <code>Parsing.FanucGoto</code> (written by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucGotoParsingSyntax.html">FanucGotoParsingSyntax</a>); decides whether
to fire, and on fire calls
<a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a> on <code>layers[0]</code> with
the re-segmented file content starting at the matching <code>N{target}</code>
label. The host block stays materialised (so cache dumps still see the
GOTO call site); execution naturally continues from the new source
once the pipeline pulls the next block.</p>
<p>
Both unconditional <code>GOTO &lt;n&gt;</code> and conditional
<code>IF [&lt;expr&gt;] GOTO &lt;n&gt;</code> are implemented. The conditional
form leans on <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>'s pass-2 tree walk
to substitute <code>Parsing.FanucGoto.Condition</code> with a numeric
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a> when the expression
evaluates successfully — <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonnode">ReadCondition(JsonNode)</a> then reads the
node polymorphically. Truthy non-zero fires the redirect; zero falls
through silently; a still-string (unresolved) Condition emits
<code>FanucGoto--ConditionNotEvaluated</code> and falls through.
</p>
<p>
Pipeline placement: tail of the Fanuc / Mazak / Syntec Evaluation
bundle. Must run after <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> so any
<code>#&lt;var&gt;</code> in the target N (e.g. <code>GOTO #1</code>) has been
substituted to a literal in <code>Parsing.FanucGoto.N</code>. Reader syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> etc.) are independent —
they touch <code>Parsing.Assignments</code>, not <code>Parsing.FanucGoto</code>.
</p>
<p>
Label scanning uses two hosted helper syntaxes —
CommentSyntax and IndexSyntax — applied to
each candidate block in turn so the predicate
<code>IndexNote.Number == target</code> matches the same way the Parsing
bundle would. Both are XML-IO-able so API customers can swap them
(e.g. for a controller variant using <code>;</code>-style comments or a
different head symbol). Defaults match Fanuc: <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.QuoteCommentSyntax.html">QuoteCommentSyntax</a>
and <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.HeadIndexSyntax.html">HeadIndexSyntax</a> with the <code>"N"</code> symbol.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucGotoSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucGotoSyntax</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a></div>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.#ctor">
FanucGotoSyntax()
</h3>
<div class="markdown level1 summary"><p>Parameterless instance with default helper syntaxes.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucGotoSyntax()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax__ctor_System_Xml_Linq_XElement_System_String_System_IProgress_System_Object__" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.#ctor(System.Xml.Linq.XElement,System.String,System.IProgress{System.Object})">
FanucGotoSyntax(XElement, string, IProgress&lt;object&gt;)
</h3>
<div class="markdown level1 summary"><p>Loads hosted helper syntaxes from XML produced by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. The <code>&lt;LabelProbeSyntaxes&gt;</code>
wrapper contains one child element per probe syntax in source
order; an absent wrapper falls back to the default list.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucGotoSyntax(XElement src, string baseDirectory, IProgress&lt;object&gt; progress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>Root element named <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_XName">XName</a>.</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Project base directory propagated to child <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a> calls.</p>
</dd>
<dt><code>progress</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>Diagnostic sink propagated to child factories.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_LabelProbeSyntaxes_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.LabelProbeSyntaxes*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_LabelProbeSyntaxes" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.LabelProbeSyntaxes">
LabelProbeSyntaxes
</h3>
<div class="markdown level1 summary"><p>Ordered list of helper syntaxes run on each candidate block during
the label scan before the <code>IndexNote.Number == target</code>
predicate is checked. The defaults match Fanuc — <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.QuoteCommentSyntax.html">QuoteCommentSyntax</a>
strips parenthesised comments so a commented-out <code>(N100)</code> never
matches, then <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.HeadIndexSyntax.html">HeadIndexSyntax</a> with symbol <code>&ldquo;N&rdquo;</code>
extracts the head index into <code>IndexNote.Number</code>.</p>
<p>
Exposed as a list (rather than two fixed properties) so API
customers can insert additional probe syntaxes — for example a
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.TailCommentSyntax.html">TailCommentSyntax</a> for <code>;</code>-style end-of-block
comments alongside the parenthesised form, or a
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.BlockSkipSyntax.html">BlockSkipSyntax</a> to skip <code>/</code>-prefixed blocks
from the label-scan results. Order matters: comment-strippers
before the head-index parser, the index parser last (so its output
reflects the post-strip text).
</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public List&lt;ISituNcSyntax&gt; LabelProbeSyntaxes { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.Name">
Name
</h3>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name used to register this syntax with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.Build*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
Build(LazyLinkedListNode&lt;SyntaxPiece&gt;, List&lt;INcDependency&gt;, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Build syntax arrangement into the
<code class="paramref">syntaxPieceNode</code> in-place.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Build(LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, List&lt;INcDependency&gt; ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>syntaxPieceNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>ncDependencyList</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,473 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucIfThenSyntax | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucIfThenSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Resolves Fanuc Custom Macro B IF [&amp;lt;cond&amp;gt;] THEN &amp;lt;body&amp;gt; single-block conditionals. Triggered by Parsing.FanucIfThen (written by ); reads the now-resolved node, decides whether to fire, and on fire lifts the parsing-stage PendingAssignments sub-object into the canonical Parsing.Assignments bucket so the brand-specific reader syntaxes downstream route each entry to its store the same way they would handle an unconditional #nnn = &amp;lt;literal&amp;gt; on a normal block. Unlike there is no source splice, no label scan, no iteration watchdog — the spec restricts the body to the current block. The host block is preserved either way (the stamped FanucIfThen section on the host&#39;s top-level JSON keeps the IF-THEN call site visible to cache dumps and diagnostics, with flipped true only on a successful fire). Pipeline placement: in the Evaluation bundle after (so the Condition expression has been substituted in place by pass-2 tree walk, and each PendingAssignments RHS string has been evaluated to a numeric ) and before the reader syntaxes (, , , ) — that ordering lets the lifted entries reach the readers as if they had been written by on a normal block. Three condition outcomes mirror the shape: Truthy non-zero → lift assignments, stamp Applied=true.Truthy zero → fall through silently, Applied=false.Truthy null (evaluator failed, condition still a string or non-finite) → warn FanucIfThen--ConditionNotEvaluated, do not lift, Applied=false. A truthy condition with no PendingAssignments (body did not parse as one or more assignments — e.g. a G-code body, currently unsupported) warns FanucIfThen--UnsupportedBody and falls through.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax" class="text-break">
Class FanucIfThenSyntax
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Resolves Fanuc Custom Macro B <code>IF [&lt;cond&gt;] THEN &lt;body&gt;</code>
single-block conditionals. Triggered by <code>Parsing.FanucIfThen</code>
(written by <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucIfThenParsingSyntax.html">FanucIfThenParsingSyntax</a>);
reads the now-resolved <a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Condition">Condition</a> node, decides
whether to fire, and on fire lifts the parsing-stage
<code>PendingAssignments</code> sub-object into the canonical
<code>Parsing.Assignments</code> bucket so the brand-specific reader syntaxes
downstream route each entry to its store the same way they would handle
an unconditional <code>#nnn = &lt;literal&gt;</code> on a normal block.</p>
<p>
Unlike <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> there is no source splice, no
label scan, no iteration watchdog — the spec restricts the body to the
current block. The host block is preserved either way (the stamped
<code>FanucIfThen</code> section on the host's top-level JSON keeps the
IF-THEN call site visible to cache dumps and diagnostics, with
<a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Applied">Applied</a> flipped true only on a successful
fire).
</p>
<p>
Pipeline placement: in the Evaluation bundle <b>after</b>
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> (so the Condition expression has
been substituted in place by pass-2 tree walk, and each
<code>PendingAssignments</code> RHS string has been evaluated to a numeric
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a>) and <b>before</b> the reader syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>) — that ordering lets
the lifted entries reach the readers as if they had been written by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.TagAssignmentSyntax.html">TagAssignmentSyntax</a> on a normal block.
</p>
<p>
Three condition outcomes mirror the
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonnode">ReadCondition(JsonNode)</a> shape:
<ul><li>Truthy non-zero → lift assignments, stamp Applied=true.</li><li>Truthy zero → fall through silently, Applied=false.</li><li>Truthy null (evaluator failed, condition still a string or
non-finite) → warn <code>FanucIfThen--ConditionNotEvaluated</code>, do not
lift, Applied=false.</li></ul>
A truthy condition with no PendingAssignments (body did not parse as
one or more assignments — e.g. a G-code body, currently unsupported)
warns <code>FanucIfThen--UnsupportedBody</code> and falls through.
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucIfThenSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucIfThenSyntax</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a></div>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.#ctor">
FanucIfThenSyntax()
</h3>
<div class="markdown level1 summary"><p>Parameterless instance (no XML state).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucIfThenSyntax()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.#ctor(System.Xml.Linq.XElement)">
FanucIfThenSyntax(XElement)
</h3>
<div class="markdown level1 summary"><p>XML ctor (no child elements; reserved for forward compatibility).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucIfThenSyntax(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>Root element named <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_XName">XName</a>.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.Name">
Name
</h3>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name used to register this syntax with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.Build*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
Build(LazyLinkedListNode&lt;SyntaxPiece&gt;, List&lt;INcDependency&gt;, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Build syntax arrangement into the
<code class="paramref">syntaxPieceNode</code> in-place.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Build(LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, List&lt;INcDependency&gt; ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>syntaxPieceNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>ncDependencyList</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucIfThenSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,531 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucLocalVariableReadingSyntax | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucLocalVariableReadingSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Routes literal-RHS assignments to Fanuc-style local macro variables (#1-#33) from Parsing.Assignments into Vars.Local on the current block, carrying the previous block&#39;s Vars.Local dict forward when both blocks share the same id. Mirrors for the #100-#499 range, with two differences: Carry is gated by equality, so a caller block after a G65 return does not inherit the macro body&#39;s final locals.Writes outside a macro frame (a main-program block doing #11 = 5) emit LocalVariable--MainFrameWriteUnsupported and consume the assignment without persisting — real Fanuc allows main-frame local writes but this simulator only tracks locals inside G65/G66 call frames; surfacing the gap as a diagnostic is more informative than a silent hit. Pipeline placement: Evaluation bundle, after (so any expression RHS such as #11 = #1 + 1 has already been normalised to a literal by the time this reader runs) and after the other range readers (, ) so they all share a similar Reader-stage shape. Only literal numeric RHS values are consumed here; non-literal entries (which can only persist if failed to resolve them) are left untouched and surface via the evaluator&#39;s own VariableExpression--Unevaluated diagnostic plus .">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax" class="text-break">
Class FanucLocalVariableReadingSyntax
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Routes literal-RHS assignments to Fanuc-style local macro variables
(<code>#1-#33</code>) from <code>Parsing.Assignments</code> into <code>Vars.Local</code>
on the current block, carrying the previous block's <code>Vars.Local</code>
dict forward when both blocks share the same
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id. Mirrors
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> for the
<code>#100-#499</code> range, with two differences:</p>
<ul><li>Carry is gated by <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> equality, so a
caller block after a G65 return does not inherit the macro body's
final locals.</li><li>Writes outside a macro frame (a main-program block doing
<code>#11 = 5</code>) emit
<code>LocalVariable--MainFrameWriteUnsupported</code> and consume the
assignment without persisting — real Fanuc allows main-frame local
writes but this simulator only tracks locals inside G65/G66 call
frames; surfacing the gap as a diagnostic is more informative than
a silent
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> hit.</li></ul>
<p>
Pipeline placement: Evaluation bundle, after
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> (so any expression RHS such as
<code>#11 = #1 + 1</code> has already been normalised to a literal by the
time this reader runs) and after the other range readers
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>) so they all share a
similar Reader-stage shape.
</p>
<p>
Only literal numeric RHS values are consumed here; non-literal
entries (which can only persist if
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> failed to resolve them) are
left untouched and surface via the evaluator's own
<code>VariableExpression--Unevaluated</code> diagnostic plus
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a>.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucLocalVariableReadingSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucLocalVariableReadingSyntax</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a></div>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.#ctor">
FanucLocalVariableReadingSyntax()
</h3>
<div class="markdown level1 summary"><p>Default constructor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucLocalVariableReadingSyntax()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.#ctor(System.Xml.Linq.XElement)">
FanucLocalVariableReadingSyntax(XElement)
</h3>
<div class="markdown level1 summary"><p>Loads from XML produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>; no state.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucLocalVariableReadingSyntax(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_LocalMax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.LocalMax">
LocalMax
</h3>
<div class="markdown level1 summary"><p>Inclusive upper bound of the local range (<code>#33</code>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const int LocalMax = 33</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_LocalMin" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.LocalMin">
LocalMin
</h3>
<div class="markdown level1 summary"><p>Inclusive lower bound of the local range (<code>#1</code>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const int LocalMin = 1</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.Name">
Name
</h3>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.Build*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
Build(LazyLinkedListNode&lt;SyntaxPiece&gt;, List&lt;INcDependency&gt;, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Build syntax arrangement into the
<code class="paramref">syntaxPieceNode</code> in-place.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Build(LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, List&lt;INcDependency&gt; ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>syntaxPieceNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>ncDependencyList</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucLocalVariableReadingSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,223 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucMacroArgumentMap | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucMacroArgumentMap | HiAPI-C# 2025 ">
<meta name="description" content="Fanuc Custom Macro B Type-I argument-letter map: which call-line letter binds to which Vars.Local id (#1-#26) inside the macro body. Reserved letters (G, L, N, O, P) are absent — they are consumed by the call itself, not passed through. Used by (G65, one-shot) and (G66, modal) to translate the argument letters captured by / into the #nnn bindings the macro body&#39;s expression evaluator can read.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroArgumentMap" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap" class="text-break">
Class FanucMacroArgumentMap
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Fanuc Custom Macro B Type-I argument-letter map: which call-line letter
binds to which <code>Vars.Local</code> id (<code>#1-#26</code>) inside the macro body.
Reserved letters (<code>G</code>, <code>L</code>, <code>N</code>, <code>O</code>, <code>P</code>) are
absent — they are consumed by the call itself, not passed through.</p>
<p>
Used by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (G65, one-shot) and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a> (G66, modal) to translate the
argument letters captured by <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G65Syntax">G65Syntax</a>
/ <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G66Syntax">G66Syntax</a> into the
<code>#nnn</code> bindings the macro body's expression evaluator can read.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class FanucMacroArgumentMap</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucMacroArgumentMap</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroArgumentMap_Map" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.Map">
Map
</h3>
<div class="markdown level1 summary"><p>Fanuc Custom Macro B Type-I letter-to-local-id map. Single-value
per letter; Type-II's repeating <code>I_J_K_</code> array binding is not
modelled here.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly IReadOnlyDictionary&lt;string, int&gt; Map</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,487 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucMacroCallSyntax | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucMacroCallSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Inlines a Fanuc Custom Macro B one-shot call (G65 P_ L_ [letter value …]) into the source layer and binds the call-line argument letters to Vars.Local #1-#26 per the Type-I map (see ). Every inlined block carries the binding dict, a clone of the diagnostic record, and a id stamp — so LocalVariableLookup resolves arg references in a single-block lookup, a cache dump landing on any block immediately shows which call it belongs to, and downstream carries body-internal #1-#33 writes forward only within the same frame. The host block itself records but stays in the caller&#39;s frame (no stamp) and emits no motion act; after the macro body&#39;s last inlined block the pipeline continues naturally into the caller&#39;s next block (the inlined pieces sit ahead of the host block&#39;s successor in layers[0]). Frame isolation works on two layers. Statically, caller blocks have no stamp (frame id 0 by ), so the inlined frame ids (allocated fresh per L-repetition) never collide with main. Dynamically, LocalVariableLookup and compare frame ids before carrying any Vars.Local entry across a block boundary — a macro body&#39;s body-internal writes therefore stay inside the macro and never leak back into the caller&#39;s frame. Filename lookup mirrors : O{P:D4}.NC, O{P}.NC, O{P:D4}, O{P}, {P:D4}.NC, {P}.NC — first match wins. The lookup root is (G65 has no &quot;external storage&quot; variant; M198&#39;s external root is M98/M198-only). L &amp;gt; 1 inlines the same macro L times in series. Each repetition is a fresh segmentation pass (so each block gets its own JSON object — the downstream pipeline mutates JSON in place and would clobber sibling repetitions if instances were shared) and gets a fresh FileIndex (so (FileIndex, LineIndex) pairs stay unique across the L-copies of the same source lines). Pipeline placement: ahead of inside the Fanuc Evaluation so a hypothetical G65 P_ + M98 P_ on the same block expands the G65 macro first (would be an unusual but legal composition). Detection is on the Parsing.G65 sub-object written by (a ) — the keyword &quot;G65&quot; never reaches Parsing.Flags because the parameterized match has already consumed the text by the time runs.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax" class="text-break">
Class FanucMacroCallSyntax
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Inlines a Fanuc Custom Macro B one-shot call (<code>G65 P_ L_ [letter
value …]</code>) into the source layer and binds the call-line argument
letters to <code>Vars.Local</code> <code>#1-#26</code> per the Type-I map (see
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>). Every inlined block carries the
binding dict, a clone of the <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> diagnostic
record, and a <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id stamp — so
LocalVariableLookup resolves arg references in a
single-block lookup, a cache dump landing on any block immediately
shows which call it belongs to, and downstream
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> carries body-internal
<code>#1-#33</code> writes forward only within the same frame. The host
block itself records <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> but stays in the
caller's frame (no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp) and emits no
motion act; after the macro body's last inlined block the pipeline
continues naturally into the caller's next block (the inlined pieces
sit ahead of the host block's successor in <code>layers[0]</code>).</p>
<p>
Frame isolation works on two layers. Statically, caller blocks
have no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp (frame id 0 by
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html#Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_">Get(JsonObject)</a>), so the inlined frame ids (allocated
fresh per <code>L</code>-repetition) never collide with main. Dynamically,
LocalVariableLookup and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> compare frame ids
before carrying any <code>Vars.Local</code> entry across a block boundary
— a macro body's body-internal writes therefore stay inside the
macro and never leak back into the caller's frame.
</p>
<p>
Filename lookup mirrors <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>:
<code>O{P:D4}.NC</code>, <code>O{P}.NC</code>, <code>O{P:D4}</code>, <code>O{P}</code>,
<code>{P:D4}.NC</code>, <code>{P}.NC</code> — first match wins. The lookup root
is <a class="xref" href="Hi.NcParsers.Dependencys.Generic.SubProgramFolderConfig.html#Hi_NcParsers_Dependencys_Generic_SubProgramFolderConfig_InternalFolder">InternalFolder</a> (G65 has no
"external storage" variant; M198's external root is M98/M198-only).
</p>
<p>
<code>L &gt; 1</code> inlines the same macro <code>L</code> times in series. Each
repetition is a fresh segmentation pass (so each block gets its own
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> JSON object — the downstream pipeline
mutates JSON in place and would clobber sibling repetitions if
instances were shared) and gets a fresh <code>FileIndex</code> (so
<code>(FileIndex, LineIndex)</code> pairs stay unique across the
<code>L</code>-copies of the same source lines).
</p>
<p>
Pipeline placement: ahead of <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> inside
the Fanuc <code>Evaluation</code> <a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a>
so a hypothetical <code>G65 P_</code> + <code>M98 P_</code> on the same block
expands the G65 macro first (would be an unusual but legal
composition). Detection is on the <code>Parsing.G65</code> sub-object
written by <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G65Syntax">G65Syntax</a>
(a <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.ParameterizedFlagSyntax.html">ParameterizedFlagSyntax</a>) — the
keyword <code>"G65"</code> never reaches <code>Parsing.Flags</code> because the
parameterized match has already consumed the text by the time
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.NumberedFlagSyntax.html">NumberedFlagSyntax</a> runs.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucMacroCallSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucMacroCallSyntax</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a></div>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.#ctor">
FanucMacroCallSyntax()
</h3>
<div class="markdown level1 summary"><p>Parameterless instance for bundle composition (no XML state).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucMacroCallSyntax()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.#ctor(System.Xml.Linq.XElement)">
FanucMacroCallSyntax(XElement)
</h3>
<div class="markdown level1 summary"><p>XML ctor (no child elements; reserved for forward compatibility).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucMacroCallSyntax(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>Root element named <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_XName">XName</a>.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.Name">
Name
</h3>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name used to register this syntax with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.Build*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
Build(LazyLinkedListNode&lt;SyntaxPiece&gt;, List&lt;INcDependency&gt;, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Build syntax arrangement into the
<code class="paramref">syntaxPieceNode</code> in-place.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Build(LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, List&lt;INcDependency&gt; ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>syntaxPieceNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>ncDependencyList</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucMacroCallSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,191 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Enum FanucModalMacroSyntax.SyntaxPhase | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Enum FanucModalMacroSyntax.SyntaxPhase | HiAPI-C# 2025 ">
<meta name="description" content="Identifies which pipeline phase the instance runs in. The two values correspond to the Evaluation-bundle and PostLogic-bundle registrations of this same syntax class.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase" class="text-break">
Enum FanucModalMacroSyntax.SyntaxPhase
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Identifies which pipeline phase the instance runs in. The two
values correspond to the Evaluation-bundle and PostLogic-bundle
registrations of this same syntax class.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public enum FanucModalMacroSyntax.SyntaxPhase</code></pre>
</div>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.MaskUtil.html#Hi_Common_MaskUtil_GetMaskedValue__1___0___0_System_Boolean_">MaskUtil.GetMaskedValue&lt;T&gt;(T, T, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Common.MaskUtil.html#Hi_Common_MaskUtil_SetMask__1___0____0_System_Boolean_">MaskUtil.SetMask&lt;T&gt;(ref T, T, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 id="fields">Fields
</h2>
<dl class="parameters">
<dt id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Expansion"><code>Expansion = 1</code></dt>
<dd><p>PostLogic phase: on every motion-producing block (signalled
by <a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> presence) that sits inside an
active <code>G66</code> modal AND lives in the main frame
(<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> == 0), inlines the modal macro
body — same call mechanism as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>.</p>
</dd>
<dt id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup"><code>Setup = 0</code></dt>
<dd><p>Evaluation phase: captures <code>G66</code> setup / <code>G67</code>
cancel edges into <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a> and carries
the section forward block-to-block.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,547 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucModalMacroSyntax | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucModalMacroSyntax | HiAPI-C# 2025 ">
<meta name="description" content="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 — once in the Evaluation bundle (, captures G66/G67 edges and carries the state block-to-block) and once in the PostLogic bundle (, on every motion block within an active G66 modal, inlines the macro body via the same mechanism uses). Keeping both phases in one class makes the pairing visually explicit: readers see &quot;G66 in one file&quot; and the two methods (DoSetup, DoExpansion) make the lifecycle obvious. The two factory helpers (, ) mirror the ModalCarrySyntax.Logic / .PostLogic pattern already in the codebase.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax" class="text-break">
Class FanucModalMacroSyntax
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Handles Fanuc Custom Macro B modal-call lifecycle (<code>G66</code> setup,
<code>G67</code> cancel, and per-motion-block implicit macro invocation).
The same class is registered twice in the pipeline via
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Phase">Phase</a> — once in the Evaluation bundle
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup">Setup</a>, captures G66/G67 edges and carries
the <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a> state block-to-block) and once in
the PostLogic bundle (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Expansion">Expansion</a>, on every
motion block within an active G66 modal, inlines the macro body via
the same mechanism <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> uses).</p>
<p>
Keeping both phases in one class makes the pairing visually explicit:
readers see "G66 in one file" and the two methods (<code>DoSetup</code>,
<code>DoExpansion</code>) make the lifecycle obvious. The two factory
helpers (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Setup">Setup</a>, <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Expansion">Expansion</a>) mirror the
<code>ModalCarrySyntax.Logic</code> / <code>.PostLogic</code> pattern already in
the codebase.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucModalMacroSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucModalMacroSyntax</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a></div>
<div><a class="xref" href="Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a></div>
<div><a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.#ctor">
FanucModalMacroSyntax()
</h3>
<div class="markdown level1 summary"><p>Parameterless instance (defaults to <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup">Setup</a>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucModalMacroSyntax()</code></pre>
</div>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.#ctor(System.Xml.Linq.XElement)">
FanucModalMacroSyntax(XElement)
</h3>
<div class="markdown level1 summary"><p>XML ctor. Reads <code>&lt;Phase&gt;</code> child element; legacy
project files without it default to <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup">Setup</a>
(the pre-expansion behaviour).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucModalMacroSyntax(XElement src)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>Root element named <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_XName">XName</a>.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Expansion_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Expansion*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Expansion" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Expansion">
Expansion
</h3>
<div class="markdown level1 summary"><p>Factory: PostLogic-bundle instance that performs implicit motion-block expansion.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FanucModalMacroSyntax Expansion { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Name">
Name
</h3>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Phase_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Phase*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Phase" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Phase">
Phase
</h3>
<div class="markdown level1 summary"><p>Pipeline phase this instance runs in. Defaults to <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup">Setup</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public FanucModalMacroSyntax.SyntaxPhase Phase { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html">SyntaxPhase</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Setup_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Setup*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Setup" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Setup">
Setup
</h3>
<div class="markdown level1 summary"><p>Factory: Evaluation-bundle instance that handles G66/G67 setup + carry.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static FanucModalMacroSyntax Setup { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name used to register this syntax with <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string XName { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Build*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
Build(LazyLinkedListNode&lt;SyntaxPiece&gt;, List&lt;INcDependency&gt;, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Build syntax arrangement into the
<code class="paramref">syntaxPieceNode</code> in-place.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Build(LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, List&lt;INcDependency&gt; ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>syntaxPieceNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>ncDependencyList</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Creates an XML representation of the object.
This method may also generate additional resources such as related files.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving relative paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path for the XML source</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if true, the extended file creation is suppressed.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>An XML element representing the object's state</p>
</dd>
</dl>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>
</div>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -84,16 +84,16 @@
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax">
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax" class="text-break">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax" class="text-break">
Class FanucSystemControlVariableSyntax
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a></dd></dl>
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.html">Fanuc</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
@ -114,7 +114,7 @@ effect. Instead it:
</p>
<ol><li>records the literal write on the block JSON under
<code>Vars.SystemControl</code> (round-trip and cache-dump visibility);</li><li>emits a <code>FanucSystemControl--Unsupported</code>
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedMessage_Hi_NcParsers_Sentence_System_String_System_String_System_Object_">UnsupportedMessage(Sentence, string, string, object)</a>
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedMessage_Hi_NcParsers_ISentenceCarrier_System_String_System_String_System_Object_">UnsupportedMessage(ISentenceCarrier, string, string, object)</a>
so the user knows the assignment was recognised but its controller-side
effect is not simulated. Message-severity (not Warning) because these
writes are safe no-ops offline — every consumed assignment would emit
@ -225,9 +225,9 @@ Fanuc-family only — Siemens uses named system variables
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.#ctor*"></a>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.#ctor">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax__ctor" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.#ctor">
FanucSystemControlVariableSyntax()
</h3>
@ -252,14 +252,14 @@ Fanuc-family only — Siemens uses named system variables
<a id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.#ctor*"></a>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.#ctor(System.Xml.Linq.XElement)">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.#ctor(System.Xml.Linq.XElement)">
FanucSystemControlVariableSyntax(XElement)
</h3>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.html#Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. No state to deserialise.</p>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. No state to deserialise.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -289,7 +289,7 @@ Fanuc-family only — Siemens uses named system variables
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_SystemControlMax" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.SystemControlMax">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_SystemControlMax" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.SystemControlMax">
SystemControlMax
</h3>
@ -320,7 +320,7 @@ Fanuc-family only — Siemens uses named system variables
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_SystemControlMin" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.SystemControlMin">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_SystemControlMin" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.SystemControlMin">
SystemControlMin
</h3>
@ -351,7 +351,7 @@ Fanuc-family only — Siemens uses named system variables
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_UnsupportedDiagId" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.UnsupportedDiagId">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_UnsupportedDiagId" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.UnsupportedDiagId">
UnsupportedDiagId
</h3>
@ -386,9 +386,9 @@ assignment — recognised by the parser, ignored by simulation.</p>
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.Name*"></a>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.Name">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.Name">
Name
</h3>
@ -418,14 +418,14 @@ assignment — recognised by the parser, ignored by simulation.</p>
<a id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.XName*"></a>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_XName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.XName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.XName">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_XName" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.XName">
XName
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -454,9 +454,9 @@ assignment — recognised by the parser, ignored by simulation.</p>
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.Build*"></a>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_Build_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.Build*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_Build_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__System_Collections_Generic_List_Hi_NcParsers_Dependencys_INcDependency__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.Build(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},System.Collections.Generic.List{Hi.NcParsers.Dependencys.INcDependency},Hi.NcParsers.NcDiagnosticProgress)">
Build(LazyLinkedListNode&lt;SyntaxPiece&gt;, List&lt;INcDependency&gt;, NcDiagnosticProgress)
</h3>
@ -491,9 +491,9 @@ assignment — recognised by the parser, ignored by simulation.</p>
<a id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.MakeXmlSource*"></a>
<a id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_MakeXmlSource_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.MakeXmlSource*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
<h3 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_MakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.MakeXmlSource(System.String,System.String,System.Boolean)">
MakeXmlSource(string, string, bool)
</h3>
@ -533,7 +533,7 @@ This method may also generate additional resources such as related files.</p>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_FanucSystemControlVariableSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<h4 class="section" id="Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucSystemControlVariableSyntax_MakeXmlSource_System_String_System_String_System_Boolean__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The <code class="paramref">baseDirectory</code> is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.</p>

View File

@ -0,0 +1,396 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Namespace Hi.NcParsers.EvaluationSyntaxs.Fanuc | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Namespace Hi.NcParsers.EvaluationSyntaxs.Fanuc | HiAPI-C# 2025 ">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc" class="text-break">Namespace Hi.NcParsers.EvaluationSyntaxs.Fanuc</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="markdown level0 remarks"></div>
<h3 id="classes">
Classes
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a></dt>
<dd><p>Resolves Fanuc Custom Macro B GOTO control flow.
Triggered by <code>Parsing.FanucGoto</code> (written by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucGotoParsingSyntax.html">FanucGotoParsingSyntax</a>); decides whether
to fire, and on fire calls
<a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a> on <code>layers[0]</code> with
the re-segmented file content starting at the matching <code>N{target}</code>
label. The host block stays materialised (so cache dumps still see the
GOTO call site); execution naturally continues from the new source
once the pipeline pulls the next block.</p>
<p>
Both unconditional <code>GOTO &lt;n&gt;</code> and conditional
<code>IF [&lt;expr&gt;] GOTO &lt;n&gt;</code> are implemented. The conditional
form leans on <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>'s pass-2 tree walk
to substitute <code>Parsing.FanucGoto.Condition</code> with a numeric
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a> when the expression
evaluates successfully — <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonnode">ReadCondition(JsonNode)</a> then reads the
node polymorphically. Truthy non-zero fires the redirect; zero falls
through silently; a still-string (unresolved) Condition emits
<code>FanucGoto--ConditionNotEvaluated</code> and falls through.
</p>
<p>
Pipeline placement: tail of the Fanuc / Mazak / Syntec Evaluation
bundle. Must run after <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> so any
<code>#&lt;var&gt;</code> in the target N (e.g. <code>GOTO #1</code>) has been
substituted to a literal in <code>Parsing.FanucGoto.N</code>. Reader syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> etc.) are independent —
they touch <code>Parsing.Assignments</code>, not <code>Parsing.FanucGoto</code>.
</p>
<p>
Label scanning uses two hosted helper syntaxes —
CommentSyntax and IndexSyntax — applied to
each candidate block in turn so the predicate
<code>IndexNote.Number == target</code> matches the same way the Parsing
bundle would. Both are XML-IO-able so API customers can swap them
(e.g. for a controller variant using <code>;</code>-style comments or a
different head symbol). Defaults match Fanuc: <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.QuoteCommentSyntax.html">QuoteCommentSyntax</a>
and <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.HeadIndexSyntax.html">HeadIndexSyntax</a> with the <code>"N"</code> symbol.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.html">FanucIfThenSyntax</a></dt>
<dd><p>Resolves Fanuc Custom Macro B <code>IF [&lt;cond&gt;] THEN &lt;body&gt;</code>
single-block conditionals. Triggered by <code>Parsing.FanucIfThen</code>
(written by <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucIfThenParsingSyntax.html">FanucIfThenParsingSyntax</a>);
reads the now-resolved <a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Condition">Condition</a> node, decides
whether to fire, and on fire lifts the parsing-stage
<code>PendingAssignments</code> sub-object into the canonical
<code>Parsing.Assignments</code> bucket so the brand-specific reader syntaxes
downstream route each entry to its store the same way they would handle
an unconditional <code>#nnn = &lt;literal&gt;</code> on a normal block.</p>
<p>
Unlike <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> there is no source splice, no
label scan, no iteration watchdog — the spec restricts the body to the
current block. The host block is preserved either way (the stamped
<code>FanucIfThen</code> section on the host's top-level JSON keeps the
IF-THEN call site visible to cache dumps and diagnostics, with
<a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Applied">Applied</a> flipped true only on a successful
fire).
</p>
<p>
Pipeline placement: in the Evaluation bundle <b>after</b>
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> (so the Condition expression has
been substituted in place by pass-2 tree walk, and each
<code>PendingAssignments</code> RHS string has been evaluated to a numeric
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a>) and <b>before</b> the reader syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>) — that ordering lets
the lifted entries reach the readers as if they had been written by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.TagAssignmentSyntax.html">TagAssignmentSyntax</a> on a normal block.
</p>
<p>
Three condition outcomes mirror the
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonnode">ReadCondition(JsonNode)</a> shape:
<ul><li>Truthy non-zero → lift assignments, stamp Applied=true.</li><li>Truthy zero → fall through silently, Applied=false.</li><li>Truthy null (evaluator failed, condition still a string or
non-finite) → warn <code>FanucIfThen--ConditionNotEvaluated</code>, do not
lift, Applied=false.</li></ul>
A truthy condition with no PendingAssignments (body did not parse as
one or more assignments — e.g. a G-code body, currently unsupported)
warns <code>FanucIfThen--UnsupportedBody</code> and falls through.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a></dt>
<dd><p>Routes literal-RHS assignments to Fanuc-style local macro variables
(<code>#1-#33</code>) from <code>Parsing.Assignments</code> into <code>Vars.Local</code>
on the current block, carrying the previous block's <code>Vars.Local</code>
dict forward when both blocks share the same
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id. Mirrors
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> for the
<code>#100-#499</code> range, with two differences:</p>
<ul><li>Carry is gated by <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> equality, so a
caller block after a G65 return does not inherit the macro body's
final locals.</li><li>Writes outside a macro frame (a main-program block doing
<code>#11 = 5</code>) emit
<code>LocalVariable--MainFrameWriteUnsupported</code> and consume the
assignment without persisting — real Fanuc allows main-frame local
writes but this simulator only tracks locals inside G65/G66 call
frames; surfacing the gap as a diagnostic is more informative than
a silent
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> hit.</li></ul>
<p>
Pipeline placement: Evaluation bundle, after
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> (so any expression RHS such as
<code>#11 = #1 + 1</code> has already been normalised to a literal by the
time this reader runs) and after the other range readers
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>) so they all share a
similar Reader-stage shape.
</p>
<p>
Only literal numeric RHS values are consumed here; non-literal
entries (which can only persist if
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> failed to resolve them) are
left untouched and surface via the evaluator's own
<code>VariableExpression--Unevaluated</code> diagnostic plus
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a></dt>
<dd><p>Fanuc Custom Macro B Type-I argument-letter map: which call-line letter
binds to which <code>Vars.Local</code> id (<code>#1-#26</code>) inside the macro body.
Reserved letters (<code>G</code>, <code>L</code>, <code>N</code>, <code>O</code>, <code>P</code>) are
absent — they are consumed by the call itself, not passed through.</p>
<p>
Used by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (G65, one-shot) and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a> (G66, modal) to translate the
argument letters captured by <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G65Syntax">G65Syntax</a>
/ <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G66Syntax">G66Syntax</a> into the
<code>#nnn</code> bindings the macro body's expression evaluator can read.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a></dt>
<dd><p>Inlines a Fanuc Custom Macro B one-shot call (<code>G65 P_ L_ [letter
value …]</code>) into the source layer and binds the call-line argument
letters to <code>Vars.Local</code> <code>#1-#26</code> per the Type-I map (see
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>). Every inlined block carries the
binding dict, a clone of the <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> diagnostic
record, and a <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id stamp — so
LocalVariableLookup resolves arg references in a
single-block lookup, a cache dump landing on any block immediately
shows which call it belongs to, and downstream
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> carries body-internal
<code>#1-#33</code> writes forward only within the same frame. The host
block itself records <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> but stays in the
caller's frame (no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp) and emits no
motion act; after the macro body's last inlined block the pipeline
continues naturally into the caller's next block (the inlined pieces
sit ahead of the host block's successor in <code>layers[0]</code>).</p>
<p>
Frame isolation works on two layers. Statically, caller blocks
have no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp (frame id 0 by
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html#Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_">Get(JsonObject)</a>), so the inlined frame ids (allocated
fresh per <code>L</code>-repetition) never collide with main. Dynamically,
LocalVariableLookup and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> compare frame ids
before carrying any <code>Vars.Local</code> entry across a block boundary
— a macro body's body-internal writes therefore stay inside the
macro and never leak back into the caller's frame.
</p>
<p>
Filename lookup mirrors <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>:
<code>O{P:D4}.NC</code>, <code>O{P}.NC</code>, <code>O{P:D4}</code>, <code>O{P}</code>,
<code>{P:D4}.NC</code>, <code>{P}.NC</code> — first match wins. The lookup root
is <a class="xref" href="Hi.NcParsers.Dependencys.Generic.SubProgramFolderConfig.html#Hi_NcParsers_Dependencys_Generic_SubProgramFolderConfig_InternalFolder">InternalFolder</a> (G65 has no
"external storage" variant; M198's external root is M98/M198-only).
</p>
<p>
<code>L &gt; 1</code> inlines the same macro <code>L</code> times in series. Each
repetition is a fresh segmentation pass (so each block gets its own
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> JSON object — the downstream pipeline
mutates JSON in place and would clobber sibling repetitions if
instances were shared) and gets a fresh <code>FileIndex</code> (so
<code>(FileIndex, LineIndex)</code> pairs stay unique across the
<code>L</code>-copies of the same source lines).
</p>
<p>
Pipeline placement: ahead of <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> inside
the Fanuc <code>Evaluation</code> <a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a>
so a hypothetical <code>G65 P_</code> + <code>M98 P_</code> on the same block
expands the G65 macro first (would be an unusual but legal
composition). Detection is on the <code>Parsing.G65</code> sub-object
written by <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G65Syntax">G65Syntax</a>
(a <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.ParameterizedFlagSyntax.html">ParameterizedFlagSyntax</a>) — the
keyword <code>"G65"</code> never reaches <code>Parsing.Flags</code> because the
parameterized match has already consumed the text by the time
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.NumberedFlagSyntax.html">NumberedFlagSyntax</a> runs.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a></dt>
<dd><p>Handles Fanuc Custom Macro B modal-call lifecycle (<code>G66</code> setup,
<code>G67</code> cancel, and per-motion-block implicit macro invocation).
The same class is registered twice in the pipeline via
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Phase">Phase</a> — once in the Evaluation bundle
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup">Setup</a>, captures G66/G67 edges and carries
the <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a> state block-to-block) and once in
the PostLogic bundle (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Expansion">Expansion</a>, on every
motion block within an active G66 modal, inlines the macro body via
the same mechanism <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> uses).</p>
<p>
Keeping both phases in one class makes the pairing visually explicit:
readers see "G66 in one file" and the two methods (<code>DoSetup</code>,
<code>DoExpansion</code>) make the lifecycle obvious. The two factory
helpers (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Setup">Setup</a>, <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Expansion">Expansion</a>) mirror the
<code>ModalCarrySyntax.Logic</code> / <code>.PostLogic</code> pattern already in
the codebase.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a></dt>
<dd><p>Consumes Fanuc-style system-control variable assignments
(<code>#3000-#3999</code>) — alarm trigger (<code>#3000</code>), millisecond and
hour clocks (<code>#3001</code> / <code>#3002</code>), single-block / feed-hold
bypass flags (<code>#3003</code> / <code>#3004</code>), pause-with-message
(<code>#3006</code>), mirror-image flags (<code>#3007</code>), date / time
(<code>#3011</code> / <code>#3012</code>), tool-life data (<code>#3030</code> /
<code>#3032</code>), etc.</p>
<p>
Every id in this range is a controller-side state variable — its
authoritative value lives on the real hardware (RTC, alarm bus,
override switches, …) and an NC write at most triggers a side effect
(clock reset, alarm raise, message-pause prompt). Offline simulation
has none of that machinery, so this syntax does <b>not</b> emulate the
effect. Instead it:
</p>
<ol><li>records the literal write on the block JSON under
<code>Vars.SystemControl</code> (round-trip and cache-dump visibility);</li><li>emits a <code>FanucSystemControl--Unsupported</code>
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedMessage_Hi_NcParsers_ISentenceCarrier_System_String_System_String_System_Object_">UnsupportedMessage(ISentenceCarrier, string, string, object)</a>
so the user knows the assignment was recognised but its controller-side
effect is not simulated. Message-severity (not Warning) because these
writes are safe no-ops offline — every consumed assignment would emit
a Warning per block, which would be noisy without signalling anything
the user must act on;</li><li>removes the entry from <code>Parsing.Assignments</code> so it does not
re-surface as a generic <code>Parsing--Unconsumed</code> diagnostic.</li></ol>
<p>
The dictionary carries forward block-by-block (same dict-merge pattern
as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>) so a downstream consumer
can read the most recent recorded value via <code>SyntaxPiece</code> linkage.
</p>
<p>
Only literal numeric RHS values are consumed; non-literal RHS
(e.g. <code>#3002 = #500</code>) is left in <code>Parsing.Assignments</code> for
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> to resolve, mirroring the
retained / volatile reading syntaxes.
</p>
<p>
Fanuc-family only — Siemens uses named system variables
(<code>$AC_TIME</code>, <code>$A_DAY</code>, …) and Heidenhain uses
<code>FN18: SYSREAD</code>; neither flows through <code>Parsing.Assignments.#nnn</code>.
</p>
</dd>
</dl>
<h3 id="enums">
Enums
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html">FanucModalMacroSyntax.SyntaxPhase</a></dt>
<dd><p>Identifies which pipeline phase the instance runs in. The two
values correspond to the Evaluation-bundle and PostLogic-bundle
registrations of this same syntax class.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,277 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class LabelScanUtil | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class LabelScanUtil | HiAPI-C# 2025 ">
<meta name="description" content="Shared &amp;ldquo;re-segment a file and skip pieces until a label matches&amp;rdquo; scan, used by both (unconditional GOTO redirect) and (M99 P{seq} jump into the caller file). Reads the file via , segments through the provided , runs the probeSyntaxes on each candidate block to extract IndexNote.Number, and returns the slice from the first matching block to EOF. Returns null when no block matches — the caller&#39;s responsibility to surface the appropriate diagnostic. The probes are idempotent because the downstream Parsing bundle re-runs the same syntaxes on the yielded pieces with no-op effect (the regex patterns no longer match once the N-prefix is consumed and the parenthesised comment stripped).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_LabelScanUtil" data-uid="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil" class="text-break">
Class LabelScanUtil
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Shared &ldquo;re-segment a file and skip pieces until a label matches&rdquo;
scan, used by both
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> (unconditional GOTO redirect)
and <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a> (<code>M99 P{seq}</code> jump
into the caller file). Reads the file via
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ReadLines_System_Int32_System_String_System_String_">ReadLines(int, string, string)</a>, segments through the
provided <a class="xref" href="Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a>, runs the
<code class="paramref">probeSyntaxes</code> on each candidate block to
extract <code>IndexNote.Number</code>, and returns the slice from the
first matching block to EOF.</p>
<p>
Returns <code>null</code> when no block matches — the caller's
responsibility to surface the appropriate diagnostic. The probes
are idempotent because the downstream Parsing bundle re-runs the
same syntaxes on the yielded pieces with no-op effect (the regex
patterns no longer match once the N-prefix is consumed and the
parenthesised comment stripped).
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class LabelScanUtil</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">LabelScanUtil</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_LabelScanUtil_SegmentAndSkipUntilLabel_" data-uid="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil.SegmentAndSkipUntilLabel*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_LabelScanUtil_SegmentAndSkipUntilLabel_Hi_NcParsers_Segmenters_ISegmenter_System_String_System_String_System_Int32_System_Int32_System_Int32_System_Collections_Generic_List_Hi_NcParsers_Syntaxs_ISituNcSyntax__Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil.SegmentAndSkipUntilLabel(Hi.NcParsers.Segmenters.ISegmenter,System.String,System.String,System.Int32,System.Int32,System.Int32,System.Collections.Generic.List{Hi.NcParsers.Syntaxs.ISituNcSyntax},Hi.NcParsers.NcDiagnosticProgress)">
SegmentAndSkipUntilLabel(ISegmenter, string, string, int, int, int, List&lt;ISituNcSyntax&gt;, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Re-segments <code class="paramref">absPath</code> from offset 0, scans for
a block whose <a class="xref" href="Hi.NcParsers.Keywords.IndexNote.html#Hi_NcParsers_Keywords_IndexNote_Number">Number</a> equals
<code class="paramref">targetN</code> (after the
<code class="paramref">probeSyntaxes</code> have stamped it in-place), and
returns the sub-list of pieces from that block to EOF.
Pieces are produced via
<a class="xref" href="Hi.NcParsers.Segmenters.ISegmenter.html">GetSyntaxPieces(ISegmenter, IEnumerable&lt;IndexedFileLine&gt;, int, NcDiagnosticProgress, CancellationToken)</a> with
<code>SentenceIndex</code> stamped starting at
<code class="paramref">sentenceIndexBegin</code>. Returns <code>null</code> when
no match is found; the caller emits its own brand-specific
&ldquo;label not found&rdquo; diagnostic.</p>
<p>
The predicate is fixed at the
<a class="xref" href="Hi.NcParsers.Keywords.IndexNote.html">IndexNote</a>.<a class="xref" href="Hi.NcParsers.Keywords.IndexNote.html#Hi_NcParsers_Keywords_IndexNote_Number">Number</a> section
— the section name comes from <code>nameof()</code> so a future rename
propagates without re-edits. Reconfigurability for non-standard
label-output sections is achieved by replacing the probe syntaxes
(the natural extension point) rather than parameterising the
predicate path here: a probe stack that doesn't end up writing
<a class="xref" href="Hi.NcParsers.Keywords.IndexNote.html">IndexNote</a> on candidates is by definition not
participating in this scan.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static List&lt;SyntaxPiece&gt; SegmentAndSkipUntilLabel(ISegmenter segmenter, string absPath, string labelPath, int fileIndex, int sentenceIndexBegin, int targetN, List&lt;ISituNcSyntax&gt; probeSyntaxes, NcDiagnosticProgress diag)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>segmenter</code> <a class="xref" href="Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a></dt>
<dd><p>Segmenter used to slice the file into <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a> blocks.</p>
</dd>
<dt><code>absPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Absolute path to read line content from.</p>
</dd>
<dt><code>labelPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Project-relative path to stamp on each line's IndexedFileLine label (so diagnostics anchor to a relative form, not the resolver's transient absolute path).</p>
</dd>
<dt><code>fileIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>Fresh file index to stamp on each scanned line, allocated by the caller from <a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</a>.</p>
</dd>
<dt><code>sentenceIndexBegin</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>Starting execution-order index for the produced pieces.</p>
</dd>
<dt><code>targetN</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>Integer label target to match against <a class="xref" href="Hi.NcParsers.Keywords.IndexNote.html#Hi_NcParsers_Keywords_IndexNote_Number">Number</a>.</p>
</dd>
<dt><code>probeSyntaxes</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a>&gt;</dt>
<dd><p>Ordered list of helper syntaxes to run on each candidate block before the predicate check (typically comment-stripper(s) followed by a head-index parser). May be null.</p>
</dd>
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd><p>Sink for any diagnostics produced by the probe syntaxes (e.g. comment-stripper malformed-comment warnings).</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,345 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Struct MacroFileResolver.ResolvedFile | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Struct MacroFileResolver.ResolvedFile | HiAPI-C# 2025 ">
<meta name="description" content="Tri-form resolution result. is the bare matched name; is that name joined with the folder portion of the dependency (relative when the folder is configured relative, absolute fallback when it isn&#39;t); is the fully-resolved I/O target.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile" class="text-break">
Struct MacroFileResolver.ResolvedFile
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Tri-form resolution result. <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName">FileName</a> is the bare
matched name; <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath">RelPath</a> is that name joined with the
folder portion of the dependency (relative when the folder is
configured relative, absolute fallback when it isn't);
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath">AbsPath</a> is the fully-resolved I/O target.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public readonly record struct MacroFileResolver.ResolvedFile : IEquatable&lt;MacroFileResolver.ResolvedFile&gt;</code></pre>
</div>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html">MacroFileResolver</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html">ResolvedFile</a>&gt;</div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.equals">ValueType.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode">ValueType.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.tostring">ValueType.ToString()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.MaskUtil.html#Hi_Common_MaskUtil_GetMaskedValue__1___0___0_System_Boolean_">MaskUtil.GetMaskedValue&lt;T&gt;(T, T, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Common.MaskUtil.html#Hi_Common_MaskUtil_SetMask__1___0____0_System_Boolean_">MaskUtil.SetMask&lt;T&gt;(ref T, T, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile__ctor_System_String_System_String_System_String_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.#ctor(System.String,System.String,System.String)">
ResolvedFile(string, string, string)
</h3>
<div class="markdown level1 summary"><p>Tri-form resolution result. <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName">FileName</a> is the bare
matched name; <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath">RelPath</a> is that name joined with the
folder portion of the dependency (relative when the folder is
configured relative, absolute fallback when it isn't);
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath">AbsPath</a> is the fully-resolved I/O target.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ResolvedFile(string FileName, string RelPath, string AbsPath)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>FileName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>RelPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>AbsPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.AbsPath*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.AbsPath">
AbsPath
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string AbsPath { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.FileName*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.FileName">
FileName
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string FileName { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.RelPath*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.RelPath">
RelPath
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string RelPath { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,338 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MacroFileResolver | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MacroFileResolver | HiAPI-C# 2025 ">
<meta name="description" content="Shared subprogram-/macro-file resolver for Fanuc-style O&amp;lt;n&amp;gt; lookups consumed by (M98 / M198) and (G65). Single helper so the three path forms — file name, project-relative path, absolute path — are produced together at one site and each caller gets exactly the form it should consume: — bare O####.NC form the resolver matched. Stored in JSON sections (FanucMacroCall, SubProgramCall) as the structural NC-language identifier; independent of which folder the dependency happened to be pointing at, so the JSON stays portable across environments. — relative path against the project base directory (e.g. &quot;NC/O1234.NC&quot;). Used as the label so diagnostics on inlined blocks align with the relative form already used for the main file label. — absolute path. Used only at the call site for actual disk I/O; never persisted, never returned to JSON. Lives inside the resolver&#39;s stack frame and the segmenter&#39;s enumeration. Filename lookup order (first match wins) mirrors real Fanuc fallback: O{P:D4}.NC, O{P}.NC, O{P:D4}, O{P}, {P:D4}.NC, {P}.NC. Case-insensitive match is delegated to the host filesystem (Windows is, Linux is not).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver" class="text-break">
Class MacroFileResolver
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Shared subprogram-/macro-file resolver for Fanuc-style <code>O&lt;n&gt;</code>
lookups consumed by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> (M98 / M198)
and <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (G65). Single helper so the three
path forms — file name, project-relative path, absolute path — are
produced together at one site and each caller gets exactly the form
it should consume:</p>
<ul><li><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName">FileName</a> — bare <code>O####.NC</code> form
the resolver matched. Stored in JSON sections (<code>FanucMacroCall</code>,
<code>SubProgramCall</code>) as the structural NC-language identifier;
independent of which folder the dependency happened to be pointing
at, so the JSON stays portable across environments.</li><li><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath">RelPath</a> — relative path against the
project base directory (e.g. <code>"NC/O1234.NC"</code>). Used as the
<a class="xref" href="Hi.Common.FileLines.IndexedFileLine.html">IndexedFileLine</a> label so diagnostics on inlined blocks
align with the relative form already used for the main file label.</li><li><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath">AbsPath</a> — absolute path. Used only
at the <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ReadLines_System_Int32_System_String_System_String_">ReadLines(int, string, string)</a> call site for actual disk I/O; never
persisted, never returned to JSON. Lives inside the resolver's stack
frame and the segmenter's enumeration.</li></ul>
<p>
Filename lookup order (first match wins) mirrors real Fanuc fallback:
<code>O{P:D4}.NC</code>, <code>O{P}.NC</code>, <code>O{P:D4}</code>, <code>O{P}</code>,
<code>{P:D4}.NC</code>, <code>{P}.NC</code>. Case-insensitive match is delegated
to the host filesystem (Windows is, Linux is not).
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class MacroFileResolver</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MacroFileResolver</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_FilenamePatterns" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.FilenamePatterns">
FilenamePatterns
</h3>
<div class="markdown level1 summary"><p>Filename-resolution fallback chain. Patterns are formatted with
the <code>P</code> parameter as the only positional arg.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static readonly string[] FilenamePatterns</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ReadLines_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ReadLines*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ReadLines_System_Int32_System_String_System_String_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ReadLines(System.Int32,System.String,System.String)">
ReadLines(int, string, string)
</h3>
<div class="markdown level1 summary"><p>Streams <a class="xref" href="Hi.Common.FileLines.IndexedFileLine.html">IndexedFileLine</a> entries from <code class="paramref">absPath</code>
but stamps each entry's <code>FilePath</code> with the project-relative
<code class="paramref">labelPath</code>. Mirrors the manual loop in
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">GetIndexedFileLines(string, IEnumerable&lt;string&gt;, int, NcDiagnosticProgress, CancellationToken)</a> for the main file
so inlined macros stay consistent with the rest of the pipeline
(diagnostics anchored to a relative label, not the resolver's
transient absolute path).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IEnumerable&lt;IndexedFileLine&gt; ReadLines(int fileIndex, string absPath, string labelPath)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>fileIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
<dt><code>absPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>labelPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Hi.Common.FileLines.IndexedFileLine.html">IndexedFileLine</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_Resolve_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.Resolve*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_Resolve_System_String_System_Int32_System_String_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.Resolve(System.String,System.Int32,System.String)">
Resolve(string, int, string)
</h3>
<div class="markdown level1 summary"><p>Resolves an <code>O&lt;p&gt;</code> file against the given folder, returning
all three path forms. Returns <code>null</code> when the folder cannot
be anchored (relative folder but no <code class="paramref">baseDirectory</code>),
the resolved folder does not exist, or no filename pattern matched.</p>
<p>
<code class="paramref">folder</code> may be absolute (used as-is) or relative
(combined with <code class="paramref">baseDirectory</code>). Empty / null
<code class="paramref">folder</code> means "look directly in
<code class="paramref">baseDirectory</code>". When the folder is absolute,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath">RelPath</a> falls back to absolute too —
there's no natural relative form when the user explicitly
configured an out-of-project folder.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static MacroFileResolver.ResolvedFile? Resolve(string folder, int p, string baseDirectory)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>folder</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>p</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html">MacroFileResolver</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html">ResolvedFile</a>?</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,338 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MacroInlineUtil | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MacroInlineUtil | HiAPI-C# 2025 ">
<meta name="description" content="Shared inline mechanism for Fanuc Custom Macro B body expansion — used by both (one-shot) and &#39;s expansion phase (modal trigger). Both callers do the same three things on every produced : stamp a clone, stamp a fresh id, and stamp argument bindings into Vars.Local. Centralising lets the two call sites stay in lock-step — frame allocation, file-index allocation, and the inline-piece JSON shape are guaranteed identical. Frame ids share the same counter as file indices — both just need within-session uniqueness and the counter is rewound on session start in lock-step with the pipeline. The main NC file is allocated index 0 first, so all inline frame ids land at &amp;gt; 0 and never collide with main.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil" class="text-break">
Class MacroInlineUtil
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.html">EvaluationSyntaxs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Shared inline mechanism for Fanuc Custom Macro B body expansion —
used by both <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (one-shot) and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>'s expansion phase (modal trigger). Both
callers do the same three things on every produced
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>: stamp a <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a>
clone, stamp a fresh <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id, and stamp
argument bindings into <code>Vars.Local</code>. Centralising lets the two
call sites stay in lock-step — frame allocation, file-index
allocation, and the inline-piece JSON shape are guaranteed
identical.</p>
<p>
Frame ids share the same <a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</a>
counter as file indices — both just need within-session uniqueness
and the counter is rewound on session start in lock-step with the
pipeline. The main NC file is allocated index 0 first, so all
inline frame ids land at &gt; 0 and never collide with main.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class MacroInlineUtil</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MacroInlineUtil</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil_ApplyLocalBindings_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.ApplyLocalBindings*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil_ApplyLocalBindings_System_Text_Json_Nodes_JsonObject_System_Collections_Generic_IReadOnlyDictionary_System_String_System_Double__" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.ApplyLocalBindings(System.Text.Json.Nodes.JsonObject,System.Collections.Generic.IReadOnlyDictionary{System.String,System.Double})">
ApplyLocalBindings(JsonObject, IReadOnlyDictionary&lt;string, double&gt;)
</h3>
<div class="markdown level1 summary"><p>Writes the resolved <code>#N → value</code> bindings into
<code>Vars.Local</code> on the given block. No-op when
<code class="paramref">bindings</code> is empty. Always overwrites any
pre-existing <code>Vars.Local</code> on the block — for inlined macro
bodies this is a fresh stamp.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void ApplyLocalBindings(JsonObject json, IReadOnlyDictionary&lt;string, double&gt; bindings)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>json</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
<dt><code>bindings</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil_BuildInlinedPieces_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.BuildInlinedPieces*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil_BuildInlinedPieces_Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_System_Int32_System_Collections_Generic_IReadOnlyDictionary_System_String_System_Double__System_Text_Json_Nodes_JsonObject_System_Text_Json_Nodes_JsonObject_Hi_NcParsers_Dependencys_SystemWired_FileIndexCounterDependency_Hi_NcParsers_Segmenters_ISegmenter_System_Int32_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.BuildInlinedPieces(Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile,System.Int32,System.Collections.Generic.IReadOnlyDictionary{System.String,System.Double},System.Text.Json.Nodes.JsonObject,System.Text.Json.Nodes.JsonObject,Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency,Hi.NcParsers.Segmenters.ISegmenter,System.Int32,Hi.NcParsers.NcDiagnosticProgress)">
BuildInlinedPieces(ResolvedFile, int, IReadOnlyDictionary&lt;string, double&gt;, JsonObject, JsonObject, FileIndexCounterDependency, ISegmenter, int, NcDiagnosticProgress)
</h3>
<div class="markdown level1 summary"><p>Yields <code>L</code> repetitions of the macro body as inline-ready
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> entries. Each repetition gets its own
freshly-allocated <code>FileIndex</code> and <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a>
id; every yielded piece is stamped with a deep clone of
<code class="paramref">callRecord</code>, the frame id, and the resolved
<code>#N → value</code> <code class="paramref">bindings</code>. The caller passes
the result to LazyLinkedList&lt;T&gt;.PrependSource on
the source layer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static IEnumerable&lt;SyntaxPiece&gt; BuildInlinedPieces(MacroFileResolver.ResolvedFile resolvedFile, int l, IReadOnlyDictionary&lt;string, double&gt; bindings, JsonObject callRecord, JsonObject pushedCallStack, FileIndexCounterDependency counterDep, ISegmenter segmenter, int sentenceIndexBegin, NcDiagnosticProgress ncDiagnosticProgress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>resolvedFile</code> <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html">MacroFileResolver</a>.<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html">ResolvedFile</a></dt>
<dd></dd>
<dt><code>l</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
<dt><code>bindings</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</dt>
<dd></dd>
<dt><code>callRecord</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
<dt><code>pushedCallStack</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
<dt><code>counterDep</code> <a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</a></dt>
<dd></dd>
<dt><code>segmenter</code> <a class="xref" href="Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a></dt>
<dd></dd>
<dt><code>sentenceIndexBegin</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil_BuildLocalBindings_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.BuildLocalBindings*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_MacroInlineUtil_BuildLocalBindings_System_Text_Json_Nodes_JsonObject_" data-uid="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.BuildLocalBindings(System.Text.Json.Nodes.JsonObject)">
BuildLocalBindings(JsonObject)
</h3>
<div class="markdown level1 summary"><p>Translates the argument-letter map captured by the host call
(<code>{ &ldquo;A&rdquo;: 1.5, &ldquo;B&rdquo;: 2.0, ... }</code>) into the <code>#N → value</code>
bindings the macro body's expression evaluator will read off
<code>Vars.Local</code>. Skips non-numeric (string) args silently —
those are unresolved variable references that the evaluator's
own <code>VariableExpression&ndash;Unevaluated</code> diagnostic will
surface; writing a string into <code>Vars.Local</code> would just
propagate the residue.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Dictionary&lt;string, double&gt; BuildLocalBindings(JsonObject args)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>args</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -308,7 +308,7 @@ runner's <code>NcDependencyList</code>, this syntax is a no-op.
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class SubProgramCallSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Inlines a Fanuc-style subprogram into the source layer when an M98 or M198 host block is reached. M98 P_ L_ reads the matching O&amp;lt;P&amp;gt; file from ; M198 P_ reads from (Fanuc external-storage call — same mechanism as M98, different lookup root). The file is segmented through the host runner&#39;s segmenter () and the resulting s are prepended into layers[0] via ; the rest of the pipeline picks them up through ordinary walkNode.Next traversal as if they had always been part of the host file. Pipeline placement: first child of the Fanuc Evaluation . By the time this runs, / (each a ) have written a Parsing.M98 / Parsing.M198 sub-object carrying the captured P / L parameters. Note: those sub-objects are this syntax&#39;s only trigger — &quot;M98&quot; / &quot;M198&quot; never reach Parsing.Flags, because the parameterized match has already consumed the text by the time runs. Filename lookup uses a fallback chain: O{P:D4}.NC, O{P}.NC, O{P:D4}, O{P}, {P:D4}.NC, {P}.NC — first match wins. Case-insensitive match is delegated to the host filesystem (Windows is, Linux is not). L &amp;gt; 1 inlines the same subprogram L times in series. Each repetition is a fresh segmentation pass so each block gets its own with an independent JSON object — the downstream pipeline mutates JSON in place and would clobber sibling repetitions if instances were shared. Not yet supported: M99 P{seq} early return inside a subprogram, partial-program calls (M98 P{seq}{prog} split encoding), and arg binding (G65 macro is a separate syntax).">
<meta name="description" content="Inlines a Fanuc-style subprogram into the source layer when an M98 or M198 host block is reached. M98 P_ L_ reads the matching O&amp;lt;P&amp;gt; file from ; M198 P_ reads from (Fanuc external-storage call — same mechanism as M98, different lookup root). The file is segmented through the host runner&#39;s segmenter () and the resulting s are prepended into layers[0] via ; the rest of the pipeline picks them up through ordinary walkNode.Next traversal as if they had always been part of the host file. Pipeline placement: first child of the Fanuc Evaluation . By the time this runs, / (each a ) have written a Parsing.M98 / Parsing.M198 sub-object carrying the captured P / L parameters. Note: those sub-objects are this syntax&#39;s only trigger — &quot;M98&quot; / &quot;M198&quot; never reach Parsing.Flags, because the parameterized match has already consumed the text by the time runs. Filename lookup uses a fallback chain: O{P:D4}.NC, O{P}.NC, O{P:D4}, O{P}, {P:D4}.NC, {P}.NC — first match wins. Case-insensitive match is delegated to the host filesystem (Windows is, Linux is not). L &amp;gt; 1 inlines the same subprogram L times in series. Each repetition is a fresh segmentation pass so each block gets its own with an independent JSON object — the downstream pipeline mutates JSON in place and would clobber sibling repetitions if instances were shared. Not yet supported: M99 P{seq} early return inside a subprogram and partial-program calls (M98 P{seq}{prog} split encoding). Custom Macro B argument-binding calls (G65 / G66 / G67) live in and — those handle the argument-letter-to-#1..#26 binding and the macro-call frame isolation that M98 deliberately does not provide.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -136,8 +136,12 @@ repetitions if instances were shared.
</p>
<p>
Not yet supported: <code>M99 P{seq}</code> early return inside a
subprogram, partial-program calls (<code>M98 P{seq}{prog}</code> split
encoding), and arg binding (G65 macro is a separate syntax).
subprogram and partial-program calls (<code>M98 P{seq}{prog}</code> split
encoding). Custom Macro B argument-binding calls (<code>G65</code> /
<code>G66</code> / <code>G67</code>) live in <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a> — those handle the
argument-letter-to-<code>#1..#26</code> binding and the macro-call frame
isolation that M98 deliberately does not provide.
</p>
</div>
<div class="markdown conceptual"></div>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class SubProgramReturnSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Consumes Fanuc-style M99 subprogram-return blocks. In the inline model used by , a plain M99 at the end of a subprogram is implicit: the inlined blocks are followed in layers[0] by the caller&#39;s next block, so the natural pipeline traversal already does the &quot;return&quot;. This syntax therefore only consumes the M99 flag (so doesn&#39;t warn) and records a section for cache-dump visibility. M99 P{seq} (return to caller&#39;s N{seq} sequence number) is captured in but not yet honoured — the subprogram tail still proceeds straight into the caller&#39;s next block. Implementing the jump requires a forward scan of the post-host caller blocks for a matching N{seq} head index, then dropping the intervening blocks; deferred until the caller-side walk semantics are designed. Pipeline placement: anywhere after Parsing has populated Parsing.M99. Conventionally placed alongside at the head of the Evaluation bundle so call/return live next to each other. Detection is on the Parsing.M99 sub-object written by (a ) — the keyword &quot;M99&quot; never reaches Parsing.Flags because the parameterized match has already consumed the text by the time runs.">
<meta name="description" content="Consumes Fanuc-style M99 subprogram-return blocks and pops one frame. Plain M99 relies on the natural pipeline tail — the inlined body&#39;s last block is followed in layers[0] by the caller&#39;s next block, so the &amp;ldquo;return&amp;rdquo; happens implicitly; this syntax only consumes the M99 trigger (so doesn&#39;t warn), stamps a diagnostic section, and writes the popped for downstream blocks to carry. M99 P{seq} additionally redirects control flow to the caller&#39;s N{seq} block via . The caller&#39;s file is resolved from the popped frame&#39;s ; the scan uses the same helper as , with hardcoded Fanuc-default probes ( + with symbol &quot;N&quot;) because the M99 P semantic itself is Fanuc-family-only and Mazak / Syntec follow the same conventions. The iteration is counted against , sharing the same runaway-loop guard as GOTO — keyed on the same (FileName, TargetN) bucket so a tight M98 → M99 P → M98 … loop trips the same threshold. Pipeline placement: same Evaluation bundle slot it always occupied, right after at the head. Needs , , , , on the dep list when M99 P{seq} is to fire; without them the plain-M99 path still works and the P-jump emits a configuration warning. Detection is on the Parsing.M99 sub-object written by (a ) — the keyword &quot;M99&quot; never reaches Parsing.Flags because the parameterized match has already consumed the text by the time runs.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -97,31 +97,42 @@ Class SubProgramReturnSyntax
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Consumes Fanuc-style <code>M99</code> subprogram-return blocks.</p>
<div class="markdown summary"><p>Consumes Fanuc-style <code>M99</code> subprogram-return blocks and pops
one <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> frame. Plain <code>M99</code> relies on the
natural pipeline tail — the inlined body's last block is followed
in <code>layers[0]</code> by the caller's next block, so the &ldquo;return&rdquo;
happens implicitly; this syntax only consumes the M99 trigger (so
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> doesn't warn),
stamps a <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html">SubProgramReturn</a> diagnostic section, and
writes the popped <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> for downstream blocks to
carry.</p>
<p>
In the inline model used by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>, a
plain <code>M99</code> at the end of a subprogram is implicit: the
inlined blocks are followed in <code>layers[0]</code> by the caller's
next block, so the natural pipeline traversal already does the
"return". This syntax therefore only consumes the M99 flag (so
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> doesn't warn)
and records a <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html">SubProgramReturn</a> section for cache-dump
visibility.
<code>M99 P{seq}</code> additionally redirects control flow to the
caller's <code>N{seq}</code> block via
<a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a>. The caller's file is
resolved from the popped frame's
<a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html#Hi_NcParsers_Keywords_CallFrame_CallerFilePath">CallerFilePath</a>; the scan uses the same
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil.html#Hi_NcParsers_EvaluationSyntaxs_LabelScanUtil_SegmentAndSkipUntilLabel_Hi_NcParsers_Segmenters_ISegmenter_System_String_System_String_System_Int32_System_Int32_System_Int32_System_Collections_Generic_List_Hi_NcParsers_Syntaxs_ISituNcSyntax__Hi_NcParsers_NcDiagnosticProgress_">SegmentAndSkipUntilLabel(ISegmenter, string, string, int, int, int, List&lt;ISituNcSyntax&gt;, NcDiagnosticProgress)</a> helper as
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a>, with hardcoded Fanuc-default
probes (<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.QuoteCommentSyntax.html">QuoteCommentSyntax</a> + <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.HeadIndexSyntax.html">HeadIndexSyntax</a>
with symbol <code>"N"</code>) because the M99 P semantic itself is
Fanuc-family-only and Mazak / Syntec follow the same conventions.
The iteration is counted against
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html">FanucGotoIterationDependency</a>, sharing the same
runaway-loop guard as GOTO — keyed on the same
<code>(FileName, TargetN)</code> bucket so a tight
<code>M98 → M99 P → M98 …</code> loop trips the same threshold.
</p>
<p>
<code>M99 P{seq}</code> (return to caller's <code>N{seq}</code> sequence
number) is captured in <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html#Hi_NcParsers_Keywords_SubProgramReturn_P">P</a> but not yet
honoured — the subprogram tail still proceeds straight into the
caller's next block. Implementing the jump requires a forward scan
of the post-host caller blocks for a matching <code>N{seq}</code> head
index, then dropping the intervening blocks; deferred until the
caller-side walk semantics are designed.
</p>
<p>
Pipeline placement: anywhere after Parsing has populated
<code>Parsing.M99</code>. Conventionally placed alongside
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> at the head of the Evaluation
bundle so call/return live next to each other.
Pipeline placement: same Evaluation bundle slot it always occupied,
right after <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> at the head. Needs
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html">FanucGotoIterationDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.ProjectFolderDependency.html">ProjectFolderDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.SegmenterDependency.html">SegmenterDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.SyntaxPieceLayerDependency.html">SyntaxPieceLayerDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</a> on the dep list when
<code>M99 P{seq}</code> is to fire; without them the plain-M99 path still
works and the P-jump emits a configuration warning.
</p>
<p>
Detection is on the <code>Parsing.M99</code> sub-object written by
@ -226,7 +237,7 @@ parameterized match has already consumed the text by the time
</h3>
<div class="markdown level1 summary"><p>Parameterless instance for bundle composition (no XML state).</p>
<div class="markdown level1 summary"><p>Parameterless instance with default probe list.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -248,23 +259,31 @@ parameterized match has already consumed the text by the time
<a id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax__ctor_" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.#ctor*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax__ctor_System_Xml_Linq_XElement_" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.#ctor(System.Xml.Linq.XElement)">
SubProgramReturnSyntax(XElement)
<h3 id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax__ctor_System_Xml_Linq_XElement_System_String_System_IProgress_System_Object__" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.#ctor(System.Xml.Linq.XElement,System.String,System.IProgress{System.Object})">
SubProgramReturnSyntax(XElement, string, IProgress&lt;object&gt;)
</h3>
<div class="markdown level1 summary"><p>XML ctor (no child elements; reserved for forward compatibility).</p>
<div class="markdown level1 summary"><p>Loads <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html#Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_LabelProbeSyntaxes">LabelProbeSyntaxes</a> from XML produced by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html#Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. An absent wrapper falls back to the
default probe list.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public SubProgramReturnSyntax(XElement src)</code></pre>
<pre><code class="lang-csharp hljs">public SubProgramReturnSyntax(XElement src, string baseDirectory, IProgress&lt;object&gt; progress)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>Root element named <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html#Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_XName">XName</a>.</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Project base directory propagated to child <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a> calls.</p>
</dd>
<dt><code>progress</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>Diagnostic sink propagated to child factories.</p>
</dd>
</dl>
@ -283,6 +302,46 @@ parameterized match has already consumed the text by the time
</h2>
<a id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_LabelProbeSyntaxes_" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.LabelProbeSyntaxes*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_LabelProbeSyntaxes" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.LabelProbeSyntaxes">
LabelProbeSyntaxes
</h3>
<div class="markdown level1 summary"><p>Ordered list of probe syntaxes run on each candidate block during
the M99 P{seq} caller-side scan, before the integer label predicate
fires. Defaults match Fanuc / Mazak / Syntec (parenthesised comment
stripper + <code>N</code> head-index parser); API customers can swap or
extend (e.g. add a <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.TailCommentSyntax.html">TailCommentSyntax</a> for <code>;</code>
end-of-block comments, or insert a <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.BlockSkipSyntax.html">BlockSkipSyntax</a>
to exclude <code>/</code>-prefixed candidates) without subclassing.
Mirrors the same hosted-list pattern as
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucGotoSyntax_LabelProbeSyntaxes">LabelProbeSyntaxes</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public List&lt;ISituNcSyntax&gt; LabelProbeSyntaxes { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_Name_" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.Name*"></a>
<h3 id="Hi_NcParsers_EvaluationSyntaxs_SubProgramReturnSyntax_Name" data-uid="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.Name">

View File

@ -104,7 +104,7 @@ appears — but does <b>not</b> write to any specific store. Routing
&ldquo;where the resolved literal lands&rdquo; stays in the brand-specific
reader syntaxes (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html">RetainedCommonVariableTable</a>'s reader,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>, …) which run
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>, …) which run
<i>after</i> this syntax on the same block.</p>
<p>
Two passes per block:
@ -123,7 +123,7 @@ from <code>Parsing.&lt;tag&gt;</code> (axis tags, canned-cycle sub-objects)
is parsed; on a successful evaluation the string is replaced with a
numeric <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a>. Failures silently leave the original
string and rely on downstream
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a> at consumer sites to surface
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a> at consumer sites to surface
<code>VariableExpression--Unevaluated</code> only if the tag is actually read.
</li></ol>
<p>
@ -285,7 +285,7 @@ CAM-emitted NC (one assignment per line).
</h3>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>. No state to deserialise.</p>
<div class="markdown level1 summary"><p>Loads from an XML element produced by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a>; restores <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a> via XFactory dispatch.</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -357,8 +357,9 @@ CAM-emitted NC (one assignment per line).
<code>Vars.Local</code> / <code>Vars.Volatile</code>, position reads,
runtime-state reads). Walked in list order, before the
dependency-bound <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IVariableLookup.html">IVariableLookup</a>s. Brand presets
configure this — instances are not XML-serialised because they
are brand-determined behaviour, not project state.</p>
configure this; the list is XML-serialised so a runner rebuilt from
XML keeps its brand-specific lookups (each impl is stateless and
dispatches by its <code>XName</code> via <a class="xref" href="Hi.Common.XmlUtils.XFactory.html">XFactory</a>).</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -390,7 +391,7 @@ are brand-determined behaviour, not project state.</p>
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -373,7 +373,7 @@ or after this syntax.
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -95,46 +95,89 @@
Classes
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a></dt>
<dd><p>Consumes Fanuc-style system-control variable assignments
(<code>#3000-#3999</code>) — alarm trigger (<code>#3000</code>), millisecond and
hour clocks (<code>#3001</code> / <code>#3002</code>), single-block / feed-hold
bypass flags (<code>#3003</code> / <code>#3004</code>), pause-with-message
(<code>#3006</code>), mirror-image flags (<code>#3007</code>), date / time
(<code>#3011</code> / <code>#3012</code>), tool-life data (<code>#3030</code> /
<code>#3032</code>), etc.</p>
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.CallStackUtil.html">CallStackUtil</a></dt>
<dd><p>Push / pop helpers for the per-block <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> section.
Both produce a fresh deep-cloned <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a> ready to
stamp onto an inlined piece (push site) or onto an M99 return block
(pop site); the caller is responsible for deep-cloning again if it
distributes the same stamp across multiple pieces of an L-repetition.</p>
<p>
Every id in this range is a controller-side state variable — its
authoritative value lives on the real hardware (RTC, alarm bus,
override switches, …) and an NC write at most triggers a side effect
(clock reset, alarm raise, message-pause prompt). Offline simulation
has none of that machinery, so this syntax does <b>not</b> emulate the
effect. Instead it:
Pairs with <a class="xref" href="Hi.NcParsers.PostLogicSyntaxs.ModalCarrySyntax.html">ModalCarrySyntax</a> at the
Logic stage: explicit push / pop writes seed the section at frame
boundaries, ModalCarry copies it forward to every block in between
so each block is self-contained for cache-dump readers and downstream
consumers (notably M99 <code>P{seq}</code> reading the top frame's
<a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html#Hi_NcParsers_Keywords_CallFrame_CallerFilePath">CallerFilePath</a>).
</p>
<ol><li>records the literal write on the block JSON under
<code>Vars.SystemControl</code> (round-trip and cache-dump visibility);</li><li>emits a <code>FanucSystemControl--Unsupported</code>
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedMessage_Hi_NcParsers_Sentence_System_String_System_String_System_Object_">UnsupportedMessage(Sentence, string, string, object)</a>
so the user knows the assignment was recognised but its controller-side
effect is not simulated. Message-severity (not Warning) because these
writes are safe no-ops offline — every consumed assignment would emit
a Warning per block, which would be noisy without signalling anything
the user must act on;</li><li>removes the entry from <code>Parsing.Assignments</code> so it does not
re-surface as a generic <code>Parsing--Unconsumed</code> diagnostic.</li></ol>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil.html">LabelScanUtil</a></dt>
<dd><p>Shared &ldquo;re-segment a file and skip pieces until a label matches&rdquo;
scan, used by both
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> (unconditional GOTO redirect)
and <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a> (<code>M99 P{seq}</code> jump
into the caller file). Reads the file via
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ReadLines_System_Int32_System_String_System_String_">ReadLines(int, string, string)</a>, segments through the
provided <a class="xref" href="Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a>, runs the
<code class="paramref">probeSyntaxes</code> on each candidate block to
extract <code>IndexNote.Number</code>, and returns the slice from the
first matching block to EOF.</p>
<p>
The dictionary carries forward block-by-block (same dict-merge pattern
as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>) so a downstream consumer
can read the most recent recorded value via <code>SyntaxPiece</code> linkage.
Returns <code>null</code> when no block matches — the caller's
responsibility to surface the appropriate diagnostic. The probes
are idempotent because the downstream Parsing bundle re-runs the
same syntaxes on the yielded pieces with no-op effect (the regex
patterns no longer match once the N-prefix is consumed and the
parenthesised comment stripped).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html">MacroFileResolver</a></dt>
<dd><p>Shared subprogram-/macro-file resolver for Fanuc-style <code>O&lt;n&gt;</code>
lookups consumed by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> (M98 / M198)
and <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (G65). Single helper so the three
path forms — file name, project-relative path, absolute path — are
produced together at one site and each caller gets exactly the form
it should consume:</p>
<ul><li><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName">FileName</a> — bare <code>O####.NC</code> form
the resolver matched. Stored in JSON sections (<code>FanucMacroCall</code>,
<code>SubProgramCall</code>) as the structural NC-language identifier;
independent of which folder the dependency happened to be pointing
at, so the JSON stays portable across environments.</li><li><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath">RelPath</a> — relative path against the
project base directory (e.g. <code>"NC/O1234.NC"</code>). Used as the
<a class="xref" href="Hi.Common.FileLines.IndexedFileLine.html">IndexedFileLine</a> label so diagnostics on inlined blocks
align with the relative form already used for the main file label.</li><li><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath">AbsPath</a> — absolute path. Used only
at the <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ReadLines_System_Int32_System_String_System_String_">ReadLines(int, string, string)</a> call site for actual disk I/O; never
persisted, never returned to JSON. Lives inside the resolver's stack
frame and the segmenter's enumeration.</li></ul>
<p>
Only literal numeric RHS values are consumed; non-literal RHS
(e.g. <code>#3002 = #500</code>) is left in <code>Parsing.Assignments</code> for
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> to resolve, mirroring the
retained / volatile reading syntaxes.
Filename lookup order (first match wins) mirrors real Fanuc fallback:
<code>O{P:D4}.NC</code>, <code>O{P}.NC</code>, <code>O{P:D4}</code>, <code>O{P}</code>,
<code>{P:D4}.NC</code>, <code>{P}.NC</code>. Case-insensitive match is delegated
to the host filesystem (Windows is, Linux is not).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroInlineUtil.html">MacroInlineUtil</a></dt>
<dd><p>Shared inline mechanism for Fanuc Custom Macro B body expansion —
used by both <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (one-shot) and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>'s expansion phase (modal trigger). Both
callers do the same three things on every produced
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>: stamp a <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a>
clone, stamp a fresh <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id, and stamp
argument bindings into <code>Vars.Local</code>. Centralising lets the two
call sites stay in lock-step — frame allocation, file-index
allocation, and the inline-piece JSON shape are guaranteed
identical.</p>
<p>
Fanuc-family only — Siemens uses named system variables
(<code>$AC_TIME</code>, <code>$A_DAY</code>, …) and Heidenhain uses
<code>FN18: SYSREAD</code>; neither flows through <code>Parsing.Assignments.#nnn</code>.
Frame ids share the same <a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</a>
counter as file indices — both just need within-session uniqueness
and the counter is rewound on session start in lock-step with the
pipeline. The main NC file is allocated index 0 first, so all
inline frame ids land at &gt; 0 and never collide with main.
</p>
</dd>
</dl>
@ -204,38 +247,53 @@ repetitions if instances were shared.
</p>
<p>
Not yet supported: <code>M99 P{seq}</code> early return inside a
subprogram, partial-program calls (<code>M98 P{seq}{prog}</code> split
encoding), and arg binding (G65 macro is a separate syntax).
subprogram and partial-program calls (<code>M98 P{seq}{prog}</code> split
encoding). Custom Macro B argument-binding calls (<code>G65</code> /
<code>G66</code> / <code>G67</code>) live in <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a> — those handle the
argument-letter-to-<code>#1..#26</code> binding and the macro-call frame
isolation that M98 deliberately does not provide.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a></dt>
<dd><p>Consumes Fanuc-style <code>M99</code> subprogram-return blocks.</p>
<dd><p>Consumes Fanuc-style <code>M99</code> subprogram-return blocks and pops
one <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> frame. Plain <code>M99</code> relies on the
natural pipeline tail — the inlined body's last block is followed
in <code>layers[0]</code> by the caller's next block, so the &ldquo;return&rdquo;
happens implicitly; this syntax only consumes the M99 trigger (so
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> doesn't warn),
stamps a <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html">SubProgramReturn</a> diagnostic section, and
writes the popped <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a> for downstream blocks to
carry.</p>
<p>
In the inline model used by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>, a
plain <code>M99</code> at the end of a subprogram is implicit: the
inlined blocks are followed in <code>layers[0]</code> by the caller's
next block, so the natural pipeline traversal already does the
"return". This syntax therefore only consumes the M99 flag (so
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> doesn't warn)
and records a <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html">SubProgramReturn</a> section for cache-dump
visibility.
<code>M99 P{seq}</code> additionally redirects control flow to the
caller's <code>N{seq}</code> block via
<a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a>. The caller's file is
resolved from the popped frame's
<a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html#Hi_NcParsers_Keywords_CallFrame_CallerFilePath">CallerFilePath</a>; the scan uses the same
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.LabelScanUtil.html#Hi_NcParsers_EvaluationSyntaxs_LabelScanUtil_SegmentAndSkipUntilLabel_Hi_NcParsers_Segmenters_ISegmenter_System_String_System_String_System_Int32_System_Int32_System_Int32_System_Collections_Generic_List_Hi_NcParsers_Syntaxs_ISituNcSyntax__Hi_NcParsers_NcDiagnosticProgress_">SegmentAndSkipUntilLabel(ISegmenter, string, string, int, int, int, List&lt;ISituNcSyntax&gt;, NcDiagnosticProgress)</a> helper as
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a>, with hardcoded Fanuc-default
probes (<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.QuoteCommentSyntax.html">QuoteCommentSyntax</a> + <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.HeadIndexSyntax.html">HeadIndexSyntax</a>
with symbol <code>"N"</code>) because the M99 P semantic itself is
Fanuc-family-only and Mazak / Syntec follow the same conventions.
The iteration is counted against
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html">FanucGotoIterationDependency</a>, sharing the same
runaway-loop guard as GOTO — keyed on the same
<code>(FileName, TargetN)</code> bucket so a tight
<code>M98 → M99 P → M98 …</code> loop trips the same threshold.
</p>
<p>
<code>M99 P{seq}</code> (return to caller's <code>N{seq}</code> sequence
number) is captured in <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html#Hi_NcParsers_Keywords_SubProgramReturn_P">P</a> but not yet
honoured — the subprogram tail still proceeds straight into the
caller's next block. Implementing the jump requires a forward scan
of the post-host caller blocks for a matching <code>N{seq}</code> head
index, then dropping the intervening blocks; deferred until the
caller-side walk semantics are designed.
</p>
<p>
Pipeline placement: anywhere after Parsing has populated
<code>Parsing.M99</code>. Conventionally placed alongside
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> at the head of the Evaluation
bundle so call/return live next to each other.
Pipeline placement: same Evaluation bundle slot it always occupied,
right after <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> at the head. Needs
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html">FanucGotoIterationDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.ProjectFolderDependency.html">ProjectFolderDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.SegmenterDependency.html">SegmenterDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.SyntaxPieceLayerDependency.html">SyntaxPieceLayerDependency</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</a> on the dep list when
<code>M99 P{seq}</code> is to fire; without them the plain-M99 path still
works and the P-jump emits a configuration warning.
</p>
<p>
Detection is on the <code>Parsing.M99</code> sub-object written by
@ -256,7 +314,7 @@ appears — but does <b>not</b> write to any specific store. Routing
&ldquo;where the resolved literal lands&rdquo; stays in the brand-specific
reader syntaxes (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html">RetainedCommonVariableTable</a>'s reader,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>, …) which run
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>, …) which run
<i>after</i> this syntax on the same block.</p>
<p>
Two passes per block:
@ -275,7 +333,7 @@ from <code>Parsing.&lt;tag&gt;</code> (axis tags, canned-cycle sub-objects)
is parsed; on a successful evaluation the string is replaced with a
numeric <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a>. Failures silently leave the original
string and rely on downstream
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a> at consumer sites to surface
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a> at consumer sites to surface
<code>VariableExpression--Unevaluated</code> only if the tag is actually read.
</li></ol>
<p>
@ -339,6 +397,18 @@ The two syntaxes are decoupled — the evaluator's lookup tracebacks via
<code>SyntaxPiece</code> linkage so it does not depend on having run before
or after this syntax.
</p>
</dd>
</dl>
<h3 id="structs">
Structs
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html">MacroFileResolver.ResolvedFile</a></dt>
<dd><p>Tri-form resolution result. <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_FileName">FileName</a> is the bare
matched name; <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_RelPath">RelPath</a> is that name joined with the
folder portion of the dependency (relative when the folder is
configured relative, absolute fallback when it isn't);
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.ResolvedFile.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_ResolvedFile_AbsPath">AbsPath</a> is the fully-resolved I/O target.</p>
</dd>
</dl>

View File

@ -0,0 +1,185 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Interface ISentenceCarrier | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Interface ISentenceCarrier | HiAPI-C# 2025 ">
<meta name="description" content="Carries a reference to a source together with its execution-order . Used as the cross-process alignment carrier for diagnostics, messages, ClStripPos, MachiningStep, etc. — both the source content (via ) and the execution-order position (via ) are available without needing two separate references.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.ISentenceCarrier">
<h1 id="Hi_NcParsers_ISentenceCarrier" data-uid="Hi.NcParsers.ISentenceCarrier" class="text-break">
Interface ISentenceCarrier
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Carries a reference to a source <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a> together with its
execution-order <a class="xref" href="Hi.NcParsers.ISentenceIndexed.html#Hi_NcParsers_ISentenceIndexed_SentenceIndex">SentenceIndex</a>. Used as the
cross-process alignment carrier for diagnostics, messages, ClStripPos,
MachiningStep, etc. — both the source content (via
<a class="xref" href="Hi.NcParsers.IGetSentence.html#Hi_NcParsers_IGetSentence_GetSentence">GetSentence()</a>) and the execution-order position
(via <a class="xref" href="Hi.NcParsers.ISentenceIndexed.html#Hi_NcParsers_ISentenceIndexed_SentenceIndex">SentenceIndex</a>) are available without
needing two separate references.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface ISentenceCarrier : IGetSentence, ISentenceIndexed</code></pre>
</div>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="Hi.NcParsers.IGetSentence.html#Hi_NcParsers_IGetSentence_GetSentence">IGetSentence.GetSentence()</a>
</div>
<div>
<a class="xref" href="Hi.NcParsers.ISentenceIndexed.html#Hi_NcParsers_ISentenceIndexed_SentenceIndex">ISentenceIndexed.SentenceIndex</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,211 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Interface ISentenceIndexed | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Interface ISentenceIndexed | HiAPI-C# 2025 ">
<meta name="description" content="Abstraction for an object that carries a — a 0-based ordinal of its source in NC execution order. Use as a cross-process alignment key (messages, ClStripPos, MachiningStep, etc.) when source order () is not enough because SubProgram inline reorders blocks relative to (FileIndex, LineIndex).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.ISentenceIndexed">
<h1 id="Hi_NcParsers_ISentenceIndexed" data-uid="Hi.NcParsers.ISentenceIndexed" class="text-break">
Interface ISentenceIndexed
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Abstraction for an object that carries a <a class="xref" href="Hi.NcParsers.ISentenceIndexed.html#Hi_NcParsers_ISentenceIndexed_SentenceIndex">SentenceIndex</a>
a 0-based ordinal of its source <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a> in NC execution
order. Use as a cross-process alignment key (messages, ClStripPos,
MachiningStep, etc.) when source order
(<a class="xref" href="Hi.Common.FileLines.FileLineUtil.html#Hi_Common_FileLines_FileLineUtil_MixedIndex_Hi_Common_FileLines_IFileLineIndex_">MixedIndex(IFileLineIndex)</a>)
is not enough because SubProgram inline reorders blocks relative to
(FileIndex, LineIndex).</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface ISentenceIndexed</code></pre>
</div>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_ISentenceIndexed_SentenceIndex_" data-uid="Hi.NcParsers.ISentenceIndexed.SentenceIndex*"></a>
<h3 id="Hi_NcParsers_ISentenceIndexed_SentenceIndex" data-uid="Hi.NcParsers.ISentenceIndexed.SentenceIndex">
SentenceIndex
</h3>
<div class="markdown level1 summary"><p>0-based ordinal in pipeline execution order.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int SentenceIndex { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,362 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class IndexedSentence | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class IndexedSentence | HiAPI-C# 2025 ">
<meta name="description" content="Minimal pairing a with its execution-order . Use when there is no richer host object that already carries the sentence — e.g. CSV-driven runs that go straight from an input line to a without a wrapper.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.IndexedSentence">
<h1 id="Hi_NcParsers_IndexedSentence" data-uid="Hi.NcParsers.IndexedSentence" class="text-break">
Class IndexedSentence
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Minimal <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a> pairing a <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a>
with its execution-order <a class="xref" href="Hi.NcParsers.IndexedSentence.html#Hi_NcParsers_IndexedSentence_SentenceIndex">SentenceIndex</a>. Use when there is no
richer host object that already carries the sentence — e.g. CSV-driven
runs that go straight from an input line to a <a class="xref" href="Hi.NcParsers.IndexedSentence.html#Hi_NcParsers_IndexedSentence_Sentence">Sentence</a>
without a <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> wrapper.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public record IndexedSentence : ISentenceCarrier, IGetSentence, ISentenceIndexed, IEquatable&lt;IndexedSentence&gt;</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">IndexedSentence</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></div>
<div><a class="xref" href="Hi.NcParsers.IGetSentence.html">IGetSentence</a></div>
<div><a class="xref" href="Hi.NcParsers.ISentenceIndexed.html">ISentenceIndexed</a></div>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a class="xref" href="Hi.NcParsers.IndexedSentence.html">IndexedSentence</a>&gt;</div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_IndexedSentence__ctor_" data-uid="Hi.NcParsers.IndexedSentence.#ctor*"></a>
<h3 id="Hi_NcParsers_IndexedSentence__ctor_Hi_NcParsers_Sentence_System_Int32_" data-uid="Hi.NcParsers.IndexedSentence.#ctor(Hi.NcParsers.Sentence,System.Int32)">
IndexedSentence(Sentence, int)
</h3>
<div class="markdown level1 summary"><p>Minimal <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a> pairing a <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a>
with its execution-order <a class="xref" href="Hi.NcParsers.IndexedSentence.html#Hi_NcParsers_IndexedSentence_SentenceIndex">SentenceIndex</a>. Use when there is no
richer host object that already carries the sentence — e.g. CSV-driven
runs that go straight from an input line to a <a class="xref" href="Hi.NcParsers.IndexedSentence.html#Hi_NcParsers_IndexedSentence_Sentence">Sentence</a>
without a <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> wrapper.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IndexedSentence(Sentence Sentence, int SentenceIndex)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>Sentence</code> <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dd><p>The source sentence carried.</p>
</dd>
<dt><code>SentenceIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>0-based ordinal in pipeline execution order.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_IndexedSentence_Sentence_" data-uid="Hi.NcParsers.IndexedSentence.Sentence*"></a>
<h3 id="Hi_NcParsers_IndexedSentence_Sentence" data-uid="Hi.NcParsers.IndexedSentence.Sentence">
Sentence
</h3>
<div class="markdown level1 summary"><p>The source sentence carried.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Sentence Sentence { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_IndexedSentence_SentenceIndex_" data-uid="Hi.NcParsers.IndexedSentence.SentenceIndex*"></a>
<h3 id="Hi_NcParsers_IndexedSentence_SentenceIndex" data-uid="Hi.NcParsers.IndexedSentence.SentenceIndex">
SentenceIndex
</h3>
<div class="markdown level1 summary"><p>0-based ordinal in pipeline execution order.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int SentenceIndex { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_IndexedSentence_GetSentence_" data-uid="Hi.NcParsers.IndexedSentence.GetSentence*"></a>
<h3 id="Hi_NcParsers_IndexedSentence_GetSentence" data-uid="Hi.NcParsers.IndexedSentence.GetSentence">
GetSentence()
</h3>
<div class="markdown level1 summary"><p>Returns the source <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a> carried by this object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Sentence GetSentence()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -338,7 +338,7 @@ previously produced by <a class="xref" href="Hi.NcParsers.InspectionSyntaxs.Clea
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -339,7 +339,7 @@ the value is a modal back-fill to make debug dumps more complete".
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -458,7 +458,7 @@ skip).</p>
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -325,7 +325,7 @@ Must be placed at the end of <a class="xref" href="Hi.NcParsers.SoftNcRunner.htm
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -0,0 +1,244 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class CallFrame | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class CallFrame | HiAPI-C# 2025 ">
<meta name="description" content="One entry in . Holds the caller-side information consumers need to &amp;ldquo;unwind&amp;rdquo; or &amp;ldquo;look back&amp;rdquo; — currently only the relative file path of the caller, used by on M99 P{seq} to locate the caller&#39;s N{seq} block.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.CallFrame">
<h1 id="Hi_NcParsers_Keywords_CallFrame" data-uid="Hi.NcParsers.Keywords.CallFrame" class="text-break">
Class CallFrame
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>One entry in <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html#Hi_NcParsers_Keywords_CallStack_Frames">Frames</a>. Holds the caller-side
information consumers need to &ldquo;unwind&rdquo; or &ldquo;look back&rdquo; — currently
only the relative file path of the caller, used by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a> on
<code>M99 P{seq}</code> to locate the caller's <code>N{seq}</code> block.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class CallFrame</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">CallFrame</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Keywords_CallFrame_CallerFilePath_" data-uid="Hi.NcParsers.Keywords.CallFrame.CallerFilePath*"></a>
<h3 id="Hi_NcParsers_Keywords_CallFrame_CallerFilePath" data-uid="Hi.NcParsers.Keywords.CallFrame.CallerFilePath">
CallerFilePath
</h3>
<div class="markdown level1 summary"><p>Project-relative file path of the calling block — same form as
<a class="xref" href="Hi.NcParsers.Sentence.html#Hi_NcParsers_Sentence_FilePath">FilePath</a> on the caller side. Used by M99
<code>P{seq}</code> to re-segment the caller file and skip ahead to
<code>N{seq}</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string CallerFilePath { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,255 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class CallStack | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class CallStack | HiAPI-C# 2025 ">
<meta name="description" content="JSON-section data shape representing the active call-frame stack on a block — pushed by call-and-inline syntaxes ( for M98/M198, for G65, and &#39;s expansion phase for G66 implicit triggers) and popped by on M99. Every block between push and pop carries the section forward via ; the caller&#39;s blocks before push and after pop carry the surrounding stack state (typically empty when running from the main file). The section is wrapped in a rather than exposed as a bare so it fits ModalCarry&#39;s &quot;deep-clone JsonObject&quot; carry pattern — the array of frames lives inside .">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.CallStack">
<h1 id="Hi_NcParsers_Keywords_CallStack" data-uid="Hi.NcParsers.Keywords.CallStack" class="text-break">
Class CallStack
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>JSON-section data shape representing the active call-frame stack on
a block — pushed by call-and-inline syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> for M98/M198,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> for G65, and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>'s expansion
phase for G66 implicit triggers) and popped by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a> on M99. Every
block between push and pop carries the section forward via
<a class="xref" href="Hi.NcParsers.PostLogicSyntaxs.ModalCarrySyntax.html">ModalCarrySyntax</a>; the caller's blocks
before push and after pop carry the surrounding stack state
(typically empty when running from the main file).</p>
<p>
The section is wrapped in a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a> rather than
exposed as a bare <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonarray">JsonArray</a> so it fits ModalCarry's
"deep-clone JsonObject" carry pattern — the array of frames lives
inside <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html#Hi_NcParsers_Keywords_CallStack_Frames">Frames</a>.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class CallStack</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">CallStack</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Keywords_CallStack_Frames_" data-uid="Hi.NcParsers.Keywords.CallStack.Frames*"></a>
<h3 id="Hi_NcParsers_Keywords_CallStack_Frames" data-uid="Hi.NcParsers.Keywords.CallStack.Frames">
Frames
</h3>
<div class="markdown level1 summary"><p>Ordered list of active call frames, bottom-of-stack first. Each
entry is a <a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html">CallFrame</a>-shaped JSON object. Length 0
means the block is in the main (top-level) frame.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public JsonArray Frames { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonarray">JsonArray</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,362 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucGoto | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucGoto | HiAPI-C# 2025 ">
<meta name="description" content="Fanuc Custom Macro B GOTO record. Stamped on the host block by after the control-flow decision has been made; produced earlier by as a parsing-stage sub-section (Parsing.FanucGoto) carrying the raw captured fields. Two source forms map to the same shape: GOTO &amp;lt;n&amp;gt; — unconditional jump. is null.IF [&amp;lt;bool-expr&amp;gt;] GOTO &amp;lt;n&amp;gt; — conditional jump. holds the expression text from inside the brackets. At parsing time is a raw token from the source — it may be a literal (&quot;100&quot;), a variable reference (&quot;#1&quot;), or a bracketed expression (&quot;#[#2+5]&quot;). VariableEvaluatorSyntax substitutes a resolved literal back into the same field in the Evaluation bundle; then int.TryParses the final string to produce an int target.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.FanucGoto">
<h1 id="Hi_NcParsers_Keywords_FanucGoto" data-uid="Hi.NcParsers.Keywords.FanucGoto" class="text-break">
Class FanucGoto
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Fanuc Custom Macro B GOTO record. Stamped on the host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> after the control-flow
decision has been made; produced earlier by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucGotoParsingSyntax.html">FanucGotoParsingSyntax</a> as a parsing-stage
sub-section (<code>Parsing.FanucGoto</code>) carrying the raw captured fields.</p>
<p>
Two source forms map to the same shape:
<ul><li><code>GOTO &lt;n&gt;</code> — unconditional jump. <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_Condition">Condition</a> is null.</li><li><code>IF [&lt;bool-expr&gt;] GOTO &lt;n&gt;</code> — conditional jump.
<a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_Condition">Condition</a> holds the expression text from inside the
brackets.</li></ul>
<p>
At parsing time <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_N">N</a> is a raw token from the source — it may
be a literal (<code>"100"</code>), a variable reference (<code>"#1"</code>), or a
bracketed expression (<code>"#[#2+5]"</code>). VariableEvaluatorSyntax
substitutes a resolved literal back into the same field in the
Evaluation bundle; <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> then
<code>int.TryParse</code>s the final string to produce an int target.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucGoto</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucGoto</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Keywords_FanucGoto_Condition_" data-uid="Hi.NcParsers.Keywords.FanucGoto.Condition*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucGoto_Condition" data-uid="Hi.NcParsers.Keywords.FanucGoto.Condition">
Condition
</h3>
<div class="markdown level1 summary"><p>Raw boolean expression text from inside the <code>IF [...]</code>
brackets, or null for the unconditional form. Evaluator boolean
support is pending — until then,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> emits a warning
and falls through for any non-null <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_Condition">Condition</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Condition { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucGoto_Fired_" data-uid="Hi.NcParsers.Keywords.FanucGoto.Fired*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucGoto_Fired" data-uid="Hi.NcParsers.Keywords.FanucGoto.Fired">
Fired
</h3>
<div class="markdown level1 summary"><p>Whether the GOTO actually redirected control flow on this block.
False on conditional GOTOs whose condition evaluated to false, on
conditional GOTOs whose condition was not evaluable, and on
iteration-limit-exceeded blocks. The host block is preserved in
either case so diagnostic readers can still see the call.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool Fired { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucGoto_N_" data-uid="Hi.NcParsers.Keywords.FanucGoto.N*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucGoto_N" data-uid="Hi.NcParsers.Keywords.FanucGoto.N">
N
</h3>
<div class="markdown level1 summary"><p>Target sequence-number expression — kept as a string so the
in-place evaluator can substitute <code>&quot;#1&quot;</code><code>&ldquo;3&rdquo;</code> before
the Evaluation stage parses it as an int.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string N { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucGoto_Term_" data-uid="Hi.NcParsers.Keywords.FanucGoto.Term*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucGoto_Term" data-uid="Hi.NcParsers.Keywords.FanucGoto.Term">
Term
</h3>
<div class="markdown level1 summary"><p>Triggering phrase: <code>&ldquo;GOTO&rdquo;</code> for the unconditional form,
<code>&ldquo;IF...GOTO&rdquo;</code> for the conditional form.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Term { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,341 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucIfThen | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucIfThen | HiAPI-C# 2025 ">
<meta name="description" content="Fanuc Custom Macro B IF [&amp;lt;cond&amp;gt;] THEN &amp;lt;body&amp;gt; single-block conditional record. Stamped on the host block by after the gate decision; produced earlier by as a parsing-stage sub-section (Parsing.FanucIfThen) carrying the raw captured fields plus an internal PendingAssignments sub-object harvested from the body text. Spec: IF [bool-expr] THEN &amp;lt;stmt&amp;gt; executes &amp;lt;stmt&amp;gt; only when the condition is truthy. Unlike &#39;s conditional form there is no jump — the body affects the current block only, no source splice, no label scan, no iteration watchdog. The most common body shape is a single Custom Macro B assignment (#nnn = &amp;lt;expr&amp;gt;); multiple assignments in one body are also accepted and lifted together. is held as a string at parsing time so VariableEvaluatorSyntax&#39;s pass-2 tree walk can substitute it to a numeric in place; the FanucIfThenSyntax tail then reads the resolved node polymorphically via the same ReadCondition shape used by .">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.FanucIfThen">
<h1 id="Hi_NcParsers_Keywords_FanucIfThen" data-uid="Hi.NcParsers.Keywords.FanucIfThen" class="text-break">
Class FanucIfThen
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Fanuc Custom Macro B <code>IF [&lt;cond&gt;] THEN &lt;body&gt;</code>
single-block conditional record. Stamped on the host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.html">FanucIfThenSyntax</a> after the gate
decision; produced earlier by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucIfThenParsingSyntax.html">FanucIfThenParsingSyntax</a> as a parsing-stage
sub-section (<code>Parsing.FanucIfThen</code>) carrying the raw captured fields
plus an internal <code>PendingAssignments</code> sub-object harvested from the
body text.</p>
<p>
Spec: <code>IF [bool-expr] THEN &lt;stmt&gt;</code> executes <code>&lt;stmt&gt;</code>
only when the condition is truthy. Unlike <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html">FanucGoto</a>'s
conditional form there is no jump — the body affects the current block
only, no source splice, no label scan, no iteration watchdog. The most
common body shape is a single Custom Macro B assignment
(<code>#nnn = &lt;expr&gt;</code>); multiple assignments in one body are also
accepted and lifted together.
</p>
<p>
<a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Condition">Condition</a> is held as a string at parsing time so
VariableEvaluatorSyntax's pass-2 tree walk can substitute
it to a numeric <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a> in place;
the FanucIfThenSyntax tail then reads the resolved node polymorphically
via the same <code>ReadCondition</code> shape used by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a>.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucIfThen</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucIfThen</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Keywords_FanucIfThen_Applied_" data-uid="Hi.NcParsers.Keywords.FanucIfThen.Applied*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucIfThen_Applied" data-uid="Hi.NcParsers.Keywords.FanucIfThen.Applied">
Applied
</h3>
<div class="markdown level1 summary"><p>Whether the body actually fired on this block. False on conditions
that evaluated to zero, on conditions the evaluator could not
resolve, and on bodies that did not parse as one or more assignments
(a G-code-only body for example, currently unsupported and warned).
The host block is preserved in either case so diagnostic readers can
still see the IF-THEN call site.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool Applied { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucIfThen_BodyText_" data-uid="Hi.NcParsers.Keywords.FanucIfThen.BodyText*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucIfThen_BodyText" data-uid="Hi.NcParsers.Keywords.FanucIfThen.BodyText">
BodyText
</h3>
<div class="markdown level1 summary"><p>Raw body text after the <code>THEN</code> keyword, retained verbatim for
diagnostics and round-trip visibility. The structured sub-section
actually lifted on a truthy condition lives at
<code>Parsing.FanucIfThen.PendingAssignments</code>, populated by the
parsing syntax via <a class="xref" href="Hi.NcParsers.Syntaxs.NcSyntaxUtil.html">NcSyntaxUtil</a>'s
<code>GrabTagAssignment</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string BodyText { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucIfThen_Condition_" data-uid="Hi.NcParsers.Keywords.FanucIfThen.Condition*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucIfThen_Condition" data-uid="Hi.NcParsers.Keywords.FanucIfThen.Condition">
Condition
</h3>
<div class="markdown level1 summary"><p>Raw boolean expression text from inside the <code>IF [...]</code> brackets.
String at parsing time;
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>'s pass-2 tree
walk substitutes a numeric literal in place when the expression
evaluates successfully. <code>FanucIfThenSyntax</code> reads the resulting
JSON node polymorphically (number → truthy gate; remaining string →
unevaluated warning).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Condition { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,390 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucMacroCall | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucMacroCall | HiAPI-C# 2025 ">
<meta name="description" content="One-shot custom-macro-call record written by . Lives on both the G65 host block (the caller) and every inlined block of the macro body — so a cache-dump reader can land on any block inside the macro and immediately see &amp;ldquo;this block belongs to a G65 call of File with these argument bindings&amp;rdquo; without back-walking to find the host. Each inlined block additionally carries the resolved Vars.Local #1-#26 bindings derived from (see ), so resolves macro args in a single-block lookup. Frame isolation is structural: caller blocks never have Vars.Local written, so after the macro body ends, the next caller block reads null for any #1-#26 without any explicit frame marker.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.FanucMacroCall">
<h1 id="Hi_NcParsers_Keywords_FanucMacroCall" data-uid="Hi.NcParsers.Keywords.FanucMacroCall" class="text-break">
Class FanucMacroCall
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>One-shot custom-macro-call record written by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>. Lives on both the
<code>G65</code> host block (the caller) and every inlined block of the
macro body — so a cache-dump reader can land on any block inside the
macro and immediately see &ldquo;this block belongs to a G65 call of
File with these argument bindings&rdquo; without back-walking
to find the host.</p>
<p>
Each inlined block additionally carries the resolved
<code>Vars.Local</code> <code>#1-#26</code> bindings derived from <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html#Hi_NcParsers_Keywords_FanucMacroCall_Args">Args</a>
(see <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>), so
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.html">LocalVariableLookup</a>
resolves macro args in a single-block lookup. Frame isolation is
structural: caller blocks never have <code>Vars.Local</code> written, so
after the macro body ends, the next caller block reads <code>null</code>
for any <code>#1-#26</code> without any explicit frame marker.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucMacroCall</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucMacroCall</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Keywords_FanucMacroCall_Args_" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.Args*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucMacroCall_Args" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.Args">
Args
</h3>
<div class="markdown level1 summary"><p>Argument-letter → numeric-value map captured from the call line
(e.g., <code>G65 P9100 A1.5 B2.</code><code>{ &ldquo;A&rdquo;: 1.5, &ldquo;B&rdquo;: 2.0 }</code>).
The matching <code>Vars.Local</code> bindings on each inlined block are
derived from this via the Type-I argument-letter map
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public JsonObject Args { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucMacroCall_FileName_" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.FileName*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucMacroCall_FileName" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.FileName">
FileName
</h3>
<div class="markdown level1 summary"><p>Bare matched file name (e.g. <code>&ldquo;O9100.NC&rdquo;</code>). The resolver
tries several fallback patterns
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_FilenamePatterns">FilenamePatterns</a>);
this records which one hit. JSON-portable across environments —
the folder context lives on the host's
<code>SubProgramFolderConfig</code> dependency, not encoded here.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string FileName { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucMacroCall_L_" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.L*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucMacroCall_L" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.L">
L
</h3>
<div class="markdown level1 summary"><p>Repeat count from the <code>L</code> parameter; defaults to 1 when absent.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int L { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucMacroCall_P_" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.P*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucMacroCall_P" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.P">
P
</h3>
<div class="markdown level1 summary"><p>Macro program number from the <code>P</code> parameter (e.g., 9100 for <code>O9100</code>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int P { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucMacroCall_Term_" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.Term*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucMacroCall_Term" data-uid="Hi.NcParsers.Keywords.FanucMacroCall.Term">
Term
</h3>
<div class="markdown level1 summary"><p>Triggering keyword (always <code>&ldquo;G65&rdquo;</code>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Term { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,386 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class FanucModalMacro | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class FanucModalMacro | HiAPI-C# 2025 ">
<meta name="description" content="Modal-macro-call record left by . Carries Fanuc G66 setup state forward block-to-block until cancelled by G67. The section is also written on the G67 block itself (with = &amp;ldquo;G67&amp;rdquo;) so cache dumps show the cancel edge; subsequent blocks then carry no section at all. Per-block expansion of the modal call into an actual macro inline at every positioning move is not yet implemented — a FanucModalMacro--NotExpanded warning is emitted on the setup block to flag the simulation gap. The setup state itself is captured faithfully so external tooling can detect &quot;this block sits inside a G66 modal&quot; via the carried section.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.FanucModalMacro">
<h1 id="Hi_NcParsers_Keywords_FanucModalMacro" data-uid="Hi.NcParsers.Keywords.FanucModalMacro" class="text-break">
Class FanucModalMacro
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Modal-macro-call record left by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>. Carries Fanuc
<code>G66</code> setup state forward block-to-block until cancelled by
<code>G67</code>. The section is also written on the <code>G67</code> block itself
(with <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html#Hi_NcParsers_Keywords_FanucModalMacro_Term">Term</a> = <code>&ldquo;G67&rdquo;</code>) so cache dumps show the cancel
edge; subsequent blocks then carry no section at all.</p>
<p>
Per-block expansion of the modal call into an actual macro inline at
every positioning move is not yet implemented — a
<code>FanucModalMacro--NotExpanded</code> warning is emitted on the setup
block to flag the simulation gap. The setup state itself is captured
faithfully so external tooling can detect "this block sits inside a
G66 modal" via the carried section.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class FanucModalMacro</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">FanucModalMacro</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_Keywords_FanucModalMacro_Args_" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.Args*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucModalMacro_Args" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.Args">
Args
</h3>
<div class="markdown level1 summary"><p>Argument-letter → numeric-value map captured from the <code>G66</code>
setup line. Null on a <code>G67</code> cancel block.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public JsonObject Args { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucModalMacro_FileName_" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.FileName*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucModalMacro_FileName" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.FileName">
FileName
</h3>
<div class="markdown level1 summary"><p>Bare matched file name (e.g. <code>&ldquo;O9000.NC&rdquo;</code>) that would supply
the modal-call macro body. Null on a <code>G67</code> cancel block or
when the file could not be resolved at the setup site. Same
JSON-portable form as <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html#Hi_NcParsers_Keywords_FanucMacroCall_FileName">FileName</a> — the
folder context lives on the host's <code>SubProgramFolderConfig</code>
dependency, not encoded here.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string FileName { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucModalMacro_L_" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.L*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucModalMacro_L" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.L">
L
</h3>
<div class="markdown level1 summary"><p>Repeat count from the <code>L</code> parameter; defaults to 1 when absent. Null on a <code>G67</code> cancel block.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? L { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucModalMacro_P_" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.P*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucModalMacro_P" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.P">
P
</h3>
<div class="markdown level1 summary"><p>Macro program number from the <code>P</code> parameter on the <code>G66</code> setup. Null on a <code>G67</code> cancel block.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? P { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_FanucModalMacro_Term_" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.Term*"></a>
<h3 id="Hi_NcParsers_Keywords_FanucModalMacro_Term" data-uid="Hi.NcParsers.Keywords.FanucModalMacro.Term">
Term
</h3>
<div class="markdown level1 summary"><p>Triggering keyword: <code>&ldquo;G66&rdquo;</code> for setup / modal-active blocks,
<code>&ldquo;G67&rdquo;</code> for the cancel block. Carried blocks downstream of a
<code>G66</code> setup mirror the setup section verbatim.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Term { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Interface IMotionEventDef | HiAPI-C# 2025 ">
<meta name="description" content="One-shot motion event — present only on blocks that actually issue a motion command. Used by motion semantics (, , ) as the trigger to emit motion . NOT carried forward across blocks. Property names are used as JSON keys via nameof.">
<meta name="description" content="One-shot motion event — present on every block whose source programmed a motion command, regardless of whether the resulting displacement is non-zero. A redundant G01 X10 on a block already at X10 still gets a ; the motion semantics (, , ) then early-return on distance &amp;lt;= 0 and emit no . NOT carried forward across blocks. Reason for the &quot;programmed, not displaced&quot; definition: Fanuc G66 modal macro fires once per programmed motion command (per Fanuc spec — no distance gate), so .Expansion uses presence as its trigger. Suppressing the section on zero-distance moves would silently change G66 behaviour. The modal sibling separately latches the Group-01 mode for readers that only need to know &quot;what G-code is active&quot;. Property names are used as JSON keys via nameof.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -97,11 +97,24 @@ Interface IMotionEventDef
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>One-shot motion event — present only on blocks that actually issue a
motion command. Used by motion semantics (<a class="xref" href="Hi.NcParsers.Semantics.McLinearMotionSemantic.html">McLinearMotionSemantic</a>,
<div class="markdown summary"><p>One-shot motion event — present on every block whose source <em>programmed</em>
a motion command, regardless of whether the resulting displacement is non-zero.
A redundant <code>G01 X10</code> on a block already at X10 still gets a
<a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a>; the motion semantics
(<a class="xref" href="Hi.NcParsers.Semantics.McLinearMotionSemantic.html">McLinearMotionSemantic</a>,
<a class="xref" href="Hi.NcParsers.Semantics.McArcMotionSemantic.html">McArcMotionSemantic</a>, <a class="xref" href="Hi.NcParsers.Semantics.ClLinearMotionSemantic.html">ClLinearMotionSemantic</a>)
as the trigger to emit motion <a class="xref" href="Hi.Numerical.Acts.IAct.html">IAct</a>. NOT carried
forward across blocks. Property names are used as JSON keys via <code>nameof</code>.</p>
then early-return on <code>distance &lt;= 0</code> and emit no
<a class="xref" href="Hi.Numerical.Acts.IAct.html">IAct</a>. NOT carried forward across blocks.</p>
<p>
Reason for the "programmed, not displaced" definition: Fanuc G66 modal
macro fires once per <em>programmed</em> motion command (per Fanuc spec —
no distance gate), so <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>.Expansion uses
<a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> presence as its trigger. Suppressing the section
on zero-distance moves would silently change G66 behaviour. The modal
sibling <a class="xref" href="Hi.NcParsers.Keywords.MotionState.html">MotionState</a> separately latches the Group-01 mode for
readers that only need to know "what G-code is active".
</p>
Property names are used as JSON keys via <code>nameof</code>.
</div>
<div class="markdown conceptual"></div>

View File

@ -0,0 +1,275 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MacroFrame | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MacroFrame | HiAPI-C# 2025 ">
<meta name="description" content="Top-level integer marker stamped onto a SyntaxPiece&#39;s JSON to identify which call frame the block belongs to. Brand-agnostic by design — written by today, reusable by any future call-inlining syntax (Fanuc G66 modal expansion, Heidenhain LBL CALL, …) that needs local-variable isolation across call boundaries. Semantics: the value is an opaque id; only equality matters. Two blocks with the same id share a call frame (locals visible across them via single-step carry); two blocks with different ids do not. The id 0 is reserved for the main program frame and is returned by when the field is absent — so a plain caller block needs no stamp and yet compares distinct from any inlined frame. Stored as a top-level JSON int (not an object section) so it stays lightweight on every inlined block. Decoupled from : that section is a diagnostic record of the call (what file, what args), while MacroFrame is the purely functional marker the local-variable I/O syntaxes consult.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.Keywords.MacroFrame">
<h1 id="Hi_NcParsers_Keywords_MacroFrame" data-uid="Hi.NcParsers.Keywords.MacroFrame" class="text-break">
Class MacroFrame
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.Keywords.html">Keywords</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Top-level integer marker stamped onto a SyntaxPiece's JSON
to identify which call frame the block belongs to. Brand-agnostic by
design — written by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>
today, reusable by any future call-inlining syntax (Fanuc <code>G66</code>
modal expansion, Heidenhain <code>LBL CALL</code>, …) that needs
local-variable isolation across call boundaries.</p>
<p>
Semantics: the value is an opaque id; only equality matters. Two
blocks with the same <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id share a call frame
(locals visible across them via single-step carry); two blocks with
different ids do not. The id <code>0</code> is reserved for the main
program frame and is returned by <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html#Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_">Get(JsonObject)</a> when the field is
absent — so a plain caller block needs no stamp and yet compares
distinct from any inlined frame.
</p>
<p>
Stored as a top-level JSON int (not an object section) so it stays
lightweight on every inlined block. Decoupled from
<a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a>: that section is a diagnostic record of
the call (what file, what args), while <code>MacroFrame</code> is the
purely functional marker the local-variable I/O syntaxes consult.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class MacroFrame</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MacroFrame</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_Keywords_MacroFrame_Get_" data-uid="Hi.NcParsers.Keywords.MacroFrame.Get*"></a>
<h3 id="Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_" data-uid="Hi.NcParsers.Keywords.MacroFrame.Get(System.Text.Json.Nodes.JsonObject)">
Get(JsonObject)
</h3>
<div class="markdown level1 summary"><p>Reads the frame id off a block, returning <code>0</code> (main frame)
when the field is absent or non-integer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static int Get(JsonObject json)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>json</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_MacroFrame_Set_" data-uid="Hi.NcParsers.Keywords.MacroFrame.Set*"></a>
<h3 id="Hi_NcParsers_Keywords_MacroFrame_Set_System_Text_Json_Nodes_JsonObject_System_Int32_" data-uid="Hi.NcParsers.Keywords.MacroFrame.Set(System.Text.Json.Nodes.JsonObject,System.Int32)">
Set(JsonObject, int)
</h3>
<div class="markdown level1 summary"><p>Stamps the frame id onto a block. Overwrites any previous value.
Callers writing the main-frame default (<code>0</code>) should simply
leave the field absent rather than calling this with <code>0</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void Set(JsonObject json, int frameId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>json</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a></dt>
<dd></dd>
<dt><code>frameId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class SubProgramCall | HiAPI-C# 2025 ">
<meta name="description" content="Subprogram call record left on the M98 / M198 host block by after the subprogram file has been inlined into the source layer. The call itself emits no motion act; this section is bookkeeping so cache dumps and diagnostic readers can see &amp;quot;this block triggered an inline of file File&amp;quot;.">
<meta name="description" content="Subprogram call record left by on the M98 / M198 host block and on every inlined body block. The call itself emits no motion act; this section is bookkeeping so cache dumps and diagnostic readers can see &amp;quot;this block triggered (or sits inside) an inline of program P&amp;quot;. M98 and M198 share the exact same section shape. The difference between them is purely environmental — which folder the resolver looks in (SubProgramFolderConfig.InternalFolder vs ExternalFolder) — and that lives on the dependency, not in this JSON record.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -97,11 +97,19 @@ Class SubProgramCall
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Subprogram call record left on the M98 / M198 host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> after the subprogram
file has been inlined into the source layer. The call itself emits no
motion act; this section is bookkeeping so cache dumps and diagnostic
readers can see &quot;this block triggered an inline of file <code>File</code>&quot;.</p>
<div class="markdown summary"><p>Subprogram call record left by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> on the M98 /
M198 host block and on every inlined body block. The call itself
emits no motion act; this section is bookkeeping so cache dumps and
diagnostic readers can see &quot;this block triggered (or sits inside)
an inline of program <code>P</code>&quot;.</p>
<p>
<code>M98</code> and <code>M198</code> share the exact same section shape. The
difference between them is purely environmental — which folder the
resolver looks in (<code>SubProgramFolderConfig.InternalFolder</code> vs
<code>ExternalFolder</code>) — and that lives on the dependency, not in
this JSON record.
</p>
</div>
<div class="markdown conceptual"></div>
@ -182,19 +190,25 @@ readers can see &quot;this block triggered an inline of file <code>File</code>&q
</h2>
<a id="Hi_NcParsers_Keywords_SubProgramCall_File_" data-uid="Hi.NcParsers.Keywords.SubProgramCall.File*"></a>
<a id="Hi_NcParsers_Keywords_SubProgramCall_FileName_" data-uid="Hi.NcParsers.Keywords.SubProgramCall.FileName*"></a>
<h3 id="Hi_NcParsers_Keywords_SubProgramCall_File" data-uid="Hi.NcParsers.Keywords.SubProgramCall.File">
File
<h3 id="Hi_NcParsers_Keywords_SubProgramCall_FileName" data-uid="Hi.NcParsers.Keywords.SubProgramCall.FileName">
FileName
</h3>
<div class="markdown level1 summary"><p>Resolved file path that supplied the inlined blocks. Useful for diagnostics when a fallback filename pattern matched.</p>
<div class="markdown level1 summary"><p>Bare matched file name (e.g. <code>&ldquo;O1234.NC&rdquo;</code>). The resolver
tries several fallback patterns
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.MacroFileResolver.html#Hi_NcParsers_EvaluationSyntaxs_MacroFileResolver_FilenamePatterns">FilenamePatterns</a>);
this records which one hit. JSON-portable across environments —
the folder context (internal vs external storage) is captured by
the host's <code>SubProgramFolderConfig</code> dependency, not encoded
here.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string File { get; set; }</code></pre>
<pre><code class="lang-csharp hljs">public string FileName { get; set; }</code></pre>
</div>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class SubProgramReturn | HiAPI-C# 2025 ">
<meta name="description" content="Subprogram return record left on the M99 host block by . Return blocks produce no motion acts; this section makes the consumed M99 visible in cache dumps and reserves a slot for future M99 P{seq} (return-to-sequence-number) support.">
<meta name="description" content="Subprogram return record left on the M99 host block by . Return blocks produce no motion acts; this section makes the consumed M99 visible in cache dumps and surfaces the M99 P{seq} jump decision.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -100,8 +100,7 @@ Class SubProgramReturn
<div class="markdown summary"><p>Subprogram return record left on the M99 host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a>. Return blocks
produce no motion acts; this section makes the consumed M99 visible
in cache dumps and reserves a slot for future <code>M99 P{seq}</code>
(return-to-sequence-number) support.</p>
in cache dumps and surfaces the <code>M99 P{seq}</code> jump decision.</p>
</div>
<div class="markdown conceptual"></div>
@ -182,6 +181,42 @@ in cache dumps and reserves a slot for future <code>M99 P{seq}</code>
</h2>
<a id="Hi_NcParsers_Keywords_SubProgramReturn_JumpedToN_" data-uid="Hi.NcParsers.Keywords.SubProgramReturn.JumpedToN*"></a>
<h3 id="Hi_NcParsers_Keywords_SubProgramReturn_JumpedToN" data-uid="Hi.NcParsers.Keywords.SubProgramReturn.JumpedToN">
JumpedToN
</h3>
<div class="markdown level1 summary"><p>Set to <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html#Hi_NcParsers_Keywords_SubProgramReturn_P">P</a> when the M99 actually redirected control
flow to the caller's <code>N{seq}</code> block via
LazyLinkedList&lt;T&gt;.ReplaceSource. Null on plain M99
(no P), and on M99 P{seq} that fell through because the jump
could not be carried out.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int? JumpedToN { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_Keywords_SubProgramReturn_P_" data-uid="Hi.NcParsers.Keywords.SubProgramReturn.P*"></a>
<h3 id="Hi_NcParsers_Keywords_SubProgramReturn_P" data-uid="Hi.NcParsers.Keywords.SubProgramReturn.P">
@ -190,10 +225,11 @@ in cache dumps and reserves a slot for future <code>M99 P{seq}</code>
</h3>
<div class="markdown level1 summary"><p>Optional caller sequence number from the <code>P</code> parameter
(<code>M99 P{seq}</code>). Null on a plain <code>M99</code>. Currently
recorded but not yet honoured — the subprogram's tail
continues straight into the caller's next block, regardless of
<a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html#Hi_NcParsers_Keywords_SubProgramReturn_P">P</a>.</p>
(<code>M99 P{seq}</code>). Null on a plain <code>M99</code>. When non-null
and the jump fires, <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html#Hi_NcParsers_Keywords_SubProgramReturn_JumpedToN">JumpedToN</a> is set to the same
value; when the jump is suppressed (no caller frame, label not
found, iteration limit reached) <a class="xref" href="Hi.NcParsers.Keywords.SubProgramReturn.html#Hi_NcParsers_Keywords_SubProgramReturn_JumpedToN">JumpedToN</a> stays
null and a warning is emitted.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -114,6 +114,36 @@ comments (and any embedded CsScript) still take effect.</li></ul>
Not a comment: a comment is static metadata, block skip is a runtime
toggle that can change per machine/operator setting.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.CallFrame.html">CallFrame</a></dt>
<dd><p>One entry in <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html#Hi_NcParsers_Keywords_CallStack_Frames">Frames</a>. Holds the caller-side
information consumers need to &ldquo;unwind&rdquo; or &ldquo;look back&rdquo; — currently
only the relative file path of the caller, used by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a> on
<code>M99 P{seq}</code> to locate the caller's <code>N{seq}</code> block.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.CallStack.html">CallStack</a></dt>
<dd><p>JSON-section data shape representing the active call-frame stack on
a block — pushed by call-and-inline syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> for M98/M198,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> for G65, and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>'s expansion
phase for G66 implicit triggers) and popped by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a> on M99. Every
block between push and pop carries the section forward via
<a class="xref" href="Hi.NcParsers.PostLogicSyntaxs.ModalCarrySyntax.html">ModalCarrySyntax</a>; the caller's blocks
before push and after pop carry the surrounding stack state
(typically empty when running from the main file).</p>
<p>
The section is wrapped in a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a> rather than
exposed as a bare <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonarray">JsonArray</a> so it fits ModalCarry's
"deep-clone JsonObject" carry pattern — the array of frames lives
inside <a class="xref" href="Hi.NcParsers.Keywords.CallStack.html#Hi_NcParsers_Keywords_CallStack_Frames">Frames</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
@ -164,6 +194,97 @@ Heidenhain: CYCL DEF 247 (Datum Preset) / CYCL DEF 7 (Datum Shift).
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.Dwell.html">Dwell</a></dt>
<dd><p>Section key holder + concrete implementation for <a class="xref" href="Hi.NcParsers.Keywords.IDwellDef.html">IDwellDef</a>.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html">FanucGoto</a></dt>
<dd><p>Fanuc Custom Macro B GOTO record. Stamped on the host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> after the control-flow
decision has been made; produced earlier by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucGotoParsingSyntax.html">FanucGotoParsingSyntax</a> as a parsing-stage
sub-section (<code>Parsing.FanucGoto</code>) carrying the raw captured fields.</p>
<p>
Two source forms map to the same shape:
<ul><li><code>GOTO &lt;n&gt;</code> — unconditional jump. <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_Condition">Condition</a> is null.</li><li><code>IF [&lt;bool-expr&gt;] GOTO &lt;n&gt;</code> — conditional jump.
<a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_Condition">Condition</a> holds the expression text from inside the
brackets.</li></ul>
<p>
At parsing time <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html#Hi_NcParsers_Keywords_FanucGoto_N">N</a> is a raw token from the source — it may
be a literal (<code>"100"</code>), a variable reference (<code>"#1"</code>), or a
bracketed expression (<code>"#[#2+5]"</code>). VariableEvaluatorSyntax
substitutes a resolved literal back into the same field in the
Evaluation bundle; <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> then
<code>int.TryParse</code>s the final string to produce an int target.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html">FanucIfThen</a></dt>
<dd><p>Fanuc Custom Macro B <code>IF [&lt;cond&gt;] THEN &lt;body&gt;</code>
single-block conditional record. Stamped on the host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.html">FanucIfThenSyntax</a> after the gate
decision; produced earlier by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucIfThenParsingSyntax.html">FanucIfThenParsingSyntax</a> as a parsing-stage
sub-section (<code>Parsing.FanucIfThen</code>) carrying the raw captured fields
plus an internal <code>PendingAssignments</code> sub-object harvested from the
body text.</p>
<p>
Spec: <code>IF [bool-expr] THEN &lt;stmt&gt;</code> executes <code>&lt;stmt&gt;</code>
only when the condition is truthy. Unlike <a class="xref" href="Hi.NcParsers.Keywords.FanucGoto.html">FanucGoto</a>'s
conditional form there is no jump — the body affects the current block
only, no source splice, no label scan, no iteration watchdog. The most
common body shape is a single Custom Macro B assignment
(<code>#nnn = &lt;expr&gt;</code>); multiple assignments in one body are also
accepted and lifted together.
</p>
<p>
<a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Condition">Condition</a> is held as a string at parsing time so
VariableEvaluatorSyntax's pass-2 tree walk can substitute
it to a numeric <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a> in place;
the FanucIfThenSyntax tail then reads the resolved node polymorphically
via the same <code>ReadCondition</code> shape used by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a></dt>
<dd><p>One-shot custom-macro-call record written by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>. Lives on both the
<code>G65</code> host block (the caller) and every inlined block of the
macro body — so a cache-dump reader can land on any block inside the
macro and immediately see &ldquo;this block belongs to a G65 call of
File with these argument bindings&rdquo; without back-walking
to find the host.</p>
<p>
Each inlined block additionally carries the resolved
<code>Vars.Local</code> <code>#1-#26</code> bindings derived from <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html#Hi_NcParsers_Keywords_FanucMacroCall_Args">Args</a>
(see <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>), so
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.LocalVariableLookup.html">LocalVariableLookup</a>
resolves macro args in a single-block lookup. Frame isolation is
structural: caller blocks never have <code>Vars.Local</code> written, so
after the macro body ends, the next caller block reads <code>null</code>
for any <code>#1-#26</code> without any explicit frame marker.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a></dt>
<dd><p>Modal-macro-call record left by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>. Carries Fanuc
<code>G66</code> setup state forward block-to-block until cancelled by
<code>G67</code>. The section is also written on the <code>G67</code> block itself
(with <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html#Hi_NcParsers_Keywords_FanucModalMacro_Term">Term</a> = <code>&ldquo;G67&rdquo;</code>) so cache dumps show the cancel
edge; subsequent blocks then carry no section at all.</p>
<p>
Per-block expansion of the modal call into an actual macro inline at
every positioning move is not yet implemented — a
<code>FanucModalMacro--NotExpanded</code> warning is emitted on the setup
block to flag the simulation gap. The setup state itself is captured
faithfully so external tooling can detect "this block sits inside a
G66 modal" via the carried section.
</p>
</dd>
</dl>
<dl class="jumplist">
@ -215,6 +336,32 @@ do not share this key, because their data shapes are richer.
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.MachineCoordinateState.html">MachineCoordinateState</a></dt>
<dd><p>Section key holder for <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html">IMachineCoordinateStateDef</a>.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a></dt>
<dd><p>Top-level integer marker stamped onto a SyntaxPiece's JSON
to identify which call frame the block belongs to. Brand-agnostic by
design — written by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a>
today, reusable by any future call-inlining syntax (Fanuc <code>G66</code>
modal expansion, Heidenhain <code>LBL CALL</code>, …) that needs
local-variable isolation across call boundaries.</p>
<p>
Semantics: the value is an opaque id; only equality matters. Two
blocks with the same <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id share a call frame
(locals visible across them via single-step carry); two blocks with
different ids do not. The id <code>0</code> is reserved for the main
program frame and is returned by <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html#Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_">Get(JsonObject)</a> when the field is
absent — so a plain caller block needs no stamp and yet compares
distinct from any inlined frame.
</p>
<p>
Stored as a top-level JSON int (not an object section) so it stays
lightweight on every inlined block. Decoupled from
<a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a>: that section is a diagnostic record of
the call (what file, what args), while <code>MacroFrame</code> is the
purely functional marker the local-variable I/O syntaxes consult.
</p>
</dd>
</dl>
<dl class="jumplist">
@ -274,11 +421,19 @@ do not share this key, because their data shapes are richer.
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.SubProgramCall.html">SubProgramCall</a></dt>
<dd><p>Subprogram call record left on the M98 / M198 host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> after the subprogram
file has been inlined into the source layer. The call itself emits no
motion act; this section is bookkeeping so cache dumps and diagnostic
readers can see &quot;this block triggered an inline of file <code>File</code>&quot;.</p>
<dd><p>Subprogram call record left by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> on the M98 /
M198 host block and on every inlined body block. The call itself
emits no motion act; this section is bookkeeping so cache dumps and
diagnostic readers can see &quot;this block triggered (or sits inside)
an inline of program <code>P</code>&quot;.</p>
<p>
<code>M98</code> and <code>M198</code> share the exact same section shape. The
difference between them is purely environmental — which folder the
resolver looks in (<code>SubProgramFolderConfig.InternalFolder</code> vs
<code>ExternalFolder</code>) — and that lives on the dependency, not in
this JSON record.
</p>
</dd>
</dl>
<dl class="jumplist">
@ -286,8 +441,7 @@ readers can see &quot;this block triggered an inline of file <code>File</code>&q
<dd><p>Subprogram return record left on the M99 host block by
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramReturnSyntax.html">SubProgramReturnSyntax</a>. Return blocks
produce no motion acts; this section makes the consumed M99 visible
in cache dumps and reserves a slot for future <code>M99 P{seq}</code>
(return-to-sequence-number) support.</p>
in cache dumps and surfaces the <code>M99 P{seq}</code> jump decision.</p>
</dd>
</dl>
<dl class="jumplist">
@ -459,11 +613,24 @@ as NaN sentinels.
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.Keywords.IMotionEventDef.html">IMotionEventDef</a></dt>
<dd><p>One-shot motion event — present only on blocks that actually issue a
motion command. Used by motion semantics (<a class="xref" href="Hi.NcParsers.Semantics.McLinearMotionSemantic.html">McLinearMotionSemantic</a>,
<dd><p>One-shot motion event — present on every block whose source <em>programmed</em>
a motion command, regardless of whether the resulting displacement is non-zero.
A redundant <code>G01 X10</code> on a block already at X10 still gets a
<a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a>; the motion semantics
(<a class="xref" href="Hi.NcParsers.Semantics.McLinearMotionSemantic.html">McLinearMotionSemantic</a>,
<a class="xref" href="Hi.NcParsers.Semantics.McArcMotionSemantic.html">McArcMotionSemantic</a>, <a class="xref" href="Hi.NcParsers.Semantics.ClLinearMotionSemantic.html">ClLinearMotionSemantic</a>)
as the trigger to emit motion <a class="xref" href="Hi.Numerical.Acts.IAct.html">IAct</a>. NOT carried
forward across blocks. Property names are used as JSON keys via <code>nameof</code>.</p>
then early-return on <code>distance &lt;= 0</code> and emit no
<a class="xref" href="Hi.Numerical.Acts.IAct.html">IAct</a>. NOT carried forward across blocks.</p>
<p>
Reason for the "programmed, not displaced" definition: Fanuc G66 modal
macro fires once per <em>programmed</em> motion command (per Fanuc spec —
no distance gate), so <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a>.Expansion uses
<a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> presence as its trigger. Suppressing the section
on zero-distance moves would silently change G66 behaviour. The modal
sibling <a class="xref" href="Hi.NcParsers.Keywords.MotionState.html">MotionState</a> separately latches the Group-01 mode for
readers that only need to know "what G-code is active".
</p>
Property names are used as JSON keys via <code>nameof</code>.
</dd>
</dl>
<dl class="jumplist">

View File

@ -0,0 +1,387 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Enum BareG28Behavior | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Enum BareG28Behavior | HiAPI-C# 2025 ">
<meta name="description" content="Writes section for G28 reference point return. Reads intermediate XYZ from Parsing.G28 (written by ) and converts to machine coordinates via . Must be placed after in the syntax chain. Removes the section written by (G28 handles its own motion). Overwrites root and with reference position for subsequent block lookback.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.LogicSyntaxs.BareG28Behavior">
<h1 id="Hi_NcParsers_LogicSyntaxs_BareG28Behavior" data-uid="Hi.NcParsers.LogicSyntaxs.BareG28Behavior" class="text-break">
Enum BareG28Behavior
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.LogicSyntaxs.html">LogicSyntaxs</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Writes <a class="xref" href="Hi.NcParsers.Keywords.ICompoundMotionDef.html">ICompoundMotionDef</a> section for G28 reference point return.
Reads intermediate XYZ from <code>Parsing.G28</code>
(written by <a class="xref" href="Hi.NcParsers.Syntaxs.GenericSyntaxKit.html#Hi_NcParsers_Syntaxs_GenericSyntaxKit_G28Syntax">G28Syntax</a>)
and converts to machine coordinates via
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveProgramXyz_System_Text_Json_Nodes_JsonNode_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">ResolveProgramXyz(JsonNode, LazyLinkedListNode&lt;SyntaxPiece&gt;, ISentenceCarrier, NcDiagnosticProgress)</a>.</p>
<p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> in the syntax chain.
Removes the <a class="xref" href="Hi.NcParsers.Keywords.IMotionEventDef.html">IMotionEventDef</a> section written by
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> (G28 handles its own motion).
Overwrites root <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>
and <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> with reference position
for subsequent block lookback.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public enum BareG28Behavior</code></pre>
</div>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.MaskUtil.html#Hi_Common_MaskUtil_GetMaskedValue__1___0___0_System_Boolean_">MaskUtil.GetMaskedValue&lt;T&gt;(T, T, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Common.MaskUtil.html#Hi_Common_MaskUtil_SetMask__1___0____0_System_Boolean_">MaskUtil.SetMask&lt;T&gt;(ref T, T, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 id="fields">Fields
</h2>
<dl class="parameters">
<dt id="Hi_NcParsers_LogicSyntaxs_BareG28Behavior_Alarm"><code>Alarm = 0</code></dt>
<dd><p>Emit <code>Coord-RefReturn&ndash;003</code> validation error and
consume the bare G28 without emitting motion.</p>
</dd>
<dt id="Hi_NcParsers_LogicSyntaxs_BareG28Behavior_AllAxesHome"><code>AllAxesHome = 1</code></dt>
<dd><p>Interpret bare G28 as if every configured axis were
listed at its current modal value, so item 0 (intermediate) is
a no-op and item 1 sends each configured axis to its home.
Requires an <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> dep; without one
the syntax falls back to <a class="xref" href="Hi.NcParsers.LogicSyntaxs.BareG28Behavior.html#Hi_NcParsers_LogicSyntaxs_BareG28Behavior_Alarm">Alarm</a>.</p>
</dd>
</dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_BareG28Behavior_examples">Examples</h2>
<p>All cases hardcode a <code>TestDeps.HomeMc</code> with X/Y home at 0 and Z
home at 100 (typical mill where Z-home is above the table) and leave
the <code>ProgramToMcTransform</code> chain at identity so the final
<code>ProgramXyz</code> equals <code>MachineCoordinateState</code>. The G28
pattern emits a 2-item <code>CompoundMotion</code>: item 0 is the
intermediate point in <code>ProgramXyz</code>, item 1 is the final position
in <code>MachineCoordinateState</code>. Axes not present in the G28 block
keep the previous-block MC value rather than going home.</p>
<p>
<code>G91 G28 X0 Y0 Z0</code> with a <code>#Previous:</code> block carrying
<code>MachineCoordinateState=(50,60,70)</code> — all three axes go home,
so the final MC is the configured home <code>(0,0,100)</code>:
</p>
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": 70 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": { "X": 0, "Y": 0, "Z": 0 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Term": "G28",
"Items": [
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 }
},
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 100 }
}
]
},
"ProgramXyz": { "X": 0, "Y": 0, "Z": 100 }
}</code></pre>
<code>G91 G28 Z0</code> — only Z goes to its home; X/Y inherit from the
previous block's MC. Item 0's intermediate <code>ProgramXyz</code> takes
X/Y from the inherited program XYZ (= previous MC under identity
transform) and Z from the literal 0 in the G28 block:
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": 70 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": { "Z": 0 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Term": "G28",
"Items": [
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"ProgramXyz": { "X": 50, "Y": 60, "Z": 0 }
},
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"MachineCoordinateState": { "X": 50, "Y": 60, "Z": 100 }
}
]
},
"ProgramXyz": { "X": 50, "Y": 60, "Z": 100 }
}</code></pre>
No <a class="xref" href="Hi.NcParsers.Dependencys.IHomeMcConfig.html">IHomeMcConfig</a> dep on the dependency list — the
syntax early-returns and the G28 sub-section stays in <code>Parsing</code>
for an upstream consumer or downstream syntax to handle:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": { "X": 0, "Y": 0, "Z": 0 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": { "X": 0, "Y": 0, "Z": 0 } } }</code></pre>
<p>
Rotary cases below add <code>TestDeps.AxisConfig</code> declaring B as
rotary and extend <code>HomeMc</code> with the conventional B home at 0°.
Each rotary block uses literal B = 45° so item 0's intermediate
(45°), item 1's home (0°), and <code>#Previous:</code> modal B (30°) are
pairwise distinct — a test that swaps any two values for any other
is caught by the assertion. The wrap pass
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a>) is a different syntax, so
these per-SUT conformance assertions show only the raw literal /
canonical-home values written by this syntax, before any cyclic
normalization runs.
</p>
<code>G91 G28 B45.</code> — pure rotary G28. Emits a 2-item
<code>CompoundMotion</code> whose items carry only ABC keys in MC; no XYZ
<code>ProgramXyz</code> and no XYZ MC because the block doesn't reference
X/Y/Z (and the conformance harness doesn't run
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> downstream — in the full pipeline that
syntax fills root <code>MachineCoordinateState</code>'s XYZ from root
<code>ProgramXyz</code>, but with no XYZ in the block there's nothing to
fill anyway). Root MC.B holds the canonical home for modal
carry-forward; root <code>ProgramXyz</code> is not written:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": { "B": 45 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "B": 0 },
"CompoundMotion": {
"Term": "G28",
"Items": [
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"MachineCoordinateState": { "B": 45 }
},
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"MachineCoordinateState": { "B": 0 }
}
]
}
}</code></pre>
<code>G28 X0. B45.</code> mixed XYZ + rotary. Both axis kinds occupy the
same two items: item 0 carries the XYZ intermediate
<code>ProgramXyz</code> alongside the rotary literal in MC; item 1
carries the final XYZ MC alongside the rotary home in MC. Root
<code>MachineCoordinateState</code> here holds only the rotary modal value
(B = 0, the home); the XYZ portion of root MC would be filled by
the downstream <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> in the full pipeline
(out of scope for this per-SUT conformance). Root
<code>MachineCoordinateState</code> appears first because the
rotary-home write happens before <code>CompoundMotion</code> /
<code>ProgramXyz</code> are inserted. <code>#Previous:</code> carries B = 30 so
the prev rotary modal is distinct from both the literal (45) and
the home (0):
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": 70, "B": 30 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": { "X": 0, "B": 45 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "B": 0 },
"CompoundMotion": {
"Term": "G28",
"Items": [
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"ProgramXyz": { "X": 0, "Y": 60, "Z": 70 },
"MachineCoordinateState": { "B": 45 }
},
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"MachineCoordinateState": { "X": 0, "Y": 60, "Z": 70, "B": 0 }
}
]
},
"ProgramXyz": { "X": 0, "Y": 60, "Z": 70 }
}</code></pre>
<p>
Bare <code>G28</code> — no axis specifiers — exercises the configurable
BareG28 policy. Default <a class="xref" href="Hi.NcParsers.LogicSyntaxs.BareG28Behavior.html#Hi_NcParsers_LogicSyntaxs_BareG28Behavior_Alarm">Alarm</a>
emits <code>Coord-RefReturn--003</code> and consumes the G28 without
motion (the diagnostic surfaces through the
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a> sink, not the block JSON, so the
canonical <code>#AfterBuild</code> is just an empty object):
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": {} } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{}</code></pre>
Bare <code>G28</code> with BareG28 set to
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.BareG28Behavior.html#Hi_NcParsers_LogicSyntaxs_BareG28Behavior_AllAxesHome">AllAxesHome</a>: the syntax synthesises a
literal at the inherited program position for every configured
linear axis and the previous modal angle for every configured
rotary axis (here X/Y/Z taken from the <code>#Previous:</code> MC under
the identity <code>ProgramToMcTransform</code>, B taken from the prev
modal). Item 0's intermediate therefore equals current (no motion
in stage 1) and item 1 sends each axis to its home:
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30, "B": 45 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G28": {} } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "B": 0 },
"CompoundMotion": {
"Term": "G28",
"Items": [
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "B": 45 }
},
{
"MotionEvent": { "Form": "McLinear", "IsRapid": true },
"MachineCoordinateState": { "X": 0, "Y": 0, "Z": 100, "B": 0 }
}
]
},
"ProgramXyz": { "X": 0, "Y": 0, "Z": 100 }
}</code></pre>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>

View File

@ -195,6 +195,161 @@ writes a <a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEve
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_CircularMotionSyntax_examples">Examples</h2>
<p>All cases below have the current block's <code>ProgramXyz</code> already
set (as a prior <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> would have produced)
and run with no <code>#Previous:</code>, so <code>GetLastProgramXyz</code>
returns <code>Vec3d.Zero</code>. The G17 XY plane is implicit
(no <code>PlaneSelect</code> section means <code>PlaneNormalDir = 2</code>).</p>
<p>
G02 with I/J — quarter arc from <code>(0,0,0)</code> to <code>(10,0,0)</code>
around <code>(5,0,0)</code>; I=5 J=0 are incremental offsets from start
to center. The <code>G02</code> flag is consumed (<code>Parsing</code> removed
once empty); <code>MotionState</code> + <code>MotionEvent</code> are written:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G02"], "I": 5, "J": 0 },
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 },
"MotionState": { "Term": "G02" },
"MotionEvent": {
"Form": "McArc",
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
"PlaneNormalDir": 2,
"IsCcw": false,
"AdditionalCircleNum": 0
}
}</code></pre>
Modal carry of G02: no motion flag on the current block but a
<code>#Previous:</code> <code>MotionState.Term = "G02"</code> tells us we are
still in circular mode. I/J on the current block describe the arc
the same way:
#Previous:
<pre><code class="lang-csharp">{ "MotionState": { "Term": "G02" } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "I": 5, "J": 0 },
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 },
"MotionState": { "Term": "G02" },
"MotionEvent": {
"Form": "McArc",
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
"PlaneNormalDir": 2,
"IsCcw": false,
"AdditionalCircleNum": 0
}
}</code></pre>
No I/J/K/R on the block — the per-block arc data is missing, so
the syntax bails out early; the <code>G02</code> flag stays in
<code>Parsing.Flags</code> for some other syntax to act on (or to surface
as residue if no one does):
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G02"] },
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G02"] },
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 }
}</code></pre>
R-format degenerate (chord = 2R, semicircle): start <code>(0,0,0)</code>
→ end <code>(10,0,0)</code>, R=5. <code>perpDistSq</code> resolves to 0 so the
computed center collapses to the chord midpoint <code>(5,0,0)</code>; no
sqrt drift on this branch:
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G02"], "R": 5 },
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 },
"MotionState": { "Term": "G02" },
"MotionEvent": {
"Form": "McArc",
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
"PlaneNormalDir": 2,
"IsCcw": false,
"AdditionalCircleNum": 0
}
}</code></pre>
R-format non-trivial: G02 90° arc from <code>(0,0,0)</code> to
<code>(10,10,0)</code> with R=10. The center comes from the cross-product
+ sqrt + normalize path inside <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">ResolveCenterFromR(Vec3d, Vec3d, int, bool, double)</a>,
but for this particular axis-aligned chord the rounding errors
cancel and the center lands at exactly <code>(10, 0, 0)</code> — i.e.
no ULP drift here, in contrast to e.g.
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a>'s rad/deg round-trip:
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G02"], "R": 10 },
"ProgramXyz": { "X": 10, "Y": 10, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 10, "Z": 0 },
"MotionState": { "Term": "G02" },
"MotionEvent": {
"Form": "McArc",
"ArcCenter": { "X": 10, "Y": 0, "Z": 0 },
"PlaneNormalDir": 2,
"IsCcw": false,
"AdditionalCircleNum": 0
}
}</code></pre>
G03 CCW with I/J — same geometry as case 0 (start <code>(0,0,0)</code>,
end <code>(10,0,0)</code>, I=5 J=0 → center <code>(5,0,0)</code>) but the G03
flag flips <code>IsCcw</code> to <code>true</code>. Direction is the only
differentiating output; arc-center math is unchanged:
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G03"], "I": 5, "J": 0 },
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 0, "Z": 0 },
"MotionState": { "Term": "G03" },
"MotionEvent": {
"Form": "McArc",
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
"PlaneNormalDir": 2,
"IsCcw": true,
"AdditionalCircleNum": 0
}
}</code></pre>
Full circle G02 — start == end (both <code>(0,0,0)</code>), I=5 J=0
places center off-start at <code>(5,0,0)</code>. The
<code>isFullCircle</code> guard (chord length &lt; 1e-6 and
center-to-start &gt; 1e-6) flips <code>AdditionalCircleNum</code> to 1
so a downstream motion semantic knows to draw the closed loop:
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G02"], "I": 5, "J": 0 },
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 }
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 0, "Y": 0, "Z": 0 },
"MotionState": { "Term": "G02" },
"MotionEvent": {
"Form": "McArc",
"ArcCenter": { "X": 5, "Y": 0, "Z": 0 },
"PlaneNormalDir": 2,
"IsCcw": false,
"AdditionalCircleNum": 1
}
}</code></pre>

View File

@ -185,6 +185,28 @@ Modal — persists via backward lookback.</p>
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_CoolantSyntax_examples">Examples</h2>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M08"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Coolant": { "IsOn": true, "Mode": "Flood" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M09", "M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"Coolant": { "IsOn": false, "Mode": "Off" }
}</code></pre>
<p>#Previous:</p>
<pre><code class="lang-csharp">{ "Coolant": { "IsOn": true, "Mode": "Mist" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"Coolant": { "IsOn": true, "Mode": "Mist" }
}</code></pre>

View File

@ -190,6 +190,37 @@ Modal carry to subsequent blocks is handled by
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_FanucPathSmoothingSyntax_examples">Examples</h2>
<p>First block of the stream (no <code>#Previous:</code>) — stamps the default
disabled section so downstream modal lookback always sees a concrete
<code>PathSmoothing</code>:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }</code></pre>
<p>G05.1 Q1 with no R — enables, no <code>Level</code> emitted:
#Previous:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "G05.1": { "Q": 1 } } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": true, "Term": "G05.1" } }</code></pre>
<p>G05.1 Q1 R3 — enables and preserves the precision level:
#Previous:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "G05.1": { "Q": 1, "R": 3 } } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": true, "Term": "G05.1", "Level": 3 } }</code></pre>
<p>G05.1 Q0 — disables; any prior <code>Level</code> is dropped (R only meaningful
when enabling):
#Previous:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": true, "Term": "G05.1", "Level": 3 } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "G05.1": { "Q": 0 } } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "PathSmoothing": { "IsEnabled": false, "Term": "G05.1" } }</code></pre>

View File

@ -182,6 +182,35 @@ Writes resolved state to a <a class="xref" href="Hi.NcParsers.Keywords.IFeedrate
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_FeedrateSyntax_examples">Examples</h2>
<p>New F value with explicit G94 mode — both consumed, <code>Unit</code>
derived as mm/min (G94 default):
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G94"], "F": 100 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Feedrate": { "FeedrateValue": 100, "Term": "G94", "Unit": "mm/min" } }</code></pre>
<p>G95 mode flag only — feedrate value inherited from
<code>#Previous:</code>; unit recomputed (mm/rev) from the new term:
#Previous:</p>
<pre><code class="lang-csharp">{ "Feedrate": { "FeedrateValue": 50, "Term": "G94", "Unit": "mm/min" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G95"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Feedrate": { "FeedrateValue": 50, "Term": "G95", "Unit": "mm/rev" } }</code></pre>
<p>F value only (no G94/G95 on this block) alongside an unrelated M03
flag — mode inherits from <code>#Previous:</code>; M03 stays in
<code>Parsing.Flags</code> because <code>CleanupParsing</code> is only invoked
on the mode-flag branch:
#Previous:</p>
<pre><code class="lang-csharp">{ "Feedrate": { "FeedrateValue": 50, "Term": "G95", "Unit": "mm/rev" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"], "F": 200 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"Feedrate": { "FeedrateValue": 200, "Term": "G95", "Unit": "mm/rev" }
}</code></pre>

View File

@ -205,7 +205,7 @@ When G68.2 is not active, a validation error is reported.
Optional explicit A/B/C on the G53.1 line (post-processor hints)
override the IK result. These are read from
<a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a> via
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.RotaryAxisUtil.html#Hi_NcParsers_LogicSyntaxs_RotaryAxisUtil_ConsumeAxis_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">ConsumeAxis(JsonObject, string, Sentence, NcDiagnosticProgress)</a> and consumed
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.RotaryAxisUtil.html#Hi_NcParsers_LogicSyntaxs_RotaryAxisUtil_ConsumeAxis_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">ConsumeAxis(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a> and consumed
to prevent <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a> from double-processing.
</p>
</div>

View File

@ -189,6 +189,79 @@ so both syntaxes can coexist without double-composing.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_Heidenhain_HeidenhainCoordinateOffsetSyntax_examples">Examples</h2>
<p><code>Mat4d</code> arrays are 16 plain doubles in column-major order; pure
translation by <code>(tx,ty,tz)</code> is
<code>[1,0,0,0, 0,1,0,0, 0,0,1,0, tx,ty,tz,1]</code>. The syntax does not
consume from <code>Parsing</code> — the CYCL DEF cycle number and its
parameters survive for downstream syntaxes / round-trip emission.</p>
<p>
<code>CYCL DEF 247 Q339=+1</code> with a
<a class="xref" href="Hi.NcParsers.Dependencys.HeidenhainDatumTable.html">HeidenhainDatumTable</a> populated so preset
row 1 = <code>(50, 50, 0)</code> — the syntax looks up the row and writes
a synthetic <code>CoordinateId = "DATUM_PRESET_1"</code> reflecting the
resolved preset index:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "CYCL DEF": 247, "Q339": "+1" } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "CYCL DEF": 247, "Q339": "+1" },
"CoordinateOffset": {
"CoordinateId": "DATUM_PRESET_1",
"Offset_X": 50, "Offset_Y": 50, "Offset_Z": 0
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 50,50,0,1]
}
]
}</code></pre>
<code>CYCL DEF 7 #5</code> — datum shift table lookup via the <code>#</code>
index (here mapped to <code>(100, 200, 0)</code>); <code>CoordinateId</code>
records the resolved shift row id:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "CYCL DEF": 7, "#": 5 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "CYCL DEF": 7, "#": 5 },
"CoordinateOffset": {
"CoordinateId": "DATUM_SHIFT_5",
"Offset_X": 100, "Offset_Y": 200, "Offset_Z": 0
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 100,200,0,1]
}
]
}</code></pre>
<code>CYCL DEF 7 X10 Y20 Z5</code> — direct X/Y/Z form (no <code>#</code>
index) writes the values straight into the offset; no
<a class="xref" href="Hi.NcParsers.Dependencys.HeidenhainDatumTable.html">HeidenhainDatumTable</a> dep is required.
<code>CoordinateId</code> is the literal <code>"DATUM_SHIFT_DIRECT"</code>
sentinel:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "CYCL DEF": 7, "X": 10, "Y": 20, "Z": 5 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "CYCL DEF": 7, "X": 10, "Y": 20, "Z": 5 },
"CoordinateOffset": {
"CoordinateId": "DATUM_SHIFT_DIRECT",
"Offset_X": 10, "Offset_Y": 20, "Offset_Z": 5
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 10,20,5,1]
}
]
}</code></pre>

View File

@ -204,6 +204,55 @@ incremental logic.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_IncrementalResolveSyntax_examples">Examples</h2>
<p>G90 (absolute) on the block — the syntax early-returns without
touching <code>Parsing.X/Y/Z</code>, even though the values look like
incremental deltas:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"Positioning": { "Term": "G90", "Mode": "Absolute" },
"Parsing": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Positioning": { "Term": "G90", "Mode": "Absolute" },
"Parsing": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>G91 (incremental) with a <code>#Previous:</code> block carrying
<code>MachineCoordinateState=(100,200,300)</code>. Under the identity
<code>ProgramToMcTransform</code> chain, <code>GetLastProgramXyz</code> recovers
program XYZ equal to MC, so each axis in <code>Parsing</code> is rewritten
to <code>lastAbs + incremental</code>:
#Previous:</p>
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 100, "Y": 200, "Z": 300 } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"Positioning": { "Term": "G91", "Mode": "Incremental" },
"Parsing": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Positioning": { "Term": "G91", "Mode": "Incremental" },
"Parsing": { "X": 110, "Y": 220, "Z": 330 }
}</code></pre>
<p>G91 + <code>Parsing.G28</code> sub-section — exercises the second entry
of the default <code>WorkingPathList</code>; the root <code>Parsing</code> has
no X/Y/Z so the first path no-ops, but the
<code>[&ldquo;Parsing&rdquo;,&ldquo;G28&rdquo;]</code> path picks up the G28 intermediate axes
and resolves them against the same <code>lastProgramXyz</code>:
#Previous:</p>
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 100, "Y": 200, "Z": 300 } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"Positioning": { "Term": "G91", "Mode": "Incremental" },
"Parsing": { "G28": { "X": 5, "Y": 10, "Z": 15 } }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Positioning": { "Term": "G91", "Mode": "Incremental" },
"Parsing": { "G28": { "X": 105, "Y": 210, "Z": 315 } }
}</code></pre>

View File

@ -185,6 +185,85 @@ Default coordinate ID is set by <a class="xref" href="Hi.NcParsers.Initializers.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoCoordinateOffsetSyntax_examples">Examples</h2>
<p>The <code>Mat4d</code> arrays below are written as 16 plain doubles in
column-major order; the first 12 are the identity 3×3 rotation, the
last 4 are the translation column <code>(tx, ty, tz, 1)</code>. So a pure
translation by <code>(tx, ty, tz)</code> is
<code>[1,0,0,0, 0,1,0,0, 0,0,1,0, tx,ty,tz,1]</code>.</p>
<p>
G54 flag on the block but no <a class="xref" href="Hi.NcParsers.Dependencys.IIsoCoordinateConfig.html">IIsoCoordinateConfig</a> on
the dep list — the resolved offset falls back to <code>Vec3d.Zero</code>
and the composed translation is the identity matrix:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G54"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CoordinateOffset": {
"CoordinateId": "G54",
"Offset_X": 0, "Offset_Y": 0, "Offset_Z": 0
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}</code></pre>
G55 flag with an <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a>
providing <code>G55 → (100, 50, -200)</code> — the offset is written to
the <code>CoordinateOffset</code> section and the same translation is
composed into the transform chain:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G55"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CoordinateOffset": {
"CoordinateId": "G55",
"Offset_X": 100, "Offset_Y": 50, "Offset_Z": -200
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 100,50,-200,1]
}
]
}</code></pre>
No coordinate flag on the current block (e.g. an unrelated M03) but
<code>#Previous:</code> carried <code>G54</code> — modal lookback inherits
<code>G54</code>, the dep is re-queried (so <code>Offset_X/Y/Z</code> are taken
from the table, not from the previous block), and the transform
chain is rebuilt. The unrelated M03 flag survives in
<code>Parsing.Flags</code> because <code>CleanupParsing</code> only fires on the
new-coord-flag branch:
#Previous:
<pre><code class="lang-csharp">{
"CoordinateOffset": {
"CoordinateId": "G54",
"Offset_X": 10, "Offset_Y": 20, "Offset_Z": -100
}
}</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"CoordinateOffset": {
"CoordinateId": "G54",
"Offset_X": 10, "Offset_Y": 20, "Offset_Z": -100
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 10,20,-100,1]
}
]
}</code></pre>

View File

@ -188,6 +188,93 @@ Managed commands: G68, G69 (idempotent with <a class="xref" href="Hi.NcParsers.L
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoG68RotationSyntax_examples">Examples</h2>
<p>All cases below avoid the cos/sin rotation math by using either G69
cancel (identity), the first-block default (no transform composed),
or modal carry of an identity Mat4d. <code>Mat4d</code> arrays are 16
plain doubles in column-major order — see
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a> for the template. A future
round can add a non-trivial G68 case by dumping the actual output
and pasting the 16 doubles back into the marker.</p>
<p>
First block of the stream (no <code>#Previous:</code>, no G68/G69 on the
block) — <code>CarryForwardFromPrevious</code> stamps a default
<code>TiltTransform.Term = "G69"</code> so downstream lookback always
sees a concrete state; no transform chain entry is composed:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "TiltTransform": { "Term": "G69" } }</code></pre>
G69 flag on the block — <code>TryHandleG69</code> consumes it, writes the
G69 section, and composes the identity Mat4d into the chain so any
previously composed tilt rotation is overridden:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G69"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"TiltTransform": { "Term": "G69" },
"ProgramToMcTransform": [
{
"Source": "TiltTransform",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}</code></pre>
Modal carry: no G68/G69 on the current block, but
<code>#Previous:</code> carries an active G68 with identity tilt Mat4d in
its chain. The current block inherits <code>TiltTransform.Term = "G68"</code>
and re-composes the same Mat4d into its own chain; unrelated M03
flag survives because this syntax does not touch <code>Parsing</code>
during the carry path:
#Previous:
<pre><code class="lang-csharp">{
"TiltTransform": { "Term": "G68" },
"ProgramToMcTransform": [
{
"Source": "TiltTransform",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"TiltTransform": { "Term": "G68" },
"ProgramToMcTransform": [
{
"Source": "TiltTransform",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}</code></pre>
Non-trivial G68 rotation: 90° around the Z axis (no I/J/K → plane
normal of the default G17 plane) at the origin (no X/Y/Z → all 0).
The Mat4d column-major layout is rotation 90° about Z (no
translation since pivot is the origin); <code>cos(π/2)</code> is not
exactly 0 in IEEE-754 so the diagonal carries the
<code>6.123233995736766E-17</code> drift produced by
<code>Math.Cos(Math.PI / 2)</code> — preserved verbatim per the
no-shorthand marker convention:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "G68": { "R": 90 } } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"TiltTransform": { "Term": "G68" },
"ProgramToMcTransform": [
{
"Source": "TiltTransform",
"Kind": "Static",
"Mat4d": [6.123233995736766E-17, 1, 0, 0, -1, 6.123233995736766E-17, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
}
]
}</code></pre>
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoG68RotationSyntax_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>Input: Parsing.G68 → {X,Y,Z,I,J,K,R} from ParameterizedFlagSyntax.

View File

@ -188,6 +188,75 @@ Modal — persists via backward lookback until changed or cancelled.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_IsoLocalCoordinateOffsetSyntax_examples">Examples</h2>
<p><code>Mat4d</code> arrays are 16 plain doubles in column-major order; pure
translation by <code>(tx,ty,tz)</code> is
<code>[1,0,0,0, 0,1,0,0, 0,0,1,0, tx,ty,tz,1]</code> — see
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a> for the column-major template.</p>
<p>
First block of the stream (no <code>#Previous:</code>) — the syntax
stamps a zero-offset section and an identity translation in the
chain so downstream lookback always sees a concrete state:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"IsoLocalCoordinateOffset": { "Offset_X": 0, "Offset_Y": 0, "Offset_Z": 0 },
"ProgramToMcTransform": [
{
"Source": "IsoLocalCoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}</code></pre>
<code>G52 X10 Y20 Z5</code> on a non-first block alongside an unrelated
M03 flag — the <code>G52</code> sub-section is consumed (removed from
<code>Parsing</code>) and the translation is composed into the chain; the
unrelated flag stays because this syntax does not call
<code>CleanupParsing</code>:
#Previous:
<pre><code class="lang-csharp">{ "IsoLocalCoordinateOffset": { "Offset_X": 0, "Offset_Y": 0, "Offset_Z": 0 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{
"Parsing": {
"Flags": ["M03"],
"G52": { "X": 10, "Y": 20, "Z": 5 }
}
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"IsoLocalCoordinateOffset": { "Offset_X": 10, "Offset_Y": 20, "Offset_Z": 5 },
"ProgramToMcTransform": [
{
"Source": "IsoLocalCoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 10,20,5,1]
}
]
}</code></pre>
No G52 on the current block but <code>#Previous:</code> had a non-zero
offset — modal lookback inherits it (with the translation
re-composed into this block's chain):
#Previous:
<pre><code class="lang-csharp">{ "IsoLocalCoordinateOffset": { "Offset_X": 10, "Offset_Y": 20, "Offset_Z": 5 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"IsoLocalCoordinateOffset": { "Offset_X": 10, "Offset_Y": 20, "Offset_Z": 5 },
"ProgramToMcTransform": [
{
"Source": "IsoLocalCoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 10,20,5,1]
}
]
}</code></pre>

View File

@ -190,6 +190,50 @@ Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_LinearMotionSyntax_examples">Examples</h2>
<p>G00 explicit + <code>MachineCoordinateState</code> on the block — both the
modal <code>MotionState</code> and the one-shot <code>MotionEvent</code> are
written; <code>IsRapid</code> is set only on rapid (G00); the parsing flag
is consumed and <code>Parsing</code> is cleaned up:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G00"] },
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 },
"MotionState": { "Term": "G00" },
"MotionEvent": { "Form": "McLinear", "IsRapid": true }
}</code></pre>
<p>G01 explicit + MC — same shape but <code>IsRapid</code> is omitted on the
event section (only written when true):
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G01"] },
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 },
"MotionState": { "Term": "G01" },
"MotionEvent": { "Form": "McLinear" }
}</code></pre>
<p>No motion flag on the current block but <code>MachineCoordinateState</code>
is present (e.g. a downstream syntax already wrote the endpoint) —
the previous block's <code>MotionState.Term</code> is the only way to know
G00 vs G01, so the modal carry path fires:
#Previous:</p>
<pre><code class="lang-csharp">{ "MotionState": { "Term": "G01" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 },
"MotionState": { "Term": "G01" },
"MotionEvent": { "Form": "McLinear" }
}</code></pre>

View File

@ -192,14 +192,39 @@ as program coordinates.
<h2 id="Hi_NcParsers_LogicSyntaxs_MachineCoordSelectSyntax_examples">Examples</h2>
<p>G53 with full axes (G54 offset = 100,50,-200):</p>
<pre><code class="lang-csharp">Input: G53 G00 X0. Y0. Z0.
Output: MachineCoordinate = (0, 0, 0)
ProgramXyz = (-100, -50, 200) [mc * inverse(transform)]</code></pre>
<p>G53 with partial axes (only Z specified):</p>
<pre><code class="lang-csharp">Input: G53 Z0.
Output: MachineCoordinate = (prevMcX, prevMcY, 0)
ProgramXyz derived from MC * inverse(transform)</code></pre>
<p>G53 with full XYZ on a first block (no <code>#Previous:</code>) — <code>FindPreviousMc</code>
falls back to <code>Vec3d.Zero</code>, transform defaults to identity, so
<code>ProgramXyz</code> equals <code>MachineCoordinateState</code>:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G53"], "X": 10, "Y": 20, "Z": 30 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 },
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>G53 with only Z specified — <code>FindPreviousMc</code> picks up X/Y from the
previous block's <code>MachineCoordinateState</code>; Z is overwritten:
#Previous:</p>
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 100, "Y": 50, "Z": -200 } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G53"], "Z": 0 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"MachineCoordinateState": { "X": 100, "Y": 50, "Z": 0 },
"ProgramXyz": { "X": 100, "Y": 50, "Z": 0 }
}</code></pre>
<p>G91 active on the same block → G53 is ignored per ISO standard; nothing
is consumed and no machine-state section is written:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G53"], "X": 10 },
"Positioning": { "Term": "G91" }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G53"], "X": 10 },
"Positioning": { "Term": "G91" }
}</code></pre>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class McAbcCyclicPathSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Resolve modular rotary axes to the shortest cyclic path relative to the previous node. Uses to determine which axes within need cyclic resolution. Falls back to hardcoded A/B/C if no is available. Must be placed after in .">
<meta name="description" content="Resolve modular rotary axes to the shortest cyclic path relative to the previous node. Uses to determine which axes within need cyclic resolution. Falls back to hardcoded A/B/C if no is available. Must be placed after in . Two stages, mirroring : Root MachineCoordinateState — anchored at the previous block&#39;s modal rotary state..[*] — sequential walk through items, anchoring item 0 at the previous block&#39;s modal state and item i &amp;gt; 0 at item i-1&#39;s post-cycle value (per-axis chain). Items without a rotary MachineCoordinateState are skipped. The items pass enables rotary motion (e.g. G28 ABC intermediate / home stages) to surface as motion segments rather than a single root-MC stamp.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -102,6 +102,18 @@ Uses <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html#Hi_N
within <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> need cyclic resolution.
Falls back to hardcoded A/B/C if no <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> is available.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> in <a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcSyntaxList">NcSyntaxList</a>.</p>
<p>
Two stages, mirroring <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a>:
<ol><li>Root <code>MachineCoordinateState</code> — anchored at the previous
block's modal rotary state.</li><li><a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html">CompoundMotion</a>.<a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html#Hi_NcParsers_Keywords_CompoundMotion_ItemsKey">ItemsKey</a>[*]
— sequential walk through items, anchoring item 0 at the previous
block's modal state and item <code>i &gt; 0</code> at item <code>i-1</code>'s
post-cycle value (per-axis chain). Items without a rotary
<code>MachineCoordinateState</code> are skipped.</li></ol>
The items pass enables rotary motion (e.g. G28 ABC intermediate /
home stages) to surface as motion <a class="xref" href="Hi.Numerical.Acts.IAct.html">IAct</a>
segments rather than a single root-MC stamp.
</div>
<div class="markdown conceptual"></div>
@ -183,6 +195,73 @@ Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzS
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_McAbcCyclicPathSyntax_examples">Examples</h2>
<p>Cases below run with no <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> on the dep
list, so the syntax uses the A/B/C fallback (a configuration
warning is emitted but does not affect the JSON). The syntax is
the tail-pass rotary-wrap centraliser — upstream rotary writers
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a>, G28, G53.1, ...) store raw degrees and
let this pass resolve to the shortest cyclic path.</p>
<p>
Current B is within ±180° of the previous B — no wrap needed; the
value is rewritten in place but equals the input:
</p>
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 0 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 10 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 10 } }</code></pre>
Current B is 270° but previous B is 0° — the shortest path is the
other way around, so the value is rewritten as -90° (mathematically
equivalent, geometrically the same orientation, but signalling the
shorter rotation to a downstream motion consumer). 270/0 round-trips
through <code>ToRad</code><code>Cycle</code><code>ToDeg</code> with no rounding
noise (1.5π → -0.5π → -90 exactly); other angle pairs (e.g.
350° → -10°) emit a trailing ULP-scale drift instead:
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 0 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 270 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": -90 } }</code></pre>
First block of the stream (no <code>#Previous:</code>) — no anchor to
resolve against, so the syntax early-returns and the raw value is
preserved verbatim:
#BeforeBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 350 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 350 } }</code></pre>
<p>
<code>CompoundMotion.Items</code> walk — two items chain: item 0 cycles
against the previous block's modal B = 0° (270° → -90°), and item 1
cycles against item 0's post-cycle -90° (170° → -190°, since the
shorter path from -90° to 170° wraps backward through -180°). If
item 1 had used the previous-block anchor instead of the chained
anchor, 170° would have stayed at 170° (already in the ±180° window
around 0°), so the test discriminates between chain and no-chain:
</p>
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 0 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Items": [
{ "MachineCoordinateState": { "B": 270 } },
{ "MachineCoordinateState": { "B": 170 } }
]
}
}</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Items": [
{ "MachineCoordinateState": { "B": -90 } },
{ "MachineCoordinateState": { "B": -190 } }
]
}
}</code></pre>

View File

@ -211,6 +211,37 @@ that need the current-block ABC to compute transforms
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_McAbcSyntax_examples">Examples</h2>
<p>Cases 1 and 2 inject a <code>TestDeps.AxisConfig</code> declaring B and C
as <a class="xref" href="Hi.NcParsers.Dependencys.AxisType.html#Hi_NcParsers_Dependencys_AxisType_Rotary">Rotary</a>. Values are stored as raw degrees;
shortest-cyclic resolution is a downstream pass via
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a>.</p>
<p>
No <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> dep on the list — early-return
no-op (the syntax only fires when rotary axes are declared):
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "B": 45, "C": 90 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "Parsing": { "B": 45, "C": 90 } }</code></pre>
AxisConfig declares B+C rotary; <code>Parsing.B/C</code> are consumed
into a freshly created <code>MachineCoordinateState</code> section
(X/Y/Z are deliberately left out so <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> can
still derive XYZ later — see class summary):
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "B": 45, "C": 90 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 45, "C": 90 } }</code></pre>
Only <code>Parsing.B</code> on the current block; <code>#Previous:</code>
carries a full MC including C=0. The missing C is filled from the
per-axis backward lookback (<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">FindPreviousMcAxis(LazyLinkedListNode&lt;SyntaxPiece&gt;, string)</a>):
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 0, "C": 0 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "B": 30 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 30, "C": 0 } }</code></pre>

View File

@ -218,6 +218,47 @@ Does nothing when the section already carries all three of X/Y/Z
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_McAbcXyzFallbackSyntax_examples">Examples</h2>
<p>All cases below stay on the non-dynamic branch (no
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_PivotTransformSource">PivotTransformSource</a> entry in the
chain) so the RTCP re-derivation path is skipped.</p>
<p>
Block has no <code>MachineCoordinateState</code> section at all (pure
parse-only) — the syntax early-returns and the block is unchanged:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G00"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G00"] } }</code></pre>
MC already complete (all three of X/Y/Z present) — the second guard
fires and the section is preserved verbatim (no overwrite even if a
<code>#Previous:</code> MC differed):
#BeforeBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
Rotary-only MC on a rotary-only block (e.g. a 5-axis B+C trunnion
machine running <code>G00 B45. C90.</code>) — missing X/Y/Z are copied
from the <code>#Previous:</code> block's MC; the rotary keys keep their
existing positions (insertion order) and X/Y/Z are appended. The
previous block's MC carries the modal rotary state alongside X/Y/Z,
but the fallback only reads X/Y/Z from it:
#Previous:
<pre><code class="lang-csharp">{
"MachineCoordinateState": {
"X": 100, "Y": 200, "Z": 300, "B": 0, "C": 0
}
}</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "B": 45, "C": 90 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"MachineCoordinateState": {
"B": 45, "C": 90,
"X": 100, "Y": 200, "Z": 300
}
}</code></pre>

View File

@ -191,6 +191,55 @@ and before syntaxes that read <code>MachineCoordinate</code>
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_McXyzSyntax_examples">Examples</h2>
<p>Root <code>ProgramXyz</code> only, no <code>ProgramToMcTransform</code> chain —
composed transform is identity, so MC equals <code>ProgramXyz</code>:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "ProgramXyz": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "X": 10, "Y": 20, "Z": 30 }
}</code></pre>
<p>Root <code>MachineCoordinateState</code> already present — guarded by the
non-null check, so an upstream syntax's explicit MC is preserved
verbatim (the derivation from <code>ProgramXyz</code> is skipped):
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "X": 100, "Y": 200, "Z": 300 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"ProgramXyz": { "X": 10, "Y": 20, "Z": 30 },
"MachineCoordinateState": { "X": 100, "Y": 200, "Z": 300 }
}</code></pre>
<p><code>CompoundMotion.Items[*]</code> with <code>ProgramXyz</code> but no
<code>MachineCoordinateState</code> — each item receives its own derived
MC; items that already had MC (or had no <code>ProgramXyz</code>) are
left alone:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Items": [
{ "ProgramXyz": { "X": 1, "Y": 2, "Z": 3 } },
{ "MachineCoordinateState": { "X": 9, "Y": 9, "Z": 9 } }
]
}
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"CompoundMotion": {
"Items": [
{
"ProgramXyz": { "X": 1, "Y": 2, "Z": 3 },
"MachineCoordinateState": { "X": 1, "Y": 2, "Z": 3 }
},
{ "MachineCoordinateState": { "X": 9, "Y": 9, "Z": 9 } }
]
}
}</code></pre>

View File

@ -187,6 +187,28 @@ Downstream consumers (<a class="xref" href="Hi.NcParsers.LogicSyntaxs.CircularMo
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_PlaneSelectSyntax_examples">Examples</h2>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G17"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "PlaneSelect": { "Term": "G17", "Plane": "XY" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G18", "M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"PlaneSelect": { "Term": "G18", "Plane": "ZX" }
}</code></pre>
<p>#Previous:</p>
<pre><code class="lang-csharp">{ "PlaneSelect": { "Term": "G19", "Plane": "YZ" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"PlaneSelect": { "Term": "G19", "Plane": "YZ" }
}</code></pre>

View File

@ -193,6 +193,30 @@ their parameters with cycle-specific G91 semantics.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_PositioningSyntax_examples">Examples</h2>
<p>G90 explicit — flag consumed, <code>Positioning</code> written with
<code>Mode=&ldquo;Absolute&rdquo;</code>:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G90"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Positioning": { "Term": "G90", "Mode": "Absolute" } }</code></pre>
<p>G91 explicit — flag consumed, <code>Mode=&ldquo;Incremental&rdquo;</code>:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G91"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Positioning": { "Term": "G91", "Mode": "Incremental" } }</code></pre>
<p>No positioning flag on the block but <code>#Previous:</code> carried G91 —
modal lookback inherits G91; the unrelated M03 flag is left alone:
#Previous:</p>
<pre><code class="lang-csharp">{ "Positioning": { "Term": "G91", "Mode": "Incremental" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"Positioning": { "Term": "G91", "Mode": "Incremental" }
}</code></pre>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class ProgramEndCleanSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Clears the per-block Vars.Volatile dictionary on blocks that triggered program end (M02 / M30, identified by the section written by ). Real Fanuc clears non-retained common variables (#100-#499) on program end + reset; this syntax models that behaviour at the simulator level. The clear happens on the same block that carried M02/M30 — the next block&#39;s carry then sees an empty dictionary on the predecessor and starts fresh. Pipeline placement: must run after both (which writes the section this syntax checks) and (so the carry has already happened on this block; this syntax overwrites the result). Retained common variables (#500-#999, owned by ) are untouched — they survive program end on real hardware (NV-RAM). Local variables (#1-#33, scope: macro call frame) are also untouched here; their lifecycle belongs to G65/G66/M99 push/pop, not program end.">
<meta name="description" content="Clears the per-block Vars.Volatile dictionary on blocks that triggered program end (M02 / M30, identified by the section written by ). Real Fanuc clears non-retained common variables (#100-#499) on program end + reset; this syntax models that behaviour at the simulator level. The clear happens on the same block that carried M02/M30 — the next block&#39;s carry then sees an empty dictionary on the predecessor and starts fresh. Pipeline placement: must run after both (which writes the section this syntax checks) and (so the carry has already happened on this block; this syntax overwrites the result). Retained common variables (#500-#999, owned by ) are untouched — they survive program end on real hardware (NV-RAM). Local variables (#1-#33, scope: macro call frame) are also untouched here; their lifecycle belongs to G65/G66/M99 push/pop, not program end. Also clears any active on the same edge: a G66 modal that was still active when M02/M30 hit is implicitly cancelled, matching real Fanuc reset behaviour. The section is overwritten with a G67-shaped cancel marker so the carry mechanism in sees the boundary and does not propagate the modal past the program-end edge.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -121,6 +121,15 @@ Local variables (<code>#1-#33</code>, scope: macro call frame) are also
untouched here; their lifecycle belongs to G65/G66/M99 push/pop, not
program end.
</p>
<p>
Also clears any active <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a> on the same
edge: a G66 modal that was still active when M02/M30 hit is
implicitly cancelled, matching real Fanuc reset behaviour. The
section is overwritten with a <code>G67</code>-shaped cancel marker so
the carry mechanism in
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a> sees the boundary
and does not propagate the modal past the program-end edge.
</p>
</div>
<div class="markdown conceptual"></div>
@ -202,6 +211,44 @@ program end.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_ProgramEndCleanSyntax_examples">Examples</h2>
<p>M30 with a populated <code>Vars.Volatile</code> — the dictionary is wiped
to an empty <code>JsonObject</code> in place (assignment, not removal, so
downstream snapshots can distinguish &ldquo;cleared on program end&rdquo; from
&ldquo;block never had volatile data&rdquo;):
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"ProgramEnd": { "Term": "M30" },
"Vars": { "Volatile": { "#100": 1.5, "#101": 2.5 } }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"ProgramEnd": { "Term": "M30" },
"Vars": { "Volatile": {} }
}</code></pre>
<p>M02 with an active G66 <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a> and no
pre-existing <code>Vars</code> — the modal is overwritten with a
<code>G67</code>-shaped cancel marker (P/L dropped), and a fresh
<code>Vars.Volatile</code> dictionary is created:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{
"ProgramEnd": { "Term": "M02" },
"FanucModalMacro": { "Term": "G66", "P": 1234, "L": 1 }
}</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"ProgramEnd": { "Term": "M02" },
"FanucModalMacro": { "Term": "G67" },
"Vars": { "Volatile": {} }
}</code></pre>
<p>No <code>ProgramEnd</code> on the block (regular machining line) — the
guard rejects the block; <code>Vars.Volatile</code> is left intact for
downstream blocks to inherit via carry:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Vars": { "Volatile": { "#100": 1.5 } } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Vars": { "Volatile": { "#100": 1.5 } } }</code></pre>
@ -311,7 +358,7 @@ program end.
</h3>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Regs">Regs</a> registration.</p>
<div class="markdown level1 summary"><p>XML element name for <a class="xref" href="Hi.Common.XmlUtils.XFactory.html#Hi_Common_XmlUtils_XFactory_Generators">Generators</a> registration.</p>
</div>
<div class="markdown level1 conceptual"></div>

View File

@ -187,6 +187,20 @@ Must be placed before syntaxes that depend on the ProgramEnd section.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_ProgramEndSyntax_examples">Examples</h2>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M30"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "ProgramEnd": { "Term": "M30" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M02"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "ProgramEnd": { "Term": "M02" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>

View File

@ -193,6 +193,23 @@ pauses the run is a runtime/semantic decision gated by the operator's
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_ProgramStopSyntax_examples">Examples</h2>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M00"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "ProgramStop": { "Term": "M00" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M01", "M03"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"ProgramStop": { "Term": "M01" }
}</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M01", "M00"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "ProgramStop": { "Term": "M00" } }</code></pre>

View File

@ -188,6 +188,39 @@ cross-node lookback for last position.</p>
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_ProgramXyzSyntax_examples">Examples</h2>
<p>SUT uses <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzSyntax_Default">Default</a> so the default
<code>WorkingPathList</code> points at the <code>Parsing</code> root. All cases
stay on the identity-transform path so
<code>GetLastProgramXyz</code> simply returns the previous block's MC.</p>
<p>
Full X/Y/Z in <code>Parsing</code> — values are read directly (no
lookback), <code>Parsing.X/Y/Z</code> are consumed, <code>ProgramXyz</code>
section is written; <code>CleanupParsing</code> removes the now-empty
<code>Parsing</code>:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "ProgramXyz": { "X": 10, "Y": 20, "Z": 30 } }</code></pre>
Only Z in <code>Parsing</code> with a <code>#Previous:</code> block carrying
<code>MachineCoordinateState=(50,60,70)</code> — under the identity
transform <code>GetLastProgramXyz</code> equals previous MC, so X/Y are
inherited from prev and Z is taken from the parsed literal:
#Previous:
<pre><code class="lang-csharp">{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": 70 } }</code></pre>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Z": 0 } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "ProgramXyz": { "X": 50, "Y": 60, "Z": 0 } }</code></pre>
<code>Parsing</code> present but with no X/Y/Z (e.g. an unrelated M03
flag) — <code>ResolveProgramXyz</code> returns null and the syntax
early-returns; the block is unchanged:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"] } }</code></pre>
<h2 id="Hi_NcParsers_LogicSyntaxs_ProgramXyzSyntax_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>The term &ldquo;Program&rdquo; is absolute positioning coordinate that can be end-user editing.

View File

@ -664,8 +664,8 @@ against the spurious-origin case.
<a id="Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveProgramXyz_" data-uid="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.ResolveProgramXyz*"></a>
<h3 id="Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveProgramXyz_System_Text_Json_Nodes_JsonNode_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.ResolveProgramXyz(System.Text.Json.Nodes.JsonNode,Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},Hi.NcParsers.Sentence,Hi.NcParsers.NcDiagnosticProgress)">
ResolveProgramXyz(JsonNode, LazyLinkedListNode&lt;SyntaxPiece&gt;, Sentence, NcDiagnosticProgress)
<h3 id="Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveProgramXyz_System_Text_Json_Nodes_JsonNode_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.ResolveProgramXyz(System.Text.Json.Nodes.JsonNode,Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},Hi.NcParsers.ISentenceCarrier,Hi.NcParsers.NcDiagnosticProgress)">
ResolveProgramXyz(JsonNode, LazyLinkedListNode&lt;SyntaxPiece&gt;, ISentenceCarrier, NcDiagnosticProgress)
</h3>
@ -675,7 +675,7 @@ Fills missing axes from last program position via lookback.</p>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Vec3d ResolveProgramXyz(JsonNode xyzSource, LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, Sentence sentence, NcDiagnosticProgress diag)</code></pre>
<pre><code class="lang-csharp hljs">public static Vec3d ResolveProgramXyz(JsonNode xyzSource, LazyLinkedListNode&lt;SyntaxPiece&gt; syntaxPieceNode, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@ -687,8 +687,8 @@ Fills missing axes from last program position via lookback.</p>
<dt><code>syntaxPieceNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd><p>Current node for lookback.</p>
</dd>
<dt><code>sentence</code> <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dd><p>Source sentence used to attach diagnostics to the offending text span.</p>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd><p>Carrier used to attach diagnostics to the offending text span.</p>
</dd>
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd><p>Diagnostic sink that receives parse errors for malformed X/Y/Z values.</p>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class ReferenceReturnSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Writes section for G28 reference point return. Reads intermediate XYZ from Parsing.G28 (written by ) and converts to machine coordinates via . Must be placed after in the syntax chain. Removes the section written by (G28 handles its own motion). Overwrites root and with reference position for subsequent block lookback.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@ -97,20 +97,7 @@ Class ReferenceReturnSyntax
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Writes <a class="xref" href="Hi.NcParsers.Keywords.ICompoundMotionDef.html">ICompoundMotionDef</a> section for G28 reference point return.
Reads intermediate XYZ from <code>Parsing.G28</code>
(written by <a class="xref" href="Hi.NcParsers.Syntaxs.GenericSyntaxKit.html#Hi_NcParsers_Syntaxs_GenericSyntaxKit_G28Syntax">G28Syntax</a>)
and converts to machine coordinates via
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveProgramXyz_System_Text_Json_Nodes_JsonNode_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">ResolveProgramXyz(JsonNode, LazyLinkedListNode&lt;SyntaxPiece&gt;, Sentence, NcDiagnosticProgress)</a>.</p>
<p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> in the syntax chain.
Removes the <a class="xref" href="Hi.NcParsers.Keywords.IMotionEventDef.html">IMotionEventDef</a> section written by
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> (G28 handles its own motion).
Overwrites root <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>
and <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> with reference position
for subsequent block lookback.
</p>
</div>
<div class="markdown summary"></div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
@ -191,28 +178,6 @@ for subsequent block lookback.
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_ReferenceReturnSyntax_examples">Examples</h2>
<p>Input: <code>G91 G28 Z0.0</code> (only Z specified → only Z goes to home)</p>
<pre><code class="lang-csharp">"CompoundMotion": {
"Term": "G28",
"Items": [
{
"ProgramXyz": { "X": prevX, "Y": prevY, "Z": intermediate },
"Motion": { "Form": "McLinear", "IsRapid": true }
},
{
"MachineCoordinate": { "X": prevMcX, "Y": prevMcY, "Z": 0 },
"Motion": { "Form": "McLinear", "IsRapid": true }
}
]
}</code></pre>
<p>Only axes present in the G28 block move to home; others keep previous MC value.
Item 0 uses <code>ProgramXyz</code> (intermediate point from NC program);
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> derives its <code>MachineCoordinate</code>.
Item 1 uses <code>MachineCoordinate</code> directly (selective home per axis).
Root <code>ProgramXyz</code> is overwritten to the final position;
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> derives the root <code>MachineCoordinate</code>.</p>
@ -227,7 +192,8 @@ Root <code>ProgramXyz</code> is overwritten to the final position;
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance with default settings.</p>
<div class="markdown level1 summary"><p>Initializes a new instance with default settings
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.html#Hi_NcParsers_LogicSyntaxs_ReferenceReturnSyntax_BareG28">BareG28</a> = <a class="xref" href="Hi.NcParsers.LogicSyntaxs.BareG28Behavior.html#Hi_NcParsers_LogicSyntaxs_BareG28Behavior_Alarm">Alarm</a>).</p>
</div>
<div class="markdown level1 conceptual"></div>
@ -284,6 +250,39 @@ Root <code>ProgramXyz</code> is overwritten to the final position;
</h2>
<a id="Hi_NcParsers_LogicSyntaxs_ReferenceReturnSyntax_BareG28_" data-uid="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.BareG28*"></a>
<h3 id="Hi_NcParsers_LogicSyntaxs_ReferenceReturnSyntax_BareG28" data-uid="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.BareG28">
BareG28
</h3>
<div class="markdown level1 summary"><p>Behaviour for a G28 block with no axis specifiers.
Defaults to <a class="xref" href="Hi.NcParsers.LogicSyntaxs.BareG28Behavior.html#Hi_NcParsers_LogicSyntaxs_BareG28Behavior_Alarm">Alarm</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public BareG28Behavior BareG28 { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.BareG28Behavior.html">BareG28Behavior</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_LogicSyntaxs_ReferenceReturnSyntax_Name_" data-uid="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.Name*"></a>
<h3 id="Hi_NcParsers_LogicSyntaxs_ReferenceReturnSyntax_Name" data-uid="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.Name">

View File

@ -158,8 +158,8 @@ and other syntaxes that read or write rotary axis values.</p>
<a id="Hi_NcParsers_LogicSyntaxs_RotaryAxisUtil_ConsumeAxis_" data-uid="Hi.NcParsers.LogicSyntaxs.RotaryAxisUtil.ConsumeAxis*"></a>
<h3 id="Hi_NcParsers_LogicSyntaxs_RotaryAxisUtil_ConsumeAxis_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.LogicSyntaxs.RotaryAxisUtil.ConsumeAxis(System.Text.Json.Nodes.JsonObject,System.String,Hi.NcParsers.Sentence,Hi.NcParsers.NcDiagnosticProgress)">
ConsumeAxis(JsonObject, string, Sentence, NcDiagnosticProgress)
<h3 id="Hi_NcParsers_LogicSyntaxs_RotaryAxisUtil_ConsumeAxis_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_" data-uid="Hi.NcParsers.LogicSyntaxs.RotaryAxisUtil.ConsumeAxis(System.Text.Json.Nodes.JsonObject,System.String,Hi.NcParsers.ISentenceCarrier,Hi.NcParsers.NcDiagnosticProgress)">
ConsumeAxis(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)
</h3>
@ -170,7 +170,7 @@ Returns the value and removes the key, or null if not present.</p>
<p>
A non-numeric value (e.g. <code>"#124"</code> left by the parser stage)
raises <code>VariableExpression--Unevaluated</code> via
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a> instead of silently dropping
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, ISentenceCarrier, NcDiagnosticProgress)</a> instead of silently dropping
the post-processor hint. The key is consumed regardless so downstream
syntaxes do not re-process it.
</p>
@ -178,7 +178,7 @@ syntaxes do not re-process it.
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static double? ConsumeAxis(JsonObject parsing, string axisName, Sentence sentence, NcDiagnosticProgress diag)</code></pre>
<pre><code class="lang-csharp hljs">public static double? ConsumeAxis(JsonObject parsing, string axisName, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@ -187,7 +187,7 @@ syntaxes do not re-process it.
<dd></dd>
<dt><code>axisName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>sentence</code> <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd></dd>
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>

View File

@ -183,6 +183,80 @@ composes into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.htm
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_Siemens_SiemensCoordinateOffsetSyntax_examples">Examples</h2>
<p>Unlike <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a> (Fanuc/ISO), this
Siemens variant does <b>not</b> consume the coordinate flag from
<code>Parsing.Flags</code> — the flag stays for downstream syntaxes /
reconstruction. <code>Mat4d</code> arrays are 16 plain doubles in
column-major order; pure translation by <code>(tx,ty,tz)</code> is
<code>[1,0,0,0, 0,1,0,0, 0,0,1,0, tx,ty,tz,1]</code>.</p>
<p>
G54 with an <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a>
providing <code>G54 → (10, 20, -100)</code> — same shape as
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a> but the <code>G54</code> flag
survives:
</p>
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G54"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G54"] },
"CoordinateOffset": {
"CoordinateId": "G54",
"Offset_X": 10, "Offset_Y": 20, "Offset_Z": -100
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 10,20,-100,1]
}
]
}</code></pre>
Siemens-extended <code>G505</code> with a table entry for the same id —
proves the syntax recognises the extended series, not only the
ISO-compat G54G57 subset:
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G505"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G505"] },
"CoordinateOffset": {
"CoordinateId": "G505",
"Offset_X": 100, "Offset_Y": 50, "Offset_Z": -200
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 100,50,-200,1]
}
]
}</code></pre>
<code>G500</code> cancel with no <a class="xref" href="Hi.NcParsers.Dependencys.IIsoCoordinateConfig.html">IIsoCoordinateConfig</a> on
the dep list — falls back to <code>Vec3d.Zero</code>; the resolved
offset is zero and the composed translation is identity (matching
the special case inside
<a class="xref" href="Hi.NcParsers.Dependencys.Siemens.SiemensFrameTable.html#Hi_NcParsers_Dependencys_Siemens_SiemensFrameTable_GetCoordinateOffset_System_String_">GetCoordinateOffset(string)</a>
for G500):
#BeforeBuild:
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["G500"] } }</code></pre>
#AfterBuild:
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["G500"] },
"CoordinateOffset": {
"CoordinateId": "G500",
"Offset_X": 0, "Offset_Y": 0, "Offset_Z": 0
},
"ProgramToMcTransform": [
{
"Source": "CoordinateOffset",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}</code></pre>

View File

@ -184,6 +184,31 @@ Direction is converted from ISO M-codes to the conventional
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_SpindleSpeedSyntax_examples">Examples</h2>
<p>New S + M03 (CW) — both consumed; <code>SpindleSpeed</code> section
written with the converted direction enum string:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"], "S": 2000 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "SpindleSpeed": { "SpindleSpeed_rpm": 2000, "Direction": "CW" } }</code></pre>
<p>M04 (CCW) only — RPM inherited from <code>#Previous:</code>; direction
updated to the new CCW state:
#Previous:</p>
<pre><code class="lang-csharp">{ "SpindleSpeed": { "SpindleSpeed_rpm": 1500, "Direction": "CW" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M04"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "SpindleSpeed": { "SpindleSpeed_rpm": 1500, "Direction": "CCW" } }</code></pre>
<p>M05 (STOP) only — RPM still carried from <code>#Previous:</code> for
bidirectional round-tripping; downstream consumers gate on
<code>Direction == STOP</code> rather than RPM == 0:
#Previous:</p>
<pre><code class="lang-csharp">{ "SpindleSpeed": { "SpindleSpeed_rpm": 1500, "Direction": "CW" } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M05"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "SpindleSpeed": { "SpindleSpeed_rpm": 1500, "Direction": "STOP" } }</code></pre>

View File

@ -186,6 +186,32 @@ the tool-change M code); modal-only blocks omit it.</p>
</dd></dl>
<h2 id="Hi_NcParsers_LogicSyntaxs_ToolChangeSyntax_examples">Examples</h2>
<p>T5 + M06 — full tool change on one block; both <code>T</code> and M06 flag
consumed, <code>Term</code> written:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M06"], "T": 5 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "ToolChange": { "ToolId": 5, "IsChange": true, "Term": "M06" } }</code></pre>
<p>T5 alone alongside an unrelated flag — modal arming only, no actual
change; <code>IsChange=false</code> and <code>Term</code> omitted. M03 is left in
place because <code>CleanupParsing</code> only runs on the M06 branch:
#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M03"], "T": 7 } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{
"Parsing": { "Flags": ["M03"] },
"ToolChange": { "ToolId": 7, "IsChange": false }
}</code></pre>
<p>M06 alone — <code>T</code> comes from <code>#Previous:</code> modal lookback;
<code>IsChange=true</code>, <code>Term=&ldquo;M06&rdquo;</code>:
#Previous:</p>
<pre><code class="lang-csharp">{ "ToolChange": { "ToolId": 5, "IsChange": false } }</code></pre>
<p>#BeforeBuild:</p>
<pre><code class="lang-csharp">{ "Parsing": { "Flags": ["M06"] } }</code></pre>
<p>#AfterBuild:</p>
<pre><code class="lang-csharp">{ "ToolChange": { "ToolId": 5, "IsChange": true, "Term": "M06" } }</code></pre>

Some files were not shown because too many files have changed in this diff Show More