Vector BLF

Loading...
Searching...
No Matches
CompactSerialEvent.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 CompactSerialEvent final {
24 CompactSerialEvent() = default;
25 virtual ~CompactSerialEvent() noexcept = default;
26 CompactSerialEvent(const CompactSerialEvent &) = default;
27 CompactSerialEvent & operator=(const CompactSerialEvent &) = default;
28 CompactSerialEvent(CompactSerialEvent &&) = default;
29 CompactSerialEvent & operator=(CompactSerialEvent &&) = default;
30
32 virtual void read(AbstractFile & is);
33
35 virtual void write(AbstractFile & os);
36
38 virtual uint32_t calculateObjectSize() const;
39
41 uint8_t compactLength {};
42
44 std::array<uint8_t, 15> compactData {};
45};
46
47}
48}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::CompactSerialEvent::calculateObjectSize
virtual uint32_t calculateObjectSize() const
Definition CompactSerialEvent.cpp:10
Vector::BLF::CompactSerialEvent::read
virtual void read(AbstractFile &is)
Definition CompactSerialEvent.cpp:16
Vector::BLF::CompactSerialEvent::compactData
std::array< uint8_t, 15 > compactData
Definition CompactSerialEvent.h:44
Vector::BLF::CompactSerialEvent::compactLength
uint8_t compactLength
Definition CompactSerialEvent.h:41
Vector::BLF::CompactSerialEvent::write
virtual void write(AbstractFile &os)
Definition CompactSerialEvent.cpp:22