X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrok%2Flibsigrok.h;h=56b4f16f1342c8e4e1629266d441bebe691ef855;hb=3ea46116dea1636222ec528c2708d99adff1b4bc;hp=c029f1176f193a7c9aeb0af21f9dd5e2b573e20b;hpb=584560f142e1b17b9f4ef9069bd3724f2f77e750;p=libsigrok.git diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index c029f117..56b4f16f 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -201,6 +201,26 @@ enum sr_mq { SR_MQ_WIND_SPEED, /** Pressure */ SR_MQ_PRESSURE, + /** Parallel inductance (LCR meter model). */ + SR_MQ_PARALLEL_INDUCTANCE, + /** Parallel capacitance (LCR meter model). */ + SR_MQ_PARALLEL_CAPACITANCE, + /** Parallel resistance (LCR meter model). */ + SR_MQ_PARALLEL_RESISTANCE, + /** Serial inductance (LCR meter model). */ + SR_MQ_SERIAL_INDUCTANCE, + /** Serial capacitance (LCR meter model). */ + SR_MQ_SERIAL_CAPACITANCE, + /** Serial resistance (LCR meter model). */ + SR_MQ_SERIAL_RESISTANCE, + /** Dissipation factor. */ + SR_MQ_DISSIPATION_FACTOR, + /** Quality factor. */ + SR_MQ_QUALITY_FACTOR, + /** Phase angle. */ + SR_MQ_PHASE_ANGLE, + /** Difference from reference value. */ + SR_MQ_DIFFERENCE, }; /** Unit of measured quantity, sr_datafeed_analog.unit. */ @@ -264,6 +284,10 @@ enum sr_unit { SR_UNIT_HECTOPASCAL, /** Relative humidity assuming air temperature of 293 kelvin (%rF). */ SR_UNIT_HUMIDITY_293K, + /** Plane angle in 1/360th of a full circle. */ + SR_UNIT_DEGREE, + /** Henry (inductance). */ + SR_UNIT_HENRY, }; /** Values for sr_datafeed_analog.flags. */ @@ -314,6 +338,12 @@ enum sr_mqflag { SR_MQFLAG_DURATION = 0x20000, /** Device is in "avg" mode, averaging upon each new value. */ SR_MQFLAG_AVG = 0x40000, + /** Reference value shown. */ + SR_MQFLAG_REFERENCE = 0x80000, + /** Device selects the measured quantity automatically. */ + SR_MQFLAG_AUTOMQ = 0x100000, + /** Device selects the measurement model automatically. */ + SR_MQFLAG_AUTOMODEL = 0x200000, }; enum sr_trigger_matches { @@ -505,6 +535,11 @@ struct sr_config_info { char *description; }; +#define SR_CONF_GET (1 << 31) +#define SR_CONF_SET (1 << 30) +#define SR_CONF_LIST (1 << 29) +#define SR_CONF_MASK 0x1fffffff + /** Constants for device classes */ enum sr_configkey { /*--- Device classes ------------------------------------------------*/ @@ -539,6 +574,9 @@ enum sr_configkey { /** Programmable power supply. */ SR_CONF_POWER_SUPPLY, + /** LCR meter. */ + SR_CONF_LCR_METER, + /*--- Driver scan options -------------------------------------------*/ /** @@ -774,6 +812,9 @@ enum sr_configkey { /** Over-temperature protection (OTP) */ SR_CONF_OVER_TEMPERATURE_PROTECTION, + /** Output frequency in Hz. */ + SR_CONF_OUTPUT_FREQUENCY, + /*--- Special stuff -------------------------------------------------*/ /** Scan options supported by the driver. */ @@ -851,8 +892,6 @@ enum sr_configkey { struct sr_dev_inst { /** Device driver. */ struct sr_dev_driver *driver; - /** Index of device in driver. */ - int index; /** Device instance status. SR_ST_NOT_FOUND, etc. */ int status; /** Device instance type. SR_INST_USB, etc. */ @@ -863,6 +902,10 @@ struct sr_dev_inst { char *model; /** Device version. */ char *version; + /** Serial number. */ + char *serial_num; + /** Connection string to uniquely identify devices. */ + char *connection_id; /** List of channels. */ GSList *channels; /** List of sr_channel_group structs */