Package com.diozero.devices
Enum BMP180.BMPMode
- java.lang.Object
-
- java.lang.Enum<BMP180.BMPMode>
-
- com.diozero.devices.BMP180.BMPMode
-
- All Implemented Interfaces:
Serializable
,Comparable<BMP180.BMPMode>
- Enclosing class:
- BMP180
public static enum BMP180.BMPMode extends Enum<BMP180.BMPMode>
Relationship between sampling mode and conversion delay (in ms) for each sampling mode Ultra low power: 4.5 ms minimum conversion delay Standard: 7.5 ms High Resolution: 13.5 ms Ultra high Resolution: 25.5 ms
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HIGH_RESOLUTION
STANDARD
ULTRA_HIGH_RESOLUTION
ULTRA_LOW_POWER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDelay()
Return the conversion delay (in ms) associated with this sampling modebyte
getPressureCommand()
Return the pressure command to the control register for this sampling modeint
getSamplingMode()
Return this sampling modestatic BMP180.BMPMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static BMP180.BMPMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ULTRA_LOW_POWER
public static final BMP180.BMPMode ULTRA_LOW_POWER
-
STANDARD
public static final BMP180.BMPMode STANDARD
-
HIGH_RESOLUTION
public static final BMP180.BMPMode HIGH_RESOLUTION
-
ULTRA_HIGH_RESOLUTION
public static final BMP180.BMPMode ULTRA_HIGH_RESOLUTION
-
-
Method Detail
-
values
public static BMP180.BMPMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BMP180.BMPMode c : BMP180.BMPMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BMP180.BMPMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDelay
public int getDelay()
Return the conversion delay (in ms) associated with this sampling mode- Returns:
- delay
-
getPressureCommand
public byte getPressureCommand()
Return the pressure command to the control register for this sampling mode- Returns:
- command
-
getSamplingMode
public int getSamplingMode()
Return this sampling mode- Returns:
- Sampling mode
-
-