Vector BLF

Loading...
Searching...
No Matches
VarObjectHeader.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 <Vector/BLF/AbstractFile.h>
10#include <Vector/BLF/ObjectHeaderBase.h>
11
12#include <Vector/BLF/vector_blf_export.h>
13
14 namespace Vector {
15 namespace BLF {
16
20 struct VECTOR_BLF_EXPORT VarObjectHeader : ObjectHeaderBase {
21 VarObjectHeader(const ObjectType objectType);
22
23 void read(AbstractFile & is) override;
24 void write(AbstractFile & os) override;
25 uint16_t calculateHeaderSize() const override;
26 uint32_t calculateObjectSize() const override;
27
29 enum ObjectFlags : uint32_t {
37 TimeTenMics = 0x00000001,
38
45 TimeOneNans = 0x00000002
46 };
47
53 uint32_t objectFlags {ObjectFlags::TimeOneNans};
54
58 uint16_t objectStaticSize {};
59
67 uint16_t objectVersion {};
68
75 uint64_t objectTimeStamp {};
76};
77
78}
79}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::ObjectHeaderBase::objectType
ObjectType objectType
object type
Definition ObjectHeaderBase.h:248
Vector::BLF::VarObjectHeader::objectFlags
uint32_t objectFlags
object flags
Definition VarObjectHeader.h:53
Vector::BLF::VarObjectHeader::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition VarObjectHeader.cpp:39
Vector::BLF::VarObjectHeader::objectStaticSize
uint16_t objectStaticSize
size of the static part of the object
Definition VarObjectHeader.h:58
Vector::BLF::VarObjectHeader::ObjectFlags
ObjectFlags
Definition VarObjectHeader.h:29
Vector::BLF::VarObjectHeader::TimeOneNans
@ TimeOneNans
1 nano second timestamp
Definition VarObjectHeader.h:45
Vector::BLF::VarObjectHeader::TimeTenMics
@ TimeTenMics
10 micro second timestamp
Definition VarObjectHeader.h:37
Vector::BLF::VarObjectHeader::objectTimeStamp
uint64_t objectTimeStamp
object timestamp
Definition VarObjectHeader.h:75
Vector::BLF::VarObjectHeader::write
void write(AbstractFile &os) override
Definition VarObjectHeader.cpp:22
Vector::BLF::VarObjectHeader::read
void read(AbstractFile &is) override
Definition VarObjectHeader.cpp:14
Vector::BLF::VarObjectHeader::calculateHeaderSize
uint16_t calculateHeaderSize() const override
Definition VarObjectHeader.cpp:30
Vector::BLF::VarObjectHeader::objectVersion
uint16_t objectVersion
object specific version
Definition VarObjectHeader.h:67