libsigrokdecode  unreleased development snapshot
sigrok protocol decoding library
Functions
Protocol decoders

Handling protocol decoders. More...

Functions

const GSList * srd_decoder_list (void)
 Returns the list of loaded protocol decoders. More...
 
struct srd_decodersrd_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...
 

Detailed Description

Handling protocol decoders.

Function Documentation

char* srd_decoder_doc_get ( const struct srd_decoder dec)

Return a protocol decoder's docstring.

Parameters
decThe loaded protocol decoder. Must not be NULL.
Returns
A newly allocated buffer containing the protocol decoder's documentation. The caller is responsible for free'ing the buffer.
Since
0.1.0

Definition at line 1086 of file decoder.c.

References srd_decoder::py_mod.

struct srd_decoder* srd_decoder_get_by_id ( const char *  id)
const GSList* srd_decoder_list ( void  )

Returns the list of loaded protocol decoders.

This is a GSList of pointers to struct srd_decoder items.

Returns
List of decoders, NULL if none are supported or loaded.
Since
0.2.0

Definition at line 75 of file decoder.c.

int srd_decoder_load ( const char *  module_name)

Load a protocol decoder module into the embedded Python interpreter.

Parameters
module_nameThe module name to be loaded.
Returns
SRD_OK upon success, a (negative) error code otherwise.
Since
0.1.0

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

+ Here is the caller graph for this function:

int srd_decoder_load_all ( void  )

Load all installed protocol decoders.

Returns
SRD_OK upon success, a (negative) error code otherwise.
Since
0.1.0

Definition at line 1276 of file decoder.c.

References srd_decoder_unload(), SRD_ERR, and SRD_OK.

+ Here is the call graph for this function:

int srd_decoder_unload ( struct srd_decoder dec)

Unload the specified protocol decoder.

Parameters
decThe struct srd_decoder to be unloaded.
Returns
SRD_OK upon success, a (negative) error code otherwise.
Since
0.1.0

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int srd_decoder_unload_all ( void  )

Unload all loaded protocol decoders.

Returns
SRD_OK upon success, a (negative) error code otherwise.
Since
0.1.0

Definition at line 1303 of file decoder.c.

References SRD_OK.

Referenced by srd_exit().

+ Here is the caller graph for this function: