PulseView  0.3.0
A Qt-based sigrok GUI
pv::StoreSession Class Reference

#include <storesession.hpp>

Inheritance diagram for pv::StoreSession:
Collaboration diagram for pv::StoreSession:

Signals

void progress_updated ()
 

Public Member Functions

 StoreSession (const std::string &file_name, const std::shared_ptr< sigrok::OutputFormat > &output_format, const std::map< std::string, Glib::VariantBase > &options, const std::pair< uint64_t, uint64_t > sample_range, const Session &session)
 
 ~StoreSession ()
 
std::pair< int, int > progress () const
 
const QString & error () const
 
bool start ()
 
void wait ()
 
void cancel ()
 

Private Member Functions

void store_proc (std::shared_ptr< pv::data::LogicSegment > segment)
 

Private Attributes

const std::string file_name_
 
const std::shared_ptr< sigrok::OutputFormat > output_format_
 
const std::map< std::string, Glib::VariantBase > options_
 
const std::pair< uint64_t, uint64_t > sample_range_
 
const Sessionsession_
 
std::shared_ptr< sigrok::Output > output_
 
std::ofstream output_stream_
 
std::thread thread_
 
std::atomic< bool > interrupt_
 
std::atomic< int > units_stored_
 
std::atomic< int > unit_count_
 
std::mutex mutex_
 
QString error_
 
uint64_t start_sample_
 
uint64_t sample_count_
 

Static Private Attributes

static const size_t BlockSize = 1024 * 1024
 

Detailed Description

Definition at line 51 of file storesession.hpp.

Constructor & Destructor Documentation

pv::StoreSession::StoreSession ( const std::string &  file_name,
const std::shared_ptr< sigrok::OutputFormat > &  output_format,
const std::map< std::string, Glib::VariantBase > &  options,
const std::pair< uint64_t, uint64_t >  sample_range,
const Session session 
)

Definition at line 72 of file storesession.cpp.

pv::StoreSession::~StoreSession ( )

Definition at line 88 of file storesession.cpp.

Here is the call graph for this function:

Member Function Documentation

void pv::StoreSession::cancel ( )

Definition at line 192 of file storesession.cpp.

Here is the caller graph for this function:

const QString & pv::StoreSession::error ( ) const

Definition at line 98 of file storesession.cpp.

Here is the caller graph for this function:

pair< int, int > pv::StoreSession::progress ( ) const

Definition at line 93 of file storesession.cpp.

Here is the caller graph for this function:

void pv::StoreSession::progress_updated ( )
signal

Definition at line 122 of file moc_storesession.cpp.

Here is the caller graph for this function:

bool pv::StoreSession::start ( )

Definition at line 104 of file storesession.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::StoreSession::store_proc ( std::shared_ptr< pv::data::LogicSegment segment)
private

TODO: Wrap this in a std::unique_ptr when we transition to C++11

Definition at line 197 of file storesession.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::StoreSession::wait ( )

Definition at line 186 of file storesession.cpp.

Here is the caller graph for this function:

Member Data Documentation

const size_t pv::StoreSession::BlockSize = 1024 * 1024
staticprivate

Definition at line 56 of file storesession.hpp.

QString pv::StoreSession::error_
private

Definition at line 100 of file storesession.hpp.

const std::string pv::StoreSession::file_name_
private

Definition at line 84 of file storesession.hpp.

std::atomic<bool> pv::StoreSession::interrupt_
private

Definition at line 95 of file storesession.hpp.

std::mutex pv::StoreSession::mutex_
mutableprivate

Definition at line 99 of file storesession.hpp.

const std::map<std::string, Glib::VariantBase> pv::StoreSession::options_
private

Definition at line 86 of file storesession.hpp.

std::shared_ptr<sigrok::Output> pv::StoreSession::output_
private

Definition at line 90 of file storesession.hpp.

const std::shared_ptr<sigrok::OutputFormat> pv::StoreSession::output_format_
private

Definition at line 85 of file storesession.hpp.

std::ofstream pv::StoreSession::output_stream_
private

Definition at line 91 of file storesession.hpp.

uint64_t pv::StoreSession::sample_count_
private

Definition at line 102 of file storesession.hpp.

const std::pair<uint64_t, uint64_t> pv::StoreSession::sample_range_
private

Definition at line 87 of file storesession.hpp.

const Session& pv::StoreSession::session_
private

Definition at line 88 of file storesession.hpp.

uint64_t pv::StoreSession::start_sample_
private

Definition at line 102 of file storesession.hpp.

std::thread pv::StoreSession::thread_
private

Definition at line 93 of file storesession.hpp.

std::atomic<int> pv::StoreSession::unit_count_
private

Definition at line 97 of file storesession.hpp.

std::atomic<int> pv::StoreSession::units_stored_
private

Definition at line 97 of file storesession.hpp.


The documentation for this class was generated from the following files: