CARLA
AsyncDataStreamImpl.h
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 // Note: AsyncDataStream.h has a circular dependency with Game/CarlaEngine.h.
8 // You should not have to include this file directly (CarlaEngine.h includes it
9 // at the appropriate place.)
10 
11 #pragma once
12 
13 #include "Carla/Game/CarlaEngine.h"
15 
16 template <typename T>
17 template <typename SensorT>
19  const SensorT &Sensor,
20  double Timestamp,
21  StreamType InStream)
22  : Stream(std::move(InStream)),
23  Header([&Sensor, Timestamp]() {
24  //check(IsInGameThread());
26  return Serializer::Serialize(
27  carla::sensor::SensorRegistry::template get<SensorT*>::index,
29  Timestamp,
30  Sensor.GetActorTransform());
31  }()) {}
Serializes the meta-information (header) sent with all the sensor data.
FAsyncDataStreamTmpl(FAsyncDataStreamTmpl &&)=default
static uint64_t GetFrameCounter()
Definition: CarlaEngine.h:65
detail::Stream< detail::MultiStreamState > Stream
A stream represents an unidirectional channel for sending data from server to client.
Definition: Stream.h:19