Grizzly.ZWave.SmartStart.MetaExtension.UUID16 (grizzly v0.15.6) 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 new UUID16.t()

Make a binary string from a UUID16.t()

Link to this section Types

Specs

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.

Specs

t() :: %Grizzly.ZWave.SmartStart.MetaExtension.UUID16{
  format: format(),
  uuid: String.t()
}

Link to this section Functions

Specs

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

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}

Specs

new(String.t(), format()) ::
  {:ok, t()} | {:error, :invalid_uuid_length | :invalid_format}

Make a new UUID16.t()

Specs

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

Make a binary string from a UUID16.t()