Table of Contents

Interface IMachiningResultSink

Namespace
Hi.MachiningSteps
Assembly
HiMech.dll

Internal Use Only. Where a play's results go as records: the result recording's boundary (the plan's P1), fed from three places on three threads – a strip position on PosAdded (the shell thread, after the pipeline's submit lock), a step and its two briefs after the step pipeline's fourth stage published it (the pump thread, through MachiningActRunner.ResultSink), a syntax piece on SyntaxPieceRan (the player's thread). The three can run at once, so a sink is thread-safe, and nothing orders the three kinds against each other: the step of a position may arrive before or after the position, a piece before or after the steps built from it; a step's briefs follow its record on the same thread. Every record carries its own key – the step index of a position, of a step and of its briefs, the sentence snapshot of a piece and of the steps built from it, the same object (Of(ISentenceCarrier)) – so a store keeps the kinds apart and never assumes a position's row is there when its step's arrives. A sink has no lifetime of its own: no begin, no end, no flush; the recorder owns those. The recorder of the plan's P3 is Hi.MachiningProcs.NcResultRecorder (HiNc).

A sink never throws, never blocks the play and never calls back into the runner. The fourth stage guards its two calls all the same: a throw out of AddMachiningStep(MachiningStepRecord) or AddStepBrief(StepBrief) -- the record's own checks can throw -- is reported on the step as Step-ResultRecord--Fault, the step stays published and the recording goes on without it; a throw out of AddClStripPos(in ClStripPosRecord) leaves the position's event handler and stops the play, a throw out of AddSyntaxPiece(SyntaxPieceRecord) leaves the piece event's handler. A sink that waits on a store holds the thread that called it -- the shell thread inside its play loop, the pump, the player -- so the recorder catches its own exceptions and keeps its own back-pressure off these threads.

public interface IMachiningResultSink
Extension Methods

Methods

AddClStripPos(in ClStripPosRecord)

A strip position, on PosAdded: the shell thread, outside the pipeline's submit lock; the position has no step yet.

void AddClStripPos(in ClStripPosRecord pos)

Parameters

pos ClStripPosRecord

The position's record.

AddMachiningStep(MachiningStepRecord)

A published step, on the pump thread, after the step pipeline's fourth stage set the step on its position: the step's values of that moment.

void AddMachiningStep(MachiningStepRecord step)

Parameters

step MachiningStepRecord

The step's record.

AddStepBrief(StepBrief)

A published step's two briefs, on the pump thread, right after AddMachiningStep(MachiningStepRecord) for the same step: the force brief the force stage built (null when the physics did not run on the step) and the sequential physics state, never null for a published step. The briefs of the moment the step was published, taken once: what the step-physics recompute writes onto the step afterwards reaches a recording by the recorder's amend, never through this method.

void AddStepBrief(StepBrief brief)

Parameters

brief StepBrief

The step's briefs, keyed by the step index.

AddSyntaxPiece(SyntaxPieceRecord)

An executed piece, on SyntaxPieceRan: the player's thread.

void AddSyntaxPiece(SyntaxPieceRecord piece)

Parameters

piece SyntaxPieceRecord

The piece's record.