View Source Tello.CyberTello (Tello v0.1.0)

Tello in Cyberspace 👾

This module acts as a virtual Tello, receives commands, then process and change the state of the virtual Tello.

Implementation based on the official documentation: https://dl-cdn.ryzerobotics.com/downloads/Tello/Tello%20SDK%202.0%20User%20Guide.pdf

architecture

Architecture

flowchart TD
  subgraph Client
    Tello.Client((Tello.Client))
  end

  subgraph CyberTello
    Gateway(Tello.CyberTello.Gateway)
    Memory[(Tello.CyberTello.Memory)]

    subgraph CPU
      Processor(Tello.CyberTello.Processor)
      ControlUnit(Tello.CyberTello.ControlUnit)

      Processor -.- ControlUnit
    end

    Memory -->|Save State| Processor

    Tello.Client -->|Send command| Gateway

    Gateway -->|Pass command| Processor
    Gateway -->|Reply| Tello.Client

    Processor -->|Read State| Memory
  end

usage

Usage

# Start CyberTello
{:ok, cyber_tello} = Tello.CyberTello.start_link()

# Get the UDP port which CyberTello receive messages
{:ok, cyber_tello_port} = Tello.CyberTello.port()

# Then you can initial a `Tello.Client` connects to `Tello.CyberTello`
{:ok, tello_client} = Tello.start_client({{127, 0, 0, 1}, cyber_tello_port})

# Send commands to `Tello.CyberTello`
Tello.Command.command(tello_client)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Get the UDP port used by Tello.CyberTello to receives commands

Start a CyberTello.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Get the UDP port used by Tello.CyberTello to receives commands

Link to this function

start_link(initial_args \\ %{})

View Source

Start a CyberTello.

You can pass an initial state as initial_args, please check Tello.CyberTello.State.