Table of Contents

Class StepLuggageBytes

Namespace
Hi.MachiningSteps
Assembly
HiMech.dll

Internal Use Only. The step's luggage as the three byte arrays the step cache takes, one a kind (play-core migration P14, D8): the Substraction.WriteBin, LayerMillingEngagement.WriteBin and MillingForceLuggage.WriteBin layouts, null for a kind the step did not produce. The pipeline fills the substraction and engagement kinds with the bytes the native geometry step answered and the force kind with the force record's bytes (the kernel's own doubles, D5); the consignment carries them to the store (LuggageBytes: the writer binds them to the row, serialising no object on its thread, D9), and every reader of a luggage object parses it from them on demand (Parse(), StepLuggage). The bytes are the truth; a parsed object is a read cache. The store keeps two of the kinds in forms of the file's own and decodes them back on every read (HiNc's SqliteStepStorage): an untouched step's no-cut force array as its 8-byte header, the substraction's contours deflated behind its 13-byte header. The arrays here never take those forms.

public sealed class StepLuggageBytes
Inheritance
StepLuggageBytes
Inherited Members
Extension Methods

Constructors

StepLuggageBytes(int, byte[], byte[], byte[])

The luggage of one step as bytes.

public StepLuggageBytes(int stepIndex, byte[] substraction, byte[] layerMillingEngagement, byte[] millingForceLuggage)

Parameters

stepIndex int

The step's index.

substraction byte[]

The substraction kind's bytes; null for none.

layerMillingEngagement byte[]

The engagement kind's bytes; null for none.

millingForceLuggage byte[]

The force kind's bytes; null for none.

Properties

Kinds

The kinds held: a flag for each array that is not null – what the store reads back as the row's non-NULL columns (SqliteStepStorage.FindStoredStepLuggageKinds) and what Kinds answers for the parsed object.

public StepLuggageKinds Kinds { get; }

Property Value

StepLuggageKinds

LayerMillingEngagement

The engagement kind, LayerMillingEngagement.WriteBin; null when the step has no engagement.

public byte[] LayerMillingEngagement { get; }

Property Value

byte[]

MillingForceLuggage

The force kind, MillingForceLuggage.WriteBin; null when the force step did not run.

public byte[] MillingForceLuggage { get; }

Property Value

byte[]

StepIndex

The step's index (the strip position's): the luggage row's key.

public int StepIndex { get; }

Property Value

int

Substraction

The substraction kind, Substraction.WriteBin; null when the step made no subtraction.

public byte[] Substraction { get; }

Property Value

byte[]

Methods

Of(StepLuggage)

The bytes of a luggage object: the three WriteBins, null for a null member. For the step-physics recompute, the bundle hand-over and the callers that still build objects (the tests, the consignment's object constructors).

public static StepLuggageBytes Of(StepLuggage luggage)

Parameters

luggage StepLuggage

The luggage; required.

Returns

StepLuggageBytes

The luggage as bytes.

Exceptions

ArgumentNullException

luggage is null.

Parse()

The luggage as objects: the three BinaryReader constructors over the kinds held, null for a kind absent, and StepIndex on the object as the store's FindStepLuggages sets it. A new object on every call; the consignment keeps the first parse as its read cache (StepLuggage). One rule beyond the constructors: an untouched substraction's ContactContours is an empty list, never null (see ParseSubstraction(byte[])).

public StepLuggage Parse()

Returns

StepLuggage

The parsed luggage.