f
decodeSentence(): DecodedSentence
bytes: Uint8Array,
options?: { offset?: number; }
Decodes a sentence from MikroTik API format
f
encodeSentence(words: string[]): EncodedSentence
Encodes a sentence (array of strings) into MikroTik API format
T
DecodedSentence = { words: string[]; bytesRead: number; }
Decoded sentence value with metadata
-
bytesRead: number
Total bytes read (all words + terminator)
-
words: string[]
Array of decoded word strings
T
EncodedSentence = Uint8Array
Encoded sentence as a Uint8Array
Usage
import * as mod from "encoding/sentence.ts";