Search documentation of grizzly

# View Source Grizzly.Inclusions.NetworkAdapter behaviour (grizzly v7.4.2)

Behaviour for inclusions to use to talk to the network

# Summary

## Types

state()
t()

A module that implements the behaviour

## Callbacks

add_node(state, list)

Start the inclusion process

add_node_stop(state)

Stop an inclusion process

connect(node_id)

Establish any a connection the including device id

grant_s2_keys(list, state)

Grant the S2 keys allowed for the including device

handle_timeout(status, reference, state)

Handle when a command times out

init()

Initialize the adapter

learn_mode(state, list)

Set the controller into learn mode

learn_mode_stop(state)

Stop the controller from being in learn mode

remove_node(state, list)

Start the exclusion process

remove_node_stop(state)

Stop the exclusion process

set_input_dsk(t, non_neg_integer, state)

Set the input DSK for the including device

# Types

Link to this type

# state()

View Source

    @type state() :: term()

Link to this type

# t()

View Source

    @type t() :: module()

A module that implements the behaviour

# Callbacks

Link to this callback

# add_node(state, list)

View Source

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

Start the inclusion process

Link to this callback

# add_node_stop(state)

View Source

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

Stop an inclusion process

Link to this callback

# connect(node_id)

View Source

    @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.Inclusions.status(), reference(), state()) ::
      {Grizzly.Inclusions.status(), state()}

Handle when a command times out

This function returns the new status of the inclusion server

Link to this callback

# init()

View Source

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

Initialize the adapter

Link to this callback

# learn_mode(state, list)

View Source

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

Set the controller into learn mode

Link to this callback

# learn_mode_stop(state)

View Source

    @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

Link to this callback

# remove_node_stop(state)

View Source

    @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