• DuetAPI
  • DuetAPIClient
  • DuetControlServer
  • DuetWebServer
  • DuetAPI.ObjectModel
  • ObjectModel
Show / Hide Table of Contents
  • DuetAPI
    • CodeChannel
    • CodeParserException
    • IncompatibleVersionException
    • InternalServerException
    • InvalidParameterTypeException
    • MissingParameterException
  • DuetAPI.Commands
    • Acknowledge
    • AddHttpEndpoint
    • AddUserSession
    • BaseCommand
    • BaseResponse
    • Cancel
    • CheckPassword
    • Code
    • CodeFlags
    • CodeParameter
    • CodeParameterConverter
    • CodeParserBuffer
    • CodeType
    • Command
    • Command<T>
    • ErrorResponse
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetObjectModel
    • HttpResponseType
    • Ignore
    • InstallPlugin
    • InstallSystemPackage
    • InvalidateChannel
    • KeywordType
    • LockObjectModel
    • PatchObjectModel
    • ReceivedHttpRequest
    • ReloadPlugin
    • RemoveHttpEndpoint
    • RemoveUserSession
    • Resolve
    • ResolvePath
    • Response<T>
    • SendHttpResponse
    • SetNetworkProtocol
    • SetObjectModel
    • SetPluginData
    • SetPluginProcess
    • SetUpdateStatus
    • SimpleCode
    • StartPlugin
    • StartPlugins
    • StopPlugin
    • StopPlugins
    • SyncObjectModel
    • UninstallPlugin
    • UninstallSystemPackage
    • UnlockObjectModel
    • WriteMessage
  • DuetAPI.Connection
    • ConnectionMode
    • Defaults
    • InterceptionMode
    • SubscriptionMode
  • DuetAPI.Connection.InitMessages
    • ClientInitMessage
    • CodeStreamInitMessage
    • CommandInitMessage
    • InterceptInitMessage
    • PluginServiceInitMessage
    • ServerInitMessage
    • SubscribeInitMessage
  • DuetAPI.ObjectModel
    • Accelerometer
    • AccessLevel
    • AnalogSensor
    • AnalogSensorType
    • AnalogSensorTypeConverter
    • Axis
    • BeepRequest
    • Board
    • BoardClosedLoop
    • BoardState
    • Build
    • BuildObject
    • CPU
    • ClosedLoopCurrentFraction
    • ClosedLoopPositionError
    • Compatibility
    • CoreKinematics
    • CurrentMove
    • DSF
    • DeltaKinematics
    • DeltaTower
    • DeserializationFailedEventArgs
    • DeserializationFailedEventHandler
    • DirectDisplay
    • DirectDisplayController
    • DirectDisplayEncoder
    • DirectDisplayScreen
    • DirectDisplayScreenST7567
    • Directories
    • DistanceUnit
    • DistanceUnitConverter
    • Driver
    • DriverClosedLoop
    • Duet3DFilamentMonitor
    • Endstop
    • EndstopType
    • Extruder
    • ExtruderNonlinear
    • Fan
    • FanThermostaticControl
    • FilamentMonitor
    • FilamentMonitorEnableMode
    • FilamentMonitorStatus
    • FilamentMonitorType
    • GCodeFileInfo
    • GCodeFileInfoConverter
    • GpInputPort
    • GpOutputPort
    • HangprinterKinematics
    • Heat
    • Heater
    • HeaterModel
    • HeaterModelPID
    • HeaterMonitor
    • HeaterMonitorAction
    • HeaterMonitorCondition
    • HeaterState
    • HttpEndpoint
    • HttpEndpointType
    • IGrowingModelCollection
    • IModelCollection
    • IModelDictionary
    • IModelObject
    • InductiveSensor
    • InputChannel
    • InputChannelState
    • InputShaping
    • InputShapingType
    • Inputs
    • Job
    • KeepoutZone
    • KeepoutZoneCoordinates
    • Kinematics
    • KinematicsName
    • KinematicsNameConverter
    • LaserFilamentMonitor
    • LaserFilamentMonitorCalibrated
    • LaserFilamentMonitorConfigured
    • Layer
    • LedStrip
    • LedStripType
    • LimitedResponseCountAttribute
    • Limits
    • LogLevel
    • MachineMode
    • MachineStatus
    • Memory
    • Message
    • MessageBox
    • MessageBoxMode
    • MessageType
    • Microstepping
    • MinMaxCurrent<T>
    • ModelCollection<T>
    • ModelDictionaryConverter
    • ModelDictionary<TValue>
    • ModelGrowingCollection<T>
    • ModelObject
    • MotorsIdleControl
    • Move
    • MoveCalibration
    • MoveCompensation
    • MoveCompensationType
    • MoveDeviations
    • MoveQueueItem
    • MoveRotation
    • MoveSegmentation
    • Network
    • NetworkInterface
    • NetworkInterfaceType
    • NetworkProtocol
    • NetworkState
    • ObjectModel
    • ObjectModelConverter
    • Plugin
    • PluginManifest
    • PolarKinematics
    • Probe
    • ProbeGrid
    • ProbeType
    • PulsedFilamentMonitor
    • PulsedFilamentMonitorCalibrated
    • PulsedFilamentMonitorConfigured
    • RestorePoint
    • RotatingMagnetFilamentMonitor
    • RotatingMagnetFilamentMonitorCalibrated
    • RotatingMagnetFilamentMonitorConfigured
    • SBC
    • SbcPropertyAttribute
    • ScaraKinematics
    • Sensors
    • SessionType
    • Skew
    • Spindle
    • SpindleState
    • StartupError
    • State
    • TemperatureError
    • ThumbnailInfo
    • ThumbnailInfoFormat
    • TiltCorrection
    • TimesLeft
    • Tool
    • ToolRetraction
    • ToolState
    • UserSession
    • Volume
    • ZLeadscrewKinematics
  • DuetAPI.Utility
    • DriverId
    • DriverIdJsonConverter
    • FileLists
    • Heightmap
    • JsonCamelCaseStringEnumConverter
    • JsonCharEnumConverter
    • JsonHelper
    • JsonLowerCaseStringEnumConverter
    • JsonOptionalShortDateTimeConverter
    • JsonPolymorphicWriteOnlyConverter<T>
    • JsonRegexListConverter
    • JsonShortDateTimeConverter
    • RequiredPermissionsAttribute
    • SbcPermissions
    • SbcPermissionsConverter
  • DuetAPIClient
    • BaseCommandConnection
    • BaseConnection
    • CodeStreamConnection
    • CommandConnection
    • HttpEndpointConnection
    • HttpEndpointUnixSocket
    • HttpEndpointUnixSocket.EndpointRequestReceived
    • InterceptConnection
    • SubscribeConnection
  • DuetControlServer
    • Program
    • Settings
  • DuetControlServer.Codes
    • ChannelProcessor
    • PipelineStage
    • Processor
  • DuetControlServer.Codes.Handlers
    • Functions
    • GCodes
    • Keywords
    • MCodes
    • TCodes
  • DuetControlServer.Codes.Pipelines
    • Executed
    • Firmware
    • PipelineBase
    • PipelineStackItem
    • Post
    • Pre
    • ProcessInternally
    • Start
  • DuetControlServer.Commands
    • AddHttpEndpoint
    • AddUserSession
    • CheckPassword
    • Code
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetObjectModel
    • IConnectionCommand
    • InstallPlugin
    • InstallSystemPackage
    • InvalidateChannel
    • LockObjectModel
    • PatchObjectModel
    • ReloadPlugin
    • RemoveHttpEndpoint
    • RemoveUserSession
    • ResolvePath
    • SetNetworkProtocol
    • SetObjectModel
    • SetPluginData
    • SetPluginProcess
    • SetUpdateStatus
    • SimpleCode
    • StartPlugin
    • StartPlugins
    • StopPlugin
    • StopPlugins
    • SyncObjectModel
    • UninstallPlugin
    • UninstallSystemPackage
    • UnlockObjectModel
    • WriteMessage
  • DuetControlServer.Files
    • CodeBlock
    • CodeFile
    • FileDirectory
    • FilePath
    • InfoParser
    • JobProcessor
    • MacroFile
  • DuetControlServer.Files.ImageProcessing
    • IconImageParser
    • ImageParser
    • ImageProcessingException
  • DuetControlServer.IPC
    • Connection
    • LockManager
    • Server
  • DuetControlServer.IPC.Processors
    • Base
    • CodeInterception
    • CodeStream
    • Command
    • ModelSubscription
    • PluginService
  • DuetControlServer.Model
    • Expressions
    • Expressions.CustomAsyncFunctionResolver
    • Filter
    • ItemPathNode
    • Observer
    • Observer.PropertyPathChanged
    • PeriodicUpdater
    • PropertyChangeType
    • Provider
    • Updater
  • DuetControlServer.SPI
    • DataTransfer
    • EvaluateExpressionRequest
    • Interface
    • Interface.MovementLock
    • VariableRequest
  • DuetControlServer.SPI.Channel
    • LockRequest
    • Manager
    • Processor
    • State
  • DuetControlServer.SPI.Communication
    • Consts
  • DuetControlServer.SPI.Communication.FirmwareRequests
    • AbortFileHeader
    • CodeBufferUpdateHeader
    • DoCodeHeader
    • EvaluationResultHeader
    • ExecuteMacroHeader
    • FileChunkHeader
    • FileHandleHeader
    • OpenFileHeader
    • PrintPausedHeader
    • PrintPausedReason
    • ReadFileHeader
    • Request
    • SeekFileHeader
  • DuetControlServer.SPI.Communication.SbcRequests
    • AssignFilamentHeader
    • BooleanHeader
    • CodeFlags
    • CodeHeader
    • CodeParameter
    • DeleteLocalVariableHeader
    • FileChunkHeader
    • FileDataHeader
    • GetObjectModelHeader
    • MacroCompleteHeader
    • OpenFileResult
    • PrintStartedHeader
    • PrintStoppedHeader
    • Request
    • SetObjectModelHeader
    • SetVariableHeader
  • DuetControlServer.SPI.Communication.Shared
    • CodeChannelHeader
    • DataType
    • HeightMapHeader
    • MessageHeader
    • MessageTypeFlags
    • PacketHeader
    • PrintStoppedReason
    • StringHeader
    • TransferHeader
    • TransferResponse
  • DuetControlServer.SPI.Serialization
    • Reader
    • Writer
  • DuetControlServer.Utility
    • BuildDateTimeAttribute
    • CRC16
    • CRC32
    • Firmware
    • Logger
    • PriorityThreadRunner
  • DuetWebServer
    • Program
    • Settings
    • Startup
  • DuetWebServer.Authorization
    • Policies
    • SessionKeyAuthenticationHandler
    • SessionKeyAuthenticationSchemeOptions
  • DuetWebServer.Controllers
    • MachineController
    • RepRapFirmwareController
    • WebSocketController
  • DuetWebServer.FileProviders
    • DuetFileProvider
  • DuetWebServer.Middleware
    • CustomEndpointMiddleware
    • FallbackMiddleware
    • FixContentTypeMiddleware
    • HttpEndpointConnection
  • DuetWebServer.Services
    • ModelObserver
    • SessionExpiry
  • DuetWebServer.Singletons
    • IModelProvider
    • IModelProvider.WebDirectoryChanged
    • ISessionStorage
    • ModelProvider
    • SessionStorage
  • DuetWebServer.Utility
    • CRC32

Class ObjectModel

Representation of the Duet3D object model

Inheritance
object
ModelObject
ObjectModel
Implements
IModelObject
ICloneable
INotifyPropertyChanged
INotifyPropertyChanging
Inherited Members
ModelObject.PropertyChanging
ModelObject.PropertyChanged
ModelObject.SetPropertyValue<T>(ref T, T, string)
ModelObject.RegisterJsonType(Type)
ModelObject.JsonProperties
ModelObject.Assign(object)
ModelObject.Clone()
ModelObject.FindDifferences(IModelObject)
ModelObject.MakeUtf8Patch(ModelObject)
ModelObject.MakeStringPatch(ModelObject)
ModelObject.UpdateFromJson(JsonElement, bool)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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
Board

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
Fan

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
LedStrip

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
Message

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
Spindle

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
Tool

Volumes

List of available mass storages

Declaration
[SbcProperty(true)]
public ModelCollection<Volume> Volumes { get; }
Property Value
Type Description
ModelCollection<Volume>
See Also
Volume

Methods

ToString()

Convert this instance to a JSON text

Declaration
public override string ToString()
Returns
Type Description
string

JSON object

Overrides
object.ToString()

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

Implements

IModelObject
ICloneable
INotifyPropertyChanged
INotifyPropertyChanging
In this article
  • Properties
    • Boards
    • Directories
    • Fans
    • Global
    • Heat
    • Inputs
    • Job
    • LedStrips
    • Limits
    • Messages
    • Move
    • Network
    • Plugins
    • SBC
    • Sensors
    • Spindles
    • State
    • Tools
    • Volumes
  • Methods
    • ToString()
    • ToUtf8Json()
    • UpdateFromFirmwareJson(string?, JsonElement, int, bool)
    • UpdateFromJson(string, JsonElement)
    • UpdateFromJson(JsonElement)
  • Events
    • OnDeserializationFailed
  • Implements
Back to top Generated by DocFX