* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <boost/foreach.hpp>
+
#include "analog.h"
#include "analogsnapshot.h"
_snapshots.clear();
}
+uint64_t Analog::get_max_sample_count() const
+{
+ uint64_t l = 0;
+ BOOST_FOREACH(const boost::shared_ptr<AnalogSnapshot> s, _snapshots) {
+ assert(s);
+ l = max(l, s->get_sample_count());
+ }
+ return l;
+}
+
} // namespace data
} // namespace pv
void clear();
+ uint64_t get_max_sample_count() const;
+
private:
std::deque< boost::shared_ptr<AnalogSnapshot> > _snapshots;
};
_annotations.clear();
}
+uint64_t DecoderStack::get_max_sample_count() const
+{
+ if (_annotations.empty())
+ return 0;
+ return _annotations.back()->end_sample();
+}
+
void DecoderStack::decode_proc(shared_ptr<data::Logic> data)
{
srd_session *session;
void clear();
+ uint64_t get_max_sample_count() const;
+
void begin_decode();
private:
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <boost/foreach.hpp>
+
#include "logic.h"
#include "logicsnapshot.h"
_snapshots.clear();
}
+uint64_t Logic::get_max_sample_count() const
+{
+ uint64_t l = 0;
+ BOOST_FOREACH(boost::shared_ptr<LogicSnapshot> s, _snapshots) {
+ assert(s);
+ l = max(l, s->get_sample_count());
+ }
+ return l;
+}
+
} // namespace data
} // namespace pv
void clear();
+ uint64_t get_max_sample_count() const;
+
private:
const unsigned int _num_probes;
std::deque< boost::shared_ptr<LogicSnapshot> > _snapshots;
virtual void clear() = 0;
+ virtual uint64_t get_max_sample_count() const = 0;
+
protected:
double _start_time;
double _samplerate;
}
}
+uint64_t Annotation::start_sample() const
+{
+ return _start_sample;
+}
+
+uint64_t Annotation::end_sample() const
+{
+ return _end_sample;
+}
+
void Annotation::paint(QPainter &p, QColor text_color, int h,
int left, int right, double samples_per_pixel, double pixels_offset,
int y)
public:
Annotation(const srd_proto_data *const pdata);
+ uint64_t start_sample() const;
+ uint64_t end_sample() const;
+
void paint(QPainter &p, QColor text_colour, int text_height, int left,
int right, double samples_per_pixel, double pixels_offset,
int y);