Class ObjectModel
Representation of the Duet3D object model
Inherited Members
Namespace: DuetAPI.ObjectModel
Assembly: DuetAPI.dll
Syntax
[JsonConverter(typeof(ObjectModelConverter))]
public class ObjectModel : ModelObject, IModelObject, ICloneable, INotifyPropertyChanged, INotifyPropertyChanging
Properties
Boards
List of connected boards
Declaration
public ModelCollection<Board> Boards { get; }
Property Value
Type | Description |
---|---|
ModelCollection<Board> |
Remarks
The first item represents the main board
See Also
Directories
Information about the individual directories
Declaration
public Directories Directories { get; }
Property Value
Type | Description |
---|---|
Directories |
Remarks
This may not be available in RepRapFirmware if no mass storages are available
Fans
List of configured fans
Declaration
public ModelCollection<Fan?> Fans { get; }
Property Value
Type | Description |
---|---|
ModelCollection<Fan> |
See Also
Global
Dictionary of global variables vs JSON values
Declaration
public ModelDictionary<JsonElement> Global { get; }
Property Value
Type | Description |
---|---|
ModelDictionary<JsonElement> |
Remarks
When DSF attempts to reconnect to RRF, this may be set to null to clear the contents
Heat
Information about the heat subsystem
Declaration
public Heat Heat { get; }
Property Value
Type | Description |
---|---|
Heat |
Inputs
Information about every available G/M/T-code channel
Declaration
public Inputs Inputs { get; }
Property Value
Type | Description |
---|---|
Inputs |
Job
Information about the current job
Declaration
public Job Job { get; }
Property Value
Type | Description |
---|---|
Job |
LedStrips
List of configured LED strips
Declaration
public ModelCollection<LedStrip> LedStrips { get; }
Property Value
Type | Description |
---|---|
ModelCollection<LedStrip> |
See Also
Limits
Machine configuration limits
Declaration
public Limits Limits { get; }
Property Value
Type | Description |
---|---|
Limits |
Messages
Generic messages that do not belong explicitly to codes being executed. This includes status messages, generic errors and outputs generated by M118
Declaration
[SbcProperty(false)]
public ModelGrowingCollection<Message> Messages { get; }
Property Value
Type | Description |
---|---|
ModelGrowingCollection<Message> |
See Also
Move
Information about the move subsystem
Declaration
public Move Move { get; }
Property Value
Type | Description |
---|---|
Move |
Network
Information about connected network adapters
Declaration
public Network Network { get; }
Property Value
Type | Description |
---|---|
Network |
Plugins
Dictionary of loaded plugins where each key is the plugin identifier
Declaration
[SbcProperty(false)]
public ModelDictionary<Plugin> Plugins { get; }
Property Value
Type | Description |
---|---|
ModelDictionary<Plugin> |
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
Declaration
[SbcProperty(false)]
public SBC? SBC { get; set; }
Property Value
Type | Description |
---|---|
SBC |
Sensors
Information about connected sensors including Z-probes and endstops
Declaration
public Sensors Sensors { get; }
Property Value
Type | Description |
---|---|
Sensors |
Spindles
List of configured CNC spindles
Declaration
public ModelCollection<Spindle?> Spindles { get; }
Property Value
Type | Description |
---|---|
ModelCollection<Spindle> |
See Also
State
Information about the machine state
Declaration
public State State { get; }
Property Value
Type | Description |
---|---|
State |
Tools
List of configured tools
Declaration
public ModelCollection<Tool?> Tools { get; }
Property Value
Type | Description |
---|---|
ModelCollection<Tool> |
See Also
Volumes
List of available mass storages
Declaration
[SbcProperty(true)]
public ModelCollection<Volume> Volumes { get; }
Property Value
Type | Description |
---|---|
ModelCollection<Volume> |
See Also
Methods
ToString()
Convert this instance to a JSON text
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | JSON object |
Overrides
ToUtf8Json()
Serialize this instance to a UTF-8 string
Declaration
public byte[] ToUtf8Json()
Returns
Type | Description |
---|---|
byte[] |
UpdateFromFirmwareJson(string?, JsonElement, int, bool)
Update a specific key of this instance from a given JSON element as provided by the firmware
Declaration
public bool UpdateFromFirmwareJson(string? key, JsonElement jsonElement, int offset = 0, bool last = true)
Parameters
Type | Name | Description |
---|---|---|
string | key | Property name to update |
JsonElement | jsonElement | Element to update this intance from |
int | offset | Index offset |
bool | last | Whether this is the last update |
Returns
Type | Description |
---|---|
bool | Whether the key could be updated |
UpdateFromJson(string, JsonElement)
Update a specific key of this instance from a given JSON element
Declaration
public bool UpdateFromJson(string key, JsonElement jsonElement)
Parameters
Type | Name | Description |
---|---|---|
string | key | Property name to update |
JsonElement | jsonElement | Element to update this intance from |
Returns
Type | Description |
---|---|
bool | Whether the key could be updated |
UpdateFromJson(JsonElement)
Update this instance from a given JSON element
Declaration
public bool UpdateFromJson(JsonElement jsonElement)
Parameters
Type | Name | Description |
---|---|---|
JsonElement | jsonElement | Element to update this intance from |
Returns
Type | Description |
---|---|
bool | Whether the key could be updated |
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
Declaration
public static event DeserializationFailedEventHandler? OnDeserializationFailed
Event Type
Type | Description |
---|---|
DeserializationFailedEventHandler |