Archived
446 lines
18 KiB
HTML
446 lines
18 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Class StepScopedProgress | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Class StepScopedProgress | HiAPI-C# 2025 ">
|
|
|
|
<meta name="description" content="A per-step of that accumulates the messages emitted while one step is built, upgrading any plain message to a anchored to this step's / . An already step-anchored is kept unchanged. (NC diagnostics are not seen here — they live in their own , not on this channel.) It does not forward to a downstream sink as messages arrive; instead it collects them into and is drained once via at the step's sequential post-physics stage. Because that stage runs strictly in step order, the per-step batches land in execution order with no position-scanning insert. No locking: a single step's construction is a data-dependency chain (substraction → physics → post-physics), so only one task writes at a time; parallelism across steps writes to different scopes. Each parallel step task therefore holds its own instance — never a shared mutable "current step" on , which would race.">
|
|
<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 "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<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.MachiningProcs.StepScopedProgress">
|
|
|
|
|
|
|
|
<h1 id="Hi_MachiningProcs_StepScopedProgress" data-uid="Hi.MachiningProcs.StepScopedProgress" class="text-break">
|
|
Class StepScopedProgress
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.MachiningProcs.html">MachiningProcs</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"><p>A per-step <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress<T></a> of <a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a> that <b>accumulates</b> the
|
|
messages emitted while one step is built, upgrading any plain message to a
|
|
<a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a> anchored to this step's <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_StepIndex">StepIndex</a> /
|
|
<a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_SentenceCarrier">SentenceCarrier</a>. An already step-anchored <a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a> is kept
|
|
unchanged. (NC diagnostics are not seen here — they live in their own
|
|
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a>, not on this channel.)</p>
|
|
<p>
|
|
It does not forward to a downstream sink as messages arrive; instead it collects them into
|
|
<a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_MessageList">MessageList</a> and is drained once via <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_FlushTo_System_IProgress_Hi_MachiningProcs_StepDiagnostic__">FlushTo(IProgress<StepDiagnostic>)</a> at the step's
|
|
<b>sequential</b> post-physics stage. Because that stage runs strictly in step order, the
|
|
per-step batches land in execution order with no position-scanning insert.
|
|
</p>
|
|
<p>
|
|
No locking: a single step's construction is a data-dependency chain (substraction → physics →
|
|
post-physics), so only one task writes <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_MessageList">MessageList</a> at a time; parallelism across
|
|
steps writes to <i>different</i> scopes. Each parallel step task therefore holds its own
|
|
instance — never a shared mutable "current step" on <a class="xref" href="Hi.MachiningProcs.StepDiagnosticProgress.html">StepDiagnosticProgress</a>, which would
|
|
race.
|
|
</p>
|
|
</div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public class StepScopedProgress : IProgress<IMessage>, IProgressMessage, IMessage, IMotionStepIndex</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">StepScopedProgress</span></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl class="typelist implements">
|
|
<dt>Implements</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a><<a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a>></div>
|
|
<div><a class="xref" href="Hi.Common.Messages.IProgressMessage.html">IProgressMessage</a></div>
|
|
<div><a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a></div>
|
|
<div><a class="xref" href="Hi.MachiningSteps.IMotionStepIndex.html">IMotionStepIndex</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<TSelf>(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<TSrc>(TSrc, Action<TSrc>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke<TSrc, TDst>(TSrc, Func<TSrc, TDst>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.MachiningProcs.StepDiagnosticAnchorUtil.html#Hi_MachiningProcs_StepDiagnosticAnchorUtil_AnchoredToStep_System_IProgress_Hi_MachiningProcs_StepDiagnostic__System_Int32_Hi_NcParsers_ISentenceCarrier_">StepDiagnosticAnchorUtil.AnchoredToStep(IProgress<StepDiagnostic>, int, ISentenceCarrier)</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_MachiningProcs_StepScopedProgress__ctor_" data-uid="Hi.MachiningProcs.StepScopedProgress.#ctor*"></a>
|
|
|
|
<h3 id="Hi_MachiningProcs_StepScopedProgress__ctor_System_Int32_Hi_NcParsers_ISentenceCarrier_" data-uid="Hi.MachiningProcs.StepScopedProgress.#ctor(System.Int32,Hi.NcParsers.ISentenceCarrier)">
|
|
StepScopedProgress(int, ISentenceCarrier)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html">StepScopedProgress</a> class.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public StepScopedProgress(int stepIndex, ISentenceCarrier sentenceCarrier)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>stepIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>Execution-order index of the step.</p>
|
|
</dd>
|
|
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
|
|
<dd><p>NC-source carrier for the step; may be null.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="properties">Properties
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_MachiningProcs_StepScopedProgress_MessageList_" data-uid="Hi.MachiningProcs.StepScopedProgress.MessageList*"></a>
|
|
|
|
<h3 id="Hi_MachiningProcs_StepScopedProgress_MessageList" data-uid="Hi.MachiningProcs.StepScopedProgress.MessageList">
|
|
MessageList
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Messages accumulated for this step, in emission order — already upgraded to
|
|
<a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a> by <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_Report_Hi_Common_Messages_IMessage_">Report(IMessage)</a>. Written by the step's pipelined
|
|
(one-at-a-time) construction tasks, then drained once via <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_FlushTo_System_IProgress_Hi_MachiningProcs_StepDiagnostic__">FlushTo(IProgress<StepDiagnostic>)</a>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public List<StepDiagnostic> MessageList { 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.list-1">List</a><<a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_MachiningProcs_StepScopedProgress_SentenceCarrier_" data-uid="Hi.MachiningProcs.StepScopedProgress.SentenceCarrier*"></a>
|
|
|
|
<h3 id="Hi_MachiningProcs_StepScopedProgress_SentenceCarrier" data-uid="Hi.MachiningProcs.StepScopedProgress.SentenceCarrier">
|
|
SentenceCarrier
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>NC-source carrier for the step; may be null.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ISentenceCarrier SentenceCarrier { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_MachiningProcs_StepScopedProgress_StepIndex_" data-uid="Hi.MachiningProcs.StepScopedProgress.StepIndex*"></a>
|
|
|
|
<h3 id="Hi_MachiningProcs_StepScopedProgress_StepIndex" data-uid="Hi.MachiningProcs.StepScopedProgress.StepIndex">
|
|
StepIndex
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Execution-order index of the step this scope anchors to.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public int StepIndex { 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_MachiningProcs_StepScopedProgress_FlushTo_" data-uid="Hi.MachiningProcs.StepScopedProgress.FlushTo*"></a>
|
|
|
|
<h3 id="Hi_MachiningProcs_StepScopedProgress_FlushTo_System_IProgress_Hi_MachiningProcs_StepDiagnostic__" data-uid="Hi.MachiningProcs.StepScopedProgress.FlushTo(System.IProgress{Hi.MachiningProcs.StepDiagnostic})">
|
|
FlushTo(IProgress<StepDiagnostic>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Drains the accumulated <a class="xref" href="Hi.MachiningProcs.StepScopedProgress.html#Hi_MachiningProcs_StepScopedProgress_MessageList">MessageList</a> into <code class="paramref">sink</code> in order. Call
|
|
once, at the step's sequential post-physics stage, so the session sink receives whole
|
|
per-step batches already in execution order.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void FlushTo(IProgress<StepDiagnostic> sink)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>sink</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a><<a class="xref" href="Hi.MachiningProcs.StepDiagnostic.html">StepDiagnostic</a>></dt>
|
|
<dd><p>The downstream sink (typically the session <a class="xref" href="Hi.MachiningProcs.StepDiagnosticProgress.html">StepDiagnosticProgress</a>); no-op if null.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_MachiningProcs_StepScopedProgress_Report_" data-uid="Hi.MachiningProcs.StepScopedProgress.Report*"></a>
|
|
|
|
<h3 id="Hi_MachiningProcs_StepScopedProgress_Report_Hi_Common_Messages_IMessage_" data-uid="Hi.MachiningProcs.StepScopedProgress.Report(Hi.Common.Messages.IMessage)">
|
|
Report(IMessage)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Reports a progress update.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Report(IMessage value)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>value</code> <a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a></dt>
|
|
<dd><p>The value of the updated progress.</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>
|