Kitt.Encoder.decode_message
You're seeing just the function
decode_message
, go back to Kitt.Encoder module for more information.
Specs
decode_message(binary(), atom(), [{:format, :hex | :binary}]) :: {:ok, message()} | {:error, term()}
Takes a binary encoded J2735 message and an explicit message type atom and decodes the message to a Kitt struct. Any sub-fields of the struct that are defined by Kitt as a struct are recursively instantiated.
By default the binary message is assumed to be in a hexadecimal string but the input
format can be explicitly supplied via the keyword argument format: :hex | :binary
.
Returns the resulting message struct wrapped in an :ok
tuple, else returns {:error, reason}
.