![]() |
libsigrokdecode
0.3.1
sigrok protocol decoding library
|
Handling protocol decoders. More...
Functions | |
const GSList * | srd_decoder_list (void) |
Returns the list of supported/loaded protocol decoders. More... | |
struct srd_decoder * | srd_decoder_get_by_id (const char *id) |
Get the decoder with the specified ID. More... | |
int | srd_decoder_load (const char *module_name) |
Load a protocol decoder module into the embedded Python interpreter. More... | |
char * | srd_decoder_doc_get (const struct srd_decoder *dec) |
Return a protocol decoder's docstring. More... | |
int | srd_decoder_unload (struct srd_decoder *dec) |
Unload the specified protocol decoder. More... | |
int | srd_decoder_load_all (void) |
Load all installed protocol decoders. More... | |
int | srd_decoder_unload_all (void) |
Unload all loaded protocol decoders. More... | |
Handling protocol decoders.
char* srd_decoder_doc_get | ( | const struct srd_decoder * | dec | ) |
Return a protocol decoder's docstring.
dec | The loaded protocol decoder. |
Definition at line 584 of file decoder.c.
References srd_decoder::py_mod.
struct srd_decoder* srd_decoder_get_by_id | ( | const char * | id | ) |
Get the decoder with the specified ID.
id | The ID string of the decoder to return. |
Definition at line 89 of file decoder.c.
References srd_decoder::id.
Referenced by srd_inst_new().
const GSList* srd_decoder_list | ( | void | ) |
Returns the list of supported/loaded protocol decoders.
This is a GSList of pointers to struct srd_decoder items.
int srd_decoder_load | ( | const char * | module_name | ) |
Load a protocol decoder module into the embedded Python interpreter.
module_name | The module name to be loaded. |
Definition at line 307 of file decoder.c.
References srd_decoder_annotation_row::ann_classes, srd_decoder::annotation_rows, srd_decoder::annotations, srd_decoder::binary, srd_decoder::channels, srd_decoder::desc, srd_decoder_annotation_row::desc, srd_decoder::id, srd_decoder_annotation_row::id, srd_decoder::license, srd_decoder::longname, srd_decoder::name, srd_decoder::opt_channels, srd_channel::order, srd_decoder::py_dec, srd_decoder::py_mod, SRD_ERR, SRD_ERR_ARG, SRD_ERR_MALLOC, SRD_ERR_PYTHON, and SRD_OK.
int srd_decoder_load_all | ( | void | ) |
int srd_decoder_unload | ( | struct srd_decoder * | dec | ) |
Unload the specified protocol decoder.
dec | The struct srd_decoder to be unloaded. |
Definition at line 638 of file decoder.c.
References srd_decoder::channels, srd_decoder_option::def, srd_decoder::desc, srd_decoder_option::desc, srd_decoder::id, srd_decoder_option::id, srd_decoder::license, srd_decoder::longname, srd_decoder::name, srd_decoder::opt_channels, srd_decoder::options, srd_decoder::py_dec, srd_decoder::py_mod, SRD_ERR, SRD_ERR_ARG, and SRD_OK.
Referenced by srd_decoder_unload_all().
int srd_decoder_unload_all | ( | void | ) |
Unload all loaded protocol decoders.
Definition at line 821 of file decoder.c.
References srd_decoder_unload(), and SRD_OK.
Referenced by srd_exit().