A streaming channel for sending sensor data to clients, supports sending data asynchronously. 更多...
#include <AsyncDataStream.h>
Public 类型 | |
using | StreamType = T |
Public 成员函数 | |
FAsyncDataStreamTmpl (FAsyncDataStreamTmpl &&)=default | |
double | GetSensorTimestamp () |
return the timestamp of the sensor | |
FTransform | GetSensorTransform () |
return the transform of the sensor | |
uint64_t | GetSensorType () |
return the type of sensor of this stream | |
auto | GetToken () const |
Return the token that allows subscribing to this stream. | |
carla::Buffer | PopBufferFromPool () |
Pop a Buffer from the pool. | |
template<typename SensorT , typename... ArgsT> | |
void | Send (SensorT &Sensor, ArgsT &&... Args) |
Send some data down the stream. | |
template<typename SensorT , typename... ArgsT> | |
void | SerializeAndSend (SensorT &Sensor, ArgsT &&... Args) |
void | SetFrameNumber (uint64_t FrameNumber) |
allow to change the frame number of the header | |
Private 成员函数 | |
template<typename SensorT > | |
FAsyncDataStreamTmpl (const SensorT &InSensor, double Timestamp, StreamType InStream) | |
Private 属性 | |
carla::Buffer | Header |
StreamType | Stream |
友元 | |
class | FDataStreamTmpl< T > |
A streaming channel for sending sensor data to clients, supports sending data asynchronously.
Data sent by the "Send" functions is passed to the serializer registered with the sensor at carla::sensor:SensorRegistry before being sent down the stream.
FAsyncDataStream also has a pool of carla::Buffer that allows reusing the allocated memory, use it whenever possible.
在文件 AsyncDataStream.h 第 35 行定义.
using FAsyncDataStreamTmpl< T >::StreamType = T |
在文件 AsyncDataStream.h 第 39 行定义.
|
default |
|
inlineexplicitprivate |
在文件 AsyncDataStreamImpl.h 第 18 行定义.
引用了 FCarlaEngine::GetFrameCounter().
|
inline |
return the timestamp of the sensor
在文件 AsyncDataStream.h 第 104 行定义.
|
inline |
return the transform of the sensor
在文件 AsyncDataStream.h 第 92 行定义.
引用了 carla::Buffer::data(), FAsyncDataStreamTmpl< T >::Header , 以及 carla::sensor::s11n::SensorHeaderSerializer::Header::sensor_transform.
|
inline |
return the type of sensor of this stream
在文件 AsyncDataStream.h 第 80 行定义.
引用了 carla::Buffer::data(), FAsyncDataStreamTmpl< T >::Header , 以及 carla::sensor::s11n::SensorHeaderSerializer::Header::sensor_type.
|
inline |
Return the token that allows subscribing to this stream.
在文件 AsyncDataStream.h 第 44 行定义.
|
inline |
Pop a Buffer from the pool.
Buffers in the pool can reuse the memory allocated by previous messages, significantly improving performance for big messages.
在文件 AsyncDataStream.h 第 52 行定义.
|
inline |
Send some data down the stream.
在文件 AsyncDataStream.h 第 160 行定义.
引用了 carla::BufferView::CreateFrom() , 以及 FDataStreamTmpl< T >::Stream.
|
inline |
在文件 AsyncDataStream.h 第 145 行定义.
引用了 carla::BufferView::CreateFrom(), carla::sensor::CompositeSerializer< Items >::Serialize() , 以及 FDataStreamTmpl< T >::Stream.
被这些函数引用 ACollisionSensor::OnCollisionEvent().
|
inline |
allow to change the frame number of the header
在文件 AsyncDataStream.h 第 65 行定义.
引用了 carla::Buffer::data(), carla::sensor::s11n::SensorHeaderSerializer::Header::frame, FAsyncDataStreamTmpl< T >::Header, carla::log_info() , 以及 carla::sensor::s11n::SensorHeaderSerializer::Header::sensor_type.
|
friend |
在文件 AsyncDataStream.h 第 104 行定义.
|
private |
|
private |
在文件 AsyncDataStream.h 第 126 行定义.
被这些函数引用 FAsyncDataStreamTmpl< T >::GetToken() , 以及 FAsyncDataStreamTmpl< T >::PopBufferFromPool().