Vector BLF

Loading...
Searching...
No Matches
GeneralSerialEvent.h
1// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <tobias.lorenz@gmx.net>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Vector/BLF/platform.h>
8
9#include <array>
10#include <vector>
11
12#include <Vector/BLF/AbstractFile.h>
13#include <Vector/BLF/ObjectHeader.h>
14
15#include <Vector/BLF/vector_blf_export.h>
16
17 namespace Vector {
18 namespace BLF {
19
23 struct VECTOR_BLF_EXPORT GeneralSerialEvent final {
24 GeneralSerialEvent() = default;
25 virtual ~GeneralSerialEvent() noexcept = default;
26 GeneralSerialEvent(const GeneralSerialEvent &) = default;
27 GeneralSerialEvent & operator=(const GeneralSerialEvent &) = default;
28 GeneralSerialEvent(GeneralSerialEvent &&) = default;
29 GeneralSerialEvent & operator=(GeneralSerialEvent &&) = default;
30
32 virtual void read(AbstractFile & is);
33
35 virtual void write(AbstractFile & os);
36
38 virtual uint32_t calculateObjectSize() const;
39
45 uint32_t dataLength {};
46
52 uint32_t timeStampsLength {};
53
55 uint64_t reservedGeneralSerialEvent {};
56
62 std::vector<uint8_t> data {};
63
69 std::vector<int64_t> timeStamps {};
70};
71
72}
73}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::GeneralSerialEvent::data
std::vector< uint8_t > data
variable data
Definition GeneralSerialEvent.h:62
Vector::BLF::GeneralSerialEvent::timeStampsLength
uint32_t timeStampsLength
length of variable timestamps in bytes
Definition GeneralSerialEvent.h:52
Vector::BLF::GeneralSerialEvent::calculateObjectSize
virtual uint32_t calculateObjectSize() const
Definition GeneralSerialEvent.cpp:33
Vector::BLF::GeneralSerialEvent::write
virtual void write(AbstractFile &os)
Definition GeneralSerialEvent.cpp:21
Vector::BLF::GeneralSerialEvent::dataLength
uint32_t dataLength
length of variable data in bytes
Definition GeneralSerialEvent.h:45
Vector::BLF::GeneralSerialEvent::read
virtual void read(AbstractFile &is)
Definition GeneralSerialEvent.cpp:10
Vector::BLF::GeneralSerialEvent::timeStamps
std::vector< int64_t > timeStamps
variable timestamps (optional)
Definition GeneralSerialEvent.h:69
Vector::BLF::GeneralSerialEvent::reservedGeneralSerialEvent
uint64_t reservedGeneralSerialEvent
Definition GeneralSerialEvent.h:55