libsigrok  0.3.0
sigrok hardware access and backend library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Output formats

Output file/data format handling. More...

Functions

struct sr_output_format ** sr_output_list (void)
 
struct sr_outputsr_output_new (struct sr_output_format *of, GHashTable *params, const struct sr_dev_inst *sdi)
 
int sr_output_send (struct sr_output *o, const struct sr_datafeed_packet *packet, GString **out)
 
int sr_output_free (struct sr_output *o)
 

Detailed Description

Output file/data format handling.

libsigrok supports several output (file) formats, e.g. binary, VCD, gnuplot, and so on. It provides an output API that frontends can use. New output formats can be added/implemented in libsigrok without having to change the frontends at all.

All output modules are fed data in a stream. Devices that can stream data into libsigrok, instead of storing and then transferring the whole buffer, can thus generate output live.

Output modules generate a newly allocated GString. The caller is then expected to free this with g_string_free() when finished with it.

Function Documentation

int sr_output_free ( struct sr_output o)
Since
0.3.0

Definition at line 108 of file output.c.

References sr_output_format::cleanup, sr_output::format, and SR_OK.

struct sr_output_format** sr_output_list ( void  )
Since
0.1.0

Definition at line 77 of file output.c.

struct sr_output* sr_output_new ( struct sr_output_format of,
GHashTable *  params,
const struct sr_dev_inst sdi 
)
Since
0.3.0

Definition at line 83 of file output.c.

References sr_output::format, sr_output_format::init, sr_output::params, sr_output::sdi, and SR_OK.

int sr_output_send ( struct sr_output o,
const struct sr_datafeed_packet packet,
GString **  out 
)
Since
0.3.0

Definition at line 101 of file output.c.

References sr_output::format, and sr_output_format::receive.