30 #ifdef STANDALONE_PARSER
183 uint64_t mReadPointer;
186 std::function<uint64_t(
bool*)> mReader;
188 void seekTransition(uint64_t pos) { seekg(pos*
sizeof(uint64_t) + 44); }
224 std::string mFilename;
228 int mLastWrittenValue;
229 uint64_t mLastWrittenTime;
231 void convertToCoded();
243 int index()
const {
return mIndex; }
void convertCoded()
Convert data buffer from "hal " format to "halx".
uint64_t mCount
Number of elements in buffer.
SaleaeDataBuffer(uint64_t cnt=0)
Constructor. Generates null instance when no argument is given.
~SaleaeDataBuffer()
Destructor takes care of disposing allocated memory.
uint64_t * mTimeArray
Buffer for mCount transition time values.
int * mValueArray
Buffer for mCount data values.
void dump() const
Dump buffer content to stdout.
bool isNull() const
Returns whether buffer has data. Will be false when e.g. reading behind EOF.
static const int sReadError
Fake data value to indicate all kind of errors.
SaleaeDataTuple(uint64_t t=0, int val=sReadError)
Constructor. Generates null/read error instance when no arguments are given.
uint64_t mTime
Transition time.
bool readError() const
Indicates that there was an error and no data was returned.
The SaleaeDirectoryFileIndex class represents a single SALEAE data file. The class comprises the inde...
void writeTimeValue(uint64_t t, int32_t val)
Write single data tuple to disk.
void close()
Update header on disk and close file.
SaleaeOutputFile(const std::string &filename, int index_)
SaleaeDirectoryFileIndex fileIndex() const
File index summary for saleae directory.
int index() const
Getter for data file index (XXX in digital_XXX.bin)
void put_data(SaleaeDataBuffer *buf)
Write buffered data.