51 return Stream.MakeBuffer();
55 template <
typename SensorT,
typename... ArgsT>
56 void Send(SensorT &Sensor, ArgsT &&... Args);
58 template <
typename SensorT,
typename... ArgsT>
68 if (HeaderStr->
frame != FrameNumber)
71 HeaderStr->
frame = FrameNumber;
117 template <
typename SensorT>
119 const SensorT &InSensor,
141template <
typename SensorT,
typename... ArgsT>
152 Stream.Write(ViewHeader, ViewData);
156template <
typename SensorT,
typename... ArgsT>
163 Stream.Write(ViewHeader, std::forward<ArgsT>(Args)...);
异步数据。“发送”功能发送的数据被传递给 序列化程序在carla::sensor:SensorRegistry上注册了传感器 被顺流而下。
void SetFrameNumber(uint64_t FrameNumber)
允许更改标头的帧号
FAsyncDataStreamTmpl(FAsyncDataStreamTmpl &&)=default
carla::Buffer PopBufferFromPool()
从池中弹出缓冲区。池中的缓冲区可以重用以前消息分配的内存,从而显著提高大消息的性能。
double GetSensorTimestamp()
返回传感器的时间戳
void Send(SensorT &Sensor, ArgsT &&... Args)
向下游发送一些数据。
FTransform GetSensorTransform()
返回传感器的变换
auto GetToken() const
返回允许订阅此流的令牌。
void SerializeAndSend(SensorT &Sensor, ArgsT &&... Args)
uint64_t GetSensorType()
返回此流的传感器类型
用于将传感器数据发送到客户端的流式处理通道。每个传感器 都有自己的 FDataStream。但请注意,此类不提供 send 函数。 为了发送数据,需要使用 “MakeAsyncDataStream” 函...
boost::optional< StreamType > Stream
static std::shared_ptr< BufferView > CreateFrom(Buffer &&buffer)
一块原始数据。 请注意,如果需要更多容量,则会分配一个新的内存块,并 删除旧的内存块。这意味着默认情况下,缓冲区只能增长。要释放内存,使用 clear 或 pop。
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)