Pull out decoded_message_t struct.
Remove state duplication with `flush()` in decoder.
Use enum for message ID to avoid linking errors.
Missing `cstdint` include.