Gcode.Model.Tape (gcode v0.4.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".

Link to this section Summary

Functions

Initialises a tape command, with no "leader"

Initialises a tape command, with a "leader"

Link to this section Types

Specs

error() :: {:tape_error, String.t()}

Specs

t() :: %Gcode.Model.Tape{leader: Gcode.Option.t(String.t())}

Link to this section Functions

Specs

init() :: Gcode.Result.t(t())

Initialises a tape command, with no "leader"

Example

iex> Tape.init()
{:ok, %Tape{leader: :error}}

Specs

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"}}}