libsigrokcxx  0.4.0
C++ bindings for libsigrok
Public Member Functions | List of all members
sigrok::Session Class Reference

A sigrok session. More...

#include <libsigrokcxx/libsigrokcxx.hpp>

Inherits sigrok::UserOwned< Class >.

Public Member Functions

void add_device (shared_ptr< Device > device)
 Add a device to this session. More...
 
vector< shared_ptr< Device > > devices ()
 List devices attached to this session. More...
 
void remove_devices ()
 Remove all devices from this session. More...
 
void add_datafeed_callback (DatafeedCallbackFunction callback)
 Add a datafeed callback to this session. More...
 
void remove_datafeed_callbacks ()
 Remove all datafeed callbacks from this session. More...
 
void start ()
 Start the session. More...
 
void run ()
 Run the session event loop. More...
 
void stop ()
 Stop the session. More...
 
bool is_running () const
 Return whether the session is running. More...
 
void set_stopped_callback (SessionStoppedCallback callback)
 Set callback to be invoked on session stop. More...
 
shared_ptr< Triggertrigger ()
 Get current trigger setting. More...
 
shared_ptr< Contextcontext ()
 Get the context. More...
 
void set_trigger (shared_ptr< Trigger > trigger)
 Set trigger setting. More...
 
string filename () const
 Get filename this session was loaded from. More...
 

Detailed Description

A sigrok session.

Definition at line 606 of file libsigrokcxx.hpp.

Member Function Documentation

void sigrok::Session::add_device ( shared_ptr< Device device)

Add a device to this session.

Parameters
deviceDevice to add.
vector<shared_ptr<Device> > sigrok::Session::devices ( )

List devices attached to this session.

void sigrok::Session::remove_devices ( )

Remove all devices from this session.

void sigrok::Session::add_datafeed_callback ( DatafeedCallbackFunction  callback)

Add a datafeed callback to this session.

Parameters
callbackCallback of the form callback(Device, Packet).
void sigrok::Session::remove_datafeed_callbacks ( )

Remove all datafeed callbacks from this session.

void sigrok::Session::start ( )

Start the session.

void sigrok::Session::run ( )

Run the session event loop.

void sigrok::Session::stop ( )

Stop the session.

bool sigrok::Session::is_running ( ) const

Return whether the session is running.

void sigrok::Session::set_stopped_callback ( SessionStoppedCallback  callback)

Set callback to be invoked on session stop.

shared_ptr<Trigger> sigrok::Session::trigger ( )

Get current trigger setting.

shared_ptr<Context> sigrok::Session::context ( )

Get the context.

void sigrok::Session::set_trigger ( shared_ptr< Trigger trigger)

Set trigger setting.

Parameters
triggerTrigger object to use.
string sigrok::Session::filename ( ) const

Get filename this session was loaded from.


The documentation for this class was generated from the following file: