libsigrok  0.3.0
sigrok hardware access and backend library
Functions | Variables
session.c File Reference

Creating, using, or destroying libsigrok sessions. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <glib.h>
#include "libsigrok.h"
#include "libsigrok-internal.h"
+ Include dependency graph for session.c:

Go to the source code of this file.

Functions

struct sr_sessionsr_session_new (void)
 Create a new session. More...
 
int sr_session_destroy (void)
 Destroy the current session. More...
 
int sr_session_dev_remove_all (void)
 Remove all the devices from the current session. More...
 
int sr_session_dev_add (const struct sr_dev_inst *sdi)
 Add a device instance to the current session. More...
 
int sr_session_dev_list (GSList **devlist)
 List all device instances attached to the current session. More...
 
int sr_session_datafeed_callback_remove_all (void)
 Remove all datafeed callbacks in the current session. More...
 
int sr_session_datafeed_callback_add (sr_datafeed_callback cb, void *cb_data)
 Add a datafeed callback to the current session. More...
 
int sr_session_start (void)
 Start a session. More...
 
int sr_session_run (void)
 Run the session. More...
 
int sr_session_stop (void)
 Stop the current session. More...
 
int sr_session_source_add (int fd, int events, int timeout, sr_receive_data_callback cb, void *cb_data)
 Add an event source for a file descriptor. More...
 
int sr_session_source_add_pollfd (GPollFD *pollfd, int timeout, sr_receive_data_callback cb, void *cb_data)
 Add an event source for a GPollFD. More...
 
int sr_session_source_add_channel (GIOChannel *channel, int events, int timeout, sr_receive_data_callback cb, void *cb_data)
 Add an event source for a GIOChannel. More...
 
int sr_session_source_remove (int fd)
 Remove the source belonging to the specified file descriptor. More...
 
int sr_session_source_remove_pollfd (GPollFD *pollfd)
 Remove the source belonging to the specified poll descriptor. More...
 
int sr_session_source_remove_channel (GIOChannel *channel)
 Remove the source belonging to the specified channel. More...
 

Variables

struct sr_sessionsession
 

Detailed Description

Creating, using, or destroying libsigrok sessions.

Definition in file session.c.