Grizzly.Storage (grizzly v8.15.3)
View SourcePersistent storage for device information and other Grizzly internals.
Summary
Functions
Returns a child spec to start the storage process under a supervisor.
See Supervisor.
Delete everything from storage.
Delete keys matching a pattern using the configured adapter.
Get a value from storage by key using the configured adapter.
Retrieves a node's command class version.
Returns a node's stored DSK.
Retrieves information about a node's inclusion process.
Retrieves a node's basic info.
Retrieves a node's last awake time.
Returns the node's wakeup interval in seconds.
Match keys in storage against a pattern using the configured adapter.
Puts a key-value pair into storage using the configured adapter.
Puts multiple key-value pairs into storage using the configured adapter.
Stores a node's command class version.
Store a node's DSK.
Stores information about a node's inclusion process.
Stores node information.
Stores a node's last awake time.
Stores a node's wakeup interval in seconds.
Types
@type key() :: PropertyTable.property()
@type node_inclusion_info() :: %{ status: Grizzly.ZWave.CommandClasses.NetworkManagementInclusion.node_add_status(), granted_keys: [Grizzly.ZWave.Security.key()], kex_fail_type: Grizzly.ZWave.Security.key_exchange_fail_type() | nil, smartstart?: boolean() }
@type node_info() :: %{ listening?: boolean(), basic_device_class: Grizzly.ZWave.DeviceClasses.basic_device_class(), generic_device_class: Grizzly.ZWave.DeviceClasses.generic_device_class(), specific_device_class: Grizzly.ZWave.DeviceClasses.specific_device_class(), command_classes: Grizzly.ZWave.CommandClasses.command_class_list() }
@type pattern() :: PropertyTable.pattern()
@type put_node_info_opt() :: {:overwrite_command_classes, boolean()}
@type value() :: PropertyTable.value()
Functions
@spec child_spec(PropertyTable.options()) :: Supervisor.child_spec()
Returns a child spec to start the storage process under a supervisor.
See Supervisor.
@spec delete_all() :: :ok
Delete everything from storage.
@spec delete_matches(pattern()) :: :ok
Delete keys matching a pattern using the configured adapter.
Get a value from storage by key using the configured adapter.
@spec get_node_command_class_version(Grizzly.ZWave.node_id(), atom()) :: pos_integer() | nil
Retrieves a node's command class version.
@spec get_node_dsk(Grizzly.ZWave.node_id()) :: Grizzly.ZWave.DSK.t() | nil
Returns a node's stored DSK.
@spec get_node_inclusion_info(Grizzly.ZWave.node_id()) :: node_inclusion_info() | nil
Retrieves information about a node's inclusion process.
@spec get_node_info(Grizzly.ZWave.node_id()) :: node_info() | nil
Retrieves a node's basic info.
@spec get_node_last_awake(Grizzly.ZWave.node_id()) :: DateTime.t() | nil
Retrieves a node's last awake time.
@spec get_node_wakeup_interval(Grizzly.ZWave.node_id()) :: non_neg_integer() | nil
Returns the node's wakeup interval in seconds.
Match keys in storage against a pattern using the configured adapter.
Puts a key-value pair into storage using the configured adapter.
Puts multiple key-value pairs into storage using the configured adapter.
@spec put_node_command_class_version(Grizzly.ZWave.node_id(), atom(), pos_integer()) :: :ok
Stores a node's command class version.
@spec put_node_dsk(Grizzly.ZWave.node_id(), Grizzly.ZWave.DSK.t()) :: :ok
Store a node's DSK.
@spec put_node_inclusion_info(Grizzly.ZWave.node_id(), node_inclusion_info()) :: :ok
Stores information about a node's inclusion process.
@spec put_node_info( Grizzly.ZWave.node_id(), Grizzly.ZWave.Command.t() | node_info(), [ put_node_info_opt() ] ) :: :ok
Stores node information.
By default, command classes are merged using CommandClasses.merge/2 to prevent
loss of data due to Z/IP Gateway quirks. To force the use of the new command class
list, use the :overwrite_command_classes option.
@spec put_node_last_awake(Grizzly.ZWave.node_id(), DateTime.t()) :: :ok
Stores a node's last awake time.
@spec put_node_wakeup_interval(Grizzly.ZWave.node_id(), non_neg_integer()) :: :ok
Stores a node's wakeup interval in seconds.