203 lines
12 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Namespace Hi.Numerical.CsvParsers | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Namespace Hi.Numerical.CsvParsers | 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.Numerical.CsvParsers">
<h1 id="Hi_Numerical_CsvParsers" data-uid="Hi.Numerical.CsvParsers" class="text-break">Namespace Hi.Numerical.CsvParsers</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.Numerical.CsvParsers.CsvRowSemantic.html">CsvRowSemantic</a></dt>
<dd><p>Final-stage semantic that turns each row JSON stamped by
<a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html">CsvRowSyntax</a> into the same <a class="xref" href="Hi.Numerical.Acts.IAct.html">IAct</a> sequence the
legacy <code>CsvRunner</code> produced: optional <a class="xref" href="Hi.Numerical.Acts.ActLineCsScript.html">ActLineCsScript</a>
(begin), <a class="xref" href="Hi.Numerical.Acts.ActActualTime.html">ActActualTime</a>, <a class="xref" href="Hi.Numerical.Acts.ActToolingTeleport.html">ActToolingTeleport</a>,
<a class="xref" href="Hi.Numerical.Acts.ActFeedrate.html">ActFeedrate</a>, <a class="xref" href="Hi.Numerical.Acts.ActSpindleDirection.html">ActSpindleDirection</a>,
<a class="xref" href="Hi.Numerical.Acts.ActSpindleSpeed.html">ActSpindleSpeed</a>, <a class="xref" href="Hi.Numerical.Acts.ActMcXyzabcStep.html">ActMcXyzabcStep</a> /
<a class="xref" href="Hi.Numerical.Acts.ActMcXyzabcLinearContour.html">ActMcXyzabcLinearContour</a>, <a class="xref" href="Hi.Numerical.Acts.ActData.html">ActData</a>, and
optional <a class="xref" href="Hi.Numerical.Acts.ActLineCsScript.html">ActLineCsScript</a> (end).</p>
<p>
Stateless — the previous machine coordinate is recovered by walking back
through the <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> chain and reading the typed
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> cells <a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html">CsvRowSyntax</a> already stamped, so
no carry-state lives on the semantic instance or in extra JSON sections.
The previous actual time is recovered the same way; that cell stays as a
string (the source format may be TimeSpan or DateTime) and is re-parsed
on demand — at most once per row.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html">CsvRowSyntax</a></dt>
<dd><p>Per-row CSV parsing syntax for the soft NC runner. Reads the active
<a class="xref" href="Hi.Numerical.CsvParsers.CsvSegmenter.html#Hi_Numerical_CsvParsers_CsvSegmenter_TitleList">TitleList</a> via
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.SegmenterDependency.html">SegmenterDependency</a>, splits the row text using
<a class="xref" href="Hi.Common.CsvUtils.CsvInputKit.html#Hi_Common_CsvUtils_CsvInputKit_GetCsvDictionary_System_Collections_Generic_IList_System_String__System_String_">GetCsvDictionary(IList&lt;string&gt;, string)</a>, and
stamps the resulting column→value map into
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_JsonObject">JsonObject</a> under the <a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html#Hi_Numerical_CsvParsers_CsvRowSyntax_CsvRowKey">CsvRowKey</a>
property for <a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSemantic.html">CsvRowSemantic</a> to consume.</p>
<p>
Numeric cells are pre-typed to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> (or <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>)
at this stage so downstream readers — including
<a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSemantic.html">CsvRowSemantic</a>'s backwards walk for the previous machine
coordinate — touch native JSON numbers instead of re-parsing strings on
every visit. Columns kept as strings: the script / time / spindle-direction
tags whose semantic interpretation is non-numeric, plus any column whose
key appears in <a class="xref" href="Hi.Numerical.CsvParsers.CsvRunnerConfig.html#Hi_Numerical_CsvParsers_CsvRunnerConfig_ParsingDictionary">ParsingDictionary</a> (the
caller-supplied parsing function expects the raw cell text).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.Numerical.CsvParsers.CsvRunnerConfig.html">CsvRunnerConfig</a></dt>
<dd><p>Configuration class for CSV Runner. Lives in
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcDependencyList">NcDependencyList</a> when wired with
<a class="xref" href="Hi.Numerical.CsvParsers.CsvSoftRunner.html">CsvSoftRunner</a>; consumed by <a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html">CsvRowSyntax</a> and
<a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSemantic.html">CsvRowSemantic</a> for tag-name lookup and custom-field parsing.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.Numerical.CsvParsers.CsvSegmenter.html">CsvSegmenter</a></dt>
<dd><p>Segments a CSV stream for the <a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a>
pipeline. Consumes the first <a class="xref" href="Hi.Common.FileLines.IndexedFileLine.html">IndexedFileLine</a> as the title
row (populating <a class="xref" href="Hi.Numerical.CsvParsers.CsvSegmenter.html#Hi_Numerical_CsvParsers_CsvSegmenter_TitleList">TitleList</a> and registering any new columns
as step variables via
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.StepPropertyAccessDictionaryDependency.html">StepPropertyAccessDictionaryDependency</a>), then yields each
subsequent line as a one-line <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a> for
<a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html">CsvRowSyntax</a> to parse.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.Numerical.CsvParsers.CsvSoftRunner.html">CsvSoftRunner</a></dt>
<dd><p>Factory for a <a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> wired to replay CSV files
(deprecates the legacy <code>CsvRunner</code>). The returned runner has a
single-syntax pipeline: <a class="xref" href="Hi.Numerical.CsvParsers.CsvSegmenter.html">CsvSegmenter</a>
<a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSyntax.html">CsvRowSyntax</a><a class="xref" href="Hi.Numerical.CsvParsers.CsvRowSemantic.html">CsvRowSemantic</a>.</p>
<p>
Default <a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcDependencyList">NcDependencyList</a>:
<ul><li><a class="xref" href="Hi.Numerical.CsvParsers.CsvRunnerConfig.html">CsvRunnerConfig</a> — tag names + custom field parsers.</li><li><a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.NcKinematicsDependency.html">NcKinematicsDependency</a> — provider left null; host wires
it the same way it does for brand presets (see <code>BuildCoordinateConverter</code>).</li><li><a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.StepPropertyAccessDictionaryDependency.html">StepPropertyAccessDictionaryDependency</a> — wired by the
host so CSV title columns auto-register as step variables.</li><li><a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.FileIndexCounterDependency.html">FileIndexCounterDependency</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> — runtime plumbing required 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>.</li></ul>
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.MachiningServiceDependency.html">MachiningServiceDependency</a> is intentionally not included by
default; clients that build custom syntaxes around <a class="xref" href="Hi.Numerical.CsvParsers.CsvSoftRunner.html">CsvSoftRunner</a>
can append it themselves.
</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>