A method for encoding a message communicated between devices, the message
having at least one field, the method comprising: if the field is not
optional and contains a value, writing the value to one or more data
bytes in a byte buffer; and, if the field is optional and contains a
default value, marking a bit in a reserved byte in the byte buffer to
indicate that the field contains a default value.