X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fstoresession.hpp;h=07d3c2fa94270497f334dd58ccba98ec9f71e54d;hp=62cf18958e251229e02b19abb29a189fd999dda1;hb=c32bf63a93d8135b5d71c70270dbf45f9b4a8267;hpb=2b81ae4682ade4109ffa442794de36ceb32045eb diff --git a/pv/storesession.hpp b/pv/storesession.hpp index 62cf1895..07d3c2fa 100644 --- a/pv/storesession.hpp +++ b/pv/storesession.hpp @@ -18,20 +18,26 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_STORESESSION_H -#define PULSEVIEW_PV_STORESESSION_H +#ifndef PULSEVIEW_PV_STORESESSION_HPP +#define PULSEVIEW_PV_STORESESSION_HPP #include #include +#include +#include +#include #include #include #include +#include + #include namespace sigrok { class Output; +class OutputFormat; } namespace pv { @@ -39,7 +45,9 @@ namespace pv { class Session; namespace data { -class LogicSnapshot; +class SignalBase; +class AnalogSegment; +class LogicSegment; } class StoreSession : public QObject @@ -51,6 +59,9 @@ private: public: StoreSession(const std::string &file_name, + const std::shared_ptr &output_format, + const std::map &options, + const std::pair sample_range, const Session &session); ~StoreSession(); @@ -66,16 +77,22 @@ public: void cancel(); private: - void store_proc(std::shared_ptr snapshot); + void store_proc(std::vector< std::shared_ptr > achannel_list, + std::vector< std::shared_ptr > asegment_list, + std::shared_ptr lsegment); Q_SIGNALS: void progress_updated(); private: const std::string file_name_; + const std::shared_ptr output_format_; + const std::map options_; + const std::pair sample_range_; const Session &session_; std::shared_ptr output_; + std::ofstream output_stream_; std::thread thread_; @@ -85,8 +102,10 @@ private: mutable std::mutex mutex_; QString error_; + + uint64_t start_sample_, sample_count_; }; } // pv -#endif // PULSEVIEW_PV_STORESESSION_H +#endif // PULSEVIEW_PV_STORESESSION_HPP