Go to the source code of this file.
Functions | |
SRD_API GSList * | srd_decoder_list (void) |
Returns the list of supported/loaded protocol decoders. More... | |
SRD_API struct srd_decoder * | srd_decoder_get_by_id (const char *id) |
Get the decoder with the specified ID. More... | |
SRD_API int | srd_decoder_load (const char *module_name) |
Load a protocol decoder module into the embedded Python interpreter. More... | |
SRD_API char * | srd_decoder_doc_get (const struct srd_decoder *dec) |
Return a protocol decoder's docstring. More... | |
SRD_API int | srd_decoder_unload (struct srd_decoder *dec) |
Unload decoder module. More... | |
SRD_API int | srd_decoder_load_all (void) |
Load all installed protocol decoders. More... | |
SRD_API int | srd_decoder_unload_all (void) |
Unload all loaded protocol decoders. More... | |
Variables | |
SRD_PRIV GSList * | pd_list = NULL |
SRD_PRIV PyObject * | mod_sigrokdecode |
SRD_API char* srd_decoder_doc_get | ( | const struct srd_decoder * | dec | ) |
Return a protocol decoder's docstring.
dec | The loaded protocol decoder. |
Definition at line 292 of file decoder.c.
References srd_decoder::py_mod, py_str_as_str(), and srd_exception_catch().
|
read |
Get the decoder with the specified ID.
id | The ID string of the decoder to return. |
Definition at line 51 of file decoder.c.
References srd_decoder::id, and srd_decoder_list().
Referenced by srd_inst_new().
SRD_API GSList* srd_decoder_list | ( | void | ) |
Returns the list of supported/loaded protocol decoders.
This is a GSList containing the names of the decoders as strings.
Definition at line 39 of file decoder.c.
References pd_list.
Referenced by srd_decoder_get_by_id(), and srd_decoder_unload_all().
SRD_API int srd_decoder_load | ( | const char * | module_name | ) |
Load a protocol decoder module into the embedded Python interpreter.
name | The module name to be loaded. |
Definition at line 131 of file decoder.c.
References srd_decoder::annotations, srd_decoder::desc, srd_decoder::id, srd_decoder::license, srd_decoder::longname, mod_sigrokdecode, srd_decoder::name, srd_decoder::opt_probes, pd_list, srd_decoder::probes, py_attr_as_str(), srd_decoder::py_dec, srd_decoder::py_mod, py_strlist_to_char(), srd_dbg(), srd_err(), SRD_ERR_MALLOC, SRD_ERR_PYTHON, srd_exception_catch(), and SRD_OK.
Referenced by srd_decoder_load_all().
SRD_API int srd_decoder_load_all | ( | void | ) |
Load all installed protocol decoders.
Definition at line 373 of file decoder.c.
References srd_decoder_load(), srd_err(), SRD_ERR_DECODERS_DIR, and SRD_OK.
SRD_API int srd_decoder_unload | ( | struct srd_decoder * | dec | ) |
Unload decoder module.
dec | The struct srd_decoder to be unloaded. |
Definition at line 338 of file decoder.c.
References srd_decoder::desc, srd_decoder::id, srd_decoder::license, srd_decoder::longname, srd_decoder::name, srd_decoder::opt_probes, srd_decoder::probes, srd_decoder::py_dec, srd_decoder::py_mod, srd_dbg(), srd_inst_free_all(), and SRD_OK.
Referenced by srd_decoder_unload_all().
SRD_API int srd_decoder_unload_all | ( | void | ) |
Unload all loaded protocol decoders.
Definition at line 398 of file decoder.c.
References srd_decoder_list(), srd_decoder_unload(), and SRD_OK.
Referenced by srd_exit().
SRD_PRIV PyObject* mod_sigrokdecode |
Definition at line 34 of file module_sigrokdecode.c.
Referenced by PyInit_sigrokdecode(), and srd_decoder_load().
SRD_PRIV GSList* pd_list = NULL |
Definition at line 27 of file decoder.c.
Referenced by srd_decoder_list(), srd_decoder_load(), and srd_exit().