]> sigrok.org Git - libsigrok.git/commitdiff
Publish config key capabilities.
authorBert Vermeulen <redacted>
Wed, 17 Sep 2014 13:28:29 +0000 (15:28 +0200)
committerBert Vermeulen <redacted>
Wed, 17 Sep 2014 13:36:11 +0000 (15:36 +0200)
Every driver now publishes its device option config keys, i.e. the
list fetched with sr_config_list(SR_CONF_DEVICE_OPTIONS), with a
set of flags indicating which methods are implemented by the driver
for that key.

The config keys are OR'ed with any combination of SR_CONF_GET,
SR_CONF_SET and SR_CONF_LIST. These are defined as the high bits
of the uint32_t config key. Clients can OR config keys with
SR_CONF_MASK to strip out these bits. This mask will be kept up to
date if other bits are added to the capabilities list; clients MUST
therefore use SR_CONF_MASK for this.

Some keys don't have capability bits added, such as the informative
device type keys (SR_CONF_MULTIMETER, SR_CONF_OSCILLOSCOPE, ...) and
SR_CONF_CONTINUOUS.

Scan options do not have capabilities bits.

43 files changed:
include/libsigrok/libsigrok.h
src/hardware/agilent-dmm/api.c
src/hardware/appa-55ii/api.c
src/hardware/asix-sigma/asix-sigma.c
src/hardware/atten-pps3xxx/api.c
src/hardware/beaglelogic/api.c
src/hardware/brymen-bm86x/api.c
src/hardware/brymen-dmm/api.c
src/hardware/cem-dt-885x/api.c
src/hardware/center-3xx/api.c
src/hardware/chronovu-la/api.c
src/hardware/colead-slm/api.c
src/hardware/conrad-digi-35-cpu/api.c
src/hardware/demo/demo.c
src/hardware/fluke-dmm/api.c
src/hardware/fx2lafw/api.c
src/hardware/gmc-mh-1x-2x/api.c
src/hardware/hameg-hmo/protocol.c
src/hardware/hantek-dso/api.c
src/hardware/ikalogic-scanalogic2/api.c
src/hardware/ikalogic-scanaplus/api.c
src/hardware/kecheng-kc-330b/api.c
src/hardware/lascar-el-usb/api.c
src/hardware/link-mso19/api.c
src/hardware/manson-hcs-3xxx/api.c
src/hardware/mic-985xx/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/norma-dmm/api.c
src/hardware/openbench-logic-sniffer/api.c
src/hardware/pipistrello-ols/api.c
src/hardware/rigol-ds/api.c
src/hardware/saleae-logic16/api.c
src/hardware/scpi-pps/profiles.c
src/hardware/serial-dmm/api.c
src/hardware/sysclk-lwla/api.c
src/hardware/teleinfo/api.c
src/hardware/testo/api.c
src/hardware/tondaj-sl-814/api.c
src/hardware/uni-t-dmm/api.c
src/hardware/uni-t-ut32x/api.c
src/hardware/victor-dmm/api.c
src/hardware/yokogawa-dlm/protocol.c
src/hardware/zeroplus-logic-cube/api.c

index c029f1176f193a7c9aeb0af21f9dd5e2b573e20b..4f3510d8c6569f3b52e3aad2d37fd28c1cd6397b 100644 (file)
@@ -505,6 +505,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 ------------------------------------------------*/
index e6652a6dfd1953135e778e94fcabefb6c65445ca..1c18c99c6c47135fd8103277a224cd13849ddb68 100644 (file)
@@ -34,9 +34,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 extern const struct agdmm_job agdmm_jobs_u12xx[];
index 5bc16310f5b3ef0940af7fe4df34762e2b65cbd2..c9169f331ef3acbfff8a0231ae2079808d54d838 100644 (file)
@@ -27,10 +27,10 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_THERMOMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
-       SR_CONF_DATA_SOURCE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const char *data_sources[] = {
index 37620c7237f436197dcc8fdb6f3a30f9474c69ec..d0f06603a2009ec02b5a86b9db0e93cab4fcacd9 100644 (file)
@@ -73,10 +73,11 @@ static const char *channel_names[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_CAPTURE_RATIO,
-       SR_CONF_LIMIT_MSEC,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const int32_t trigger_matches[] = {
index 0df8bcf0fe2d877e9edb67de5450a1761e84047d..d901649a20c1434f61eeb5c9033d1b7344db92e4 100644 (file)
@@ -39,16 +39,16 @@ static const uint32_t scanopts[] = {
 static const uint32_t devopts[] = {
        SR_CONF_POWER_SUPPLY,
        SR_CONF_CONTINUOUS,
-       SR_CONF_OUTPUT_CHANNEL_CONFIG,
-       SR_CONF_OVER_CURRENT_PROTECTION_ENABLED,
+       SR_CONF_OUTPUT_CHANNEL_CONFIG | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const uint32_t devopts_cg[] = {
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_VOLTAGE_MAX,
-       SR_CONF_OUTPUT_CURRENT,
-       SR_CONF_OUTPUT_CURRENT_MAX,
-       SR_CONF_OUTPUT_ENABLED,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const char *channel_modes[] = {
index 3f83a9168b4b68d2520eba870b1a47fa95814687..9732311de386cc655257d94f40add7d07ae3b0ac 100644 (file)
@@ -31,13 +31,11 @@ static const uint32_t scanopts[] = {
 /* Hardware capabilities */
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
-
-       SR_CONF_NUM_LOGIC_CHANNELS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET,
 };
 
 /* Trigger matching capabilities */
index dee492af65fe7c7f843087068c9e96f10ccc4df0..d56b76ae514a3aa9ec83ec51f9ad26f8e5c0644f 100644 (file)
@@ -27,9 +27,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver brymen_bm86x_driver_info;
index 44c9286d1227247521636c36617a6f0cab73c2d8..513342172a8418333b6ce8fd21cc404ed76da1cb 100644 (file)
@@ -26,9 +26,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
-       SR_CONF_LIMIT_MSEC,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver brymen_bm857_driver_info;
index b4bfe861f58f2f97d5832358e92bbf8e4562db42..b77f471f17af35b9db7c090d9ad58e77dcbe85c2 100644 (file)
@@ -30,16 +30,16 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_SOUNDLEVELMETER,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
-       SR_CONF_SPL_WEIGHT_FREQ,
-       SR_CONF_SPL_WEIGHT_TIME,
-       SR_CONF_SPL_MEASUREMENT_RANGE,
-       SR_CONF_DATALOG,
-       SR_CONF_HOLD_MAX,
-       SR_CONF_HOLD_MIN,
-       SR_CONF_POWER_OFF,
-       SR_CONF_DATA_SOURCE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SPL_WEIGHT_FREQ | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SPL_WEIGHT_TIME | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SPL_MEASUREMENT_RANGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_HOLD_MAX | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_HOLD_MIN | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const char *weight_freq[] = {
index 1594724aa78f32872cc8ff4bc256dc1822137f7b..9a43323da3d8a9f451b7b49e001e20005517c088 100644 (file)
@@ -27,9 +27,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_THERMOMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 static const char *channel_names[] = {
index ae977a4b96ec39e59722bee9d3f00683b44e8c52..4edeedfc93cc6592a77b2c68a91ea48bd204eb64 100644 (file)
@@ -25,10 +25,10 @@ static struct sr_dev_driver *di = &chronovu_la_driver_info;
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_LIMIT_MSEC, /* TODO: Not yet implemented. */
-       SR_CONF_LIMIT_SAMPLES, /* TODO: Not yet implemented. */
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
 };
 
 static const int32_t trigger_matches[] = {
index d299693f95b49be54694c2c8bc7958b47bdd8d79..0f4225e5c93af561d2d499f0d9d8d2edf0ee2f81 100644 (file)
@@ -37,9 +37,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_SOUNDLEVELMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver colead_slm_driver_info;
index 36a9c3fdd8d5ba9869e94a3fd66e0949c0810374..f0bb236638a0cb9b4a9db9d9d953e35ef69ac862 100644 (file)
@@ -33,10 +33,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_POWER_SUPPLY,
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_CURRENT,
-       /* There's no SR_CONF_OUTPUT_ENABLED; can't know/set status remotely. */
-       SR_CONF_OVER_CURRENT_PROTECTION_ENABLED,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_SET,
+       SR_CONF_OUTPUT_CURRENT | SR_CONF_SET,
+       SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver conrad_digi_35_cpu_driver_info;
@@ -150,7 +149,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                }
                ret = send_msg1(sdi, 'C', (int) (dblval * 100 + 0.5));
                break;
-       /* No SR_CONF_OUTPUT_ENABLED :-( . */
        case SR_CONF_OVER_CURRENT_PROTECTION_ENABLED:
                if (g_variant_get_boolean(data))
                        ret = send_msg1(sdi, 'V', 900);
index d2fddde466751c1eb17b57e5d7b06e9b26127a29..2609aa5fe283543e8614e2d9b6830cf3a1c2a959 100644 (file)
@@ -135,11 +135,15 @@ static const uint32_t scanopts[] = {
 
 static const int devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_DEMO_DEV,
-       SR_CONF_SAMPLERATE,
        SR_CONF_CONTINUOUS,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
+       SR_CONF_DEMO_DEV,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET,
+       SR_CONF_NUM_ANALOG_CHANNELS | SR_CONF_GET,
+       SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const int devopts_cg_logic[] = {
index 91c6bd7b9e0e0e098c75a3f89dc3de7b6a06acb2..9c5d4b559536a607b880f45788f3c6b8daf28fef 100644 (file)
@@ -34,9 +34,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver flukedmm_driver_info;
index b73f871fc6b46232fe1a81e5205eb5b40c607f78..18a34df659ab5daed4fe71b1529a1a81b27ceab4 100644 (file)
@@ -79,12 +79,11 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_SAMPLERATE,
-
-       /* These are really implemented in the driver, not the hardware. */
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
+       SR_CONF_CONN | SR_CONF_GET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
 };
 
 static const char *channel_names[] = {
index e8914244380c74233d4adac89c35f6f365a729ef..4574dfea72d7d8f79d3db665713b82e2ebd4aa2f 100644 (file)
@@ -43,19 +43,19 @@ static const uint32_t scanopts[] = {
 static const uint32_t devopts_sm[] = {
        SR_CONF_MULTIMETER,
        SR_CONF_THERMOMETER,    /**< All GMC 1x/2x multimeters seem to support this */
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
 };
 
 /** Hardware capabilities for Metrahit 2x devices in bidirectional Mode. */
 static const uint32_t devopts_bd[] = {
        SR_CONF_MULTIMETER,
        SR_CONF_THERMOMETER,    /**< All GMC 1x/2x multimeters seem to support this */
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
-       SR_CONF_POWER_OFF,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET,
 };
 
 
@@ -463,7 +463,7 @@ static int config_list_common(uint32_t key, GVariant **data, const struct sr_dev
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                                                 scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
+                               scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
                break;
        default:
                return SR_ERR_NA;
@@ -479,7 +479,7 @@ static int config_list_sm(uint32_t key, GVariant **data, const struct sr_dev_ins
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                                                 devopts_sm, ARRAY_SIZE(devopts_sm), sizeof(uint32_t));
+                               devopts_sm, ARRAY_SIZE(devopts_sm), sizeof(uint32_t));
                break;
        default:
                return config_list_common(key, data, sdi, cg);
@@ -495,7 +495,7 @@ static int config_list_bd(uint32_t key, GVariant **data, const struct sr_dev_ins
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                                                 devopts_bd, ARRAY_SIZE(devopts_bd), sizeof(uint32_t));
+                               devopts_bd, ARRAY_SIZE(devopts_bd), sizeof(uint32_t));
                break;
        default:
                return config_list_common(key, data, sdi, cg);
index 8c80204fca024952bf9d7166a78da44d5a5f6dc3..c97658ea441990a5563ff582861349d3a180e7c6 100644 (file)
@@ -47,19 +47,19 @@ static const char *hameg_scpi_dialect[] = {
 
 static const uint32_t hmo_devopts[] = {
        SR_CONF_OSCILLOSCOPE,
-       SR_CONF_TRIGGER_SOURCE,
-       SR_CONF_TIMEBASE,
-       SR_CONF_NUM_TIMEBASE,
-       SR_CONF_TRIGGER_SLOPE,
-       SR_CONF_HORIZ_TRIGGERPOS,
-       SR_CONF_SAMPLERATE,
        SR_CONF_LIMIT_FRAMES,
+       SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET,
 };
 
 static const uint32_t hmo_analog_devopts[] = {
-       SR_CONF_NUM_VDIV,
-       SR_CONF_COUPLING,
-       SR_CONF_VDIV,
+       SR_CONF_NUM_VDIV | SR_CONF_GET,
+       SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const char *hmo_coupling_options[] = {
index abc3c08efeee2dece29226fb84ffd01c9d2980cc..e0e05df5ef268bc62ea67989eaa606db2c4e3e0f 100644 (file)
@@ -46,18 +46,19 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_OSCILLOSCOPE,
-       SR_CONF_LIMIT_FRAMES,
        SR_CONF_CONTINUOUS,
-       SR_CONF_TIMEBASE,
-       SR_CONF_BUFFERSIZE,
-       SR_CONF_TRIGGER_SOURCE,
-       SR_CONF_TRIGGER_SLOPE,
-       SR_CONF_HORIZ_TRIGGERPOS,
-       SR_CONF_FILTER,
-       SR_CONF_VDIV,
-       SR_CONF_COUPLING,
-       SR_CONF_NUM_TIMEBASE,
-       SR_CONF_NUM_VDIV,
+       SR_CONF_CONN | SR_CONF_GET,
+       SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+       SR_CONF_TIMEBASE | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_BUFFERSIZE | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SOURCE | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_SET,
+       SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+       SR_CONF_FILTER | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_VDIV | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_COUPLING | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+       SR_CONF_NUM_VDIV | SR_CONF_GET,
 };
 
 static const char *channel_names[] = {
index 44eb47552a4a3e75190b0f0a67675f7a85e9c233..81756d76aab84edc076d29d6a2683e5b3c37c6a6 100644 (file)
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_CAPTURE_RATIO,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const int32_t trigger_matches[] = {
index 0ba0d3c9b424960531428418ba58331102837d18..02d5c0432b088e829c420dec499113ea8a8ffc67 100644 (file)
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_LIMIT_MSEC,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_CONTINUOUS, // TODO?
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 /* Channels are numbered 1-9. */
index 30d3247ec57dc563eb84f9a138822e9abf781e14..0dbf198a5f234882b9344c8da5deabce36639ee3 100644 (file)
 
 static const uint32_t devopts[] = {
        SR_CONF_SOUNDLEVELMETER,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
-       SR_CONF_DATALOG,
-       SR_CONF_SPL_WEIGHT_FREQ,
-       SR_CONF_SPL_WEIGHT_TIME,
-       SR_CONF_DATA_SOURCE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SAMPLE_INTERVAL | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_DATALOG | SR_CONF_GET,
+       SR_CONF_SPL_WEIGHT_FREQ | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SPL_WEIGHT_TIME | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 SR_PRIV const uint64_t kecheng_kc_330b_sample_intervals[][2] = {
index 5c615cceb2eafb37fc4f753340685d94e5dfb6da..731415613ddab0364645b6b4d6cb236821c89beb 100644 (file)
@@ -33,8 +33,9 @@ static const uint32_t scanopts[] = {
 static const uint32_t devopts[] = {
        SR_CONF_THERMOMETER,
        SR_CONF_HYGROMETER,
-       SR_CONF_DATALOG,
-       SR_CONF_LIMIT_SAMPLES,
+       SR_CONF_CONN | SR_CONF_GET,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
 };
 
 static int init(struct sr_context *sr_ctx)
index 7beb15ca6c644178813cae4d241c790c1101132e..08fcb4b74ac347a9b4dc09ec293061cba506e8fb 100644 (file)
 static const uint32_t devopts[] = {
        SR_CONF_OSCILLOSCOPE,
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_TYPE,
-       SR_CONF_TRIGGER_SLOPE,
-       SR_CONF_HORIZ_TRIGGERPOS,
-//      SR_CONF_CAPTURE_RATIO,
-       SR_CONF_LIMIT_SAMPLES,
-//      SR_CONF_RLE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_TYPE | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_SET,
+       SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+       SR_CONF_CAPTURE_RATIO | SR_CONF_SET,
+       SR_CONF_RLE | SR_CONF_SET,
 };
 
 /*
index ce6b6f32e8fa1b565aeb6ca82d820dd165fe5d97..58fe7e1f9df40f92c93f9ac066577e580707ad7f 100644 (file)
@@ -35,15 +35,15 @@ static const uint32_t devopts[] = {
        /* Device class */
        SR_CONF_POWER_SUPPLY,
        /* Aquisition modes. */
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
        /* Device configuration */
-       SR_CONF_OUTPUT_CURRENT,
-       SR_CONF_OUTPUT_CURRENT_MAX,
-       SR_CONF_OUTPUT_ENABLED,
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_VOLTAGE_MAX,
+       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 /* Note: All models have one power supply output only. */
index 10f114e4ec821dd2a86030f297022024adc26e87..8f9dd5cbef7ad301bb27197ebd2604ef04ef35a6 100644 (file)
@@ -28,9 +28,9 @@ static const uint32_t scanopts[] = {
 static const uint32_t devopts[] = {
        SR_CONF_THERMOMETER,
        SR_CONF_HYGROMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver mic_98581_driver_info;
index 3778cc9b44ddcb4c87132095e13e257ccbb5b075..1304e1c5d72aba7988728ae5a7833ae0bf2244e0 100644 (file)
@@ -54,26 +54,26 @@ static const uint32_t devopts[] = {
        /* Device class */
        SR_CONF_POWER_SUPPLY,
        /* Aquisition modes. */
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
        /* Device configuration */
-       SR_CONF_OUTPUT_CHANNEL_CONFIG,
+       SR_CONF_OUTPUT_CHANNEL_CONFIG | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 /** Hardware capabilities channel 1, 2. */
 static const uint32_t devopts_ch12[] = {
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_VOLTAGE_MAX,
-       SR_CONF_OUTPUT_CURRENT,
-       SR_CONF_OUTPUT_CURRENT_MAX,
-       SR_CONF_OUTPUT_ENABLED,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
 /** Hardware capabilities channel 3. (LPS-304/305 only). */
 static const uint32_t devopts_ch3[] = {
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_ENABLED,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const char *channel_modes[] = {
index 48a8f13323c911324dfa5681ca03111557b0fcae..c5f95d28e020526f62d5d5e5e00b9272a068267f 100644 (file)
@@ -31,9 +31,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 #define BUF_MAX 50
index 73459e2d8ab865f4a5765487ce513639c956baaf..25f296ebb6db4532c1ede91ccf9d97d719473005 100644 (file)
@@ -29,14 +29,14 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_CAPTURE_RATIO,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_EXTERNAL_CLOCK,
-       SR_CONF_PATTERN_MODE,
-       SR_CONF_SWAP,
-       SR_CONF_RLE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_EXTERNAL_CLOCK | SR_CONF_SET,
+       SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SWAP | SR_CONF_SET,
+       SR_CONF_RLE | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const int32_t trigger_matches[] = {
index 41f24fc5f6ec8e997e1a53bcf8e4d1304c9097cb..9287509f8e3c1088f4d0376524e0e1df2dc5f00b 100644 (file)
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_CAPTURE_RATIO,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_PATTERN_MODE,
-       SR_CONF_EXTERNAL_CLOCK,
-       SR_CONF_SWAP,
-       SR_CONF_RLE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_EXTERNAL_CLOCK | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SWAP | SR_CONF_SET,
+       SR_CONF_RLE | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const int32_t trigger_matches[] = {
index e76b6b9236c14fd9dbb02ef8294786982df5852e..e943f9b270f12c204507830211cd6764fa825772 100644 (file)
@@ -36,20 +36,20 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_OSCILLOSCOPE,
-       SR_CONF_TIMEBASE,
-       SR_CONF_TRIGGER_SOURCE,
-       SR_CONF_TRIGGER_SLOPE,
-       SR_CONF_HORIZ_TRIGGERPOS,
-       SR_CONF_NUM_TIMEBASE,
-       SR_CONF_LIMIT_FRAMES,
-       SR_CONF_SAMPLERATE,
+       SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+       SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+       SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET,
 };
 
 static const uint32_t analog_devopts[] = {
-       SR_CONF_NUM_VDIV,
-       SR_CONF_VDIV,
-       SR_CONF_COUPLING,
-       SR_CONF_DATA_SOURCE,
+       SR_CONF_NUM_VDIV | SR_CONF_GET,
+       SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const uint64_t timebases[][2] = {
index 6b282f7d58c79898d6169fe78d59ba765a897eb0..2ae1f3de02470e83b81d7110507df3755625d31b 100644 (file)
@@ -47,13 +47,12 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_VOLTAGE_THRESHOLD,
-       SR_CONF_TRIGGER_MATCH,
-
-       /* These are really implemented in the driver, not the hardware. */
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_CONN | SR_CONF_GET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_VOLTAGE_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
 };
 
 static const int32_t soft_trigger_matches[] = {
index 925b6db84599666261b326f4802c9458c9826b05..efd871931b1682ffa88e4a2277de27f168af9131 100644 (file)
@@ -45,22 +45,22 @@ static const uint32_t devopts_none[] = { };
 static const uint32_t rigol_dp800_devopts[] = {
        SR_CONF_POWER_SUPPLY,
        SR_CONF_CONTINUOUS,
-       SR_CONF_OVER_TEMPERATURE_PROTECTION,
+       SR_CONF_OVER_TEMPERATURE_PROTECTION | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const uint32_t rigol_dp800_devopts_cg[] = {
-       SR_CONF_OUTPUT_REGULATION,
-       SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED,
-       SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE,
-       SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD,
-       SR_CONF_OVER_CURRENT_PROTECTION_ENABLED,
-       SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE,
-       SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD,
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_VOLTAGE_MAX,
-       SR_CONF_OUTPUT_CURRENT,
-       SR_CONF_OUTPUT_CURRENT_MAX,
-       SR_CONF_OUTPUT_ENABLED,
+       SR_CONF_OUTPUT_REGULATION | SR_CONF_GET,
+       SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
+       SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
+       SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
 struct channel_spec rigol_dp831_ch[] = {
@@ -111,11 +111,11 @@ struct scpi_command rigol_dp800_cmd[] = {
 static const uint32_t hp_6632b_devopts[] = {
        SR_CONF_POWER_SUPPLY,
        SR_CONF_CONTINUOUS,
-       SR_CONF_OUTPUT_ENABLED,
-       SR_CONF_OUTPUT_VOLTAGE,
-       SR_CONF_OUTPUT_CURRENT,
-       SR_CONF_OUTPUT_VOLTAGE_MAX,
-       SR_CONF_OUTPUT_CURRENT_MAX,
+       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
+       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
+       SR_CONF_OUTPUT_VOLTAGE_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_OUTPUT_CURRENT_MAX | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 struct channel_spec hp_6632b_ch[] = {
index 86488d769ac863a9248cb422fd15a39ab454b008..f423f474cf3f5602b3d8e2ae614f7622f22dad36 100644 (file)
@@ -36,9 +36,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver bbcgm_m2110_driver_info;
index 3bb0c4f3f32b7e2a12ead8fa01766fa791a4477c..40308f507397f3ae9af73102b27b4ba99f254638 100644 (file)
@@ -31,14 +31,14 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_EXTERNAL_CLOCK,
-       SR_CONF_CLOCK_EDGE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_TRIGGER_SOURCE,
-       SR_CONF_TRIGGER_SLOPE,
-       SR_CONF_LIMIT_MSEC,
-       SR_CONF_LIMIT_SAMPLES,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_EXTERNAL_CLOCK | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_CLOCK_EDGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const int32_t trigger_matches[] = {
index 02de164c8dae5e58bf5bec6e05cc357361a870fb..4060b03ebf67866baaf1871c8c6e8f5d6a258a6a 100644 (file)
@@ -30,9 +30,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_ENERGYMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver teleinfo_driver_info;
index c0604da68e9878566a0ec8de3c24b9e370728e63..8970a9f9b5f34efaefa61c49620ab62c8e6adc53 100644 (file)
@@ -32,9 +32,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_MSEC,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 unsigned char TESTO_x35_REQUEST[] = { 0x12, 0, 0, 0, 1, 1, 0x55, 0xd1, 0xb7 };
index 6150ccb99fc4ccf607f4bac795ea9b566565c1eb..5a294abc4ba7e72e0835b4e09acd0e8f9cb901a8 100644 (file)
@@ -33,8 +33,8 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_SOUNDLEVELMETER,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
index 56d116cef8057dbb91a37ecc2e4f9668e7e357e7..440a7ec1962b45e4bfebf881be11d0fa673fe9b1 100644 (file)
@@ -32,9 +32,9 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_SAMPLES,
-       SR_CONF_LIMIT_MSEC,
        SR_CONF_CONTINUOUS,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 SR_PRIV struct sr_dev_driver tecpel_dmm_8061_driver_info;
index 87ff065e0294d82ca13148f917c255ce5bd8e3e3..ab82b779e035b40a1aa1948a5373c7d5189facac 100644 (file)
@@ -23,9 +23,9 @@
 
 static const uint32_t devopts[] = {
        SR_CONF_THERMOMETER,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
-       SR_CONF_DATA_SOURCE,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static char *channels[] = {
index 38c4504a05168de105d40c4fefd37114b5c63305..e0c5d2fd1f8bf850f530e5e2ae53e65220a95800 100644 (file)
@@ -41,9 +41,10 @@ static const uint32_t scanopts[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_MULTIMETER,
-       SR_CONF_LIMIT_MSEC,
-       SR_CONF_LIMIT_SAMPLES,
        SR_CONF_CONTINUOUS,
+       SR_CONF_CONN | SR_CONF_GET,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+       SR_CONF_LIMIT_MSEC | SR_CONF_SET,
 };
 
 static int init(struct sr_context *sr_ctx)
index 7acd1b59b5d80d09b5f56a2b25b7d757d8404341..09d3c9b8faf86512054482ef544f1a4ed23d3175 100644 (file)
 static const uint32_t dlm_devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
        SR_CONF_OSCILLOSCOPE,
-       SR_CONF_TRIGGER_SLOPE,
-       SR_CONF_TRIGGER_SOURCE,
-       SR_CONF_TIMEBASE,
-       SR_CONF_NUM_TIMEBASE,
-       SR_CONF_HORIZ_TRIGGERPOS,
+       SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET,
+       SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_NUM_TIMEBASE | SR_CONF_GET,
+       SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const uint32_t dlm_analog_devopts[] = {
-       SR_CONF_VDIV,
-       SR_CONF_COUPLING,
-       SR_CONF_NUM_VDIV,
+       SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_NUM_VDIV | SR_CONF_GET,
 };
 
 static const char *dlm_coupling_options[] = {
index 3e0dbef040e4018cc36bea25fe7c1d0cadbb413e..ade3a640b141a92aa9870ef321827bfa1fb8c3b3 100644 (file)
@@ -54,11 +54,11 @@ static const struct zp_model zeroplus_models[] = {
 
 static const uint32_t devopts[] = {
        SR_CONF_LOGIC_ANALYZER,
-       SR_CONF_SAMPLERATE,
-       SR_CONF_TRIGGER_MATCH,
-       SR_CONF_CAPTURE_RATIO,
-       SR_CONF_VOLTAGE_THRESHOLD,
-       SR_CONF_LIMIT_SAMPLES,
+       SR_CONF_LIMIT_SAMPLES | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
+       SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_VOLTAGE_THRESHOLD | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const int32_t trigger_matches[] = {