X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrok%2Flibsigrok.h;h=58216c2cdcb525329b505a19c30938ab7f083009;hb=c12ca361e724ed1e04c659420d74dd68efe345a9;hp=5d3d23c9963f102bf0aac1b7127a412bf784829a;hpb=1a7adeac29d6331b53a2c78fc9c70429b32da0bd;p=libsigrok.git diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 5d3d23c9..58216c2c 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -153,6 +153,7 @@ enum sr_datatype { SR_T_DOUBLE_RANGE, SR_T_INT32, SR_T_MQ, + SR_T_UINT32, /* Update sr_variant_type_get() (hwdriver.c) upon changes! */ }; @@ -528,9 +529,22 @@ struct sr_analog_encoding { gboolean is_float; gboolean is_bigendian; /** - * Number of significant digits after the decimal point if positive, - * or number of non-significant digits before the decimal point if - * negative (refers to the value we actually read on the wire). + * Number of significant digits after the decimal point, if positive. + * When negative, exponent with reversed polarity that is necessary to + * express the value with all digits without a decimal point. + * Refers to the value we actually read on the wire. + * + * Examples: + * + * | Disp. value | Exp. notation | Exp. not. normalized | digits | + * |-------------|---------------------|----------------------|--------| + * | 12.34 MOhm | 1.234 * 10^7 Ohm | 1234 * 10^4 Ohm | -4 | + * | 1.2345 MOhm | 1.2345 * 10^6 Ohm | 12345 * 10^2 Ohm | -2 | + * | 123.4 kOhm | 1.234 * 10^5 Ohm | 1234 * 10^2 Ohm | -2 | + * | 1234 Ohm | 1.234 * 10^3 Ohm | 1234 * 10^0 Ohm | 0 | + * | 12.34 Ohm | 1.234 * 10^1 Ohm | 1234 * 10^-2 Ohm | 2 | + * | 0.0123 Ohm | 1.23 * 10^-2 Ohm | 123 * 10^-4 Ohm | 4 | + * | 1.234 pF | 1.234 * 10^-12 F | 1234 * 10^-15 F | 15 | */ int8_t digits; gboolean is_digits_decimal; @@ -547,10 +561,22 @@ struct sr_analog_meaning { struct sr_analog_spec { /** - * Number of significant digits after the decimal point if positive, - * or number of non-significant digits before the decimal point if - * negative (refers to vendor specifications/datasheet or actual - * device display). + * Number of significant digits after the decimal point, if positive. + * When negative, exponent with reversed polarity that is necessary to + * express the value with all digits without a decimal point. + * Refers to vendor specifications/datasheet or actual device display. + * + * Examples: + * + * | On the wire | Exp. notation | Exp. not. normalized | spec_digits | + * |-------------|---------------------|----------------------|-------------| + * | 12.34 MOhm | 1.234 * 10^7 Ohm | 1234 * 10^4 Ohm | -4 | + * | 1.2345 MOhm | 1.2345 * 10^6 Ohm | 12345 * 10^2 Ohm | -2 | + * | 123.4 kOhm | 1.234 * 10^5 Ohm | 1234 * 10^2 Ohm | -2 | + * | 1234 Ohm | 1.234 * 10^3 Ohm | 1234 * 10^0 Ohm | 0 | + * | 12.34 Ohm | 1.234 * 10^1 Ohm | 1234 * 10^-2 Ohm | 2 | + * | 0.0123 Ohm | 1.23 * 10^-2 Ohm | 123 * 10^-4 Ohm | 4 | + * | 1.234 pF | 1.234 * 10^-12 F | 1234 * 10^-15 F | 15 | */ int8_t spec_digits; }; @@ -723,6 +749,12 @@ enum sr_configkey { /** The device can measure power. */ SR_CONF_POWERMETER, + /** + * The device can switch between multiple sources, e.g. a relay actuator + * or multiplexer. + */ + SR_CONF_MULTIPLEXER, + /* Update sr_key_info_config[] (hwdriver.c) upon changes! */ /*--- Driver scan options -------------------------------------------*/ @@ -778,6 +810,26 @@ enum sr_configkey { */ SR_CONF_FORCE_DETECT, + /** + * Override builtin probe names from user specs. + * + * Users may want to override the names which are assigned to + * probes during scan (these usually match the vendor's labels + * on the device). This avoids the interactive tedium of + * changing channel names after device creation and before + * protocol decoder attachment. Think of IEEE488 recorders or + * parallel computer bus loggers. The scan option eliminates + * the issue of looking up previously assigned names before + * renaming a channel (see sigrok-cli -C), which depends on + * the device as well as the application, and is undesirable. + * The scan option is limited to those drivers which implement + * support for it, but works identically across those drivers. + * + * The value is a string, either a comma separated list of + * probe names, or an alias for a typical set of names. + */ + SR_CONF_PROBE_NAMES, + /* Update sr_key_info_config[] (hwdriver.c) upon changes! */ /*--- Device (or channel group) configuration -----------------------*/