-
Notifications
You must be signed in to change notification settings - Fork 7
ISense Framing Decoder Encoder
This decoder/encoder (Located here) wraps a set of bytes in such a way that the first byte is interpreted as the packet's type while the remaining bytes are considered as the packet's payload. The structure of a packet is as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type (1 Byte) | Payload (arbitrary size) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ...
This packet format is used by the iSense sensor nodes from coalesenses in conjunction with the DLESTXETX framing. Basically, packets are framed by the DLESTXETX framing and the contained payload is an iSense packet where the first byte is the packet's type while the remaining bytes are considered as the packet's payload.
The encoder accepts instances of [[ISensePacket|https://github.com/itm/netty-handlerstack/blob/master/protocols/isense/src/main/java/de/uniluebeck/itm/netty/handlerstack/isense/ISensePacket.java] and sends ChannelBuffer instances downstream. The decoder accepts instances of ChannelBuffer and passes instances of ISensePacket upstream.