harald v0.2.0 Harald.DataType.ServiceData 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
Deserializes 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
Link to this function
deserialize(bin) View Source
Deserializes a service data binary.
iex> deserialize(<<32, 1, 2, 3, 4, 5, 6>>)
{:ok, {"Service Data - 32-bit UUID", %{data: <<5, 6>>, uuid: 67305985}}}
Link to this function
gap_descriptions() View Source
Returns the three GAP descriptions encompassed by service data.
Link to this function
serialize(arg1) View Source
iex> serialize({"Service Data - 32-bit UUID", %{data: <<5, 6>>, uuid: 67305985}})
{:ok, <<32, 1, 2, 3, 4, 5, 6>>}