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

class carla::ros2::ROS2
 
template<typename... Items>
class CompositeSerializer
 

Detailed Description

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

Definition at line 21 of file RawData.h.

Member Typedef Documentation

◆ HeaderSerializer

Definition at line 22 of file RawData.h.

Constructor & Destructor Documentation

◆ RawData()

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

Definition at line 94 of file RawData.h.

Member Function Documentation

◆ begin() [1/2]

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

Begin iterator to the data generated by the sensor.

Definition at line 52 of file RawData.h.

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

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::begin(), carla::sensor::data::Array< data::SemanticLidarDetection >::cbegin(), data(), carla::sensor::s11n::NormalsImageSerializer::DeserializeHeader(), carla::sensor::s11n::OpticalFlowImageSerializer::DeserializeHeader(), carla::sensor::s11n::ImageSerializer::DeserializeHeader(), carla::sensor::s11n::GBufferFloatSerializer::DeserializeHeader(), carla::sensor::s11n::GBufferUint8Serializer::DeserializeHeader(), carla::sensor::s11n::DVSEventArraySerializer::DeserializeHeader(), carla::sensor::s11n::EpisodeStateSerializer::DeserializeHeader(), carla::sensor::s11n::LidarSerializer::DeserializeHeader(), carla::sensor::s11n::SemanticLidarSerializer::DeserializeHeader(), carla::sensor::s11n::GnssSerializer::DeserializeRawData(), carla::sensor::s11n::ObstacleDetectionEventSerializer::DeserializeRawData(), carla::sensor::s11n::CollisionEventSerializer::DeserializeRawData(), carla::sensor::s11n::IMUSerializer::DeserializeRawData(), and size().

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

◆ begin() [2/2]

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

Begin iterator to the data generated by the sensor.

Definition at line 57 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 73 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 78 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 62 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 67 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 37 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 25 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 47 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 32 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 42 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 83 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

◆ carla::ros2::ROS2

friend class carla::ros2::ROS2
friend

Definition at line 92 of file RawData.h.

◆ CompositeSerializer

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

Definition at line 91 of file RawData.h.

Member Data Documentation

◆ _buffer

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

Definition at line 96 of file RawData.h.

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


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