libsigrokdecode
unreleased development snapshot
sigrok protocol decoding library
|
Handling protocol decoders. More...
Functions | |
const GSList * | srd_decoder_list (void) |
Returns the list of 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. Must not be NULL. |
Definition at line 1086 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_annotation_row::ann_classes, srd_decoder::annotation_rows, srd_decoder::annotations, srd_decoder::binary, srd_decoder::channels, srd_decoder_option::def, srd_decoder::desc, srd_channel::desc, srd_decoder_option::desc, srd_decoder_annotation_row::desc, srd_decoder_logic_output_channel::desc, FALSE, srd_decoder::id, srd_channel::id, srd_decoder_option::id, srd_decoder_annotation_row::id, srd_decoder_logic_output_channel::id, srd_decoder::inputs, srd_decoder::license, srd_decoder::logic_output_channels, srd_decoder::longname, srd_decoder::name, srd_channel::name, srd_decoder::opt_channels, srd_decoder::options, srd_channel::order, srd_decoder::outputs, srd_decoder::py_dec, srd_decoder::py_mod, SRD_ERR_PYTHON, SRD_OK, SRD_PRIV, srd_decoder::tags, TRUE, and srd_decoder_option::values.
Referenced by srd_inst_new().
const GSList* srd_decoder_list | ( | void | ) |
Returns the list of 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 826 of file decoder.c.
References srd_decoder::annotation_rows, srd_decoder::annotations, srd_decoder::binary, srd_decoder::channels, srd_decoder::desc, srd_decoder::id, srd_decoder::inputs, srd_decoder::license, srd_decoder::longname, srd_decoder::name, srd_decoder::opt_channels, srd_decoder::options, srd_decoder::outputs, srd_decoder::py_dec, srd_decoder::py_mod, SRD_ERR, SRD_ERR_ARG, SRD_ERR_PYTHON, SRD_OK, and srd_decoder::tags.
Referenced by srd_decoder_unload().
int srd_decoder_load_all | ( | void | ) |
Load all installed protocol decoders.
Definition at line 1276 of file decoder.c.
References srd_decoder_unload(), SRD_ERR, and SRD_OK.
int srd_decoder_unload | ( | struct srd_decoder * | dec | ) |
Unload the specified protocol decoder.
dec | The struct srd_decoder to be unloaded. |
Definition at line 1132 of file decoder.c.
References srd_decoder_load(), SRD_ERR, SRD_ERR_ARG, and SRD_OK.
Referenced by srd_decoder_load_all().
int srd_decoder_unload_all | ( | void | ) |
Unload all loaded protocol decoders.
Definition at line 1303 of file decoder.c.
References SRD_OK.
Referenced by srd_exit().