Class ByteCommsSensorBase<UNIT>
ByteCommsSensorBase abstract class
Assembly: Meadow.Foundation.dll
View Source
Declaration
public abstract class ByteCommsSensorBase<UNIT> : PollingSensorBase<UNIT>, IObservable<IChangeResult<UNIT>>, ISamplingSensor<UNIT>, ISensor<UNIT>, ISensor, ISamplingSensor, IDisposable where UNIT : struct
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Derived:
Implements:
System.IObservable<Meadow.IChangeResult<<UNIT>>>
, Meadow.Peripherals.Sensors.ISamplingSensor<<UNIT>>
, Meadow.Peripherals.Sensors.ISensor<<UNIT>>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
, System.IDisposable
Properties
BusComms
Bus communications object, i.e. an I2cCommunications or SpiCommunications
View Source
Declaration
protected IByteCommunications BusComms { get; set; }
ReadBuffer
The read buffer
View Source
Declaration
protected Memory<byte> ReadBuffer { get; }
WriteBuffer
The write buffer
View Source
Declaration
protected Memory<byte> WriteBuffer { get; }
Methods
Init(int, int)
Simple constructor for peripherals that don't use a bus and don't need an IByteCommunications
View Source
Declaration
protected virtual void Init(int readBufferSize = 8, int writeBufferSize = 8)
Parameters
Type | Name |
---|---|
System.Int32 | readBufferSize |
System.Int32 | writeBufferSize |
Dispose(bool)
Dispose of the object
View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
Declaration
public virtual void Dispose()
Implements
System.IObservable<Meadow.IChangeResult<<UNIT>>>
Meadow.Peripherals.Sensors.ISamplingSensor<<UNIT>>
Meadow.Peripherals.Sensors.ISensor<<UNIT>>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor
System.IDisposable