CARLA
 
载入中...
搜索中...
未找到
CarlaRecorderVisualTime.cpp
浏览该文件的文档.
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
8#include "CarlaRecorder.h"
10
12{
13 Time = ThisTime;
14}
15
16void CarlaRecorderVisualTime::Read(std::ifstream &InFile)
17{
18 ReadValue<double>(InFile, this->Time);
19}
20
21void 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}
void Read(std::ifstream &InFile)
void Write(std::ofstream &OutFile)