Grizzly.CommandHandlers.AggregateReport (grizzly v0.15.8) View Source

Handler for working with reports that could take many report frames to complete

This handler will handle aggregating the responses into one report command for ease of consumption by callers.

Link to this section Summary

Link to this section Types

Specs

opt() :: {:complete_report, atom(), [{:aggregate_param, atom()}]}

Specs

state() :: %{
  complete_report: atom(),
  aggregate_param: atom(),
  aggregates: [any()]
}

Link to this section Functions

Specs

handle_ack(state()) :: {:continue, state()}

Callback implementation for Grizzly.CommandHandler.handle_ack/1.

Link to this function

handle_command(command, state)

View Source

Specs

handle_command(Grizzly.ZWave.Command.t(), state()) ::
  {:continue, state()} | {:complete, {:ok, Grizzly.ZWave.Command.t()}}

Callback implementation for Grizzly.CommandHandler.handle_command/2.

Specs

init([opt()]) :: {:ok, state()}

Callback implementation for Grizzly.CommandHandler.init/1.