projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Update pulseview(1) manpage, add --no-scan option (-D)
[pulseview.git]
/
pv
/
session.hpp
diff --git
a/pv/session.hpp
b/pv/session.hpp
index c27afcb15f1177ed2b7951fec816279fc69ad92a..ead2f82df47955773e53a562f91c18a3e75f94d6 100644
(file)
--- a/
pv/session.hpp
+++ b/
pv/session.hpp
@@
-29,12
+29,6
@@
#include <unordered_set>
#include <vector>
#include <unordered_set>
#include <vector>
-#ifdef _WIN32
-// Windows: Avoid boost/thread namespace pollution (which includes windows.h).
-#define NOGDI
-#define NORESOURCE
-#endif
-
#include <QObject>
#include <QSettings>
#include <QString>
#include <QObject>
#include <QSettings>
#include <QString>
@@
-61,11
+55,14
@@
class Device;
class InputFormat;
class Logic;
class Meta;
class InputFormat;
class Logic;
class Meta;
+class Option;
class OutputFormat;
class Packet;
class Session;
} // namespace sigrok
class OutputFormat;
class Packet;
class Session;
} // namespace sigrok
+using sigrok::Option;
+
namespace pv {
class DeviceManager;
namespace pv {
class DeviceManager;
@@
-73,6
+70,7
@@
class DeviceManager;
namespace data {
class Analog;
class AnalogSegment;
namespace data {
class Analog;
class AnalogSegment;
+class DecodeSignal;
class Logic;
class LogicSegment;
class SignalBase;
class Logic;
class LogicSegment;
class SignalBase;
@@
-102,6
+100,8
@@
public:
Running
};
Running
};
+ static shared_ptr<sigrok::Context> sr_context;
+
public:
Session(DeviceManager &device_manager, QString name);
public:
Session(DeviceManager &device_manager, QString name);
@@
-163,6
+163,8
@@
public:
double get_samplerate() const;
double get_samplerate() const;
+ uint32_t get_segment_count() const;
+
void register_view(shared_ptr<views::ViewBase> view);
void deregister_view(shared_ptr<views::ViewBase> view);
void register_view(shared_ptr<views::ViewBase> view);
void deregister_view(shared_ptr<views::ViewBase> view);
@@
-171,10
+173,12
@@
public:
const unordered_set< shared_ptr<data::SignalBase> > signalbases() const;
const unordered_set< shared_ptr<data::SignalBase> > signalbases() const;
+ bool all_segments_complete(uint32_t segment_id) const;
+
#ifdef ENABLE_DECODE
#ifdef ENABLE_DECODE
-
bool add_decoder(srd_decoder *const dec
);
+
shared_ptr<data::DecodeSignal> add_decode_signal(
);
- void remove_decode_signal(shared_ptr<data::
SignalBase> signalbase
);
+ void remove_decode_signal(shared_ptr<data::
DecodeSignal> signal
);
#endif
private:
#endif
private:
@@
-185,11
+189,18
@@
private:
shared_ptr<data::SignalBase> signalbase_from_channel(
shared_ptr<sigrok::Channel> channel) const;
shared_ptr<data::SignalBase> signalbase_from_channel(
shared_ptr<sigrok::Channel> channel) const;
+ static map<string, Glib::VariantBase> input_format_options(
+ vector<string> user_spec,
+ map<string, shared_ptr<Option>> fmt_opts);
+
private:
void sample_thread_proc(function<void (const QString)> error_handler);
void free_unused_memory();
private:
void sample_thread_proc(function<void (const QString)> error_handler);
void free_unused_memory();
+ void signal_new_segment();
+ void signal_segment_completed();
+
void feed_in_header();
void feed_in_meta(shared_ptr<sigrok::Meta> meta);
void feed_in_header();
void feed_in_meta(shared_ptr<sigrok::Meta> meta);
@@
-197,6
+208,7
@@
private:
void feed_in_trigger();
void feed_in_frame_begin();
void feed_in_trigger();
void feed_in_frame_begin();
+ void feed_in_frame_end();
void feed_in_logic(shared_ptr<sigrok::Logic> logic);
void feed_in_logic(shared_ptr<sigrok::Logic> logic);
@@
-227,11
+239,13
@@
private:
shared_ptr<data::LogicSegment> cur_logic_segment_;
map< shared_ptr<sigrok::Channel>, shared_ptr<data::AnalogSegment> >
cur_analog_segments_;
shared_ptr<data::LogicSegment> cur_logic_segment_;
map< shared_ptr<sigrok::Channel>, shared_ptr<data::AnalogSegment> >
cur_analog_segments_;
+ int32_t highest_segment_id_;
std::thread sampling_thread_;
bool out_of_memory_;
bool data_saved_;
std::thread sampling_thread_;
bool out_of_memory_;
bool data_saved_;
+ bool frame_began_;
Q_SIGNALS:
void capture_state_changed(int state);
Q_SIGNALS:
void capture_state_changed(int state);
@@
-243,12
+257,11
@@
Q_SIGNALS:
void trigger_event(util::Timestamp location);
void trigger_event(util::Timestamp location);
- void frame_began();
+ void new_segment(int new_segment_id);
+ void segment_completed(int segment_id);
void data_received();
void data_received();
- void frame_ended();
-
void add_view(const QString &title, views::ViewType type,
Session *session);
void add_view(const QString &title, views::ViewType type,
Session *session);