CARLA
载入中...
搜索中...
未找到
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
Recorder
CarlaRecorderFrameCounter.cpp
浏览该文件的文档.
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.h
CarlaRecorderHelpers.h
CarlaRecorder.h
CarlaRecorderPacketId::FrameCounter
@ FrameCounter
CarlaRecorderFrameCounter::FrameCounter
uint64_t FrameCounter
Definition
CarlaRecorderFrameCounter.h:15
CarlaRecorderFrameCounter::Write
void Write(std::ostream &OutFile)
Definition
CarlaRecorderFrameCounter.cpp:16
CarlaRecorderFrameCounter::Read
void Read(std::istream &InFile)
Definition
CarlaRecorderFrameCounter.cpp:11
制作者
1.10.0