X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=sigsession.h;h=f6b1d8e4951e0e021b2f3e76851ce525af44a888;hp=47f37a10fa8e5680a9a61bde5d448d9fc07c95ac;hb=1d19ef83d7598f3248086d456df55e844b229bb3;hpb=2953961c06ff9e758035ba3cd67220568bd01710 diff --git a/sigsession.h b/sigsession.h index 47f37a10..f6b1d8e4 100644 --- a/sigsession.h +++ b/sigsession.h @@ -21,36 +21,60 @@ #ifndef SIGSESSION_H #define SIGSESSION_H +#include + +#include +#include + +#include + extern "C" { #include } -#include +class LogicData; +class LogicDataSnapshot; +class Signal; -class SigSession +class SigSession : public QObject { + Q_OBJECT + public: SigSession(); ~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(); + + boost::shared_ptr get_data(); 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 probeList[SR_MAX_NUM_PROBES + 1]; + std::vector< boost::shared_ptr > _signals; + boost::shared_ptr _logic_data; + boost::shared_ptr _cur_logic_snapshot; + +signals: + 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