X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=logicdatasnapshot.h;h=e6fee52bea70f88aad01ee18c8522636930c4bc7;hp=f321f6cf6e031904e185c5be4b9f89630d41484b;hb=2858b391af20bd46c9a7da17195ec8d58bcd12c3;hpb=81a635d1f697166ce7bf78eda52c58ddf268d371 diff --git a/logicdatasnapshot.h b/logicdatasnapshot.h index f321f6cf..e6fee52b 100644 --- a/logicdatasnapshot.h +++ b/logicdatasnapshot.h @@ -20,10 +20,32 @@ #include "datasnapshot.h" +#include +#include + class LogicDataSnapshot : public DataSnapshot { +public: + typedef std::pair EdgePair; + public: LogicDataSnapshot(const sr_datafeed_logic &logic); void append_payload(const sr_datafeed_logic &logic); + + uint64_t get_sample(uint64_t index) const; + + /** + * Parses a logic data snapshot to generate a list of transitions + * in a time interval to a given level of detail. + * @param[out] edges The vector to place the edges into. + * @param[in] start The start sample index. + * @param[in] end The end sample index. + * @param[in] quantization_length The minimum period of time that + * can be resolved at this level of detail. + * @param[in] sig_index The index of the signal. + **/ + void get_subsampled_edges(std::vector &edges, + int64_t start, int64_t end, + int64_t quantization_length, int sig_index); };