* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <cassert>
#include <sstream>
#include <libsigrok/libsigrok.h>
{
DevInst::use(owner);
- sr_session_new();
+ sr_session_new(&SigSession::_sr_session);
assert(_sdi);
sr_dev_open(_sdi);
- if (sr_session_dev_add(_sdi) != SR_OK)
+ if (sr_session_dev_add(SigSession::_sr_session, _sdi) != SR_OK)
throw QString(tr("Failed to use device."));
}
{
if (_owner) {
DevInst::release();
- sr_session_destroy();
+ sr_session_destroy(SigSession::_sr_session);
}
sr_dev_close(_sdi);
return s.str();
}
-bool Device::is_trigger_enabled() const
-{
- assert(_sdi);
- for (const GSList *l = _sdi->channels; l; l = l->next) {
- const sr_channel *const p = (const sr_channel *)l->data;
- assert(p);
- if (p->trigger && p->trigger[0] != '\0')
- return true;
- }
- return false;
-}
-
} // device
} // pv