Class Y4000
Represents a Yosemitech Y4000 Multiparameter Sonde water quality sensor for dissolved oxygen, conductivity, turbidity, pH, chlorophyll, blue green algae, chlorophyll, and temperature
Assembly: Y4000.dll
View Source
public class Y4000 : IDisposable, IY4000, IWaterQualityConcentrationsSensor, ISamplingSensor<WaterQualityConcentrations>, ISensor<WaterQualityConcentrations>, IElectricalConductivitySensor, ISamplingSensor<Conductivity>, ISensor<Conductivity>, IPotentialHydrogenSensor, ISamplingSensor<PotentialHydrogen>, ISensor<PotentialHydrogen>, ITurbiditySensor, ISamplingSensor<Turbidity>, ISensor<Turbidity>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, IRedoxPotentialSensor, ISamplingSensor<Voltage>, ISensor<Voltage>, ISensor, ISamplingSensor
Implements:
Expand
System.IDisposable
, Meadow.Foundation.Sensors.Environmental.IY4000, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Voltage>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Voltage>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
Properties
UpdateInterval
A TimeSpan
that specifies how long to wait between readings
View Source
public TimeSpan UpdateInterval { get; }
IsSampling
Gets a value indicating whether the sensor is currently sampling
View Source
public bool IsSampling { get; }
IsDisposed
Is the object disposed
View Source
public bool IsDisposed { get; }
ModbusAddress
The current modbus address
View Source
public byte ModbusAddress { get; }
Fields
DefaultBaudRate
The default baud rate for communicating with the device
View Source
public const int DefaultBaudRate = 9600
Methods
StartUpdating(TimeSpan?)
Starts updating the sensor on the updateInterval frequency specified
View Source
public void StartUpdating(TimeSpan? updateInterval)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.TimeSpan> | updateInterval | A TimeSpan that specifies how long to |
wait between readings |
StopUpdating()
Stops sampling the sensor
View Source
public void StopUpdating()
ReadSensor()
Reads all measurements of the sensor
View Source
public Task<Y4000.Measurements?> ReadSensor()
Returns
System.Threading.Tasks.Task<System.Nullable<Meadow.Foundation.Sensors.Environmental.Y4000.Measurements>>
Initialize()
Initialize sensor
View Source
public Task Initialize()
Returns
System.Threading.Tasks.Task
GetISDN()
Get the device ISDN (address) of the sensor Note this is a broadcast event so all Y4000 devices on the bus will respond
View Source
public Task<byte> GetISDN()
Returns
System.Threading.Tasks.Task<System.Byte>
: The address as a byte### SetISDN(byte)
Set the ISDN (address) of the sensor
View Source
public Task SetISDN(byte modbusAddress)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name | Description |
---|---|---|
System.Byte | modbusAddress | The address |
GetSupplyVoltage()
Get the current supply voltage
View Source
public Task<Voltage> GetSupplyVoltage()
Returns
System.Threading.Tasks.Task<Meadow.Units.Voltage>
GetSerialNumber()
Get the device serial number
View Source
public Task<string> GetSerialNumber()
Returns
System.Threading.Tasks.Task<System.String>
: The serial number### GetVersion()
Get the device version
View Source
public Task<ushort[]> GetVersion()
Returns
System.Threading.Tasks.Task<System.UInt16[]>
GetBrushInterval()
Get the brush or wiper interval
View Source
public Task<TimeSpan> GetBrushInterval()
Returns
System.Threading.Tasks.Task<System.TimeSpan>
SetBrushInterval(TimeSpan)
Set the brush or wiper interval (normalized to minutes)
View Source
public Task SetBrushInterval(TimeSpan interval)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.TimeSpan | interval |
StartBrush()
Start the brush or wiper
View Source
public Task StartBrush()
Returns
System.Threading.Tasks.Task
GetErrorFlag()
Read the error flag from the sensor
View Source
public Task<ushort> GetErrorFlag()
Returns
System.Threading.Tasks.Task<System.UInt16>
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
public void Dispose()
Dispose(bool)
Dispose of the object
View Source
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
Implements
System.IDisposable
- Meadow.Foundation.Sensors.Environmental.IY4000
- Meadow.Foundation.Sensors.Environmental.IWaterQualityConcentrationsSensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Foundation.Sensors.Environmental.WaterQualityConcentrations>
Meadow.Peripherals.Sensors.ISensor<Meadow.Foundation.Sensors.Environmental.WaterQualityConcentrations>
Meadow.Peripherals.Sensors.IElectricalConductivitySensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Conductivity>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Conductivity>
Meadow.Peripherals.Sensors.Environmental.IPotentialHydrogenSensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.PotentialHydrogen>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.PotentialHydrogen>
Meadow.Peripherals.Sensors.Environmental.ITurbiditySensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Turbidity>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Turbidity>
Meadow.Peripherals.Sensors.ITemperatureSensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Temperature>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Temperature>
- Meadow.Foundation.Sensors.Environmental.IRedoxPotentialSensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Voltage>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Voltage>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor