From: Joel Holdsworth Date: Mon, 26 Aug 2013 22:28:36 +0000 (+0100) Subject: Added Snapshot::unit_size X-Git-Tag: pulseview-0.2.0~301 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6fd14a32c76a8d4548223eba546d1805d2725df0;p=pulseview.git Added Snapshot::unit_size --- diff --git a/pv/data/snapshot.cpp b/pv/data/snapshot.cpp index 8571dc66..60238841 100644 --- a/pv/data/snapshot.cpp +++ b/pv/data/snapshot.cpp @@ -50,6 +50,11 @@ uint64_t Snapshot::get_sample_count() const return _sample_count; } +int Snapshot::unit_size() const +{ + return _unit_size; +} + void Snapshot::append_data(void *data, uint64_t samples) { lock_guard lock(_mutex); diff --git a/pv/data/snapshot.h b/pv/data/snapshot.h index 5fb79198..1758d4cd 100644 --- a/pv/data/snapshot.h +++ b/pv/data/snapshot.h @@ -37,6 +37,8 @@ public: uint64_t get_sample_count() const; + int unit_size() const; + protected: void append_data(void *data, uint64_t samples);