CARLA
Public Types | Public Member Functions | Private Attributes | List of all members
FDataStreamTmpl< T > Class Template Reference

A streaming channel for sending sensor data to clients. More...

#include <AsyncDataStream.h>

+ Inheritance diagram for FDataStreamTmpl< T >:
+ Collaboration diagram for FDataStreamTmpl< T >:

Public Types

using StreamType = T
 

Public Member Functions

bool AreClientsListening ()
 
 FDataStreamTmpl ()=default
 
 FDataStreamTmpl (StreamType InStream)
 
uint64_t GetSensorType ()
 
auto GetToken () const
 Return the token that allows subscribing to this stream. More...
 
bool IsStreamReady ()
 
template<typename SensorT >
FAsyncDataStreamTmpl< T > MakeAsyncDataStream (const SensorT &Sensor, double Timestamp)
 Create a FAsyncDataStream object. More...
 

Private Attributes

boost::optional< StreamTypeStream
 

Detailed Description

template<typename T>
class FDataStreamTmpl< T >

A streaming channel for sending sensor data to clients.

Each sensor has its own FDataStream. Note however that this class does not provide a send function. In order to send data, a FAsyncDataStream needs to be created using "MakeAsyncDataStream" function. FAsyncDataStream allows sending data from any thread.

Definition at line 18 of file AsyncDataStream.h.

Member Typedef Documentation

◆ StreamType

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

Definition at line 30 of file DataStream.h.

Constructor & Destructor Documentation

◆ FDataStreamTmpl() [1/2]

template<typename T>
FDataStreamTmpl< T >::FDataStreamTmpl ( )
default

◆ FDataStreamTmpl() [2/2]

template<typename T>
FDataStreamTmpl< T >::FDataStreamTmpl ( StreamType  InStream)
inline

Definition at line 34 of file DataStream.h.

Member Function Documentation

◆ AreClientsListening()

template<typename T>
bool FDataStreamTmpl< T >::AreClientsListening ( )
inline

Definition at line 64 of file DataStream.h.

Referenced by ASensor::Tick().

+ Here is the caller graph for this function:

◆ GetSensorType()

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

Definition at line 58 of file DataStream.h.

Referenced by AGnssSensor::PostPhysTick(), AInertialMeasurementUnit::PostPhysTick(), and ADVSCamera::PostPhysTick().

+ Here is the caller graph for this function:

◆ GetToken()

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

Return the token that allows subscribing to this stream.

Definition at line 52 of file DataStream.h.

Referenced by ASensor::EndPlay(), FWorldObserver::GetToken(), FCameraGBufferUint8::GetToken(), and FCameraGBufferFloat::GetToken().

+ Here is the caller graph for this function:

◆ IsStreamReady()

template<typename T>
bool FDataStreamTmpl< T >::IsStreamReady ( )
inline

Definition at line 46 of file DataStream.h.

Referenced by FWorldObserver::BroadcastTick().

+ Here is the caller graph for this function:

◆ MakeAsyncDataStream()

template<typename T>
template<typename SensorT >
FAsyncDataStreamTmpl<T> FDataStreamTmpl< T >::MakeAsyncDataStream ( const SensorT &  Sensor,
double  Timestamp 
)
inline

Create a FAsyncDataStream object.

Precondition
This functions needs to be called in the game-thread.

Definition at line 40 of file DataStream.h.

Referenced by FWorldObserver::BroadcastTick(), FCameraGBufferUint8::GetDataStream(), and FCameraGBufferFloat::GetDataStream().

+ Here is the caller graph for this function:

Member Data Documentation

◆ Stream

template<typename T>
boost::optional<StreamType> FDataStreamTmpl< T >::Stream
private

The documentation for this class was generated from the following files: