More missing files.

This commit is contained in:
David Given
2018-10-20 16:25:19 +02:00
parent 41f56c4ef5
commit 30f716d1b5
2 changed files with 49 additions and 0 deletions

25
lib/fluxmap.h Normal file
View File

@@ -0,0 +1,25 @@
#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