libsigrokcxx
0.4.0
C++ bindings for libsigrok
|
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< Trigger > | trigger () |
Get current trigger setting. More... | |
shared_ptr< Context > | context () |
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... | |
A sigrok session.
Definition at line 606 of file libsigrokcxx.hpp.
void sigrok::Session::add_device | ( | shared_ptr< Device > | device | ) |
Add a device to this session.
device | Device 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.
callback | Callback 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.
trigger | Trigger object to use. |
string sigrok::Session::filename | ( | ) | const |
Get filename this session was loaded from.