C# Класс OctoprintClient.OctoprintPosTracker

Octoprint position tracker. tracks the Position and guesses the position if needed.
Наследование: OctoprintClient.OctoprintTracker
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AutoSync void
GetGCode void
ReadLine float[]
ReadLineBackwards void
ReadLineForwards void
ReadLineToBuffer void
Sync void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

GetCurrentPosSync() публичный Метод

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[]
Результат float[]

GetPosAsync() публичный Метод

Gets the position asynchroniously, guesses between Sync intervals, starts thread if it isn't allready running.
public GetPosAsync ( ) : float[]
Результат float[]

Home() публичный Метод

public Home ( ) : string
Результат string

Home() публичный Метод

Home the specified axes.
public Home ( Array axes ) : string
axes Array Axes. in string "x", "y" or "z"
Результат string

IsReady() публичный Метод

Checks if the GCode allready exists
public IsReady ( ) : Boolean
Результат Boolean

Move() публичный Метод

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.
Результат void

MoveTo() публичный Метод

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.
Результат string

OctoprintPosTracker() публичный Метод

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.
Результат System

SetPos() публичный Метод

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.
Результат void

StartThread() публичный Метод

Starts the thread.
public StartThread ( ) : void
Результат void

StopThread() публичный Метод

Stops the thread.
public StopThread ( ) : void
Результат void

Syncpos() публичный Метод

Syncronizes the position with a Thread
public Syncpos ( ) : void
Результат void