Show / Hide Table of Contents

    Class Bmxx80Base

    Represents the core functionality of the Bmxx80 family.

    Inheritance
    Object
    Bmxx80Base
    Bme680
    Bmx280Base
    Implements
    IDisposable
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Iot.Device.Bmxx80
    Assembly: Iot.Device.Bmxx80.dll
    Syntax
    public abstract class Bmxx80Base : IDisposable

    Constructors

    | Improve this Doc View Source

    Bmxx80Base(Byte, I2cDevice)

    Initializes a new instance of the Bmxx80Base class.

    Declaration
    protected Bmxx80Base(byte deviceId, I2cDevice i2cDevice)
    Parameters
    Type Name Description
    Byte deviceId

    The ID of the device.

    I2cDevice i2cDevice

    The I2cDevice to create with.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the given I2cDevice is null.

    IOException

    Thrown when the device cannot be found on the bus.

    Properties

    | Improve this Doc View Source

    CommunicationProtocol1

    Gets or sets chosen communication protocol.

    Declaration
    protected Bmxx80Base.CommunicationProtocol CommunicationProtocol1 { get; set; }
    Property Value
    Type Description
    Bmxx80Base.CommunicationProtocol
    | Improve this Doc View Source

    ControlRegister

    Gets or sets control register of the sensor.

    Declaration
    protected byte ControlRegister { get; set; }
    Property Value
    Type Description
    Byte
    | Improve this Doc View Source

    I2cDevice

    Gets or sets I2C device used to communicate with the device.

    Declaration
    protected I2cDevice I2cDevice { get; set; }
    Property Value
    Type Description
    I2cDevice
    | Improve this Doc View Source

    PressureSampling

    Gets or sets the pressure sampling.

    Declaration
    public Sampling PressureSampling { get; set; }
    Property Value
    Type Description
    Sampling
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when the Sampling is set to an undefined mode.

    | Improve this Doc View Source

    TempCalibrationFactor

    The temperature calibration factor.

    Declaration
    protected virtual int TempCalibrationFactor { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    TemperatureFine

    Gets or sets TemperatureFine carries a fine resolution temperature value over to the pressure compensation formula and could be implemented as a global variable.

    Declaration
    protected double TemperatureFine { get; set; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    TemperatureSampling

    Gets or sets the temperature sampling.

    Declaration
    public Sampling TemperatureSampling { get; set; }
    Property Value
    Type Description
    Sampling
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when the Sampling is set to an undefined mode.

    Methods

    | Improve this Doc View Source

    ByteToSampling(Byte)

    Converts byte to Sampling.

    Declaration
    protected Sampling ByteToSampling(byte value)
    Parameters
    Type Name Description
    Byte value

    Value to convert.

    Returns
    Type Description
    Sampling

    Sampling

    | Improve this Doc View Source

    CompensateTemperature(Int32)

    Compensates the temperature.

    Declaration
    protected Temperature CompensateTemperature(int adcTemperature)
    Parameters
    Type Name Description
    Int32 adcTemperature

    The temperature value read from the device.

    Returns
    Type Description
    UnitsNet.Temperature

    The UnitsNet.Temperature.

    | Improve this Doc View Source

    Dispose()

    Cleanup.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Releases the unmanaged resources used by the Bmxx80 and optionally releases the managed resources.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    True to release both managed and unmanaged resources; false to release only unmanaged resources.

    | Improve this Doc View Source

    Read16BitsFromRegister(Byte, Bmxx80Base.Endianness)

    Reads a 16 bit value over I2C.

    Declaration
    protected ushort Read16BitsFromRegister(byte register, Bmxx80Base.Endianness endianness = Bmxx80Base.Endianness.LittleEndian)
    Parameters
    Type Name Description
    Byte register

    Register to read from.

    Bmxx80Base.Endianness endianness

    Interpretation of the bytes (big or little endian).

    Returns
    Type Description
    UInt16

    Value from register.

    | Improve this Doc View Source

    Read24BitsFromRegister(Byte, Bmxx80Base.Endianness)

    Reads a 24 bit value over I2C.

    Declaration
    protected uint Read24BitsFromRegister(byte register, Bmxx80Base.Endianness endianness = Bmxx80Base.Endianness.LittleEndian)
    Parameters
    Type Name Description
    Byte register

    Register to read from.

    Bmxx80Base.Endianness endianness

    Interpretation of the bytes (big or little endian).

    Returns
    Type Description
    UInt32

    Value from register.

    | Improve this Doc View Source

    Read8BitsFromRegister(Byte)

    Reads an 8 bit value from a register.

    Declaration
    protected byte Read8BitsFromRegister(byte register)
    Parameters
    Type Name Description
    Byte register

    Register to read from.

    Returns
    Type Description
    Byte

    Value from register.

    | Improve this Doc View Source

    Reset()

    When called, the device is reset using the complete power-on-reset procedure. The device will reset to the default configuration.

    Declaration
    public void Reset()
    | Improve this Doc View Source

    SetDefaultConfiguration()

    Sets the default configuration for the sensor.

    Declaration
    protected virtual void SetDefaultConfiguration()
    | Improve this Doc View Source

    TryReadPressure(out Pressure)

    Reads the pressure. A return value indicates whether the reading succeeded.

    Declaration
    public abstract bool TryReadPressure(out Pressure pressure)
    Parameters
    Type Name Description
    UnitsNet.Pressure pressure

    Contains the measured pressure if the PressureSampling was not set to Skipped. Contains NaN otherwise.

    Returns
    Type Description
    Boolean
    true
    if measurement was not skipped, otherwise
    false
    .
    | Improve this Doc View Source

    TryReadTemperature(out Temperature)

    Reads the temperature. A return value indicates whether the reading succeeded.

    Declaration
    public abstract bool TryReadTemperature(out Temperature temperature)
    Parameters
    Type Name Description
    UnitsNet.Temperature temperature

    Contains the measured temperature if the TemperatureSampling was not set to Skipped. Contains NaN otherwise.

    Returns
    Type Description
    Boolean
    true
    if measurement was not skipped, otherwise
    false
    .

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX