Namespace Hi.Numerical.CsvParsers
Classes
- CsvActDataSemantic
CSV extension semantic: emits ActData from the residual
CsvRowcolumns — those not claimed by anyRowTo*Syntax(tool id, spindle, feedrate, coolant, time, csscript) nor by the machine / cutter coordinate prefixes. A caller-supplied ParsingDictionary entry is applied to its column's raw text; the rest pass through as their pre-typed number / bool / string. Carries arbitrary recorded channels (file/line bookkeeping, sensor columns, etc.) onto the step.
- CsvActualTimeSemantic
CSV extension semantic: emits ActActualTimecode from the ActualTimeTag cell of the decoded
CsvRow. This is telemetry the general semantic list does not cover — the absolute controller timestamp of the recorded sample. Stateless; the duration that consumes this timestamp is computed independently by CsvMotionSemantic via Hi.Numerical.CsvParsers.CsvTimingUtil.
- CsvMotionSemantic
CSV motion semantic — the recorded-duration counterpart of the general McLinearMotionSemantic. Reads the same standardized sections (IMotionEventDef, MachineCoordinateState, IFeedrateDef) the general motion semantic reads, but derives the move's duration from the recorded CSV timing (ResolveDuration(LazyLinkedListNode<SyntaxPiece>)) instead of feedrate × distance — because CSV is replayed telemetry where time is given, not computed.
First coordinate row (no previous MC) → ActMcXyzabcStep to the point; subsequent rows → ActMcXyzabcLinearContour from the previous point. The recorded feedrate is emitted as a standalone ActFeedrate on change.
Because the upstream RowToMotionEventSyntax writes the full general motion-section contract, this semantic can be replaced one-for-one with McLinearMotionSemantic to fall back to feedrate-derived timing.
- CsvRowSyntax
Per-row CSV parsing syntax for the soft NC runner. Reads the active TitleList via SegmenterDependency, splits the row text using GetCsvDictionary(IList<string>, string), and stamps the resulting column→value map into JsonObject under the CsvRowKey property for the downstream CSV syntaxes and semantics to consume.
Numeric cells are pre-typed to double (or bool) at this stage so downstream readers — including the CSV semantics' 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 ParsingDictionary (the caller-supplied parsing function expects the raw cell text).
- CsvRunnerConfig
Configuration class for CSV Runner. Lives in PipelineNcDependencyList when wired with GeneralCsvRunner; consumed by CsvRowSyntax and the CSV row syntaxes/semantics for tag-name lookup and custom-field parsing.
- CsvSegmenter
Segments a CSV stream for the SoftNcRunner pipeline. Consumes the first IndexedFileLine as the title row (populating TitleList and registering any new columns as step variables via StepPropertyAccessDictionaryDependency), then yields each subsequent line as a one-line Sentence for CsvRowSyntax to parse.
- CsvToolingTeleportSemantic
CSV extension semantic: emits ActToolingTeleport from the
ToolChangesection written by RowToToolingSyntax. In CSV (recorded telemetry) mode the tool jumps to its recorded position rather than running a modelled tool-changer cycle, so this replaces the general ToolChangeSemantic'sActToolingStep. Fires only when IsChangeKey is set (the row's tool id differs from the previous row), so a long run of same-tool rows emits a single teleport.
- GeneralCsvRunner
Factory for a SoftNcRunner that replays CSV telemetry through the general-semantics architecture: a chain of small
RowTo*Syntaxclasses maps each decodedCsvRowinto the same standardized JSON sections the brand-NC pipeline writes (SpindleSpeed,Feedrate,Coolant,CsScript,ToolChange,MachineCoordinateState,MotionEvent), and a mostly-general semantic list resolves them into acts. A handful of CSV extension semantics cover telemetry the general list does not (CsvActualTimeSemantic, CsvToolingTeleportSemantic, CsvMotionSemantic, CsvActDataSemantic).This is the flagship CSV runner — it superseded an earlier single-syntax / single-semantic pipeline.
Recorded vs. computed timing. CSV is replayed telemetry, so CsvMotionSemantic uses the recorded sample duration (
StepDuration/ActualTimedelta) rather than feedrate × distance. Because RowToMotionEventSyntax still writes the full general motion-section contract, swapping CsvMotionSemantic for the general McLinearMotionSemantic in NcSemanticList flips the runner to feedrate-derived timing with no other change.
- RowToCoolantSyntax
Translates the coolant column of a decoded
CsvRowinto the standardized ICoolantDef section consumed by the general CoolantSemantic. The cell may hold a mode name (Flood / Mist / Off) or a boolean / 0-1 on-off flag; an unrecognized value is a no-op.
- RowToCsScriptSyntax
Translates the begin/end C# script columns of a decoded
CsvRow(LineBeginCsScriptTag / LineEndCsScriptTag) into the standardized CsScript section consumed by the general CsScriptBeginSemantic / CsScriptEndSemantic. Empty cells are skipped; an all-empty row is a no-op.
- RowToFeedrateSyntax
Translates the feedrate column of a decoded
CsvRowinto the standardized IFeedrateDef section. CSV feedrate is recorded in mm/min, so the section is stamped with the G94 (mm/min) term and its derived unit — the same shape ReadFeedrate_mmds(JsonObject, ISentenceCarrier, NcDiagnosticProgress) expects.
- RowToMachineCoordinateSyntax
Translates the machine-coordinate columns of a decoded
CsvRow(prefixed by MachineCoordinatePrefix, e.g.MC.X…MC.C) into the standardized MachineCoordinateState section. Linear axes (X/Y/Z) are millimetres; rotary axes (A/B/C) are raw degrees, matching the convention McAbcSyntax writes and ReadMcXyzabc(JsonObject) reads (degrees → radians). Only axes actually present in the row are written; an all-absent row is a no-op.Must run before RowToMotionEventSyntax.
- RowToMotionEventSyntax
Marks every CSV row that carries a MachineCoordinateState section as a McLinear feed move by writing the standardized IMotionEventDef (+ modal IMotionStateDef) sections. This keeps the motion-section contract identical to the one the general McLinearMotionSemantic reads, so the CSV pipeline's CsvMotionSemantic (recorded-duration) can be swapped for the general feedrate-derived semantic by changing only the semantic list.
CSV telemetry has no rapid concept, so IsRapid is never set (feed move). Must run after RowToMachineCoordinateSyntax.
- RowToSpindleSyntax
Translates the spindle columns of a decoded
CsvRowinto the standardized ISpindleSpeedDef section that the general SpindleSpeedSemantic consumes. Reads SpindleSpeedTag_rpm (numeric) and SpindleDirectionTag (enum name); when only the speed is present the direction defaults to CW (matching the legacy CSV behavior).
- RowToTimingSyntax
Moves the recorded-timing columns of a decoded
CsvRow(DurationTag / ActualTimeTag) into a dedicatedCsvTimingsection, consuming them fromCsvRow. The cells stay as raw strings (the source format may be aTimeSpanorDateTimeliteral); parsing happens later in Hi.Numerical.CsvParsers.CsvTimingUtil. Having a syntax own the timing tags — like the otherRowTo*syntaxes own their columns — is what lets CsvActDataSemantic treat whatever remains inCsvRowas residual telemetry without a hard-coded consumed-key list.
- RowToToolingSyntax
Translates the tool-id column of a decoded
CsvRowinto the standardizedToolChangesection (SectionName). The active tool number is always written; IsChangeKey is set when the tool id differs from the previous row (including the first occurrence), so the section both drives CsvToolingTeleportSemantic (CSV teleport-on-change) and stays compatible with the general ToolChangeSemantic.