View Source Tello.StatusListener.Handler behaviour (Tello v0.3.0)

The behaviour to define a custom handler for Tello.StatusListener.

# Define custom handler
defmodule MyHandler do
  use Tello.StatusListener.Handler

  def handle_status(%Tello.StatusListener.Status{} = status) do
    # Do something with the data
  end
end

# Set customer receiver while starting the client.
{:ok, client, controller, status_listener} =
  Tello.start(
      controller: [ip: {127, 0, 0, 1}, port: tello_server_port],
      status_listener: [port: 8890, handler: MyHandler]
    )

Link to this section Summary

Link to this section Types

Link to this section Callbacks

@callback handle_status(status :: Tello.StatusListener.Status.t()) :: none()

Link to this section Functions

Link to this function

handle_data(handler_module, status)

View Source
@spec handle_data(t(), Tello.StatusListener.Status.t()) :: any()