Often previously unsupported models might be covered by existing code,
but would not match against a builtin list of known devices.
Introduce a config key which provides a scan option for users to force
the use of a driver with an unsupported device. This increases the
probability of requests for support of an additional model which are
associated with a successful use of that very device, and eliminates
the necessity to build from source for the trivial cases.
It's up to individual drivers whether they support forced detection,
and how they interpret the value of the scan option.
*/
SR_CONF_MODBUSADDR,
+ /**
+ * User specified forced driver attachment to unknown devices.
+ *
+ * By design the interpretation of the string depends on the
+ * specific driver. It typically would be either a replacement
+ * '*IDN?' response value, or a sub-driver name. But could also
+ * be anything else and totally arbitrary.
+ */
+ SR_CONF_FORCE_DETECT,
+
/* Update sr_key_info_config[] (hwdriver.c) upon changes! */
/*--- Device (or channel group) configuration -----------------------*/
"Serial communication", NULL},
{SR_CONF_MODBUSADDR, SR_T_UINT64, "modbusaddr",
"Modbus slave address", NULL},
+ {SR_CONF_FORCE_DETECT, SR_T_STRING, "force_detect",
+ "Forced detection", NULL},
/* Device (or channel group) configuration */
{SR_CONF_SAMPLERATE, SR_T_UINT64, "samplerate",