libsigrok
unreleased development snapshot
sigrok hardware access and backend library
|
Transform module handling. More...
Functions | |
const struct sr_transform_module ** | sr_transform_list (void) |
Returns a NULL-terminated list of all available transform modules. More... | |
const char * | sr_transform_id_get (const struct sr_transform_module *tmod) |
Returns the specified transform module's ID. More... | |
const char * | sr_transform_name_get (const struct sr_transform_module *tmod) |
Returns the specified transform module's name. More... | |
const char * | sr_transform_description_get (const struct sr_transform_module *tmod) |
Returns the specified transform module's description. More... | |
const struct sr_transform_module * | sr_transform_find (const char *id) |
Return the transform module with the specified ID, or NULL if no module with that ID is found. More... | |
const struct sr_option ** | sr_transform_options_get (const struct sr_transform_module *tmod) |
Returns a NULL-terminated array of struct sr_option, or NULL if the module takes no options. More... | |
void | sr_transform_options_free (const struct sr_option **options) |
After a call to sr_transform_options_get(), this function cleans up all resources returned by that call. More... | |
const struct sr_transform * | sr_transform_new (const struct sr_transform_module *tmod, GHashTable *options, const struct sr_dev_inst *sdi) |
Create a new transform instance using the specified transform module. More... | |
int | sr_transform_free (const struct sr_transform *t) |
Free the specified transform instance and all associated resources. More... | |
Transform module handling.
const char* sr_transform_description_get | ( | const struct sr_transform_module * | tmod | ) |
Returns the specified transform module's description.
Definition at line 102 of file transform.c.
const struct sr_transform_module* sr_transform_find | ( | const char * | id | ) |
Return the transform module with the specified ID, or NULL if no module with that ID is found.
Definition at line 118 of file transform.c.
int sr_transform_free | ( | const struct sr_transform * | t | ) |
Free the specified transform instance and all associated resources.
Definition at line 272 of file transform.c.
References SR_ERR_ARG, and SR_OK.
const char* sr_transform_id_get | ( | const struct sr_transform_module * | tmod | ) |
const struct sr_transform_module** sr_transform_list | ( | void | ) |
Returns a NULL-terminated list of all available transform modules.
Definition at line 62 of file transform.c.
Referenced by sr_buildinfo_scpi_backends_get().
const char* sr_transform_name_get | ( | const struct sr_transform_module * | tmod | ) |
Returns the specified transform module's name.
Definition at line 87 of file transform.c.
const struct sr_transform* sr_transform_new | ( | const struct sr_transform_module * | tmod, |
GHashTable * | options, | ||
const struct sr_dev_inst * | sdi | ||
) |
Create a new transform instance using the specified transform module.
options
is a *GHashTable with the keys corresponding with the module options' id
field. The values should be GVariant pointers with sunk * references, of the same GVariantType as the option's default value.
The sr_dev_inst passed in can be used by the instance to determine channel names, samplerate, and so on.
Definition at line 200 of file transform.c.
References sr_option::def, sr_option::id, and SR_OK.
After a call to sr_transform_options_get(), this function cleans up all resources returned by that call.
Definition at line 166 of file transform.c.
References sr_option::def, and sr_option::values.
const struct sr_option** sr_transform_options_get | ( | const struct sr_transform_module * | tmod | ) |
Returns a NULL-terminated array of struct sr_option, or NULL if the module takes no options.
Each call to this function must be followed by a call to sr_transform_options_free().
Definition at line 139 of file transform.c.
References sr_option::id.