Package dev.rablet.scd41
Enum SCD41Commands
- All Implemented Interfaces:
Serializable,Comparable<SCD41Commands>
Enum for the supported SCD41 commands
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUsed to check if data is ready.Command to get the serial number from SCD41Command to get a one-off reading.Reads data from SCD41.Starts periodic measurementsStops preiodic measurements -
Method Summary
Modifier and TypeMethodDescriptionintgetValue()Get the command for an enumstatic SCD41CommandsReturns the enum constant of this type with the specified name.static SCD41Commands[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CMD_GET_SERIAL
Command to get the serial number from SCD41 -
CMD_ONE_OFF_READING
Command to get a one-off reading. Appears to result in inaccurate reads -
CMD_READ_DATA
Reads data from SCD41. Used to read data after sending a command -
CMD_START_PERIODIC_MEASUREMENT
Starts periodic measurements -
CMD_STOP_PERIODIC_MEASUREMENT
Stops preiodic measurements -
CMD_DATA_READY
Used to check if data is ready. Used after starting periodic measurements to determined when to read data
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getValue
public int getValue()Get the command for an enum- Returns:
- int the sensor command
-