libsigrok  0.4.0
sigrok hardware access and backend library
Functions
session.c File Reference

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

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

Go to the source code of this file.

Functions

int sr_session_new (struct sr_context *ctx, struct sr_session **new_session)
 Create a new session. More...
 
int sr_session_destroy (struct sr_session *session)
 Destroy a session. More...
 
int sr_session_dev_remove_all (struct sr_session *session)
 Remove all the devices from a session. More...
 
int sr_session_dev_add (struct sr_session *session, struct sr_dev_inst *sdi)
 Add a device instance to a session. More...
 
int sr_session_dev_list (struct sr_session *session, GSList **devlist)
 List all device instances attached to a session. More...
 
int sr_session_dev_remove (struct sr_session *session, struct sr_dev_inst *sdi)
 Remove a device instance from a session. More...
 
int sr_session_datafeed_callback_remove_all (struct sr_session *session)
 Remove all datafeed callbacks in a session. More...
 
int sr_session_datafeed_callback_add (struct sr_session *session, sr_datafeed_callback cb, void *cb_data)
 Add a datafeed callback to a session. More...
 
struct sr_triggersr_session_trigger_get (struct sr_session *session)
 Get the trigger assigned to this session. More...
 
int sr_session_trigger_set (struct sr_session *session, struct sr_trigger *trig)
 Set the trigger of this session. More...
 
int sr_session_start (struct sr_session *session)
 Start a session. More...
 
int sr_session_run (struct sr_session *session)
 Block until the running session stops. More...
 
int sr_session_stop (struct sr_session *session)
 Stop a session. More...
 
int sr_session_is_running (struct sr_session *session)
 Return whether the session is currently running. More...
 
int sr_session_stopped_callback_set (struct sr_session *session, sr_session_stopped_callback cb, void *cb_data)
 Set the callback to be invoked after a session stopped running. More...
 
SR_PRIV int sr_session_fd_source_add (struct sr_session *session, void *key, gintptr fd, int events, int timeout, sr_receive_data_callback cb, void *cb_data)
 
SR_PRIV int sr_packet_copy (const struct sr_datafeed_packet *packet, struct sr_datafeed_packet **copy)
 
void sr_packet_free (struct sr_datafeed_packet *packet)
 

Detailed Description

Creating, using, or destroying libsigrok sessions.

Definition in file session.c.