GSList *values;
};
-/** Input (file) format struct. */
+/** Input (file) module struct. */
struct sr_input {
/**
- * A pointer to this input format's 'struct sr_input_format'.
+ * A pointer to this input module's 'struct sr_input_module'.
* The frontend can use this to call the module's callbacks.
*/
- struct sr_input_format *format;
+ struct sr_input_module *module;
GHashTable *param;
void *internal;
};
-/** Input (file) format driver. */
-struct sr_input_format {
- /** The unique ID for this input format. Must not be NULL. */
+/** Input (file) module driver. */
+struct sr_input_module {
+ /** The unique ID for this input module. Must not be NULL. */
char *id;
/**
- * A short description of the input format, which can (for example)
+ * A short description of the input module, which can (for example)
* be displayed to the user by frontends. Must not be NULL.
*/
char *description;
/*--- input/input.c ---------------------------------------------------------*/
-SR_API struct sr_input_format **sr_input_list(void);
+SR_API struct sr_input_module **sr_input_list(void);
/*--- output/output.c -------------------------------------------------------*/
static int sanity_check_all_input_modules(void)
{
int i, errors, ret = SR_OK;
- struct sr_input_format **inputs;
+ struct sr_input_module **inputs;
const char *d;
sr_spew("Sanity-checking all input modules.");
return SR_OK;
}
-SR_PRIV struct sr_input_format input_binary = {
+SR_PRIV struct sr_input_module input_binary = {
.id = "binary",
.description = "Raw binary",
.format_match = format_match,
return SR_OK;
}
-SR_PRIV struct sr_input_format input_chronovu_la8 = {
+SR_PRIV struct sr_input_module input_chronovu_la8 = {
.id = "chronovu-la8",
.description = "ChronoVu LA8",
.format_match = format_match,
return SR_OK;
}
-SR_PRIV struct sr_input_format input_csv = {
+SR_PRIV struct sr_input_module input_csv = {
.id = "csv",
.description = "Comma-separated values (CSV)",
.format_match = format_match,
*/
/**
- * @defgroup grp_input Input formats
+ * @defgroup grp_input Input modules
*
- * Input file/data format handling.
+ * Input file/data module handling.
*
* libsigrok can process acquisition data in several different ways.
* Aside from acquiring data from a hardware device, it can also take it from
* Every input module is "pluggable", meaning it's handled as being separate
* from the main libsigrok, but linked in to it statically. To keep things
* modular and separate like this, functions within an input module should be
- * declared static, with only the respective 'struct sr_input_format' being
+ * declared static, with only the respective 'struct sr_input_module' being
* exported for use into the wider libsigrok namespace.
*
* @{
*/
/** @cond PRIVATE */
-extern SR_PRIV struct sr_input_format input_chronovu_la8;
-extern SR_PRIV struct sr_input_format input_csv;
-extern SR_PRIV struct sr_input_format input_binary;
-extern SR_PRIV struct sr_input_format input_vcd;
-extern SR_PRIV struct sr_input_format input_wav;
+extern SR_PRIV struct sr_input_module input_chronovu_la8;
+extern SR_PRIV struct sr_input_module input_csv;
+extern SR_PRIV struct sr_input_module input_binary;
+extern SR_PRIV struct sr_input_module input_vcd;
+extern SR_PRIV struct sr_input_module input_wav;
/* @endcond */
-static struct sr_input_format *input_module_list[] = {
+static struct sr_input_module *input_module_list[] = {
&input_vcd,
&input_chronovu_la8,
&input_wav,
};
/** @since 0.1.0 */
-SR_API struct sr_input_format **sr_input_list(void)
+SR_API struct sr_input_module **sr_input_list(void)
{
return input_module_list;
}
return SR_OK;
}
-SR_PRIV struct sr_input_format input_vcd = {
+SR_PRIV struct sr_input_module input_vcd = {
.id = "vcd",
.description = "Value Change Dump",
.format_match = format_match,
}
-SR_PRIV struct sr_input_format input_wav = {
+SR_PRIV struct sr_input_module input_wav = {
.id = "wav",
.description = "WAV file",
.format_match = format_match,