X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Flogicdatasnapshot.h;h=63680200d11f4bfce47ef24f6e6f31fdf9345f7c;hb=ffd5cd208c277b148d0e3a85d49330149f02f0c8;hp=21541202d81cfb6afa8114183f141bbb60dee259;hpb=51e77110d4316fd0106f8306f5e1f0523c5bf7d7;p=pulseview.git diff --git a/pv/logicdatasnapshot.h b/pv/logicdatasnapshot.h index 2154120..6368020 100644 --- a/pv/logicdatasnapshot.h +++ b/pv/logicdatasnapshot.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef PULSEVIEW_PV_LOGICDATASNAPSHOT_H +#define PULSEVIEW_PV_LOGICDATASNAPSHOT_H + #include "datasnapshot.h" #include @@ -44,7 +47,7 @@ private: }; private: - static const int ScaleStepCount = 10; + static const unsigned int ScaleStepCount = 10; static const int MipMapScalePower; static const int MipMapScaleFactor; static const float LogMipMapScaleFactor; @@ -65,9 +68,9 @@ private: void append_payload_to_mipmap(); -public: uint64_t get_sample(uint64_t index) const; +public: /** * Parses a logic data snapshot to generate a list of transitions * in a time interval to a given level of detail. @@ -79,13 +82,13 @@ public: * @param[in] sig_index The index of the signal. **/ void get_subsampled_edges(std::vector &edges, - int64_t start, int64_t end, + uint64_t start, uint64_t end, float min_length, int sig_index); private: uint64_t get_subsample(int level, uint64_t offset) const; - static int64_t pow2_ceil(int64_t x, unsigned int power); + static uint64_t pow2_ceil(uint64_t x, unsigned int power); private: struct MipMapLevel _mip_map[ScaleStepCount]; @@ -99,3 +102,5 @@ private: }; } // namespace pv + +#endif // PULSEVIEW_PV_LOGICDATASNAPSHOT_H