Skip to main content
Version: v0.0.4

Function: results()

results(msg): readonly ResultRecord[]

Every result (R) record in the message, in wire order.

Parameters

msg

AstmMessage

A parsed single-message stream.

Returns

readonly ResultRecord[]

The result records (possibly empty).

Throws

AstmAmbiguousStreamError (ASTM_AMBIGUOUS_MULTI_MESSAGE) when the stream carries more than one message - see messages.

Example

import { parseAstmRecords, results } from "@cosyte/astm";
const msg = parseAstmRecords("H|\\^&\rR|1|^^^687|28.6|U/L||N||F\rL|1\r");
results(msg)[0]?.units; // "U/L"