grizzly v0.15.3 Grizzly.ZWave.SmartStart.MetaExtension.LocationInformation View Source
This extension is used to advertise the location assigned to the supporting node
The location string cannot contain underscores and cannot end with a dash.
The location string can contain a period (.) but a sublocation cannot end a dash. For example:
123.123-.123
The above location invalid. To make it valid remove the -
before .
.
A node's location cannot be more than 62 bytes.
Link to this section Summary
Functions
Make a LocationInformation.t()
from a binary
Make a new LocationInformation.t()
from a location string
Make a LocationInformation.t()
into a binary
Link to this section Types
Specs
t() :: %Grizzly.ZWave.SmartStart.MetaExtension.LocationInformation{ location: String.t() }
Link to this section Functions
Specs
from_binary(binary()) :: {:ok, t()} | {:error, :contains_underscore | :ends_with_dash | :critical_bit_set | :location_too_long | :sublocation_ends_with_dash | :invalid_binary}
Make a LocationInformation.t()
from a binary
If the location contains characters that are not valid this function will return
{:error, reason}
where reason
is:
:contains_underscore
:ends_with_dash
:location_too_long
:sublocation_ends_with_dash
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 | :location_too_long | :sublocation_ends_with_dash}
Make a new LocationInformation.t()
from a location string
If the location contains characters that are not valid this function will return
{:error, reason}
where reason
is:
:contains_underscore
:ends_with_dash
:location_too_long
:sublocation_ends_with_dash
Specs
Make a LocationInformation.t()
into a binary