View Source Grizzly.Inclusions.NetworkAdapter behaviour (grizzly v8.6.6)

Behaviour for inclusions to use to talk to the network

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

Types

state()

@type state() :: term()

t()

@type t() :: module()

A module that implements the behaviour

Callbacks

add_node(state, list)

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

Start the inclusion process

add_node_stop(state)

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

Stop an inclusion process

connect(node_id)

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

Establish any a connection the including device id

grant_s2_keys(list, state)

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

Grant the S2 keys allowed for the including device

handle_timeout(status, reference, state)

@callback handle_timeout(Grizzly.Inclusions.status(), reference(), state()) ::
  {Grizzly.Inclusions.status(), state()}

Handle when a command times out

This function returns the new status of the inclusion server

init()

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

Initialize the adapter

learn_mode(state, list)

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

Set the controller into learn mode

learn_mode_stop(state)

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

Stop the controller from being in learn mode

remove_node(state, list)

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

Start the exclusion process

remove_node_stop(state)

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

Stop the exclusion process

set_input_dsk(t, non_neg_integer, state)

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

Set the input DSK for the including device