View Source Grizzly.Inclusions.NetworkAdapter behaviour (grizzly v5.1.2)

Behaviour for inclusions to use to talk to the network

Link to this section Summary

Types

t()

A module that implements the behaviour

Callbacks

Start the inclusion process

Stop an inclusion process

Establish any a connection the including device id

Grant the S2 keys allowed for the including device

Handle when a command times out

Initialize the adapter

Set the controller into learn mode

Stop the controller from being in learn mode

Start the exclusion process

Stop the exclusion process

Set the input DSK for the including device

Link to this section Types

@type state() :: term()
@type t() :: module()

A module that implements the behaviour

Link to this section Callbacks

@callback add_node(state(), [Grizzly.Inclusions.opt()]) :: {:ok, state()}

Start the inclusion process

@callback add_node_stop(state()) :: {:ok, state()}

Stop an inclusion process

@callback connect(Grizzly.ZWave.node_id()) :: :ok

Establish any a connection the including device id

Link to this callback

grant_s2_keys(list, state)

View Source
@callback grant_s2_keys([Grizzly.ZWave.Security.key()], state()) :: {:ok, state()}

Grant the S2 keys allowed for the including device

Link to this callback

handle_timeout(status, reference, state)

View Source
@callback handle_timeout(Grizzly.InclusionServer.status(), reference(), state()) ::
  {Grizzly.InclusionServer.status(), state()}

Handle when a command times out

This function returns the new status of the inclusion server

@callback init() :: {:ok, state()}

Initialize the adapter

@callback learn_mode(state(), [Grizzly.Inclusions.opt()]) :: {:ok, state()}

Set the controller into learn mode

@callback learn_mode_stop(state()) :: {:ok, state()}

Stop the controller from being in learn mode

Link to this callback

remove_node(state, list)

View Source
@callback remove_node(state(), [Grizzly.Inclusions.opt()]) :: {:ok, state()}

Start the exclusion process

@callback remove_node_stop(state()) :: {:ok, state()}

Stop the exclusion process

Link to this callback

set_input_dsk(t, non_neg_integer, state)

View Source
@callback set_input_dsk(Grizzly.ZWave.DSK.t(), non_neg_integer(), state()) ::
  {:ok, state()}

Set the input DSK for the including device