BowlerKernel
Public Member Functions | List of all members
com.neuronrobotics.replicator.driver.interpreter.GCodeLineData Class Reference

Public Member Functions

 GCodeLineData ()
 
 GCodeLineData (GCodeLineData toCopy)
 
void storeWord (char c, double val)
 
double getWord (char c)
 
double[] getWords (char words[])
 
String toString ()
 

Detailed Description

Encapsulates the register information in a line of G code, stored as double-precision floating point values.

Author
Jonathan D.K. Gibbons
Version
1

Definition at line 12 of file GCodeLineData.java.

Constructor & Destructor Documentation

◆ GCodeLineData() [1/2]

com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.GCodeLineData ( )

Construct a new object, initialized to zero.

Definition at line 20 of file GCodeLineData.java.

◆ GCodeLineData() [2/2]

com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.GCodeLineData ( GCodeLineData  toCopy)

Copies a GCodeLineData object. By default, registers are copied between every line, such that a Y1.5 setting is kept if Y is not mentioned.

Parameters
toCopyUsually the data for the previous line of G code.

Definition at line 28 of file GCodeLineData.java.

Member Function Documentation

◆ getWord()

double com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.getWord ( char  c)

Retrieve the value for register c.

Parameters
cthe register letter. must be upper case.
Returns
the value of the register for c

Definition at line 47 of file GCodeLineData.java.

Referenced by com.neuronrobotics.replicator.driver.interpreter.GCodeInterpreter.addDefaultHandlers(), and com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.toString().

◆ getWords()

double [] com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.getWords ( char  words[])

Retrieve an array of values for the registers named in words.

Parameters
wordsthe words
Returns
the values of the registers in words

Definition at line 59 of file GCodeLineData.java.

◆ storeWord()

void com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.storeWord ( char  c,
double  val 
)

Set the value for register c in the line to val.

Parameters
cthe register letter. May be upper or lower case.
valthe new value.

Definition at line 37 of file GCodeLineData.java.

Referenced by com.neuronrobotics.replicator.driver.interpreter.GCodeInterpreter.addDefaultHandlers(), and com.neuronrobotics.replicator.driver.interpreter.GCodeInterpreter.processSingleGCODELine().

◆ toString()

String com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.toString ( )

Definition at line 70 of file GCodeLineData.java.

References com.neuronrobotics.replicator.driver.interpreter.GCodeLineData.getWord().

Here is the call graph for this function:

The documentation for this class was generated from the following file: