Matter Device Type registry.
Maps device type IDs to their metadata: name, required server clusters, and optional server clusters. Used by the Descriptor cluster to populate device_type_list and validate cluster requirements.
Reference: Matter Specification, Chapter 9 (Device Library).
Summary
Functions
Get device type definition by ID.
List all known device type IDs.
Get device type name by ID.
Check if a set of cluster IDs satisfies all required clusters for a device type.
Types
@type device_type() :: %{ id: non_neg_integer(), name: atom(), revision: non_neg_integer(), required_clusters: [non_neg_integer()], optional_clusters: [non_neg_integer()] }
Functions
@spec get(non_neg_integer()) :: device_type() | nil
Get device type definition by ID.
@spec list() :: [non_neg_integer()]
List all known device type IDs.
@spec name(non_neg_integer()) :: atom() | nil
Get device type name by ID.
@spec validate(non_neg_integer(), [non_neg_integer()]) :: :ok | {:error, [non_neg_integer()]}
Check if a set of cluster IDs satisfies all required clusters for a device type.