X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fsigsession.h;h=307330ecb3e40065cc26b5dd8a05b6617b71ace3;hp=29929a9dde63d1b1bbc4520885d28cc3e719370e;hb=3868e5fa3081573891ff2ae5b9dd67eb4a6afa4b;hpb=8d634081d8b0cc741dd34d8c646474ff6754aea8 diff --git a/pv/sigsession.h b/pv/sigsession.h index 29929a9d..307330ec 100644 --- a/pv/sigsession.h +++ b/pv/sigsession.h @@ -22,8 +22,10 @@ #define PULSEVIEW_PV_SIGSESSION_H #include +#include #include +#include #include #include @@ -55,12 +57,15 @@ public: void start_capture(struct sr_dev_inst* sdi, uint64_t record_length, uint64_t sample_rate); - std::vector< boost::shared_ptr >& + std::vector< boost::shared_ptr > get_signals(); boost::shared_ptr get_data(); private: + void sample_thread_proc(struct sr_dev_inst *sdi, + uint64_t record_length, uint64_t sample_rate); + void data_feed_in(const struct sr_dev_inst *sdi, struct sr_datafeed_packet *packet); @@ -68,11 +73,18 @@ private: struct sr_datafeed_packet *packet); private: + mutable boost::mutex _signals_mutex; std::vector< boost::shared_ptr > _signals; + + mutable boost::mutex _data_mutex; boost::shared_ptr _logic_data; boost::shared_ptr _cur_logic_snapshot; + std::auto_ptr _sampling_thread; + signals: + void signals_changed(); + void data_updated(); private: