CARLA
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
carla::sensor::RawData Class Reference

Wrapper around the raw data generated by a sensor plus some useful meta-information. More...

#include <RawData.h>

+ Collaboration diagram for carla::sensor::RawData:

Public Member Functions

auto begin () noexcept
 Begin iterator to the data generated by the sensor. More...
 
auto begin () const noexcept
 Begin iterator to the data generated by the sensor. More...
 
auto data () noexcept
 Retrieve a pointer to the memory containing the data generated by the sensor. More...
 
auto data () const noexcept
 Retrieve a pointer to the memory containing the data generated by the sensor. More...
 
auto end () noexcept
 Past-the-end iterator to the data generated by the sensor. More...
 
auto end () const noexcept
 Past-the-end iterator to the data generated by the sensor. More...
 
uint64_t GetFrame () const
 Frame count when the data was generated. More...
 
const rpc::TransformGetSensorTransform () const
 Sensor's transform when the data was generated. More...
 
uint64_t GetSensorTypeId () const
 Type-id of the sensor that generated the data. More...
 
double GetTimestamp () const
 Timestamp when the data was generated. More...
 
size_t size () const
 Size in bytes of the data generated by the sensor. More...
 

Private Types

using HeaderSerializer = s11n::SensorHeaderSerializer
 

Private Member Functions

const auto & GetHeader () const
 
 RawData (Buffer &&buffer)
 

Private Attributes

Buffer _buffer
 

Friends

template<typename... Items>
class CompositeSerializer
 

Detailed Description

Wrapper around the raw data generated by a sensor plus some useful meta-information.

Definition at line 20 of file RawData.h.

Member Typedef Documentation

◆ HeaderSerializer

Definition at line 21 of file RawData.h.

Constructor & Destructor Documentation

◆ RawData()

carla::sensor::RawData::RawData ( Buffer &&  buffer)
inlineprivate

Definition at line 92 of file RawData.h.

Member Function Documentation

◆ begin() [1/2]

auto carla::sensor::RawData::begin ( )
inlinenoexcept

◆ begin() [2/2]

auto carla::sensor::RawData::begin ( ) const
inlinenoexcept

Begin iterator to the data generated by the sensor.

Definition at line 56 of file RawData.h.

References _buffer, carla::Buffer::begin(), and carla::sensor::s11n::SensorHeaderSerializer::header_offset.

+ Here is the call graph for this function:

◆ data() [1/2]

auto carla::sensor::RawData::data ( )
inlinenoexcept

Retrieve a pointer to the memory containing the data generated by the sensor.

Definition at line 72 of file RawData.h.

References begin().

+ Here is the call graph for this function:

◆ data() [2/2]

auto carla::sensor::RawData::data ( ) const
inlinenoexcept

Retrieve a pointer to the memory containing the data generated by the sensor.

Definition at line 77 of file RawData.h.

References begin().

+ Here is the call graph for this function:

◆ end() [1/2]

auto carla::sensor::RawData::end ( )
inlinenoexcept

Past-the-end iterator to the data generated by the sensor.

Definition at line 61 of file RawData.h.

References _buffer, and carla::Buffer::end().

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::cend(), carla::sensor::data::Array< data::SemanticLidarDetection >::end(), and size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ end() [2/2]

auto carla::sensor::RawData::end ( ) const
inlinenoexcept

Past-the-end iterator to the data generated by the sensor.

Definition at line 66 of file RawData.h.

References _buffer, and carla::Buffer::end().

+ Here is the call graph for this function:

◆ GetFrame()

uint64_t carla::sensor::RawData::GetFrame ( ) const
inline

Frame count when the data was generated.

Definition at line 36 of file RawData.h.

References GetHeader().

+ Here is the call graph for this function:

◆ GetHeader()

const auto& carla::sensor::RawData::GetHeader ( ) const
inlineprivate

Definition at line 24 of file RawData.h.

References _buffer, and carla::sensor::s11n::SensorHeaderSerializer::Deserialize().

Referenced by GetFrame(), GetSensorTransform(), GetSensorTypeId(), and GetTimestamp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSensorTransform()

const rpc::Transform& carla::sensor::RawData::GetSensorTransform ( ) const
inline

Sensor's transform when the data was generated.

Definition at line 46 of file RawData.h.

References GetHeader().

+ Here is the call graph for this function:

◆ GetSensorTypeId()

uint64_t carla::sensor::RawData::GetSensorTypeId ( ) const
inline

Type-id of the sensor that generated the data.

Definition at line 31 of file RawData.h.

References GetHeader().

Referenced by carla::sensor::CompositeSerializer< Items >::Deserialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTimestamp()

double carla::sensor::RawData::GetTimestamp ( ) const
inline

Timestamp when the data was generated.

Definition at line 41 of file RawData.h.

References GetHeader().

+ Here is the call graph for this function:

◆ size()

size_t carla::sensor::RawData::size ( ) const
inline

Size in bytes of the data generated by the sensor.

Definition at line 82 of file RawData.h.

References begin(), DEBUG_ASSERT, and end().

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::Array(), carla::sensor::s11n::GnssSerializer::DeserializeRawData(), carla::sensor::s11n::ObstacleDetectionEventSerializer::DeserializeRawData(), carla::sensor::s11n::CollisionEventSerializer::DeserializeRawData(), and carla::sensor::s11n::IMUSerializer::DeserializeRawData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ CompositeSerializer

template<typename... Items>
friend class CompositeSerializer
friend

Definition at line 90 of file RawData.h.

Member Data Documentation

◆ _buffer

Buffer carla::sensor::RawData::_buffer
private

Definition at line 94 of file RawData.h.

Referenced by begin(), end(), and GetHeader().


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