Grizzly.ZWave.SmartStart.MetaExtension.ProductType (grizzly v0.15.6) View Source

This Information Type is used to advertise the product type data of a supporting node

Link to this section Summary

Types

t()

The generic and specific device classes are what is advertised in the Node Information Frame (NIF)

Functions

Make a ProductType.t() from a binary string

Build a binary from a ProductType.t()

Link to this section Types

Specs

t() :: %Grizzly.ZWave.SmartStart.MetaExtension.ProductType{
  generic_device_class: atom(),
  installer_icon: Grizzly.ZWave.IconType.name(),
  specific_device_class: atom()
}

The generic and specific device classes are what is advertised in the Node Information Frame (NIF)

The installer icon for the specific device see Grizzly.IconType for more information

Link to this section Functions

Specs

from_binary(binary()) ::
  {:ok, t()} | {:error, :critical_bit_set | :invalid_binary}

Make a ProductType.t() from a binary string

According to the specification for this extension the critical bit must not be set. If it is then the binary is not consider valid and should be ignored.

Link to this function

new(generic_device_class, specific_device_class, installer_icon)

View Source

Specs

new(atom(), atom(), Grizzly.ZWave.IconType.name()) :: {:ok, t()}

Make a new ProductType.t()

If there is invalid device classes or installer icon type with will return {:error, reason} where reason is:

  • :invalid_generic_device_class - the generic device class could not be encoded into its byte representation
  • :invalid_specific_device_class - the specific device class could nto be encoded into its byte representation
  • :unknown_icon_type - the installer icon type cannot be encoded into its byte representation

Specs

to_binary(t()) :: {:ok, binary()}

Build a binary from a ProductType.t()