grizzly v0.7.0 Grizzly.CommandClass.NodeProvisioning.MetaExtension.UUID16 View Source

This is used to advertise 16 bytes of manufactured-defined information that is unique for a given product.

Z-Wave UUIDs are not limited to the format outlined in RFC 4122 but can also be ASCII characters and a relevant prefix.

Link to this section Summary

Types

The three formats that the Z-Wave UUID can be formatted in are :ascii, :hex, or :rfc4122.

t()

Functions

Take a binary string and try to make a UUID16.t() from it

Make a binary string from a UUID16.t()

Link to this section Types

Link to this type

format() View Source
format() :: :ascii | :hex | :rfc4122

The three formats that the Z-Wave UUID can be formatted in are :ascii, :hex, or :rfc4122.

Both :ascii and :hex can also have the prefix sn: or UUID:.

Valid :hex formatted UUIDs look like:

  • 0102030405060708090A141516171819
  • sn:0102030405060708090A141516171819
  • UUID:0102030405060708090A141516171819

Valid :ascii formatted UUIDs look like:

  • Hello Elixir!!!
  • sn:Hello Elixir!!!
  • UUID:Hello Elixir!!!

Lastly rfc4122 format looks like 58D5E212-165B-4CA0-909B-C86B9CEE0111 where every two digits make up one hex value.

More information about RFC 4122 and the specification format can be found here.

Link to this type

t() View Source
t() :: %Grizzly.CommandClass.NodeProvisioning.MetaExtension.UUID16{
  format: format(),
  uuid: String.t()
}

Link to this section Functions

Link to this function

from_binary(arg) View Source
from_binary(binary()) ::
  {:ok, t()} | {:error, :critical_bit_set | :invalid_format}

Take a binary string and try to make a UUID16.t() from it

If the critical bit is set in teh binary this will return {:error, :critical_bit_set} and the information should be ignored.

If the format in the binary is not part of the defined Z-Wave specification this will return {:error, :invalid_format}

Link to this function

to_binary(arg1) View Source
to_binary(t()) ::
  {:ok, binary()} | {:error, :invalid_uuid_length | :invalid_format}

Make a binary string from a UUID16.t()