encodeIndiCommand function Protocol
Encodes command as an INDI XML string, including a trailing newline.
BLOB data is base64-encoded inline. For large BLOBs prefer encodeIndiCommandChunks, which avoids building one huge string.
Implementation
String encodeIndiCommand(IndiCommand command) => _pieces(command).join();