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

This extension is used to advertise the name assigned to the supporting node

The name string cannot contain underscores and cannot end with a dash.

A node's name cannot be more than 62 bytes.

Link to this section Summary

Functions

Make a NameInformation.t() from a binary

Make a NameInformation.t() into a binary

Link to this section Types

Specs

t() :: %Grizzly.ZWave.SmartStart.MetaExtension.NameInformation{name: String.t()}

Link to this section Functions

Specs

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

Make a NameInformation.t() from a binary

If the name contains characters that are not valid this function will return {:error, reason} where reason is:

  • :contains_underscore
  • :ends_with_dash
  • :name_too_long

If the critical bit set in the binary this function will return {:error, :critical_bit_set}

Specs

new(String.t()) ::
  {:ok, t()} | {:error, :contains_underscore | :ends_with_dash | :name_too_long}
Link to this function

to_binary(name_information)

View Source

Specs

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

Make a NameInformation.t() into a binary