cayenne_lpp v0.1.0 Cayenne.LPP.Buffer View Source

This buffer module stores the data for Cayenne.LPP.Payload or any Cayenne LPP type

Example

alias Cayenne.LPP.Buffer

buffer =
  Buffer.new()
  |> Buffer.add_byte(0x28)
  |> Buffer.add_bytes(0xFF, 2)
  |> Buffer.add_bytes(0x1234, 2)

Buffer.to_string(buffer) # "2800FF1234"
Buffer.size(buffer) # 5

Link to this section Summary

Link to this section Types

Link to this section Functions

Link to this function

add_byte(buffer, value)

View Source
add_byte(t(), value()) :: t()
Link to this function

add_bytes(buffer, value, size)

View Source
add_bytes(t(), value(), size()) :: t()
Link to this function

concat(a, b)

View Source
concat(t(), t()) :: t()
Link to this function

to_string(buffer)

View Source
to_string(t()) :: String.t()