AutoApi.GetCommand.to_bin
You're seeing just the function
to_bin
, go back to AutoApi.GetCommand module for more information.
Specs
Transforms a GetCommand struct into a binary format.
If the command is somehow invalid, it returns an error.
Examples
iex> # Request the door locks state iex> command = %Elixir.AutoApi.GetCommand{capability: AutoApi.DoorsCapability, properties: [:locks_state]} iex> Elixir.AutoApi.GetCommand.to_bin(command) <<13, 0, 32, 0, 6>>
iex> # Request all properties for race state iex> command = %Elixir.AutoApi.GetCommand{capability: AutoApi.RaceCapability, properties: []} iex> Elixir.AutoApi.GetCommand.to_bin(command) <<13, 0, 87, 0>>