Gcode.Model.Tape (gcode v1.0.1)
The tape (%
) denotes the beginning and end of the program and is not needed
by most controllers. Can optionally contain a comment, called a "leader".
Summary
Types
Link to this type
error()
@type error() :: {:tape_error, String.t()}
@type t() :: %Gcode.Model.Tape{leader: Gcode.Option.t(String.t())}
Functions
Link to this function
init()
@spec init() :: Gcode.Result.t(t())
Initialises a tape command, with no "leader"
Example
iex> Tape.init()
{:ok, %Tape{leader: :error}}
Link to this function
init(leader)
@spec init(String.t()) :: Gcode.Result.t(t(), error())
Initialises a tape command, with a "leader"
Example
iex> Tape.init("Marty in the Delorean with the Flux Capacitor")
{:ok, %Tape{leader: {:ok, "Marty in the Delorean with the Flux Capacitor"}}}