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
C
C value of this sensor
public float? C { get; set; }
Property Value
HighReading
High sensor reading (only linear analog sensors, otherwise null)
public float? HighReading { get; set; }
Property Value
LastReading
Last sensor reading (in C) or null if invalid
[Live]
public float? LastReading { get; set; }
Property Value
LowReading
Low sensor reading (only linear analog sensors, otherwise null)
public float? LowReading { get; set; }
Property Value
Name
Name of this sensor or null if not configured
public string? Name { get; set; }
Property Value
OffsetAdj
Offset adjustment (in K)
public float OffsetAdj { get; set; }
Property Value
Remarks
See also M308 U
Port
Port of this sensor or null if not applicable
public string? Port { get; set; }
Property Value
R25
Resistance of this sensor at 25C
public float? R25 { get; set; }
Property Value
RRef
Series resistance of this sensor channel (only applicable for thermistors)
public float? RRef { get; set; }
Property Value
SlopeAdj
Slope adjustment factor
public float SlopeAdj { get; set; }
Property Value
Remarks
See also M308 V
State
State of this sensor
public TemperatureError State { get; set; }
Property Value
Type
Type of this sensor
public AnalogSensorType Type { get; set; }
Property Value
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
fromIStaticModelObjectOther 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
jsonElementJsonElementElement to update this intance from
ignoreSbcPropertiesboolWhether 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
readerUtf8JsonReaderReader to update this intance from
ignoreSbcPropertiesboolWhether SBC properties are ignored
Remarks
This method is auto-generated
Exceptions
- JsonException
Failed to deserialize data