Class InfoParser
Static class used to retrieve information from G-code jobs
Inherited Members
Namespace: DuetControlServer.Files
Assembly: DuetControlServer.dll
Syntax
public static class InfoParser
Methods
Parse(string, bool)
Parse a G-code file
Declaration
public static Task<GCodeFileInfo> Parse(string fileName, bool readThumbnailContent)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | File to analyze |
bool | readThumbnailContent | Whether thumbnail content shall be returned |
Returns
Type | Description |
---|---|
Task<GCodeFileInfo> | Information about the file |
ParseThumbnail(string, long)
Retrieve a chunk of a thumbnail for PanelDue compatibility
Declaration
public static ValueTask<string> ParseThumbnail(string filename, long offset)
Parameters
Type | Name | Description |
---|---|---|
string | filename | G-code file to parse |
long | offset | File offset to start from |
Returns
Type | Description |
---|---|
ValueTask<string> | JSON response |
UpdateSimulatedTime(string, int)
Update the last simulation time in a job file
Declaration
public static Task UpdateSimulatedTime(string filename, int totalSeconds)
Parameters
Type | Name | Description |
---|---|---|
string | filename | Path to the job file |
int | totalSeconds | Total print or simulated time |
Returns
Type | Description |
---|---|
Task | Asynchronous task |