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

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

Link to this section Summary

Functions

Make a ProductId.t() from a binary string

Build a binary from a ProductId.t()

Link to this section Types

Specs

param() :: :manufacturer_id | :product_type | :product_id | :application_version

Specs

t() :: %Grizzly.ZWave.SmartStart.MetaExtension.ProductId{
  application_version: {byte(), byte()},
  manufacturer_id: u16(),
  product_id: u16(),
  product_type: u16()
}

Specs

u16() :: 0..65535

Link to this section Functions

Specs

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

Make a ProductId.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(manufacturer_id, product_id, product_type, application_version)

View Source

Specs

new(
  manufacturer_id :: u16(),
  product_id :: u16(),
  product_type :: u16(),
  application_version :: {byte(), byte()}
) :: {:ok, t()} | {:error, :invalid_param_argument, param(), any()}

Make a new ProductId.t()

If a param is invalid this function will return {:error, :invalid_params, param(), param_value}

Specs

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

Build a binary from a ProductId.t()

The arguments for the params() other than application version should be unsigned 16 bit integers.