exbee v0.0.3 Exbee.Message View Source

Converts between binary messages and frames.

Link to this section Summary

Functions

Encodes a frame into a binary message using the Exbee.EncodableFrame protocol

Decodes a binary message into frames using the Exbee.DecodableFrame protocol

Link to this section Functions

Encodes a frame into a binary message using the Exbee.EncodableFrame protocol.

It applies the separator, length, and checksum bytes.

Link to this function parse(data) View Source
parse(binary) :: {binary, [Exbee.DecodableFrame.t]}

Decodes a binary message into frames using the Exbee.DecodableFrame protocol.

Messages can arrive incomplete, so this returns a buffer of any partial messages. The caller should return this buffer prepended to the next message.

Frames with invalid checksums will be dropped.