X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=sigsession.cpp;h=ac96833f842d5df0cdad4d470e26a8cc6b65144b;hb=b3f22de060b73f15ad3eb2dabee04a0b4f5d947e;hp=21c5624bc40790ca410002e0b5320a70ff99ae2d;hpb=04abfae9c8f8e4884e6535d6584df8b5f1e3a1db;p=pulseview.git diff --git a/sigsession.cpp b/sigsession.cpp index 21c5624..ac96833 100644 --- a/sigsession.cpp +++ b/sigsession.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the PulseView project. * * Copyright (C) 2012 Joel Holdsworth * @@ -58,7 +58,7 @@ void SigSession::load_file(const std::string &name) } void SigSession::start_capture(struct sr_dev_inst *sdi, - uint64_t sample_rate) + uint64_t record_length, uint64_t sample_rate) { sr_session_new(); sr_session_datafeed_callback_add(data_feed_in_proc); @@ -69,9 +69,8 @@ void SigSession::start_capture(struct sr_dev_inst *sdi, return; } - uint64_t limit_samples = 10000; if (sr_dev_config_set(sdi, SR_HWCAP_LIMIT_SAMPLES, - &limit_samples) != SR_OK) { + &record_length) != SR_OK) { qDebug() << "Failed to configure time-based sample limit."; sr_session_destroy(); return; @@ -98,6 +97,11 @@ vector< shared_ptr >& SigSession::get_signals() return _signals; } +boost::shared_ptr SigSession::get_data() +{ + return _logic_data; +} + void SigSession::data_feed_in(const struct sr_dev_inst *sdi, struct sr_datafeed_packet *packet) {