54 return Stream.MakeBuffer();
58 template <
typename SensorT,
typename... ArgsT>
59 void Send(SensorT &Sensor, ArgsT &&... Args);
61 template <
typename SensorT,
typename... ArgsT>
71 if (HeaderStr->
frame != FrameNumber)
74 HeaderStr->
frame = FrameNumber;
120 template <
typename SensorT>
122 const SensorT &InSensor,
143 template <
typename T>
144 template <
typename SensorT,
typename... ArgsT>
155 Stream.Write(ViewHeader, ViewData);
158 template <
typename T>
159 template <
typename SensorT,
typename... ArgsT>
166 Stream.Write(ViewHeader, std::forward<ArgsT>(Args)...);
double GetSensorTimestamp()
return the timestamp of the sensor
const value_type * data() const noexcept
Direct access to the allocated memory or nullptr if no memory is allocated.
FAsyncDataStreamTmpl(FAsyncDataStreamTmpl &&)=default
void SerializeAndSend(SensorT &Sensor, ArgsT &&... Args)
A streaming channel for sending sensor data to clients.
static std::shared_ptr< BufferView > CreateFrom(Buffer &&buffer)
FTransform GetSensorTransform()
return the transform of the sensor
carla::Buffer PopBufferFromPool()
Pop a Buffer from the pool.
static Buffer Serialize(Sensor &sensor, Args &&... args)
Serialize the arguments provided into a Buffer by calling to the serializer registered for the given ...
static void log_info(Args &&... args)
A streaming channel for sending sensor data to clients, supports sending data asynchronously.
auto GetToken() const
Return the token that allows subscribing to this stream.
void Send(SensorT &Sensor, ArgsT &&... Args)
Send some data down the stream.
uint64_t GetSensorType()
return the type of sensor of this stream
void SetFrameNumber(uint64_t FrameNumber)
allow to change the frame number of the header