Grizzly.Associations (grizzly v8.9.0)

View Source

Storage for Z-Wave association groups. Supports both standard and multi channel associations.

Summary

Functions

Returns a specification to start this module under a supervisor.

Delete all the associations

Delete the nodes from each association group

Delete the specified nodes from the association grouping

Get an association by the grouping id

Get all the associations

Save the node ids to the grouping id

Start the Associations server

Types

grouping_id()

@type grouping_id() :: byte()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

delete_all(server \\ __MODULE__)

@spec delete_all(GenServer.server()) :: :ok

Delete all the associations

delete_all_nodes_from_grouping(server \\ __MODULE__, grouping_id)

@spec delete_all_nodes_from_grouping(GenServer.server(), grouping_id()) :: :ok

Delete all the nodes from the grouping

delete_nodes_from_all_groupings(server \\ __MODULE__, nodes)

@spec delete_nodes_from_all_groupings(GenServer.server(), [Grizzly.ZWave.node_id()]) ::
  :ok

Delete the nodes from each association group

delete_nodes_from_grouping(server \\ __MODULE__, grouping_id, nodes)

@spec delete_nodes_from_grouping(GenServer.server(), grouping_id(), [
  Grizzly.ZWave.node_id()
]) ::
  :ok | {:error, :invalid_grouping_id}

Delete the specified nodes from the association grouping

get(server \\ __MODULE__, grouping_id)

Get an association by the grouping id

get_all(server \\ __MODULE__)

Get all the associations

save(server \\ __MODULE__, grouping_id, node_ids)

@spec save(GenServer.server(), grouping_id(), [Grizzly.ZWave.node_id()]) ::
  :ok | :error

Save the node ids to the grouping id

start_link(grizzly_options, server_opts \\ [])

Start the Associations server

If you pass the GenServer option for a name you can access the server with that name. However, if no name is passed to the server_opts then it will fallback to using the Grizzly.Associations module name