Table of Contents

Class PlayedUnderTable

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Internal Use Only. What the steps of the strip were played under, as change points by strip index on four tracks: whether the act runner's collision detection was on for the step (the very read it detected by, EnableCollisionDetection in its step procedure); whether the program that built it was a CSV control table (the session's pipeline built by the host's CSV runner); whether the act runner's physics was on for the step (EnablePhysics as the step procedure read it; step coloring p11); and whether the collision detection, switched on, answered no result for the step (Detect(bool) returned null: no collision licence, or no machining chain to detect against; a runner without equipment asked nothing and records no refusal), so that the Collision leaf stayed empty whatever happened (p11). A point only where a track's value changes, at most MaxChangePoints changes a track: no byte a step. Written by the act runner on the thread that builds the steps (Observe(int, bool, bool, bool), ObserveDetectionResult(int, bool)); read by any thread (ReadRanges(int)); cleared with the strip (ResetStateAndClStrip(StepDiagnosticProgress, IProgress<IMessage>), Reset()), which is the only way a track loses its first point. The HiNc host reads it for the notes of its built-in color trees (step coloring p10, p11).

public sealed class PlayedUnderTable
Inheritance
PlayedUnderTable
Inherited Members
Extension Methods

Fields

MaxChangePoints

The changes of value a track keeps (one point more: the first step's; 32 KB a track at most); past it the track only says it changed too often (PlayedUnderRanges's truncated flags). A play that switches the detection on every line of a long program is the case it bounds.

public const int MaxChangePoints = 4096

Field Value

int

Methods

Observe(int, bool, bool, bool)

The step at stepIndex is about to be built under these values: the act runner's step procedure calls it once a step, with the strip index the step takes, before the step's collision detection (whose result ObserveDetectionResult(int, bool) records under the same index).

public void Observe(int stepIndex, bool collisionDetection, bool csvProgram, bool physics)

Parameters

stepIndex int

The strip index the step takes (the strip's count as the step is built).

collisionDetection bool

Whether the collision detection is on for this step.

csvProgram bool

Whether the program that builds this step is a CSV control table.

physics bool

Whether the physics is on for this step, as the step procedure read the switch (EnablePhysics). The step pipeline reads the switch again on its own, at the force stage (MachiningParallelProc.FreezePhysics) and at the thermal stage, so a switch written from another thread between those reads can leave this record, the step's force and its thermal physics in disagreement for that one step – the same window the collision switch has between its record and a switch written mid-play.

ObserveDetectionResult(int, bool)

What the step's collision detection answered: the act runner's step procedure calls it once a step, right after the detection and before it yields on a collision, with the index Observe(int, bool, bool, bool) took for the step. refused is true when the detection was on and answered no result (Detect(bool) returned null: no collision licence, or no machining chain to detect against), so the Collision leaf of a color tree stays empty for the step whatever happened; false when the detection was off, or on and answered (a result with or without a collision), or the runner had no equipment to ask (nothing was refused: there was nothing to detect with).

public void ObserveDetectionResult(int stepIndex, bool refused)

Parameters

stepIndex int

The strip index the step takes, the one Observe(int, bool, bool, bool) was given.

refused bool

Whether the detection was on and answered no result.

ReadRanges(int)

The ranges over the strip's first stepCount steps: where the collision detection was off, where the program was a CSV table, where the physics was off and where the detection was on but answered no result, each clipped to [0, stepCount); a copy taken under the table's lock.

public PlayedUnderRanges ReadRanges(int stepCount)

Parameters

stepCount int

The strip's count; a range never reaches past it.

Returns

PlayedUnderRanges

Reset()

Forgets every track's points and flags: the strip was cleared.

public void Reset()