libsigrokdecode  0.5.2
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

◆ srd_decoder_doc_get()

char* srd_decoder_doc_get ( const struct srd_decoder dec)

Return a protocol decoder's docstring.

Parameters
decThe loaded protocol decoder.
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 868 of file decoder.c.

◆ srd_decoder_get_by_id()

struct srd_decoder* srd_decoder_get_by_id ( const char *  id)

Get the decoder with the specified ID.

Parameters
idThe ID string of the decoder to return.
Returns
The decoder with the specified ID, or NULL if not found.
Since
0.1.0

Definition at line 89 of file decoder.c.

References srd_decoder::id.

Referenced by srd_inst_new().

+ Here is the caller graph for this function:

◆ srd_decoder_list()

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.

◆ srd_decoder_load()

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 679 of file decoder.c.

◆ srd_decoder_load_all()

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 1058 of file decoder.c.

◆ srd_decoder_unload()

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 914 of file decoder.c.

Referenced by srd_decoder_unload_all().

+ Here is the caller graph for this function:

◆ srd_decoder_unload_all()

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 1078 of file decoder.c.

References srd_decoder_unload(), and SRD_OK.

Referenced by srd_exit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: