BlueHeron.DataType.ServiceData (blue_heron v0.4.1) View Source

The Service Data data type consists of a service UUID with the data associated with that service.

Reference: Core Specification Supplement, Part A, section 1.11.1

Link to this section Summary

Functions

Deserialize a service data binary.

Returns the three GAP descriptions encompassed by service data.

iex> serialize({"Service Data - 32-bit UUID", %{data: <<5, 6>>, uuid: 67305985}})
{:ok, <<32, 1, 2, 3, 4, 5, 6>>}

Link to this section Functions

Deserialize a service data binary.

iex> deserialize(<<32, 1, 2, 3, 4, 5, 6>>)
{:ok, {"Service Data - 32-bit UUID", %{data: <<5, 6>>, uuid: 67305985}}}

Returns the three GAP descriptions encompassed by service data.

iex> serialize({"Service Data - 32-bit UUID", %{data: <<5, 6>>, uuid: 67305985}})
{:ok, <<32, 1, 2, 3, 4, 5, 6>>}