Class ObjectModel
Representation of the Duet3D object model
Implements
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<System.Text.Json.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 |
HttpEndpoints
List of registered third-party HTTP endpoints
Declaration
[SbcProperty(false)]
public ModelCollection<HttpEndpoint> HttpEndpoints { get; }
Property Value
Type | Description |
---|---|
ModelCollection<HttpEndpoint> |
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 |
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 SBC plugins where each key is the plugin identifier
Declaration
[SbcProperty(false)]
public ModelDictionary<Plugin> Plugins { get; }
Property Value
Type | Description |
---|---|
ModelDictionary<Plugin> |
Remarks
Values in this dictionary cannot become null. If a change to null is reported, the corresponding key is deleted. Do not rely on the setter of this property; it will be removed from a future version.
Scanner
Information about the 3D scanner subsystem
Declaration
[SbcProperty(true)]
public Scanner Scanner { get; }
Property Value
Type | Description |
---|---|
Scanner |
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
UserSessions
List of user sessions
Declaration
[SbcProperty(false)]
public ModelCollection<UserSession> UserSessions { get; }
Property Value
Type | Description |
---|---|
ModelCollection<UserSession> |
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 |
---|---|
System.String | JSON object |
Overrides
ToUtf8Json()
Serialize this instance to a UTF-8 string
Declaration
public byte[] ToUtf8Json()
Returns
Type | Description |
---|---|
System.Byte[] |
UpdateFromFirmwareJson(String, JsonElement, Int32, Boolean)
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 |
---|---|---|
System.String | key | Property name to update |
System.Text.Json.JsonElement | jsonElement | Element to update this intance from |
System.Int32 | offset | Index offset |
System.Boolean | last | Whether this is the last update |
Returns
Type | Description |
---|---|
System.Boolean | 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 |
---|---|---|
System.String | key | Property name to update |
System.Text.Json.JsonElement | jsonElement | Element to update this intance from |
Returns
Type | Description |
---|---|
System.Boolean | 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 |
---|---|---|
System.Text.Json.JsonElement | jsonElement | Element to update this intance from |
Returns
Type | Description |
---|---|
System.Boolean | 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 |