]> sigrok.org Git - libsigrok.git/blobdiff - include/libsigrok/libsigrok.h
libsigrok.h: Add SR_MQ_POWER_FACTOR and SR_MQ_APPARENT_POWER.
[libsigrok.git] / include / libsigrok / libsigrok.h
index c0ec19fff226ef041fb2c25c31117f9f2811ba6d..7f37d4de6317fc198eee1555fa624150463b22b1 100644 (file)
@@ -76,6 +76,7 @@ enum sr_error_code {
        SR_ERR_TIMEOUT       = -8, /**< A timeout occurred. */
        SR_ERR_CHANNEL_GROUP = -9, /**< A channel group must be specified. */
        SR_ERR_DATA          =-10, /**< Data is invalid.  */
+       SR_ERR_IO            =-11, /**< Input/output error. */
 
        /*
         * Note: When adding entries here, don't forget to also update the
@@ -223,6 +224,12 @@ enum sr_mq {
        SR_MQ_PHASE_ANGLE,
        /** Difference from reference value. */
        SR_MQ_DIFFERENCE,
+       /** Count. */
+       SR_MQ_COUNT,
+       /** Power factor. */
+       SR_MQ_POWER_FACTOR,
+       /** Apparent power */
+       SR_MQ_APPARENT_POWER,
 };
 
 /** Unit of measured quantity, sr_datafeed_analog.unit. */
@@ -528,6 +535,8 @@ enum sr_channeltype {
 
 /** Information on single channel. */
 struct sr_channel {
+       /** The device this channel is attached to. */
+       struct sr_dev_inst *sdi;
        /** The index of this channel, starting at 0. Logic channels will
         * be encoded according to this index in SR_DF_LOGIC packets. */
        int index;
@@ -703,8 +712,8 @@ enum sr_configkey {
        /** The device supports setting its sample interval, in ms. */
        SR_CONF_SAMPLE_INTERVAL,
 
-       /** Number of timebases, as related to SR_CONF_TIMEBASE.  */
-       SR_CONF_NUM_TIMEBASE,
+       /** Number of horizontal divisions, as related to SR_CONF_TIMEBASE. */
+       SR_CONF_NUM_HDIV,
 
        /** Number of vertical divisions, as related to SR_CONF_VDIV.  */
        SR_CONF_NUM_VDIV,
@@ -905,6 +914,9 @@ enum sr_configkey {
         */
        SR_CONF_DATA_SOURCE,
 
+       /** The device supports setting a probe factor. */
+       SR_CONF_PROBE_FACTOR,
+
        /*--- Acquisition modes, sample limiting ----------------------------*/
 
        /**