X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=sigsession.h;h=bf262bbf6cc675c7a8136e6cb72f139995538cf0;hp=92c048bddc1bcf5e25d357d204f312f4fda17919;hb=1e669074475e36ae5f7e1fbdc9ad5809beaccdf3;hpb=009e1503d46291cbc33cdb900761eaa505fd6269 diff --git a/sigsession.h b/sigsession.h index 92c048bd..bf262bbf 100644 --- a/sigsession.h +++ b/sigsession.h @@ -21,13 +21,20 @@ #ifndef SIGSESSION_H #define SIGSESSION_H +#include + +#include +#include + #include extern "C" { #include } -#include +class LogicData; +class LogicDataSnapshot; +class Signal; class SigSession : public QObject { @@ -38,28 +45,34 @@ public: ~SigSession(); - void loadFile(const std::string &name); + void load_file(const std::string &name); + + void start_capture(struct sr_dev_inst* sdi, uint64_t record_length, + uint64_t sample_rate); + + std::vector< boost::shared_ptr >& + get_signals(); private: - void dataFeedIn(const struct sr_dev_inst *sdi, + void data_feed_in(const struct sr_dev_inst *sdi, struct sr_datafeed_packet *packet); - static void dataFeedInProc(const struct sr_dev_inst *sdi, + static void data_feed_in_proc(const struct sr_dev_inst *sdi, struct sr_datafeed_packet *packet); private: - int unitSize; - int probeList[SR_MAX_NUM_PROBES + 1]; - GArray *sigData; + std::vector< boost::shared_ptr > _signals; + boost::shared_ptr _logic_data; + boost::shared_ptr _cur_logic_snapshot; signals: - void dataUpdated(); + void data_updated(); private: // TODO: This should not be necessary. Multiple concurrent // sessions should should be supported and it should be // possible to associate a pointer with a sr_session. - static SigSession *session; + static SigSession *_session; }; #endif // SIGSESSION_H