Enum SCD41Commands

java.lang.Object
java.lang.Enum<SCD41Commands>
dev.rablet.scd41.SCD41Commands
All Implemented Interfaces:
Serializable, Comparable<SCD41Commands>

public enum SCD41Commands extends Enum<SCD41Commands>
Enum for the supported SCD41 commands
  • Enum Constant Details

    • CMD_GET_SERIAL

      public static final SCD41Commands CMD_GET_SERIAL
      Command to get the serial number from SCD41
    • CMD_ONE_OFF_READING

      public static final SCD41Commands CMD_ONE_OFF_READING
      Command to get a one-off reading. Appears to result in inaccurate reads
    • CMD_READ_DATA

      public static final SCD41Commands CMD_READ_DATA
      Reads data from SCD41. Used to read data after sending a command
    • CMD_START_PERIODIC_MEASUREMENT

      public static final SCD41Commands CMD_START_PERIODIC_MEASUREMENT
      Starts periodic measurements
    • CMD_STOP_PERIODIC_MEASUREMENT

      public static final SCD41Commands CMD_STOP_PERIODIC_MEASUREMENT
      Stops preiodic measurements
    • CMD_DATA_READY

      public static final SCD41Commands CMD_DATA_READY
      Used to check if data is ready. Used after starting periodic measurements to determined when to read data
  • Method Details

    • values

      public static SCD41Commands[] 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

      public static SCD41Commands 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 name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the command for an enum
      Returns:
      int the sensor command