Skip to main content

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
Declaration
public class Y4000 : PollingSensorBase<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)>, IObservable<IChangeResult<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)>>, ISamplingSensor<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)>, ISensor<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)>, ISensor, ISamplingSensor, IDisposable

Inheritance: System.Object -> Meadow.Foundation.ObservableBase<UNIT>

Implements:
System.IObservable<Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>>, Meadow.Peripherals.Sensors.ISamplingSensor<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>, Meadow.Peripherals.Sensors.ISensor<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor, System.IDisposable

Properties

DissolvedOxygen

The current Dissolved Oxygen concentration

View Source
Declaration
public ConcentrationInWater? DissolvedOxygen { get; }

Chlorophyl

The current Chlorophyll concentration

View Source
Declaration
public ConcentrationInWater? Chlorophyl { get; }

BlueGreenAlgae

The current Blue Green Algae concentration

View Source
Declaration
public ConcentrationInWater? BlueGreenAlgae { get; }

ElectricalConductivity

The current Electrical Conductivity

View Source
Declaration
public Conductivity? ElectricalConductivity { get; }

PH

The current Potential Hydrogen (pH)

View Source
Declaration
public PotentialHydrogen? PH { get; }

Turbidity

The current Turbidity

View Source
Declaration
public Turbidity? Turbidity { get; }

OxidationReductionPotential

The current Oxidation Reduction Potential (redux)

View Source
Declaration
public Voltage? OxidationReductionPotential { get; }

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

ModbusAddress

The current modbus address

View Source
Declaration
public byte ModbusAddress { get; }

Methods

Initialize()

Initialize sensor

View Source
Declaration
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
Declaration
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
Declaration
public Task SetISDN(byte modbusAddress)
Returns

System.Threading.Tasks.Task

Parameters
TypeNameDescription
System.BytemodbusAddressThe address

GetSupplyVoltage()

Get the current supply voltage

View Source
Declaration
public Task<Voltage> GetSupplyVoltage()
Returns

System.Threading.Tasks.Task<Meadow.Units.Voltage>

GetSerialNumber()

Get the device serial number

View Source
Declaration
public Task<ushort[]> GetSerialNumber()
Returns

System.Threading.Tasks.Task<System.UInt16[]>: The serial number as a ushort array### GetVersion() Get the device version

View Source
Declaration
public Task<ushort[]> GetVersion()
Returns

System.Threading.Tasks.Task<System.UInt16[]>

GetBrushInterval()

Get the brush or wiper interval

View Source
Declaration
public Task<TimeSpan> GetBrushInterval()
Returns

System.Threading.Tasks.Task<System.TimeSpan>

SetBrushInterval(TimeSpan)

Set the brush or wiper interval (normalized to minutes)

View Source
Declaration
public Task SetBrushInterval(TimeSpan interval)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.TimeSpaninterval

StartBrush()

Start the brush or wiper

View Source
Declaration
public Task StartBrush()
Returns

System.Threading.Tasks.Task

GetErrorFlag()

Read the error flag from the sensor

View Source
Declaration
public Task<ushort> GetErrorFlag()
Returns

System.Threading.Tasks.Task<System.UInt16>

ReadSensor()

Reads data from the sensor

View Source
Declaration
protected override Task<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)> ReadSensor()
Returns

System.Threading.Tasks.Task<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>: The latest sensor reading### RaiseEventsAndNotify(IChangeResult<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)>) Raise events for subscribers and notify of value changes

View Source
Declaration
protected override void RaiseEventsAndNotify(IChangeResult<(ConcentrationInWater? DissolvedOxygen, ConcentrationInWater? Chlorophyl, ConcentrationInWater? BlueGreenAlgae, Conductivity? ElectricalConductivity, PotentialHydrogen? PH, Turbidity? Turbidity, Temperature? Temperature, Voltage? OxidationReductionPotential)> changeResult)
Parameters
TypeNameDescription
Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>changeResultThe updated sensor data

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
Declaration
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Events

DissolvedOxygenUpdated

Raised when the DissolvedOxygen value changes

View Source
Declaration
public event EventHandler<IChangeResult<ConcentrationInWater>> DissolvedOxygenUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ConcentrationInWater>>

ChlorophylUpdated

Raised when the Chlorophyll value changes

View Source
Declaration
public event EventHandler<IChangeResult<ConcentrationInWater>> ChlorophylUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ConcentrationInWater>>

BlueGreenAlgaeUpdated

Raised when the BlueGreenAlgae value changes

View Source
Declaration
public event EventHandler<IChangeResult<ConcentrationInWater>> BlueGreenAlgaeUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ConcentrationInWater>>

ElectricalConductivityUpdated

Raised when the ElectricalConductivity value changes

View Source
Declaration
public event EventHandler<IChangeResult<Conductivity>> ElectricalConductivityUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Conductivity>>

PHUpdated

Raised when the PotentialHydrogen (pH) value changes

View Source
Declaration
public event EventHandler<IChangeResult<PotentialHydrogen>> PHUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.PotentialHydrogen>>

TurbidityUpdated

Raised when the Turbidity value changes

View Source
Declaration
public event EventHandler<IChangeResult<Turbidity>> TurbidityUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Turbidity>>

TemperatureUpdated

Raised when the Temperature value changes

View Source
Declaration
public event EventHandler<IChangeResult<Temperature>> TemperatureUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Temperature>>

OxidationReductionPotentialUpdated

Raised when the OxidationReductionPotential (redux) value changes

View Source
Declaration
public event EventHandler<IChangeResult<Voltage>> OxidationReductionPotentialUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Voltage>>

Implements

  • System.IObservable<Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>>
  • Meadow.Peripherals.Sensors.ISamplingSensor<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>
  • Meadow.Peripherals.Sensors.ISensor<System.ValueTuple<System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.ConcentrationInWater>,System.Nullable<Meadow.Units.Conductivity>,System.Nullable<Meadow.Units.PotentialHydrogen>,System.Nullable<Meadow.Units.Turbidity>,System.Nullable<Meadow.Units.Temperature>,System.ValueTuple<System.Nullable<Meadow.Units.Voltage>>>>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor
  • System.IDisposable