grizzly v0.8.0 Grizzly.CommandClass.Version View Source

Helpers for working with the command class VERSION

Link to this section Summary

Functions

Decode a byte into a library type

Decode version report data

Link to this section Types

Link to this type

library_type() View Source
library_type() ::
  :static_controller
  | :controller
  | :enhanced_slave
  | :slave
  | :installer
  | :routing_slave
  | :bridge_controller
  | :device_under_test
  | :av_remote
  | :av_device

Link to this type

version_report() View Source
version_report() :: %{
  protocol_library: library_type(),
  protocol_version: byte(),
  protocol_sub_version: byte(),
  firmware_version: byte(),
  firmware_sub_version: byte()
}

Link to this section Functions

Link to this function

decode_library_type(byte) View Source
decode_library_type(byte()) ::
  {:ok, library_type()} | {:error, :invalid_library_type, byte()}

Decode a byte into a library type

Link to this function

decode_report_data(arg) View Source
decode_report_data(<<_::16>>) :: %{command_class: atom(), version: byte()}

Decode version report data

Link to this function

decode_version_report(binary) View Source
decode_version_report(binary()) ::
  {:ok, version_report()} | {:error, :invalid_version_report, binary()}

Link to this function

encode_command_class(command_class) View Source
encode_command_class(atom()) :: {:ok, byte()} | {:error, :invalid_arg, any()}

Encode command class