Skip to main content
Version: v0.0.6

Interface: AstmFrame

One decoded ASTM frame. text is the frame's record-byte payload (the bytes between the frame number and the terminator, escapes untouched, this is the framing layer, not the record layer). trusted is the single flag a consumer gates on: it is true only for a fully-terminated frame whose checksum validated, and such frames are the only ones reassembled into records.

Properties

byteOffset

readonly byteOffset: number

Byte offset of the STX that opened this frame, within the decoded stream.


checksum

readonly checksum: FrameChecksum

The checksum verdict.


frameNumber?

readonly optional frameNumber?: number

The frame's sequence number as read from the FN byte. Normally 07; a value outside that range means the FN byte was not a 07 digit (a corruption that also trips a sequence-gap warning). undefined when the frame was too truncated to carry a frame number at all.


oversize

readonly oversize: boolean

true when the frame's record text exceeded the 240-byte limit.


terminator?

readonly optional terminator?: FrameTerminator

ETB (intermediate) or ETX (final); undefined for an unterminated frame.


text

readonly text: Uint8Array

The frame's record-byte payload (may be empty). A copy, safe for the caller to retain.


trusted

readonly trusted: boolean

true only when the frame was fully terminated and its checksum validated. Only trusted frames are reassembled into DecodeAstmFramesResult.records; an untrusted frame is surfaced here but never merged.


unterminated

readonly unterminated: boolean

true when no valid terminator + checksum was found for this frame (a truncated/partial frame).