Characteristic | Locus |
---|---|
Inheritance | System.Object ObservableBase<UNIT> SamplingSensorBase<UNIT> > PollingSensorBase<UNIT> > ByteCommsSensorBase<UNIT> |
Implements | ISamplingSensor<UNIT> |
Inherited Members | SamplingSensorBase<UNIT>.samplingLock SamplingSensorBase<UNIT>.Updated SamplingSensorBase<UNIT>.SamplingTokenSource SamplingSensorBase<UNIT>.Conditions SamplingSensorBase<UNIT>.IsSampling SamplingSensorBase<UNIT>.UpdateInterval SamplingSensorBase<UNIT>.ReadSensor() SamplingSensorBase<UNIT>.RaiseEventsAndNotify(IChangeResult<UNIT>) SamplingSensorBase<UNIT>.Read() ObservableBase<UNIT>.observers ObservableBase<UNIT>.NotifyObservers(IChangeResult<UNIT>) ObservableBase<UNIT>.Subscribe(IObserver<IChangeResult<UNIT>>) ObservableBase<UNIT>.CreateObserver(Action<IChangeResult<UNIT>>, Nullable<Predicate<IChangeResult<UNIT>>>) |
Namespace | Meadow.Foundation |
Assembly | Meadow.Foundation.dll |
Syntax
public abstract class PollingSensorBase<UNIT> : SamplingSensorBase<UNIT>, ISamplingSensor<UNIT> where UNIT : struct
Type Parameters
Name | Description |
---|---|
UNIT |
Methods
StartUpdating(Nullable<TimeSpan>)
Starts updating the sensor on the updateInterval frequency specified.
This method also starts raising Updated
events and notifying
IObservable subscribers. Use the updateInterval
parameter
to specify how often events and notifications are raised/sent.
Declaration
public override void StartUpdating(TimeSpan? updateInterval = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<TimeSpan> | updateInterval | A |
Overrides
Meadow.Foundation.SamplingSensorBase<UNIT>.StartUpdating(System.Nullable<TimeSpan>)
StopUpdating()
Stops sampling the sensor
Declaration
public override void StopUpdating()
Overrides
Meadow.Foundation.SamplingSensorBase<UNIT>.StopUpdating()