Table of Contents

Class StepDiagnosticProgress

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Append-only, thread-safe sink for step-anchored diagnostics on the IMessage channel.

This sink stores only StepDiagnostic: every message is anchored to a motion step. Per-step batches arrive via FlushTo(IProgress<StepDiagnostic>); out-of-pipeline emits (e.g. stroke-limit / tooling diagnostics) anchor themselves with AnchoredToStep(IProgress<StepDiagnostic>, int, ISentenceCarrier) before reporting. Data that already has another owner is not duplicated here — NC diagnostics live in NcDiagnosticProgress, plain session-level notices live in ShellProgress, cutter positions live in the CL strip.

Because every StepDiagnostic carries its own StepIndex anchor, ordering is recovered downstream by sorting on that anchor. Producers therefore only ever Report(StepDiagnostic) (append) — even from parallel step-processing tasks — and never insert at a computed position.

public class StepDiagnosticProgress : IProgress<StepDiagnostic>
Inheritance
StepDiagnosticProgress
Implements
Inherited Members
Extension Methods

Properties

Messages

All reported diagnostics, in append (report) order. The collection is thread-safe for concurrent appends from parallel step-processing tasks.

public SynList<StepDiagnostic> Messages { get; }

Property Value

SynList<StepDiagnostic>

Methods

Clear()

Removes all messages (e.g. on session reset).

public void Clear()

Report(StepDiagnostic)

Reports a progress update.

public void Report(StepDiagnostic value)

Parameters

value StepDiagnostic

The value of the updated progress.

Events

Cleared

Raised after Clear() empties the collection.

public event Action Cleared

Event Type

Action

MessageAdded

Raised after a diagnostic has been appended. Carries the index it landed at in Messages and the appended diagnostic, so a consumer can place it and reach nearby items by indexing into Messages. The index is captured atomically with the append, so it stays correct under concurrent step-task reports.

public event Action<int, StepDiagnostic> MessageAdded

Event Type

Action<int, StepDiagnostic>