libsigrok  unreleased development snapshot
sigrok hardware access and backend library
Functions
input.c File Reference

Input module handling. More...

#include <config.h>
#include <string.h>
#include <errno.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
+ Include dependency graph for input.c:

Go to the source code of this file.

Functions

const struct sr_input_module ** sr_input_list (void)
 Returns a NULL-terminated list of all available input modules. More...
 
const char * sr_input_id_get (const struct sr_input_module *imod)
 Returns the specified input module's ID. More...
 
const char * sr_input_name_get (const struct sr_input_module *imod)
 Returns the specified input module's name. More...
 
const char * sr_input_description_get (const struct sr_input_module *imod)
 Returns the specified input module's description. More...
 
const char *const * sr_input_extensions_get (const struct sr_input_module *imod)
 Returns the specified input module's file extensions typical for the file format, as a NULL terminated array, or returns a NULL pointer if there is no preferred extension. More...
 
const struct sr_input_module * sr_input_find (const char *id)
 Return the input module with the specified ID, or NULL if no module with that id is found. More...
 
const struct sr_option ** sr_input_options_get (const struct sr_input_module *imod)
 Returns a NULL-terminated array of struct sr_option, or NULL if the module takes no options. More...
 
void sr_input_options_free (const struct sr_option **options)
 After a call to sr_input_options_get(), this function cleans up all resources returned by that call. More...
 
struct sr_input * sr_input_new (const struct sr_input_module *imod, GHashTable *options)
 Create a new input instance using the specified input module. More...
 
int sr_input_scan_buffer (GString *buf, const struct sr_input **in)
 Try to find an input module that can parse the given buffer. More...
 
int sr_input_scan_file (const char *filename, const struct sr_input **in)
 Try to find an input module that can parse the given file. More...
 
const struct sr_input_module * sr_input_module_get (const struct sr_input *in)
 Return the input instance's module "class". More...
 
struct sr_dev_inst * sr_input_dev_inst_get (const struct sr_input *in)
 Return the input instance's (virtual) device instance. More...
 
int sr_input_send (const struct sr_input *in, GString *buf)
 Send data to the specified input instance. More...
 
int sr_input_end (const struct sr_input *in)
 Signal the input module no more data will come. More...
 
int sr_input_reset (const struct sr_input *in_ro)
 Reset the input module's input handling structures. More...
 
void sr_input_free (const struct sr_input *in)
 Free the specified input instance and all associated resources. More...
 

Detailed Description

Input module handling.

Definition in file input.c.