+ SR_UNIT_BOOLEAN,
+ SR_UNIT_SECOND,
+ /** Unit of conductance, the inverse of resistance. */
+ SR_UNIT_SIEMENS,
+ /**
+ * An absolute measurement of power, in decibels, referenced to
+ * 1 milliwatt (dBu).
+ */
+ SR_UNIT_DECIBEL_MW,
+ /** Voltage in decibel, referenced to 1 volt (dBV). */
+ SR_UNIT_DECIBEL_VOLT,
+ /**
+ * Measurements that intrinsically do not have units attached, such
+ * as ratios, gains, etc. Specifically, a transistor's gain (hFE) is
+ * a unitless quantity, for example.
+ */
+ SR_UNIT_UNITLESS,
+ /** Sound pressure level relative so 20 micropascals. */
+ SR_UNIT_DECIBEL_SPL,
+ /**
+ * Normalized (0 to 1) concentration of a substance or compound with 0
+ * representing a concentration of 0%, and 1 being 100%. This is
+ * represented as the fraction of number of particles of the substance.
+ */
+ SR_UNIT_CONCENTRATION,
+ SR_UNIT_REVOLUTIONS_PER_MINUTE,
+ SR_UNIT_VOLT_AMPERE,
+ SR_UNIT_WATT,
+ SR_UNIT_WATT_HOUR,
+};
+
+/** Values for sr_datafeed_analog.flags. */
+enum {
+ /** Voltage measurement is alternating current (AC). */
+ SR_MQFLAG_AC = 0x01,
+ /** Voltage measurement is direct current (DC). */
+ SR_MQFLAG_DC = 0x02,
+ /** This is a true RMS measurement. */
+ SR_MQFLAG_RMS = 0x04,
+ /** Value is voltage drop across a diode, or NAN. */
+ SR_MQFLAG_DIODE = 0x08,
+ /** Device is in "hold" mode (repeating the last measurement). */
+ SR_MQFLAG_HOLD = 0x10,
+ /** Device is in "max" mode, only updating upon a new max value. */
+ SR_MQFLAG_MAX = 0x20,
+ /** Device is in "min" mode, only updating upon a new min value. */
+ SR_MQFLAG_MIN = 0x40,
+ /** Device is in autoranging mode. */
+ SR_MQFLAG_AUTORANGE = 0x80,
+ /** Device is in relative mode. */
+ SR_MQFLAG_RELATIVE = 0x100,
+ /** Sound pressure level is A-weighted in the frequency domain,
+ * according to IEC 61672:2003. */
+ SR_MQFLAG_SPL_FREQ_WEIGHT_A = 0x200,
+ /** Sound pressure level is C-weighted in the frequency domain,
+ * according to IEC 61672:2003. */
+ SR_MQFLAG_SPL_FREQ_WEIGHT_C = 0x400,
+ /** Sound pressure level is Z-weighted (i.e. not at all) in the
+ * frequency domain, according to IEC 61672:2003. */
+ SR_MQFLAG_SPL_FREQ_WEIGHT_Z = 0x800,
+ /** Sound pressure level is not weighted in the frequency domain,
+ * albeit without standards-defined low and high frequency limits. */
+ SR_MQFLAG_SPL_FREQ_WEIGHT_FLAT = 0x1000,
+ /** Sound pressure level measurement is S-weighted (1s) in the
+ * time domain. */
+ SR_MQFLAG_SPL_TIME_WEIGHT_S = 0x2000,
+ /** Sound pressure level measurement is F-weighted (125ms) in the
+ * time domain. */
+ SR_MQFLAG_SPL_TIME_WEIGHT_F = 0x4000,
+ /** Sound pressure level is time-averaged (LAT), also known as
+ * Equivalent Continuous A-weighted Sound Level (LEQ). */
+ SR_MQFLAG_SPL_LAT = 0x8000,
+ /** Sound pressure level represented as a percentage of measurements
+ * that were over a preset alarm level. */
+ SR_MQFLAG_SPL_PCT_OVER_ALARM = 0x10000,