CARLA
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
Recorder
CarlaRecorderVisualTime.cpp
Go to the documentation of this file.
1
// Copyright (c) 2020 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 "
CarlaRecorderVisualTime.h
"
8
#include "
CarlaRecorder.h
"
9
#include "
CarlaRecorderHelpers.h
"
10
11
void
CarlaRecorderVisualTime::SetTime
(
double
ThisTime)
12
{
13
Time
= ThisTime;
14
}
15
16
void
CarlaRecorderVisualTime::Read
(std::ifstream &InFile)
17
{
18
ReadValue<double>(InFile, this->
Time
);
19
}
20
21
void
CarlaRecorderVisualTime::Write
(std::ofstream &OutFile)
22
{
23
// write the packet id
24
WriteValue<char>(OutFile,
static_cast<
char
>
(
CarlaRecorderPacketId::VisualTime
));
25
26
// write packet size
27
uint32_t Total =
sizeof
(double);
28
WriteValue<uint32_t>(OutFile, Total);
29
30
WriteValue<double>(OutFile, this->
Time
);
31
}
CarlaRecorder.h
CarlaRecorderHelpers.h
CarlaRecorderVisualTime::Write
void Write(std::ofstream &OutFile)
Definition:
CarlaRecorderVisualTime.cpp:21
CarlaRecorderVisualTime::SetTime
void SetTime(double ThisTime)
Definition:
CarlaRecorderVisualTime.cpp:11
CarlaRecorderVisualTime::Time
double Time
Definition:
CarlaRecorderVisualTime.h:15
CarlaRecorderPacketId::VisualTime
CarlaRecorderVisualTime.h
CarlaRecorderVisualTime::Read
void Read(std::ifstream &InFile)
Definition:
CarlaRecorderVisualTime.cpp:16
Generated by
1.8.13