C# Class OctoprintClient.OctoprintPosTracker

Octoprint position tracker. tracks the Position and guesses the position if needed.
Inheritance: OctoprintClient.OctoprintTracker
Afficher le fichier Open project: FabLabSiegen/Printerface Class Usage Examples

Private Properties

Свойство Type Description
AutoSync void
GetGCode void
ReadLine float[]
ReadLineBackwards void
ReadLineForwards void
ReadLineToBuffer void
Sync void

Méthodes publiques

Méthode Description
GetCurrentPosSync ( ) : float[]

Gets the current position Synchroniously at this exact time, should not be used many times per seconds though, that's why GetPosAsync exists.

GetPosAsync ( ) : float[]

Gets the position asynchroniously, guesses between Sync intervals, starts thread if it isn't allready running.

Home ( ) : string
Home ( Array axes ) : string

Home the specified axes.

IsReady ( ) : Boolean

Checks if the GCode allready exists

Move ( float? x = null, float? y = null, float? z = null ) : void

Moves the internal representation of the Printhead-Position, doesn't post to octoprint though

MoveTo ( float? x = null, float? y = null, float? z = null, bool absolute = false, int? speed = null ) : string

Moves the actual printhead to a position.

OctoprintPosTracker ( OctoprintClient.OctoprintConnection con ) : System

Initializes a Positiontracker, this shouldn't be done directly and is part of the Connection it needs anyway

SetPos ( float? x = null, float? y = null, float? z = null ) : void

Sets the internal representation of the Printhead-Position, doesn't post to octoprint though

StartThread ( ) : void

Starts the thread.

StopThread ( ) : void

Stops the thread.

Syncpos ( ) : void

Syncronizes the position with a Thread

Private Methods

Méthode Description
AutoSync ( ) : void

The thread function.

GetGCode ( string location ) : void

Gets the gcode from the given location

ReadLine ( string currline ) : float[]

Reads one line of the GCode, only G1 and M203 return something

ReadLineBackwards ( string currline ) : void

Sets the position by reading what happened in the past before the GCodePos and adding things that are not set.

ReadLineForwards ( string currline ) : void

Reads the line and sets the Positions.

ReadLineToBuffer ( string currline ) : void

Reads the line and adds it to the buffer for guessing later.

Sync ( ) : void

Sync the position.

Method Details

GetCurrentPosSync() public méthode

Gets the current position Synchroniously at this exact time, should not be used many times per seconds though, that's why GetPosAsync exists.
public GetCurrentPosSync ( ) : float[]
Résultat float[]

GetPosAsync() public méthode

Gets the position asynchroniously, guesses between Sync intervals, starts thread if it isn't allready running.
public GetPosAsync ( ) : float[]
Résultat float[]

Home() public méthode

public Home ( ) : string
Résultat string

Home() public méthode

Home the specified axes.
public Home ( Array axes ) : string
axes Array Axes. in string "x", "y" or "z"
Résultat string

IsReady() public méthode

Checks if the GCode allready exists
public IsReady ( ) : Boolean
Résultat Boolean

Move() public méthode

Moves the internal representation of the Printhead-Position, doesn't post to octoprint though
public Move ( float? x = null, float? y = null, float? z = null ) : void
x float? The x coordinate.
y float? The y coordinate.
z float? The z coordinate.
Résultat void

MoveTo() public méthode

Moves the actual printhead to a position.
public MoveTo ( float? x = null, float? y = null, float? z = null, bool absolute = false, int? speed = null ) : string
x float? The x coordinate.
y float? The y coordinate.
z float? The z coordinate.
absolute bool If set to true The position is set to absolute.
speed int? Speed.
Résultat string

OctoprintPosTracker() public méthode

Initializes a Positiontracker, this shouldn't be done directly and is part of the Connection it needs anyway
public OctoprintPosTracker ( OctoprintClient.OctoprintConnection con ) : System
con OctoprintClient.OctoprintConnection The Octoprint connection it connects to.
Résultat System

SetPos() public méthode

Sets the internal representation of the Printhead-Position, doesn't post to octoprint though
public SetPos ( float? x = null, float? y = null, float? z = null ) : void
x float? The x coordinate.
y float? The y coordinate.
z float? The z coordinate.
Résultat void

StartThread() public méthode

Starts the thread.
public StartThread ( ) : void
Résultat void

StopThread() public méthode

Stops the thread.
public StopThread ( ) : void
Résultat void

Syncpos() public méthode

Syncronizes the position with a Thread
public Syncpos ( ) : void
Résultat void