encodeStatusRecord
fn
ubyte[] encodeStatusRecord(ubyte status, string message = "")Encodes one status record (acknowledgment, end marker, or error).
Parameters
status | ScpAck status byte. |
message | Diagnostic 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.