libsigrok  0.4.0
sigrok hardware access and backend library
Functions
Transform modules

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...
 

Detailed Description

Transform module handling.

Function Documentation

const char* sr_transform_description_get ( const struct sr_transform_module *  tmod)

Returns the specified transform module's description.

Since
0.4.0

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.

Since
0.4.0

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.

Since
0.4.0

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)

Returns the specified transform module's ID.

Since
0.4.0

Definition at line 72 of file transform.c.

const struct sr_transform_module** sr_transform_list ( void  )

Returns a NULL-terminated list of all available transform modules.

Since
0.4.0

Definition at line 62 of file transform.c.

const char* sr_transform_name_get ( const struct sr_transform_module *  tmod)

Returns the specified transform module's name.

Since
0.4.0

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.

Since
0.4.0

Definition at line 200 of file transform.c.

References sr_option::def, sr_option::id, and SR_OK.

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.

Since
0.4.0

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().

Since
0.4.0

Definition at line 139 of file transform.c.

References sr_option::id.