chrono::sensor::ChFilterAccess< BufferType, UserBufferType > Class Template Reference

Description

template<class BufferType, class UserBufferType>
class chrono::sensor::ChFilterAccess< BufferType, UserBufferType >

Filter for accessing data from the sensor.

#include <ChFilterAccess.h>

Inheritance diagram for chrono::sensor::ChFilterAccess< BufferType, UserBufferType >:
Collaboration diagram for chrono::sensor::ChFilterAccess< BufferType, UserBufferType >:

Public Member Functions

 ChFilterAccess (std::string name={})
 Class constructor. More...
 
virtual ~ChFilterAccess ()
 Virtual class destructor.
 
virtual void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Apply function. More...
 
virtual void Initialize (std::shared_ptr< ChSensor > pSensor)
 Initializes all data needed by the filter access apply function. More...
 
UserBufferType GetBuffer ()
 User calls this to get access and owndership of the buffer memory on the host. More...
 
template<>
CH_SENSOR_API void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Virtual apply function. More...
 
template<>
CH_SENSOR_API void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Virtual apply function. More...
 
template<>
CH_SENSOR_API void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Virtual apply function. More...
 
template<>
CH_SENSOR_API void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Virtual apply function. More...
 
template<>
CH_SENSOR_API void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Virtual apply function. More...
 
template<>
CH_SENSOR_API void Apply (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Virtual apply function. More...
 
- Public Member Functions inherited from chrono::sensor::ChFilter
virtual ~ChFilter ()
 Virtual class desctructor.
 
std::string & Name ()
 Accesses the name of the filter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from chrono::sensor::ChFilter
 ChFilter (std::string name)
 protected constructor for the filter which requires a name as input. More...
 

Constructor & Destructor Documentation

◆ ChFilterAccess()

template<class BufferType , class UserBufferType >
chrono::sensor::ChFilterAccess< BufferType, UserBufferType >::ChFilterAccess ( std::string  name = {})
inline

Class constructor.

Parameters
nameString name of the filter. Defaults to empty.

Member Function Documentation

◆ Apply() [1/7]

template<>
CH_SENSOR_API void chrono::sensor::ChFilterAccess< SensorHostR8Buffer, UserR8BufferPtr >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implements chrono::sensor::ChFilter.

◆ Apply() [2/7]

template<class BufferType , class UserBufferType >
virtual void chrono::sensor::ChFilterAccess< BufferType, UserBufferType >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Apply function.

Moves data from the device into the lag buffer and presents data to the user if the data is ready based on the time.

Parameters
pSensorA pointer to the sensor on which the filter is attached.
bufferInOutA buffer that is passed into the filter. This data is what will be made available for the user.

Implements chrono::sensor::ChFilter.

◆ Apply() [3/7]

template<>
CH_SENSOR_API void chrono::sensor::ChFilterAccess< SensorHostRGBA8Buffer, UserRGBA8BufferPtr >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implements chrono::sensor::ChFilter.

◆ Apply() [4/7]

template<>
CH_SENSOR_API void chrono::sensor::ChFilterAccess< SensorHostXYZIBuffer, UserXYZIBufferPtr >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implements chrono::sensor::ChFilter.

◆ Apply() [5/7]

template<>
CH_SENSOR_API void chrono::sensor::ChFilterAccess< SensorHostDIBuffer, UserDIBufferPtr >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implements chrono::sensor::ChFilter.

◆ Apply() [6/7]

template<>
CH_SENSOR_API void chrono::sensor::ChFilterAccess< SensorHostIMUBuffer, UserIMUBufferPtr >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implements chrono::sensor::ChFilter.

◆ Apply() [7/7]

template<>
CH_SENSOR_API void chrono::sensor::ChFilterAccess< SensorHostGPSBuffer, UserGPSBufferPtr >::Apply ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implements chrono::sensor::ChFilter.

◆ GetBuffer()

template<class BufferType , class UserBufferType >
UserBufferType chrono::sensor::ChFilterAccess< BufferType, UserBufferType >::GetBuffer ( )
inline

User calls this to get access and owndership of the buffer memory on the host.

user can store the returned pointer or modify as desired, user has the ownership of the memory. Underlying framework has released all ownership. Filter graph will create new memory during the next run.

Parameters
Auser buffer that is safe for the user to access.

◆ Initialize()

template<class BufferType , class UserBufferType >
virtual void chrono::sensor::ChFilterAccess< BufferType, UserBufferType >::Initialize ( std::shared_ptr< ChSensor pSensor)
inlinevirtual

Initializes all data needed by the filter access apply function.

Parameters
pSensorA pointer to the sensor.

Implements chrono::sensor::ChFilter.


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono_sensor/filters/ChFilterAccess.h