macula_protocol_decoder (macula v0.18.1)

View Source

Protocol message decoder for Macula mesh. Decodes binary wire format to message maps.

Summary

Functions

Decode a binary message to {Type, Msg} tuple. Returns {ok, {Type, Msg}} on success or {error, Reason} on failure.

Functions

decode(Binary)

-spec decode(binary()) -> {ok, {atom(), map()}} | {error, term()}.

Decode a binary message to {Type, Msg} tuple. Returns {ok, {Type, Msg}} on success or {error, Reason} on failure.