Class StepActualTime
- Namespace
- Hi.MachiningSteps
- Assembly
- HiMech.dll
Wall-clock stamp of a machining step end — the controller-recorded timeline, as opposed to the simulated machine timeline (EndTimecode). Grouped into one optional sub-object so scenes that never map measured data (pure NC simulation, collision check, optimization) carry a single null reference per step. A CSV play stamps only the first step built after each row/idle boundary with the controller instant; the steps in between receive values extrapolated from the latest stamp along the machine timeline and are marked IsInterpolated. Persisted as one 20-byte record (WriteBin(BinaryWriter), StepActualTime(BinaryReader)); a step without a stamp has no record at all (the result recording's column is NULL), there is no record of a null stamp.
public class StepActualTime : IWriteBin
- Inheritance
-
StepActualTime
- Implements
- Inherited Members
- Extension Methods
Constructors
StepActualTime()
Initializes an empty stamp, filled through the setters: the object initializers of the CSV play's step-built action and of the CSV mapping embedded after a play.
public StepActualTime()
StepActualTime(BinaryReader)
Reads the record WriteBin(BinaryWriter) wrote. The version byte is judged before a byte of the payload is read; with the presence byte set, the instant's kind and ticks are judged as soon as they are read (a kind of 0, 1 or 2; ticks from 0 to MaxValue's), and without it the nine bytes of the instant are read past and not interpreted.
public StepActualTime(BinaryReader reader)
Parameters
readerBinaryReaderThe reader positioned at the record's first byte.
Exceptions
- InvalidDataException
The record's version is not this build's, or its instant has a kind or ticks no DateTime takes.
- EndOfStreamException
The stream ends inside the record.
Properties
Instant
Absolute controller instant of the step end; null when the source row carried only a relative timecode.
public DateTime? Instant { get; set; }
Property Value
IsInterpolated
False when the values came directly from a controller row (an original stamp — a genuine timeline anchor); true when they were extrapolated from the latest stamp along the machine timeline.
public bool IsInterpolated { get; set; }
Property Value
Timecode
Run-relative wall-clock timecode of the step end, resolved against the
project mapping anchor (TimeMapping.MappingAnchorDateTime).
public TimeSpan Timecode { get; set; }
Property Value
Methods
WriteBin(BinaryWriter)
Writes the stamp as one 20-byte record: the version byte, the ticks of Timecode (int64), a presence byte for Instant, the instant's ticks (int64) and its DateTimeKind (one byte) – both zero when there is no instant; the kind beside the ticks, not folded into them as ToBinary() folds – then IsInterpolated (one byte).
public void WriteBin(BinaryWriter writer)
Parameters
writerBinaryWriterThe writer to write to.