• DuetAPI
  • DuetAPIClient
  • DuetControlServer
  • DuetWebServer
Show / Hide Table of Contents
  • DuetAPI
    • CodeChannel
  • DuetAPI.Commands
    • Acknowledge
    • AddHttpEndpoint
    • AddUserSession
    • BaseCommand
    • BaseResponse
    • Cancel
    • Code
    • CodeFlags
    • CodeParameter
    • CodeParameterConverter
    • CodeParserBuffer
    • CodeParserException
    • CodeResult
    • CodeType
    • Command
    • Command<T>
    • ErrorResponse
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetMachineModel
    • HttpResponseType
    • Ignore
    • KeywordType
    • LockMachineModel
    • PatchMachineModel
    • ReceivedHttpRequest
    • RemoveHttpEndpoint
    • RemoveUserSession
    • Resolve
    • ResolvePath
    • Response<T>
    • SendHttpResponse
    • SetMachineModel
    • SimpleCode
    • SyncMachineModel
    • UnlockMachineModel
    • WriteMessage
  • DuetAPI.Connection
    • ConnectionMode
    • Defaults
    • IncompatibleVersionException
    • InterceptionMode
    • SubscriptionMode
  • DuetAPI.Connection.InitMessages
    • ClientInitMessage
    • CommandInitMessage
    • InterceptInitMessage
    • ServerInitMessage
    • SubscribeInitMessage
  • DuetAPI.Machine
    • AccessLevel
    • AnalogSensor
    • AnalogSensorType
    • AnalogSensorTypeConverter
    • Axis
    • BeepRequest
    • Board
    • BoardState
    • Build
    • BuildObject
    • Compatibility
    • CoreKinematics
    • CurrentMove
    • DAA
    • DeltaKinematics
    • DeltaTower
    • Directories
    • DistanceUnit
    • Endstop
    • EndstopType
    • Extruder
    • ExtruderNonlinear
    • Fan
    • FanThermostaticControl
    • FilamentMonitor
    • FilamentMonitorType
    • GpInputPort
    • GpOutputPort
    • HangprinterKinematics
    • Heat
    • Heater
    • HeaterModel
    • HeaterModelPID
    • HeaterMonitor
    • HeaterMonitorAction
    • HeaterMonitorCondition
    • HeaterState
    • HttpEndpoint
    • HttpEndpointType
    • InputChannel
    • InputChannelState
    • Inputs
    • InterfaceType
    • Job
    • Kinematics
    • KinematicsName
    • KinematicsNameConverter
    • LaserFilamentMonitor
    • LaserFilamentMonitorCalibrated
    • LaserFilamentMonitorConfigured
    • Layer
    • Limits
    • LinuxPropertyAttribute
    • MachineMode
    • MachineModel
    • MachineModelConverter
    • MachineStatus
    • Message
    • MessageBox
    • MessageBoxMode
    • MessageType
    • Microstepping
    • MinMaxCurrent<T>
    • ModelCollection
    • ModelCollection<T>
    • ModelGrowingCollection
    • ModelGrowingCollection<T>
    • ModelObject
    • MotorsIdleControl
    • Move
    • MoveCalibration
    • MoveCompensation
    • MoveCompensationType
    • MoveDeviations
    • Network
    • NetworkInterface
    • NetworkProtocol
    • ParsedFileInfo
    • Probe
    • ProbeGrid
    • ProbeType
    • PulsedFilamentMonitor
    • PulsedFilamentMonitorCalibrated
    • PulsedFilamentMonitorConfigured
    • RestorePoint
    • RotatingMagnetFilamentMonitor
    • RotatingMagnetFilamentMonitorCalibrated
    • RotatingMagnetFilamentMonitorConfigured
    • Scanner
    • ScannerStatus
    • ScaraKinematics
    • Sensors
    • SessionType
    • SimpleFilamentMonitor
    • Skew
    • Spindle
    • State
    • TiltCorrection
    • TimesLeft
    • Tool
    • ToolRetraction
    • ToolState
    • UserSession
    • UserVariable
    • Volume
    • ZLeadscrewKinematics
  • DuetAPI.Utility
    • DriverId
    • FileLists
    • Heightmap
    • JsonCamelCaseStringEnumConverter
    • JsonCharEnumConverter
    • JsonHelper
    • JsonLowerCaseStringEnumConverter
    • JsonPolymorphicWriteOnlyConverter<T>
    • JsonRegexListConverter
  • DuetAPIClient
    • BaseCommandConnection
    • BaseConnection
    • CommandConnection
    • HttpEndpointConnection
    • HttpEndpointUnixSocket
    • HttpEndpointUnixSocket.EndpointRequestReceived
    • InterceptConnection
    • InternalServerException
    • SubscribeConnection
  • DuetControlServer
    • Program
    • Settings
  • DuetControlServer.Codes
    • GCodes
    • MCodes
    • TCodes
  • DuetControlServer.Commands
    • AddHttpEndpoint
    • AddUserSession
    • Code
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetMachineModel
    • LockMachineModel
    • RemoveHttpEndpoint
    • RemoveUserSession
    • ResolvePath
    • SetMachineModel
    • SimpleCode
    • SyncMachineModel
    • UnlockMachineModel
    • WriteMessage
  • DuetControlServer.FileExecution
    • Job
    • Macro
  • DuetControlServer.Files
    • CodeBlock
    • CodeFile
    • ConfigOverride
    • FileDirectory
    • FilePath
    • InfoParser
  • DuetControlServer.IPC
    • Connection
    • LockManager
    • Server
  • DuetControlServer.IPC.Processors
    • Base
    • Command
    • Interception
    • Subscription
  • DuetControlServer.Model
    • Expressions
    • Filter
    • ItemPathNode
    • Observer
    • Observer.PropertyPathChanged
    • PeriodicUpdater
    • PropertyChangeType
    • Provider
    • Updater
  • DuetControlServer.SPI
    • DataTransfer
    • EvaluateExpressionRequest
    • Interface
  • DuetControlServer.SPI.Channel
    • LockRequest
    • Manager
    • Processor
    • State
  • DuetControlServer.SPI.Communication
    • Consts
  • DuetControlServer.SPI.Communication.FirmwareRequests
    • AbortFileHeader
    • CodeBufferUpdateHeader
    • DoCodeHeader
    • EvaluationResultHeader
    • ExecuteMacroHeader
    • FileChunkHeader
    • PrintPausedHeader
    • PrintPausedReason
    • Request
  • DuetControlServer.SPI.Communication.LinuxRequests
    • AssignFilamentHeader
    • CodeFlags
    • CodeHeader
    • CodeParameter
    • FileChunk
    • GetObjectModelHeader
    • MacroCompleteHeader
    • PrintStartedHeader
    • PrintStoppedHeader
    • Request
    • SetObjectModelHeader
  • DuetControlServer.SPI.Communication.Shared
    • CodeChannelHeader
    • DataType
    • HeightMapHeader
    • MessageHeader
    • MessageTypeFlags
    • PacketHeader
    • PrintStoppedReason
    • StringHeader
    • TransferHeader
    • TransferResponse
  • DuetControlServer.SPI.Serialization
    • Reader
    • Writer
  • DuetControlServer.Utility
    • CRC16
    • FilamentManager
    • Logger
  • DuetWebServer
    • Program
    • Startup
  • DuetWebServer.Controllers
    • MachineController
    • WebSocketController
  • DuetWebServer.FileProviders
    • DuetFileProvider
  • DuetWebServer.Middleware
    • CustomEndpointMiddleware
    • FallbackMiddleware
    • HttpEndpointConnection
  • DuetWebServer.Services
    • ModelObserver
    • ModelObserver.WebDirectoryChanged

Class ModelObject

Base class for machine model properties

Inheritance
System.Object
ModelObject
AnalogSensor
Axis
BeepRequest
Board
Build
BuildObject
CurrentMove
DAA
DeltaTower
Directories
Endstop
Extruder
ExtruderNonlinear
Fan
FanThermostaticControl
FilamentMonitor
GpInputPort
GpOutputPort
Heat
Heater
HeaterModel
HeaterModelPID
HeaterMonitor
HttpEndpoint
InputChannel
Job
Kinematics
LaserFilamentMonitorCalibrated
LaserFilamentMonitorConfigured
Layer
Limits
MachineModel
MessageBox
Microstepping
MinMaxCurrent<T>
MotorsIdleControl
Move
MoveCalibration
MoveCompensation
MoveDeviations
Network
NetworkInterface
ParsedFileInfo
Probe
ProbeGrid
PulsedFilamentMonitorCalibrated
PulsedFilamentMonitorConfigured
RestorePoint
RotatingMagnetFilamentMonitorCalibrated
RotatingMagnetFilamentMonitorConfigured
Scanner
Sensors
Skew
Spindle
State
TiltCorrection
TimesLeft
Tool
ToolRetraction
UserSession
UserVariable
Volume
Implements
System.ICloneable
System.ComponentModel.INotifyPropertyChanging
System.ComponentModel.INotifyPropertyChanged
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetAPI.Machine
Assembly: DuetAPI.dll
Syntax
public class ModelObject : ICloneable, INotifyPropertyChanging, INotifyPropertyChanged

Constructors

ModelObject()

Default constructor to be called from derived classes

Declaration
public ModelObject()

Fields

JsonProperties

Get the cached JSON properties of this type

Declaration
public readonly Dictionary<string, PropertyInfo> JsonProperties
Field Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Reflection.PropertyInfo>

Properties of this type

Methods

Assign(ModelObject)

Method to assign the value of one type to another

Declaration
public void Assign(ModelObject from)
Parameters
Type Name Description
ModelObject from

Other object

Clone()

Create a clone of this instance

Declaration
public object Clone()
Returns
Type Description
System.Object

Cloned object

MakeStringPatch(ModelObject)

Create a string-encoded JSON patch to bring an old instance to this state

Declaration
public string MakeStringPatch(ModelObject old)
Parameters
Type Name Description
ModelObject old

Old object state

Returns
Type Description
System.String

JSON patch

MakeUtf8Patch(ModelObject)

Create a UTF8-encoded JSON patch to bring an old instance to this state

Declaration
public byte[] MakeUtf8Patch(ModelObject old)
Parameters
Type Name Description
ModelObject old

Old object state

Returns
Type Description
System.Byte[]

JSON patch

SetPropertyValue<T>(ref T, T, String)

Method to update a property value internally

Declaration
protected void SetPropertyValue<T>(ref T propertyStorage, T value, string propertyName = "")
Parameters
Type Name Description
T propertyStorage

Reference to the variable that holds the current value

T value

New property value

System.String propertyName

Name of the property

Type Parameters
Name Description
T

UpdateFromJson(JsonElement)

Update this instance from a given JSON element

Declaration
public ModelObject UpdateFromJson(JsonElement jsonElement)
Parameters
Type Name Description
System.Text.Json.JsonElement jsonElement

Element to update this intance from

Returns
Type Description
ModelObject

Updated instance

Events

PropertyChanged

Event that is triggered when a property has been changed

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

PropertyChanging

Event that is triggered when a property is being changed

Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Type
Type Description
System.ComponentModel.PropertyChangingEventHandler

Implements

System.ICloneable
System.ComponentModel.INotifyPropertyChanging
System.ComponentModel.INotifyPropertyChanged
Back to top Generated by DocFX