encodeStatusRecord

fnubyte[] encodeStatusRecord(ubyte status, string message = "")

Encodes one status record (acknowledgment, end marker, or error).

Parameters

statusScpAck status byte.
messageDiagnostic message for nonzero statuses; must not be empty when the status is nonzero and is ignored for ScpAck.OK.

Returns

The encoded record bytes.

Throws

ScpException when the status is not 0..2, a nonzero

status has no message, or the message contains a newline or NUL byte.