encodeCommand

open fun encodeCommand(commandId: String, value: CommandValue = CommandValue.None): CommandEncodingResult(source)

Checked contract API. Rejects invalid values before encoding (and its possible side effects), instead of relying on legacy clamping, masking or ignored fields.