CARLA
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
Recorder
CarlaRecorderFrameCounter.cpp
Go to the documentation of this file.
1
// Copyright (c) 2022 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#include "
CarlaRecorderFrameCounter.h
"
8
#include "
CarlaRecorder.h
"
9
#include "
CarlaRecorderHelpers.h
"
10
11
void
CarlaRecorderFrameCounter::Read
(std::istream &InFile)
12
{
13
ReadValue<uint64_t>(InFile, this->
FrameCounter
);
14
}
15
16
void
CarlaRecorderFrameCounter::Write
(std::ostream &OutFile)
17
{
18
// write the packet id
19
WriteValue<char>(OutFile,
static_cast<
char
>
(
CarlaRecorderPacketId::FrameCounter
));
20
21
// write packet size
22
uint32_t Total =
sizeof
(uint64_t);
23
WriteValue<uint32_t>(OutFile, Total);
24
25
WriteValue<uint64_t>(OutFile, this->
FrameCounter
);
26
}
CarlaRecorderFrameCounter::Write
void Write(std::ostream &OutFile)
Definition:
CarlaRecorderFrameCounter.cpp:16
CarlaRecorder.h
CarlaRecorderFrameCounter.h
CarlaRecorderHelpers.h
CarlaRecorderFrameCounter::FrameCounter
uint64_t FrameCounter
Definition:
CarlaRecorderFrameCounter.h:15
CarlaRecorderPacketId::FrameCounter
CarlaRecorderFrameCounter::Read
void Read(std::istream &InFile)
Definition:
CarlaRecorderFrameCounter.cpp:11
Generated by
1.8.13