View Source Grizzly.CommandHandlers.AggregateReport (grizzly v8.6.4)

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.

Summary

Types

opt()

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

state()

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

Functions

handle_ack(state)

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

Callback implementation for Grizzly.CommandHandler.handle_ack/1.

handle_command(command, state)

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

Callback implementation for Grizzly.CommandHandler.handle_command/2.

init(opts)

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

Callback implementation for Grizzly.CommandHandler.init/1.