Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { // CurrentObject is the index of the current object being printed // or -1 if unknown CurrentObject int64 `json:"currentObject"` // M486Names if M486 names are being used M486Names bool `json:"m486Names"` // M486Numbers if M486 numbers are being used M486Numbers bool `json:"m486Numbers"` // Objects is a list of detected objects Objects []BuildObject `json:"objects"` }
Build holds information about the current build
type BuildObject ¶
type BuildObject struct { // Cancelled indicates if this build object is cancelled Cancelled bool `json:"cancelled"` // Name of the build object (if any) Name string `json:"name"` // X coordinates of the build object (in mm or nil if not found) X []*float64 `json:"x"` // Y coordinates of the build object (in mm or nil if not found) Y []*float64 `json:"y"` }
BuildObject holds information about a detected build object
type Job ¶
type Job struct { // Build holds information about the current build or nil if not available Build *Build `json:"build"` // Duration is the total duration of the current job in s Duration *int `json:"duration"` // File holds ParsedFileInfo about the file being processed File ParsedFileInfo `json:"file"` // FilePosition is the current position in the file being processed in bytes FilePosition *uint64 `json:"filePosition"` // FirstLayerDuration is the duration of the first layer in s or nil if not available FirstLayerDuration *int64 `json:"firstLayerDuration"` // LastDuration is the total duration of the last job in s or nil if not available LastDuration *int64 `json:"lastDuration"` // LastFileName is the name of the last processed file LastFileName string `json:"lastFileName"` // LastFileAborted indicated if the last file was aborted (unexpected cancellation) LastFileAborted bool `json:"lastFileAborted"` // LastFileCancelled indicates if the last file was cancelled by the user LastFileCancelled bool `json:"lastFileCancelled"` // LastFileSimulated indicates if the last file was simulated LastFileSimulated bool `json:"lastFileSimulated"` // Layer number of the current layer or nil if none has been started yet Layer *int64 `json:"layer"` // LayerTime is time elapsed since the beginning of the current layer in s or nil if unknown LayerTime *int64 `json:"layerTime"` // Layers is a list of Layer information about past layers Layers []Layer `json:"layers"` // TimesLeft contains estimated remaining times TimesLeft TimesLeft `json:"timesLeft"` // WarmUpDuration is the time needed to heat up the heaters in s or nil if unknown WarmUpDuration *int64 `json:"warmUpDuration"` }
Job holds information about the current file job (if any)
type Layer ¶
type Layer struct { // Duration of the layer (in s) Duration int `json:"duration"` // Filament represents the actual amount of filament extruded during // this layer in mm Filament []float64 `json:"filament"` // FractionPrinted represents the fraction of the whole file printed // during this layer on a scale between 0 and 1 FractionPrinted float64 `json:"fractionPrinted"` // Height of the layer in mm (0 if unknown) Height float64 `json:"height"` }
Layer holds information about a layer from a file being printed
type ParsedFileInfo ¶
type ParsedFileInfo struct { // Filament is the filament consumption per extruder drive (in mm) Filament []float64 `json:"filament"` // FileName of the G-code file FileName string `json:"fileName"` // FirstLayerHeight is the height of the first layer or 0 if not found (in mm) FirstLayerHeight float64 `json:"firstLayerHeight"` // GeneratedBy is the name of the application that generated this file GeneratedBy string `json:"generatedBy"` // Height is the build height of the G-code job or 0 if not found (in mm) Height float64 `json:"height"` // LastModified is the last date and time the file was modified or nil if none is set LastModified *time.Time `json:"lastModified"` // TODO: This will probably need adjustment/custom type // LayerHeight is the height of each layer above the first or 0 if not found (in mm) LayerHeight float64 `json:"layerHeight"` // NumLayers is the number of total layers or 0 if unknown NumLayers int64 `json:"numLayers"` // PrintTime is the estimated job duration (in s) PrintTime *uint64 `json:"printTime"` // SimulatedTime is the estimated job duration from G-code simulation (in s) SimulatedTime *uint64 `json:"simulatedTime"` // Size of the file in bytes Size uint64 `json:"size"` }
ParsedFileInfo holds information about a parsed G-code file
type TimesLeft ¶
type TimesLeft struct { // File progress based estimation in s (nil if unknown) File *int64 `json:"file"` // Filament consumption based estimation in s (nil if unknown) Filament *int64 `json:"filament"` // Layer progress based estimation in s (nil if unknown) Layer *int64 `json:"layer"` }
TimesLeft holds information about estimated remaining times
Click to show internal directories.
Click to hide internal directories.