projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide notifiers for when signal data changes
[pulseview.git]
/
pv
/
data
/
analog.cpp
diff --git
a/pv/data/analog.cpp
b/pv/data/analog.cpp
index 3f96dae1afe566e61d512176d4d1cf2d6fbdd08d..1a2449891d9d8b86922c6b6efb6350d8b14db70d 100644
(file)
--- a/
pv/data/analog.cpp
+++ b/
pv/data/analog.cpp
@@
-14,14
+14,13
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <cassert>
#include "analog.hpp"
*/
#include <cassert>
#include "analog.hpp"
-#include "analogs
napsho
t.hpp"
+#include "analogs
egmen
t.hpp"
using std::deque;
using std::max;
using std::deque;
using std::max;
@@
-36,36
+35,44
@@
Analog::Analog() :
{
}
{
}
-void Analog::push_s
napshot(shared_ptr<AnalogSnapshot> &snapsho
t)
+void Analog::push_s
egment(shared_ptr<AnalogSegment> &segmen
t)
{
{
- s
napshots_.push_front(snapsho
t);
+ s
egments_.push_front(segmen
t);
}
}
-const deque< shared_ptr<AnalogS
napshot> >& Analog::analog_snapsho
ts() const
+const deque< shared_ptr<AnalogS
egment> >& Analog::analog_segmen
ts() const
{
{
- return s
napsho
ts_;
+ return s
egmen
ts_;
}
}
-vector< shared_ptr<S
napshot> > Analog::snapsho
ts() const
+vector< shared_ptr<S
egment> > Analog::segmen
ts() const
{
{
- return vector< shared_ptr<S
napsho
t> >(
- s
napshots_.begin(), snapsho
ts_.end());
+ return vector< shared_ptr<S
egmen
t> >(
+ s
egments_.begin(), segmen
ts_.end());
}
void Analog::clear()
{
}
void Analog::clear()
{
- snapshots_.clear();
+ segments_.clear();
+
+ samples_cleared();
}
}
-uint64_t Analog::
get_
max_sample_count() const
+uint64_t Analog::max_sample_count() const
{
uint64_t l = 0;
{
uint64_t l = 0;
- for (const std::shared_ptr<AnalogS
napshot> s : snapsho
ts_) {
+ for (const std::shared_ptr<AnalogS
egment> s : segmen
ts_) {
assert(s);
l = max(l, s->get_sample_count());
}
return l;
}
assert(s);
l = max(l, s->get_sample_count());
}
return l;
}
+void Analog::notify_samples_added(QObject* segment, uint64_t start_sample,
+ uint64_t end_sample)
+{
+ samples_added(segment, start_sample, end_sample);
+}
+
} // namespace data
} // namespace pv
} // namespace data
} // namespace pv