Table of Contents

Class Job

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Information about the current job

public class Job : ModelObject, INotifyPropertyChanging, IStaticModelObject, IModelObject, ICloneable, INotifyPropertyChanged
Inheritance
Job
Implements
Inherited Members

Constructors

Job()

public Job()

Properties

Build

Information about the current build or null if not available

[Live]
public Build? Build { get; set; }

Property Value

Build

Duration

Total active duration of the current job file (in s or null)

[Live]
public int? Duration { get; set; }

Property Value

int?

File

Information about the file being processed

public GCodeFileInfo File { get; }

Property Value

GCodeFileInfo

FilePosition

Current position in the file being processed (in bytes or null)

[Live]
public long? FilePosition { get; set; }

Property Value

long?

LastDuration

Total duration of the last job (in s or null)

public int? LastDuration { get; set; }

Property Value

int?

LastFileAborted

Indicates if the last file was aborted (unexpected cancellation)

[SbcProperty(false)]
public bool LastFileAborted { get; set; }

Property Value

bool

LastFileCancelled

Indicates if the last file was cancelled (user cancelled)

[SbcProperty(false)]
public bool LastFileCancelled { get; set; }

Property Value

bool

LastFileName

Name of the last file processed or null if none

public string? LastFileName { get; set; }

Property Value

string

LastFileSimulated

Indicates if the last file processed was simulated

[SbcProperty(false)]
public bool LastFileSimulated { get; set; }

Property Value

bool

Remarks

This is not set if the file was aborted or cancelled

LastWarmUpDuration

Warm-up duration of the last print or null if not available (in s)

public int? LastWarmUpDuration { get; set; }

Property Value

int?

Layer

Number of the current layer or null not available

[Live]
public int? Layer { get; set; }

Property Value

int?

LayerTime

Time elapsed since the last layer change (in s or null)

[Live]
public float? LayerTime { get; set; }

Property Value

float?

Layers

Information about the past layers

[SbcProperty(false)]
public StaticModelCollection<Layer> Layers { get; }

Property Value

StaticModelCollection<Layer>

Remarks

In previous API versions this was a MessageCollection but it has been changed to StaticModelCollection<T> to allow past layers to be modified again when needed. Note that previous plugins subscribing to this property will not receive any more updates about this property to avoid memory leaks

See Also

PauseDuration

Total pause time since the job started

[Live]
public int? PauseDuration { get; set; }

Property Value

int?

RawExtrusion

Total extrusion amount without extrusion factors applied (in mm)

[Live]
public float? RawExtrusion { get; set; }

Property Value

float?

TimesLeft

Estimated times left

[Live]
public TimesLeft TimesLeft { get; }

Property Value

TimesLeft

WarmUpDuration

Time needed to heat up the heaters (in s or null)

[Live]
public int? WarmUpDuration { get; set; }

Property Value

int?

Methods

Assign(IStaticModelObject)

Assign the properties from another instance. This is required to update model properties which do not have a setter

public void Assign(IStaticModelObject from)

Parameters

from IStaticModelObject

Other instance

Clone()

Clone this instance

public object Clone()

Returns

object

Cloned instance

Remarks

This method is auto-generated

UpdateFromJson(JsonElement, bool)

Update this instance from a given JSON element

public void UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)

Parameters

jsonElement JsonElement

Element to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data

UpdateFromJsonReader(ref Utf8JsonReader, bool)

Update this instance from a given JSON element

public void UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)

Parameters

reader Utf8JsonReader

Reader to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data