Class StepPhysicsChannels
- Namespace
- Hi.MachiningProcs
- Assembly
- HiMech.dll
Internal Use Only. The resident channels of a play: for every published step, the twelve float32 source quantities of StepPhysicsChannel and the “thermal stress evaluated” bit, in chunks of ChunkSteps steps, a chunk allocated on the first write into it (one 32 KB column per channel a chunk, under the large-object heap threshold). Written by the sequential physics stage as it publishes each step and by the step-physics recompute for the steps it rewrites — one writer at a time — and read by the plural strip charts' polls on any thread: a value is read as it was written (a float is atomic), a chunk is published before its first value is readable, and a step never written reads NaN / false. Cleared on a session reset with the strip. The two briefs themselves live in the step cache (the brief-into-DB chain's C4b); the channels hold what a poll over the whole strip would otherwise read from it once a step.
public sealed class StepPhysicsChannels
- Inheritance
-
StepPhysicsChannels
- Inherited Members
- Extension Methods
Fields
ChannelCount
The channels of StepPhysicsChannel.
public const int ChannelCount = 12
Field Value
ChunkSteps
The steps of one chunk.
public const int ChunkSteps = 8192
Field Value
Properties
AllocatedBytes
What the allocated chunks take on the heap: the columns and the two bitsets of each, array headers included (24 B an array on 64-bit).
public long AllocatedBytes { get; }
Property Value
AllocatedChunkCount
The chunks allocated so far (a chunk is allocated on its first write).
public int AllocatedChunkCount { get; }
Property Value
Methods
Clear()
Drops every chunk: every step reads NaN / false until written again.
public void Clear()
IsThermalStressEvaluated(int)
Whether the step's thermal step evaluated the thermal stress; false for a step never written.
public bool IsThermalStressEvaluated(int stepIndex)
Parameters
stepIndexintThe step.
Returns
- bool
The evaluated bit.
IsWritten(int)
Whether the step was written at least once since the last Clear().
public bool IsWritten(int stepIndex)
Parameters
stepIndexintThe step.
Returns
- bool
true when written.
Read(int, StepPhysicsChannel)
Reads one channel of one step: NaN for a step never written, a chunk not allocated or a negative index.
public float Read(int stepIndex, StepPhysicsChannel channel)
Parameters
stepIndexintThe step.
channelStepPhysicsChannelThe channel.
Returns
- float
The value as written, or NaN.
Write(int, in SubstractionBrief, MillingForceBrief, SeqPhysicsState, IMachiningTool)
Writes the channels of one step from its removal scalars and its two briefs, as the
step's getters would read them: a force brief of the null record (the physics did not
run) writes NaN on the eight force-side channels; the no-cut record writes 0 on the
force, deflection, ratio, torque and power channels and NaN on the force height (the
record carries none); a computed brief writes its values (a vector not built reads
NaN, and so do the torque and the power while the brief's non-sequential extension is
not built). The sequential physics state writes the spindle temperature, the flute temperature under
the coating of tool's cutter (NaN without a flute list, a milling
cutter or a layer at that index) and the evaluated bit.
public void Write(int stepIndex, in SubstractionBrief substractionBrief, MillingForceBrief millingForceBrief, SeqPhysicsState seqPhysicsState, IMachiningTool tool)
Parameters
stepIndexintThe step; the chunk it falls in is allocated when missing.
substractionBriefSubstractionBriefThe step's removal scalars (the tri-state tag).
millingForceBriefMillingForceBriefThe step's force brief; null for the null record.
seqPhysicsStateSeqPhysicsStateThe step's sequential physics state; null writes NaN / false.
toolIMachiningToolThe step's tool, for the coating layer count; may be null.
Exceptions
- ArgumentOutOfRangeException
stepIndexis negative.