space_ex v0.3.0 SpaceEx.Procedure

Represents a remote procedure call, for streams and expressions.

Normally created using the new/4 function or the create/1 macro.

Link to this section Summary

Functions

Creates a procedure structure based on an actual procedure call

Creates a procedure structure, representing a kRPC procedure call

Link to this section Functions

Link to this macro create(arg) (macro)

Creates a procedure structure based on an actual procedure call.

You can wrap any normal API function call in this, and it will parse that into a format suitable for using in streams, expressions, etc. For example:

require SpaceEx.Procedure

call1 = SpaceEx.Procedure.create(SpaceEx.SpaceCenter.get_ut(conn))
# You can also use pipelining:
call2 =
  SpaceEx.SpaceCenter.Flight.get_mean_altitude(conn, flight)
  |> SpaceEx.Procedure.create

create(Mod.func(conn, args)) is equivalent to calling new(conn, Mod, :func, args).

Link to this function new(conn, module, function, args \\ [])

Creates a procedure structure, representing a kRPC procedure call.

Any arguments will be immediately encoded, so most errors related to argument data (e.g. incorrect type) will be detected immediately.