AutoApi.LegacyCommand (auto_api v13.2.0) View Source

This module is only intended to provide a compatibility layer for code that relies on the removed per-capability command modules.

Link to this section Summary

Functions

Converts a state structure into a set command binary message.

Link to this section Functions

Specs

state(AutoApi.State.t()) :: binary()

Converts a state structure into a set command binary message.

Example

iex> state =  %AutoApi.EngineState{status: %AutoApi.Property{data: :on}}
iex> Elixir.AutoApi.LegacyCommand.state(state)
<<13, 0, 105, 1, 1, 0, 4, 1, 0, 1, 1>>