Class State
Information about the machine state
Inherited Members
Namespace: DuetAPI.ObjectModel
Assembly: DuetAPI.dll
Syntax
public sealed class State : ModelObject, IModelObject, ICloneable, INotifyPropertyChanged, INotifyPropertyChanging
Properties
AtxPower
State of the ATX power pin (if controlled)
Declaration
public bool? AtxPower { get; set; }
Property Value
Type | Description |
---|---|
bool? |
AtxPowerPort
Port of the ATX power pin or null if not assigned
Declaration
public string? AtxPowerPort { get; set; }
Property Value
Type | Description |
---|---|
string |
Beep
Information about a requested beep or null if none is requested
Declaration
public BeepRequest? Beep { get; set; }
Property Value
Type | Description |
---|---|
BeepRequest |
CurrentTool
Number of the currently selected tool or -1 if none is selected
Declaration
public int CurrentTool { get; set; }
Property Value
Type | Description |
---|---|
int |
DeferredPowerDown
When provided it normally has value 0 normally and 1 when a deferred power down is pending
Declaration
public bool? DeferredPowerDown { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Remarks
It is only available after power switching has been enabled by M80 or M81
DisplayMessage
Persistent message to display (see M117)
Declaration
public string DisplayMessage { get; set; }
Property Value
Type | Description |
---|---|
string |
GpOut
List of general-purpose output ports
Declaration
public ModelCollection<GpOutputPort?> GpOut { get; }
Property Value
Type | Description |
---|---|
ModelCollection<GpOutputPort> |
See Also
LaserPwm
Laser PWM of the next commanded move (0..1) or null if not applicable
Declaration
public float? LaserPwm { get; set; }
Property Value
Type | Description |
---|---|
float? |
LogFile
Log file being written to or null if logging is disabled
Declaration
[SbcProperty(true)]
public string? LogFile { get; set; }
Property Value
Type | Description |
---|---|
string |
LogLevel
Current log level
Declaration
[SbcProperty(true)]
public LogLevel LogLevel { get; set; }
Property Value
Type | Description |
---|---|
LogLevel |
MachineMode
Current mode of operation
Declaration
public MachineMode MachineMode { get; set; }
Property Value
Type | Description |
---|---|
MachineMode |
MacroRestarted
Indicates if the current macro file was restarted after a pause
Declaration
public bool MacroRestarted { get; set; }
Property Value
Type | Description |
---|---|
bool |
MessageBox
Details about a requested message box or null if none is requested
Declaration
public MessageBox? MessageBox { get; set; }
Property Value
Type | Description |
---|---|
MessageBox |
MsUpTime
Millisecond fraction of UpTime
Declaration
public int MsUpTime { get; set; }
Property Value
Type | Description |
---|---|
int |
NextTool
Number of the next tool to be selected
Declaration
public int NextTool { get; set; }
Property Value
Type | Description |
---|---|
int |
PluginsStarted
Indicates if at least one plugin has been started
Declaration
[SbcProperty(false)]
public bool PluginsStarted { get; set; }
Property Value
Type | Description |
---|---|
bool |
PowerFailScript
Script to execute when the power fails
Declaration
public string PowerFailScript { get; set; }
Property Value
Type | Description |
---|---|
string |
PreviousTool
Number of the previous tool
Declaration
public int PreviousTool { get; set; }
Property Value
Type | Description |
---|---|
int |
RestorePoints
List of restore points
Declaration
public ModelCollection<RestorePoint> RestorePoints { get; }
Property Value
Type | Description |
---|---|
ModelCollection<RestorePoint> |
StartupError
First error on start-up or null if there was none
Declaration
[SbcProperty(true)]
public StartupError? StartupError { get; set; }
Property Value
Type | Description |
---|---|
StartupError |
Status
Current state of the machine
Declaration
public MachineStatus Status { get; set; }
Property Value
Type | Description |
---|---|
MachineStatus |
ThisActive
Shorthand for inputs[state.thisInput].active
Declaration
public bool? ThisActive { get; set; }
Property Value
Type | Description |
---|---|
bool? |
ThisInput
Index of the current G-code input channel (see Inputs)
Declaration
public int? ThisInput { get; set; }
Property Value
Type | Description |
---|---|
int? |
Remarks
This is primarily intended for macro files to determine on which G-code channel it is running. The value of this property is always null in object model queries
Time
Internal date and time in RepRapFirmware or null if unknown
Declaration
[JsonConverter(typeof(JsonOptionalShortDateTimeConverter))]
public DateTime? Time { get; set; }
Property Value
Type | Description |
---|---|
DateTime? |
UpTime
How long the machine has been running (in s)
Declaration
public int UpTime { get; set; }
Property Value
Type | Description |
---|---|
int |