mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
26 lines
583 B
C++
26 lines
583 B
C++
#ifndef FLUXMAP_H
|
|
#define FLUXMAP_H
|
|
|
|
class Fluxmap
|
|
{
|
|
public:
|
|
uint8_t operator[](int index) const
|
|
{
|
|
return _intervals.at(index);
|
|
}
|
|
|
|
nanoseconds_t duration() const { return _duration; }
|
|
const uint8_t* ptr() const { return &_intervals.at(0); }
|
|
int bytes() const { return _intervals.size(); }
|
|
|
|
Fluxmap& appendIntervals(std::vector<uint8_t>& intervals);
|
|
Fluxmap& appendIntervals(const uint8_t* ptr, size_t len);
|
|
|
|
private:
|
|
nanoseconds_t _duration = 0;
|
|
int _ticks = 0;
|
|
std::vector<uint8_t> _intervals;
|
|
};
|
|
|
|
#endif
|