CARLA
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Private 成员函数 | Private 属性 | 友元 | 所有成员列表
FAsyncDataStreamTmpl< T > 模板类 参考

A streaming channel for sending sensor data to clients, supports sending data asynchronously. 更多...

#include <AsyncDataStream.h>

+ FAsyncDataStreamTmpl< T > 的协作图:

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 >
 

详细描述

template<typename T>
class FAsyncDataStreamTmpl< 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.

警告
This is a single-use object, a new one needs to be created for each new message.

FAsyncDataStream also has a pool of carla::Buffer that allows reusing the allocated memory, use it whenever possible.

在文件 AsyncDataStream.h35 行定义.

成员类型定义说明

◆ StreamType

template<typename T >
using FAsyncDataStreamTmpl< T >::StreamType = T

在文件 AsyncDataStream.h39 行定义.

构造及析构函数说明

◆ FAsyncDataStreamTmpl() [1/2]

template<typename T >
FAsyncDataStreamTmpl< T >::FAsyncDataStreamTmpl ( FAsyncDataStreamTmpl< T > && )
default

◆ FAsyncDataStreamTmpl() [2/2]

template<typename T >
template<typename SensorT >
FAsyncDataStreamTmpl< T >::FAsyncDataStreamTmpl ( const SensorT & InSensor,
double Timestamp,
StreamType InStream )
inlineexplicitprivate
前置条件
This functions needs to be called in the game-thread.

在文件 AsyncDataStreamImpl.h18 行定义.

引用了 FCarlaEngine::GetFrameCounter().

+ 函数调用图:

成员函数说明

◆ GetSensorTimestamp()

template<typename T >
double FAsyncDataStreamTmpl< T >::GetSensorTimestamp ( )
inline

return the timestamp of the sensor

在文件 AsyncDataStream.h104 行定义.

◆ GetSensorTransform()

template<typename T >
FTransform FAsyncDataStreamTmpl< T >::GetSensorTransform ( )
inline

return the transform of the sensor

在文件 AsyncDataStream.h92 行定义.

引用了 carla::Buffer::data(), FAsyncDataStreamTmpl< T >::Header , 以及 carla::sensor::s11n::SensorHeaderSerializer::Header::sensor_transform.

+ 函数调用图:

◆ GetSensorType()

template<typename T >
uint64_t FAsyncDataStreamTmpl< T >::GetSensorType ( )
inline

return the type of sensor of this stream

在文件 AsyncDataStream.h80 行定义.

引用了 carla::Buffer::data(), FAsyncDataStreamTmpl< T >::Header , 以及 carla::sensor::s11n::SensorHeaderSerializer::Header::sensor_type.

+ 函数调用图:

◆ GetToken()

template<typename T >
auto FAsyncDataStreamTmpl< T >::GetToken ( ) const
inline

Return the token that allows subscribing to this stream.

在文件 AsyncDataStream.h44 行定义.

引用了 FAsyncDataStreamTmpl< T >::Stream.

◆ PopBufferFromPool()

template<typename T >
carla::Buffer FAsyncDataStreamTmpl< T >::PopBufferFromPool ( )
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.h52 行定义.

引用了 FAsyncDataStreamTmpl< T >::Stream.

◆ Send()

template<typename T >
template<typename SensorT , typename... ArgsT>
void FAsyncDataStreamTmpl< T >::Send ( SensorT & Sensor,
ArgsT &&... Args )
inline

Send some data down the stream.

在文件 AsyncDataStream.h160 行定义.

引用了 carla::BufferView::CreateFrom() , 以及 FDataStreamTmpl< T >::Stream.

+ 函数调用图:

◆ SerializeAndSend()

template<typename T >
template<typename SensorT , typename... ArgsT>
void FAsyncDataStreamTmpl< T >::SerializeAndSend ( SensorT & Sensor,
ArgsT &&... Args )
inline

在文件 AsyncDataStream.h145 行定义.

引用了 carla::BufferView::CreateFrom(), carla::sensor::CompositeSerializer< Items >::Serialize() , 以及 FDataStreamTmpl< T >::Stream.

被这些函数引用 ACollisionSensor::OnCollisionEvent().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ SetFrameNumber()

template<typename T >
void FAsyncDataStreamTmpl< T >::SetFrameNumber ( uint64_t FrameNumber)
inline

allow to change the frame number of the header

在文件 AsyncDataStream.h65 行定义.

引用了 carla::Buffer::data(), carla::sensor::s11n::SensorHeaderSerializer::Header::frame, FAsyncDataStreamTmpl< T >::Header, carla::log_info() , 以及 carla::sensor::s11n::SensorHeaderSerializer::Header::sensor_type.

+ 函数调用图:

友元及相关函数文档

◆ FDataStreamTmpl< T >

template<typename T >
friend class FDataStreamTmpl< T >
friend

在文件 AsyncDataStream.h104 行定义.

类成员变量说明

◆ Header

template<typename T >
carla::Buffer FAsyncDataStreamTmpl< T >::Header
private

◆ Stream

template<typename T >
StreamType FAsyncDataStreamTmpl< T >::Stream
private

该类的文档由以下文件生成: