MDF Lib 2.2
Interface against MDF 3/4 files
Loading...
Searching...
No Matches
samplerecord.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 Ingemar Hedvall
3 * SPDX-License-Identifier: MIT
4 */
8#pragma once
9#include <cstdint>
10#include <cstddef>
11#include <vector>
12namespace mdf {
13
21 uint64_t timestamp = 0;
22 uint64_t record_id = 0;
23 std::vector<uint8_t> record_buffer;
24 bool vlsd_data = false;
25 std::vector<uint8_t> vlsd_buffer;
26
28 [[nodiscard]] size_t SampleSize() const {
29 return record_buffer.size() + vlsd_buffer.size();
30 }
31};
32
33} // namespace mdf
Main namespace for the MDF library.
Definition canmessage.h:17
Simple record buffer structure.
Definition samplerecord.h:20
std::vector< uint8_t > vlsd_buffer
VLSD record buffer.
Definition samplerecord.h:25
bool vlsd_data
True if the vlsd_buffer holds data.
Definition samplerecord.h:24
uint64_t timestamp
Nanosecond since midnight 1970-01-01 UTC.
Definition samplerecord.h:21
size_t SampleSize() const
Returns the size of a record buffer.
Definition samplerecord.h:28
std::vector< uint8_t > record_buffer
Record buffer (fixed size).
Definition samplerecord.h:23
uint64_t record_id
Unique record ID within the data group.
Definition samplerecord.h:22