xplane v0.6.0 XPlane.Cmd
Send X-Plane commands.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Send a command to X-pLane
Start GenServer controlling port used to send commands to a specific X-Plane instance.
Start GenServer linked to current process controlling port used to send commands to a specific X-Plane instance.
Stop the GenServer controlling the port used to send commands.
Link to this section Functions
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
send(instance, command_ids)
send(instance, command_ids)
send(XPlane.Instance.t(), [atom()]) :: :ok | {:error, list()}
send(XPlane.Instance.t(), [atom()]) :: :ok | {:error, list()}
Send a command to X-pLane
Parameters
- instance: X-Plane instance from list returned by
XPlane.Instance.list/0
- commands: List of command atoms - use
XPlane.CmdRef.describe()
to look these up.
Example
iex> XPlane.Cmd.send(master, [:engines_throttle_up])
:ok
Link to this function
start(instance, opts \\ [])
start(instance, opts \\ [])
start(XPlane.Instance.t(), list()) :: {:ok, pid()} | {:error, any()} | :ignore
start(XPlane.Instance.t(), list()) :: {:ok, pid()} | {:error, any()} | :ignore
Start GenServer controlling port used to send commands to a specific X-Plane instance.
Parameters
- instance: X-Plane instance from list returned by
XPlane.Instance.list/0
Link to this function
start_link(instance, opts \\ [])
start_link(instance, opts \\ [])
start_link(XPlane.Instance.t(), list()) ::
{:ok, pid()} | {:error, any()} | :ignore
start_link(XPlane.Instance.t(), list()) :: {:ok, pid()} | {:error, any()} | :ignore
Start GenServer linked to current process controlling port used to send commands to a specific X-Plane instance.
Parameters
- instance: X-Plane instance from list returned by
XPlane.Instance.list/0
Link to this function
stop(instance)
stop(instance)
stop(XPlane.Instance.t()) :: :ok | {:error, any()}
stop(XPlane.Instance.t()) :: :ok | {:error, any()}
Stop the GenServer controlling the port used to send commands.