grizzly v0.8.5 Grizzly.SmartStart.MetaExtension.ProductType 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

Link to this type

t() View Source
t() :: %Grizzly.SmartStart.MetaExtension.ProductType{
  generic_device_class: atom(),
  installer_icon: Grizzly.IconType.icon_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

Link to this function

from_binary(arg1) View Source
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
new(atom(), atom(), Grizzly.IconType.icon_name()) ::
  {:ok, t()}
  | {:error,
     :invalid_generic_device_class
     | :invalid_specific_device_class
     | :unknown_icon_type}

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
Link to this function

to_binary(product_type) View Source
to_binary(t()) :: {:ok, binary()}

Build a binary from a ProductType.t()