projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Session: Renamed pv::SigSession to Session
[pulseview.git]
/
pv
/
sigsession.cpp
diff --git
a/pv/sigsession.cpp
b/pv/sigsession.cpp
index 80830214877148f38a6100c06dc43bbc56c0a134..87ba9afa5d484eace490524d5d9247a0ab5061ef 100644
(file)
--- a/
pv/sigsession.cpp
+++ b/
pv/sigsession.cpp
@@
-82,7
+82,7
@@
using Glib::VariantBase;
using Glib::Variant;
namespace pv {
using Glib::Variant;
namespace pv {
-S
igSession::Sig
Session(DeviceManager &device_manager) :
+S
ession::
Session(DeviceManager &device_manager) :
device_manager_(device_manager),
session_(device_manager.context()->create_session()),
capture_state_(Stopped)
device_manager_(device_manager),
session_(device_manager.context()->create_session()),
capture_state_(Stopped)
@@
-90,33
+90,33
@@
SigSession::SigSession(DeviceManager &device_manager) :
set_default_device();
}
set_default_device();
}
-S
igSession::~Sig
Session()
+S
ession::~
Session()
{
// Stop and join to the thread
stop_capture();
}
{
// Stop and join to the thread
stop_capture();
}
-DeviceManager& S
igS
ession::device_manager()
+DeviceManager& Session::device_manager()
{
return device_manager_;
}
{
return device_manager_;
}
-const DeviceManager& S
igS
ession::device_manager() const
+const DeviceManager& Session::device_manager() const
{
return device_manager_;
}
{
return device_manager_;
}
-const shared_ptr<sigrok::Session>& S
igS
ession::session() const
+const shared_ptr<sigrok::Session>& Session::session() const
{
return session_;
}
{
return session_;
}
-shared_ptr<Device> S
igS
ession::device() const
+shared_ptr<Device> Session::device() const
{
return device_;
}
{
return device_;
}
-void S
igS
ession::set_device(shared_ptr<Device> device)
+void Session::set_device(shared_ptr<Device> device)
{
// Ensure we are not capturing before setting the device
stop_capture();
{
// Ensure we are not capturing before setting the device
stop_capture();
@@
-157,7
+157,7
@@
void SigSession::set_device(shared_ptr<Device> device)
device_selected();
}
device_selected();
}
-void S
igS
ession::set_file(const string &name)
+void Session::set_file(const string &name)
{
session_ = device_manager_.context()->load_session(name);
device_ = session_->devices()[0];
{
session_ = device_manager_.context()->load_session(name);
device_ = session_->devices()[0];
@@
-171,7
+171,7
@@
void SigSession::set_file(const string &name)
device_selected();
}
device_selected();
}
-void S
igS
ession::set_default_device()
+void Session::set_default_device()
{
shared_ptr<HardwareDevice> default_device;
const list< shared_ptr<HardwareDevice> > &devices =
{
shared_ptr<HardwareDevice> default_device;
const list< shared_ptr<HardwareDevice> > &devices =
@@
-192,13
+192,13
@@
void SigSession::set_default_device()
}
}
}
}
-S
igSession::capture_state Sig
Session::get_capture_state() const
+S
ession::capture_state
Session::get_capture_state() const
{
lock_guard<mutex> lock(sampling_mutex_);
return capture_state_;
}
{
lock_guard<mutex> lock(sampling_mutex_);
return capture_state_;
}
-void S
igS
ession::start_capture(function<void (const QString)> error_handler)
+void Session::start_capture(function<void (const QString)> error_handler)
{
stop_capture();
{
stop_capture();
@@
-220,11
+220,11
@@
void SigSession::start_capture(function<void (const QString)> error_handler)
// Begin the session
sampling_thread_ = std::thread(
// Begin the session
sampling_thread_ = std::thread(
- &S
igS
ession::sample_thread_proc, this, device_,
+ &Session::sample_thread_proc, this, device_,
error_handler);
}
error_handler);
}
-void S
igS
ession::stop_capture()
+void Session::stop_capture()
{
if (get_capture_state() != Stopped)
session_->stop();
{
if (get_capture_state() != Stopped)
session_->stop();
@@
-234,7
+234,7
@@
void SigSession::stop_capture()
sampling_thread_.join();
}
sampling_thread_.join();
}
-set< shared_ptr<data::SignalData> > S
igS
ession::get_data() const
+set< shared_ptr<data::SignalData> > Session::get_data() const
{
shared_lock<shared_mutex> lock(signals_mutex_);
set< shared_ptr<data::SignalData> > data;
{
shared_lock<shared_mutex> lock(signals_mutex_);
set< shared_ptr<data::SignalData> > data;
@@
-246,18
+246,18
@@
set< shared_ptr<data::SignalData> > SigSession::get_data() const
return data;
}
return data;
}
-boost::shared_mutex& S
igS
ession::signals_mutex() const
+boost::shared_mutex& Session::signals_mutex() const
{
return signals_mutex_;
}
{
return signals_mutex_;
}
-const vector< shared_ptr<view::Signal> >& S
igS
ession::signals() const
+const vector< shared_ptr<view::Signal> >& Session::signals() const
{
return signals_;
}
#ifdef ENABLE_DECODE
{
return signals_;
}
#ifdef ENABLE_DECODE
-bool S
igS
ession::add_decoder(srd_decoder *const dec)
+bool Session::add_decoder(srd_decoder *const dec)
{
map<const srd_channel*, shared_ptr<view::LogicSignal> > channels;
shared_ptr<data::DecoderStack> decoder_stack;
{
map<const srd_channel*, shared_ptr<view::LogicSignal> > channels;
shared_ptr<data::DecoderStack> decoder_stack;
@@
-313,13
+313,13
@@
bool SigSession::add_decoder(srd_decoder *const dec)
return true;
}
return true;
}
-vector< shared_ptr<view::DecodeTrace> > S
igS
ession::get_decode_signals() const
+vector< shared_ptr<view::DecodeTrace> > Session::get_decode_signals() const
{
shared_lock<shared_mutex> lock(signals_mutex_);
return decode_traces_;
}
{
shared_lock<shared_mutex> lock(signals_mutex_);
return decode_traces_;
}
-void S
igS
ession::remove_decode_signal(view::DecodeTrace *signal)
+void Session::remove_decode_signal(view::DecodeTrace *signal)
{
for (auto i = decode_traces_.begin(); i != decode_traces_.end(); i++)
if ((*i).get() == signal)
{
for (auto i = decode_traces_.begin(); i != decode_traces_.end(); i++)
if ((*i).get() == signal)
@@
-331,7
+331,7
@@
void SigSession::remove_decode_signal(view::DecodeTrace *signal)
}
#endif
}
#endif
-void S
igS
ession::set_capture_state(capture_state state)
+void Session::set_capture_state(capture_state state)
{
lock_guard<mutex> lock(sampling_mutex_);
const bool changed = capture_state_ != state;
{
lock_guard<mutex> lock(sampling_mutex_);
const bool changed = capture_state_ != state;
@@
-340,7
+340,7
@@
void SigSession::set_capture_state(capture_state state)
capture_state_changed(state);
}
capture_state_changed(state);
}
-void S
igS
ession::update_signals(shared_ptr<Device> device)
+void Session::update_signals(shared_ptr<Device> device)
{
assert(device);
assert(capture_state_ == Stopped);
{
assert(device);
assert(capture_state_ == Stopped);
@@
-407,7
+407,7
@@
void SigSession::update_signals(shared_ptr<Device> device)
signals_changed();
}
signals_changed();
}
-shared_ptr<view::Signal> S
igS
ession::signal_from_channel(
+shared_ptr<view::Signal> Session::signal_from_channel(
shared_ptr<Channel> channel) const
{
lock_guard<boost::shared_mutex> lock(signals_mutex_);
shared_ptr<Channel> channel) const
{
lock_guard<boost::shared_mutex> lock(signals_mutex_);
@@
-419,7
+419,7
@@
shared_ptr<view::Signal> SigSession::signal_from_channel(
return shared_ptr<view::Signal>();
}
return shared_ptr<view::Signal>();
}
-void S
igS
ession::read_sample_rate(shared_ptr<Device> device)
+void Session::read_sample_rate(shared_ptr<Device> device)
{
const auto keys = device_->config_keys(ConfigKey::DEVICE_OPTIONS);
const auto iter = keys.find(ConfigKey::SAMPLERATE);
{
const auto keys = device_->config_keys(ConfigKey::DEVICE_OPTIONS);
const auto iter = keys.find(ConfigKey::SAMPLERATE);
@@
-436,7
+436,7
@@
void SigSession::read_sample_rate(shared_ptr<Device> device)
}
}
}
}
-void S
igS
ession::sample_thread_proc(shared_ptr<Device> device,
+void Session::sample_thread_proc(shared_ptr<Device> device,
function<void (const QString)> error_handler)
{
assert(device);
function<void (const QString)> error_handler)
{
assert(device);
@@
-465,12
+465,12
@@
void SigSession::sample_thread_proc(shared_ptr<Device> device,
}
}
}
}
-void S
igS
ession::feed_in_header(shared_ptr<Device> device)
+void Session::feed_in_header(shared_ptr<Device> device)
{
read_sample_rate(device);
}
{
read_sample_rate(device);
}
-void S
igS
ession::feed_in_meta(shared_ptr<Device> device,
+void Session::feed_in_meta(shared_ptr<Device> device,
shared_ptr<Meta> meta)
{
(void)device;
shared_ptr<Meta> meta)
{
(void)device;
@@
-489,13
+489,13
@@
void SigSession::feed_in_meta(shared_ptr<Device> device,
signals_changed();
}
signals_changed();
}
-void S
igS
ession::feed_in_frame_begin()
+void Session::feed_in_frame_begin()
{
if (cur_logic_snapshot_ || !cur_analog_snapshots_.empty())
frame_began();
}
{
if (cur_logic_snapshot_ || !cur_analog_snapshots_.empty())
frame_began();
}
-void S
igS
ession::feed_in_logic(shared_ptr<Logic> logic)
+void Session::feed_in_logic(shared_ptr<Logic> logic)
{
lock_guard<mutex> lock(data_mutex_);
{
lock_guard<mutex> lock(data_mutex_);
@@
-540,7
+540,7
@@
void SigSession::feed_in_logic(shared_ptr<Logic> logic)
data_received();
}
data_received();
}
-void S
igS
ession::feed_in_analog(shared_ptr<Analog> analog)
+void Session::feed_in_analog(shared_ptr<Analog> analog)
{
lock_guard<mutex> lock(data_mutex_);
{
lock_guard<mutex> lock(data_mutex_);
@@
-608,7
+608,7
@@
void SigSession::feed_in_analog(shared_ptr<Analog> analog)
data_received();
}
data_received();
}
-void S
igS
ession::data_feed_in(shared_ptr<Device> device, shared_ptr<Packet> packet)
+void Session::data_feed_in(shared_ptr<Device> device, shared_ptr<Packet> packet)
{
assert(device);
assert(packet);
{
assert(device);
assert(packet);