Table of Contents

Class AnalogSensor

Namespace
DuetAPI.ObjectModel
Assembly
DuetAPI.dll

Representation of an analog sensor

public class AnalogSensor : ModelObject, INotifyPropertyChanging, IStaticModelObject, IModelObject, ICloneable, INotifyPropertyChanged
Inheritance
AnalogSensor
Implements
Inherited Members

Constructors

AnalogSensor()

public AnalogSensor()

Properties

Beta

Beta value of this sensor (if applicable)

public float? Beta { get; set; }

Property Value

float?

C

C value of this sensor

public float? C { get; set; }

Property Value

float?

HighReading

High sensor reading (only linear analog sensors, otherwise null)

public float? HighReading { get; set; }

Property Value

float?

LastReading

Last sensor reading (in C) or null if invalid

[Live]
public float? LastReading { get; set; }

Property Value

float?

LowReading

Low sensor reading (only linear analog sensors, otherwise null)

public float? LowReading { get; set; }

Property Value

float?

Name

Name of this sensor or null if not configured

public string? Name { get; set; }

Property Value

string

OffsetAdj

Offset adjustment (in K)

public float OffsetAdj { get; set; }

Property Value

float

Remarks

See also M308 U

Port

Port of this sensor or null if not applicable

public string? Port { get; set; }

Property Value

string

R25

Resistance of this sensor at 25C

public float? R25 { get; set; }

Property Value

float?

RRef

Series resistance of this sensor channel (only applicable for thermistors)

public float? RRef { get; set; }

Property Value

float?

SlopeAdj

Slope adjustment factor

public float SlopeAdj { get; set; }

Property Value

float

Remarks

See also M308 V

State

State of this sensor

public TemperatureError State { get; set; }

Property Value

TemperatureError

Type

Type of this sensor

public AnalogSensorType Type { get; set; }

Property Value

AnalogSensorType

Methods

Assign(IStaticModelObject)

Assign the properties from another instance. This is required to update model properties which do not have a setter

public void Assign(IStaticModelObject from)

Parameters

from IStaticModelObject

Other instance

Clone()

Clone this instance

public object Clone()

Returns

object

Cloned instance

Remarks

This method is auto-generated

UpdateFromJson(JsonElement, bool)

Update this instance from a given JSON element

public void UpdateFromJson(JsonElement jsonElement, bool ignoreSbcProperties)

Parameters

jsonElement JsonElement

Element to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data

UpdateFromJsonReader(ref Utf8JsonReader, bool)

Update this instance from a given JSON element

public void UpdateFromJsonReader(ref Utf8JsonReader reader, bool ignoreSbcProperties)

Parameters

reader Utf8JsonReader

Reader to update this intance from

ignoreSbcProperties bool

Whether SBC properties are ignored

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data