* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <libsigrok/libsigrok.h>
#include <libsigrokdecode/libsigrokdecode.h>
#include "decoder.h"
switch(probe->type) {
case SR_PROBE_LOGIC:
signal = shared_ptr<view::Signal>(
- new view::LogicSignal(*this, probe,
- _logic_data));
+ new view::LogicSignal(*this, dev_inst,
+ probe, _logic_data));
break;
case SR_PROBE_ANALOG:
shared_ptr<data::Analog> data(
new data::Analog());
signal = shared_ptr<view::Signal>(
- new view::AnalogSignal(*this, probe,
- data));
+ new view::AnalogSignal(*this, dev_inst,
+ probe, data));
break;
}
const float AnalogSignal::EnvelopeThreshold = 256.0f;
-AnalogSignal::AnalogSignal(pv::SigSession &session, sr_probe *const probe,
+AnalogSignal::AnalogSignal(pv::SigSession &session,
+ shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
shared_ptr<data::Analog> data) :
- Signal(session, probe),
+ Signal(session, dev_inst, probe),
_data(data),
_scale(1.0f)
{
static const float EnvelopeThreshold;
public:
- AnalogSignal(pv::SigSession &session, sr_probe *const probe,
+ AnalogSignal(pv::SigSession &session,
+ boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
boost::shared_ptr<pv::data::Analog> data);
virtual ~AnalogSignal();
QColor(0xEE, 0xEE, 0xEC), // White
};
-LogicSignal::LogicSignal(pv::SigSession &session, sr_probe *const probe,
+LogicSignal::LogicSignal(pv::SigSession &session,
+ shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
shared_ptr<data::Logic> data) :
- Signal(session, probe),
+ Signal(session, dev_inst, probe),
_data(data),
_trigger_none(NULL),
_trigger_rising(NULL),
static const QColor SignalColours[10];
public:
- LogicSignal(pv::SigSession &session, sr_probe *const probe,
+ LogicSignal(pv::SigSession &session,
+ boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
boost::shared_ptr<pv::data::Logic> data);
virtual ~LogicSignal();
#include <QFormLayout>
#include <QMenu>
+#include <libsigrok/libsigrok.h>
+
#include "signal.h"
#include "view.h"
+using boost::shared_ptr;
+
namespace pv {
namespace view {
"SCL"
};
-Signal::Signal(pv::SigSession &session, sr_probe *const probe) :
+Signal::Signal(pv::SigSession &session, shared_ptr<pv::DevInst> dev_inst,
+ sr_probe *const probe) :
Trace(session, probe->name),
+ _dev_inst(dev_inst),
_probe(probe),
_name_widget(NULL),
_updating_name_widget(false)
#include <stdint.h>
-#include <libsigrok/libsigrok.h>
-
#include "trace.h"
+struct sr_probe;
+
namespace pv {
+class DevInst;
+
namespace data {
class SignalData;
}
Q_OBJECT
protected:
- Signal(pv::SigSession &session, sr_probe *const probe);
+ Signal(pv::SigSession &session, boost::shared_ptr<pv::DevInst> dev_inst,
+ sr_probe *const probe);
public:
/**
void on_disable();
protected:
+ boost::shared_ptr<pv::DevInst> _dev_inst;
sr_probe *const _probe;
QComboBox *_name_widget;