X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fsignal.hpp;h=1b9f254330a79fd150f6f73165f5cb910a76b5be;hp=1c53d8b2260a960669261c056f069a9e35883bfb;hb=eeceee9955e7db4ac777d49d1b7a766069476b08;hpb=b4bc9b55381ff22196785291d3862c8c8c131885 diff --git a/pv/views/trace/signal.hpp b/pv/views/trace/signal.hpp index 1c53d8b..1b9f254 100644 --- a/pv/views/trace/signal.hpp +++ b/pv/views/trace/signal.hpp @@ -27,6 +27,8 @@ #include +#include + #include "trace.hpp" #include "viewitemowner.hpp" @@ -68,6 +70,15 @@ public: virtual shared_ptr data() const = 0; + /** + * Determines the closest level change (i.e. edge) to a given sample, which + * is useful for e.g. the "snap to edge" functionality. + * + * @param sample_pos Sample to use + * @return The changes left and right of the given position + */ + virtual vector get_nearest_level_changes(uint64_t sample_pos) = 0; + /** * Returns true if the trace is visible and enabled. */