I implementing protocol, which has multiple byte codes for one type. For example digital message may have codes in range of 0x90 - 0x9F. Naive function for generating that type can looks like this:
(defn digital-message
[port]
(bit-or 0x90 port))
I would like to create encoders and decoders which looks like that:
decoder:
I implementing protocol, which has multiple byte codes for one type. For example digital message may have codes in range of 0x90 - 0x9F. Naive function for generating that type can looks like this:
I would like to create encoders and decoders which looks like that: decoder:
encoder:
Unfortunaly, I don't know how to implement it and combine with
gloss/header
.Thanks for any response.