Vector BLF

Loading...
Searching...
No Matches
ObjectHeader.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
22 struct VECTOR_BLF_EXPORT ObjectHeader : ObjectHeaderBase {
23 ObjectHeader(const ObjectType objectType, const uint16_t objectVersion = 0);
24
25 void read(AbstractFile & is) override;
26 void write(AbstractFile & os) override;
27 uint16_t calculateHeaderSize() const override;
28 uint32_t calculateObjectSize() const override;
29
31 enum ObjectFlags : uint32_t {
39 TimeTenMics = 0x00000001,
40
47 TimeOneNans = 0x00000002
48 };
49
55 uint32_t objectFlags {ObjectFlags::TimeOneNans};
56
60 uint16_t clientIndex {};
61
71 uint16_t objectVersion {0};
72
79 uint64_t objectTimeStamp {};
80};
81
82}
83}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::ObjectHeaderBase::objectType
ObjectType objectType
object type
Definition ObjectHeaderBase.h:248
Vector::BLF::ObjectHeader::calculateHeaderSize
uint16_t calculateHeaderSize() const override
Definition ObjectHeader.cpp:31
Vector::BLF::ObjectHeader::clientIndex
uint16_t clientIndex
client index of send node
Definition ObjectHeader.h:60
Vector::BLF::ObjectHeader::objectTimeStamp
uint64_t objectTimeStamp
object timestamp
Definition ObjectHeader.h:79
Vector::BLF::ObjectHeader::objectFlags
uint32_t objectFlags
object flags
Definition ObjectHeader.h:55
Vector::BLF::ObjectHeader::objectVersion
uint16_t objectVersion
object specific version
Definition ObjectHeader.h:71
Vector::BLF::ObjectHeader::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition ObjectHeader.cpp:40
Vector::BLF::ObjectHeader::ObjectFlags
ObjectFlags
Definition ObjectHeader.h:31
Vector::BLF::ObjectHeader::TimeOneNans
@ TimeOneNans
1 nano second timestamp
Definition ObjectHeader.h:47
Vector::BLF::ObjectHeader::TimeTenMics
@ TimeTenMics
10 micro second timestamp
Definition ObjectHeader.h:39
Vector::BLF::ObjectHeader::write
void write(AbstractFile &os) override
Definition ObjectHeader.cpp:23
Vector::BLF::ObjectHeader::read
void read(AbstractFile &is) override
Definition ObjectHeader.cpp:15