X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fstoresession.hpp;h=64913a74d9eb4961baad25fde89ed39b75b963b8;hb=12ea3616767553ee0a615f14bbcb8ec614589e34;hp=9f31d59a7920c93d6252dba98acf0eee8fcef0d9;hpb=e93f553816d1938ab1917dff497a36acec4257e3;p=pulseview.git
diff --git a/pv/storesession.hpp b/pv/storesession.hpp
index 9f31d59..64913a7 100644
--- a/pv/storesession.hpp
+++ b/pv/storesession.hpp
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#ifndef PULSEVIEW_PV_STORESESSION_HPP
@@ -35,6 +34,16 @@
#include
+using std::atomic;
+using std::string;
+using std::shared_ptr;
+using std::pair;
+using std::map;
+using std::vector;
+using std::thread;
+using std::mutex;
+using std::ofstream;
+
namespace sigrok {
class Output;
class OutputFormat;
@@ -45,6 +54,8 @@ namespace pv {
class Session;
namespace data {
+class SignalBase;
+class AnalogSegment;
class LogicSegment;
}
@@ -56,14 +67,15 @@ private:
static const size_t BlockSize;
public:
- StoreSession(const std::string &file_name,
- const std::shared_ptr &output_format,
- const std::map &options,
+ StoreSession(const string &file_name,
+ const shared_ptr &output_format,
+ const map &options,
+ const pair sample_range,
const Session &session);
~StoreSession();
- std::pair progress() const;
+ pair progress() const;
const QString& error() const;
@@ -74,28 +86,35 @@ public:
void cancel();
private:
- void store_proc(std::shared_ptr segment);
+ void store_proc(vector< shared_ptr > achannel_list,
+ vector< shared_ptr > asegment_list,
+ shared_ptr lsegment);
Q_SIGNALS:
void progress_updated();
+ void store_successful();
+
private:
- const std::string file_name_;
- const std::shared_ptr output_format_;
- const std::map options_;
+ const string file_name_;
+ const shared_ptr output_format_;
+ const map options_;
+ const pair sample_range_;
const Session &session_;
- std::shared_ptr output_;
- std::ofstream output_stream_;
+ shared_ptr output_;
+ ofstream output_stream_;
std::thread thread_;
- std::atomic interrupt_;
+ atomic interrupt_;
- std::atomic units_stored_, unit_count_;
+ atomic units_stored_, unit_count_;
- mutable std::mutex mutex_;
+ mutable mutex mutex_;
QString error_;
+
+ uint64_t start_sample_, sample_count_;
};
} // pv