Class ObjectModel
- Namespace
- DuetAPI.ObjectModel
- Assembly
- DuetAPI.dll
Representation of the Duet3D object model
public class ObjectModel : ModelObject, INotifyPropertyChanging, IStaticModelObject, IModelObject, ICloneable, INotifyPropertyChanged
- Inheritance
-
ObjectModel
- Implements
- Derived
- Inherited Members
Constructors
ObjectModel()
public ObjectModel()
Properties
Boards
List of connected boards
public StaticModelCollection<Board> Boards { get; }
Property Value
Remarks
The first item represents the main board
- See Also
Directories
Information about the individual directories
public Directories Directories { get; }
Property Value
Remarks
This may not be available in RepRapFirmware if no mass storages are available
Fans
List of configured fans
[Live]
public StaticModelCollection<Fan?> Fans { get; }
Property Value
- See Also
Global
Dictionary of global variables vs JSON values
public JsonModelDictionary Global { get; }
Property Value
Remarks
When DSF attempts to reconnect to RRF, this may be set to null to clear the contents
Heat
Information about the heat subsystem
[Live]
public Heat Heat { get; }
Property Value
Inputs
Information about every available G/M/T-code channel
public Inputs Inputs { get; }
Property Value
Job
Information about the current job
[Live]
public Job Job { get; }
Property Value
LedStrips
List of configured LED strips
public StaticModelCollection<LedStrip> LedStrips { get; }
Property Value
- See Also
Limits
Machine configuration limits
[Verbose]
public Limits Limits { get; }
Property Value
Messages
Generic messages that do not belong explicitly to codes being executed. This includes status messages, generic errors and outputs generated by M118
[SbcProperty(false)]
public MessageCollection Messages { get; }
Property Value
- See Also
Move
Information about the move subsystem
[Live]
public Move Move { get; }
Property Value
Network
Information about connected network adapters
public Network Network { get; }
Property Value
Plugins
Dictionary of loaded plugins where each key is the plugin identifier
[SbcProperty(false)]
public StaticModelDictionary<Plugin> Plugins { get; }
Property Value
Remarks
This is only populated by DSF in SBC mode, however it may be populated manually as well in standalone mode. Values in this dictionary cannot become null. If a value is changed to null, the corresponding item is deleted
SBC
Information about the SBC which Duet Software Framework is running on. This is null if the system is operating in standalone mode
[SbcProperty(false)]
public SBC? SBC { get; set; }
Property Value
Sensors
Information about connected sensors including Z-probes and endstops
[Live]
public Sensors Sensors { get; }
Property Value
Spindles
List of configured CNC spindles
[Live]
public StaticModelCollection<Spindle?> Spindles { get; }
Property Value
- See Also
State
Information about the machine state
[Live]
public State State { get; }
Property Value
Tools
List of configured tools
[Live]
public StaticModelCollection<Tool?> Tools { get; }
Property Value
- See Also
Volumes
List of available mass storages
[SbcProperty(true)]
public StaticModelCollection<Volume> Volumes { get; }
Property Value
- See Also
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
fromIStaticModelObjectOther instance
Clone()
Clone this instance
public object Clone()
Returns
- object
Cloned instance
Remarks
This method is auto-generated
ToString()
Convert this instance to a JSON text
public override string ToString()
Returns
- string
JSON object
ToUtf8Json()
Serialize this instance to a UTF-8 string
public byte[] ToUtf8Json()
Returns
- byte[]
UpdateFromFirmwareJson(string?, JsonElement, int, bool)
Update a specific key of this instance from a given JSON element as provided by the firmware
public bool UpdateFromFirmwareJson(string? key, JsonElement jsonElement, int offset = 0, bool last = true)
Parameters
keystringProperty name to update
jsonElementJsonElementElement to update this intance from
offsetintIndex offset
lastboolWhether this is the last update
Returns
- bool
Whether the key could be updated
UpdateFromFirmwareJsonReader(string?, ref Utf8JsonReader, int, bool)
Update a specific key of this instance from a given JSON reader as provided by the firmware
public bool UpdateFromFirmwareJsonReader(string? key, ref Utf8JsonReader reader, int offset = 0, bool last = true)
Parameters
keystringProperty name to update
readerUtf8JsonReaderJSON reader
offsetintIndex offset
lastboolWhether this is the last update. May be used to flag whether move.axes is about to be updated, too
Returns
- bool
Whether the key could be updated
UpdateFromJson(string, JsonElement)
Update a specific key of this instance from a given JSON element
public bool UpdateFromJson(string key, JsonElement jsonElement)
Parameters
keystringProperty name to update
jsonElementJsonElementElement to update this intance from
Returns
- bool
Whether the key could be updated
UpdateFromJson(JsonElement)
Update this instance from a given JSON element
public bool UpdateFromJson(JsonElement jsonElement)
Parameters
jsonElementJsonElementElement to update this intance from
Returns
- bool
Whether the key could be updated
UpdateFromJson(JsonElement, bool)
Update this instance from a given JSON element
public void UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)
Parameters
jsonElementJsonElementElement to update this intance from
ignoreSbcPropertiesboolWhether SBC properties are ignored
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data
UpdateFromJsonReader(string, ref Utf8JsonReader)
Update a specific key of this instance from a given JSON reader
public bool UpdateFromJsonReader(string key, ref Utf8JsonReader reader)
Parameters
keystringProperty name to update
readerUtf8JsonReaderJSON reader
Returns
- bool
Whether the key could be updated
UpdateFromJsonReader(ref Utf8JsonReader, bool)
Update this instance from a given JSON element
public void UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)
Parameters
readerUtf8JsonReaderReader to update this intance from
ignoreSbcPropertiesboolWhether SBC properties are ignored
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data
Events
OnDeserializationFailed
Static event to be called when the deserialization of a property failed. If an event handler is assigned, potential JsonExceptions are suppressed and the event is called instead
public static event DeserializationFailedEventHandler? OnDeserializationFailed