OrbbecSDK 2.0.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::Sensor Class Reference

#include <Sensor.hpp>

Public Types

typedef std::function< void(std::shared_ptr< Frame > frame)> FrameCallback
 Callback function for frame data.
 

Public Member Functions

 Sensor (ob_sensor_t *impl)
 
 Sensor (Sensor &&sensor) noexcept
 
Sensoroperator= (Sensor &&sensor) noexcept
 
 Sensor (const Sensor &sensor)=delete
 
Sensoroperator= (const Sensor &sensor)=delete
 
virtual ~Sensor () noexcept
 
OBSensorType getType () const
 Get the sensor type.
 
std::shared_ptr< StreamProfileListgetStreamProfileList () const
 Get the list of stream profiles.
 
std::vector< std::shared_ptr< Filter > > createRecommendedFilters () const
 Create a list of recommended filters for the sensor.
 
void start (std::shared_ptr< StreamProfile > streamProfile, FrameCallback callback)
 Open a frame data stream and set up a callback.
 
void stop () const
 Stop the stream.
 
void switchProfile (std::shared_ptr< StreamProfile > streamProfile)
 Dynamically switch resolutions.
 
OBSensorType type () const
 
std::vector< std::shared_ptr< Filter > > getRecommendedFilters () const
 

Protected Attributes

ob_sensor_t * impl_
 
FrameCallback callback_
 

Detailed Description

Definition at line 24 of file Sensor.hpp.

Member Typedef Documentation

◆ FrameCallback

std::function<void(std::shared_ptr<Frame> frame)> ob::Sensor::FrameCallback

Callback function for frame data.

Parameters
frameThe frame data.

Definition at line 31 of file Sensor.hpp.

Constructor & Destructor Documentation

◆ Sensor() [1/3]

ob::Sensor::Sensor ( ob_sensor_t * impl)
inlineexplicit

Definition at line 38 of file Sensor.hpp.

◆ Sensor() [2/3]

ob::Sensor::Sensor ( Sensor && sensor)
inlinenoexcept

Definition at line 40 of file Sensor.hpp.

◆ Sensor() [3/3]

ob::Sensor::Sensor ( const Sensor & sensor)
delete

◆ ~Sensor()

virtual ob::Sensor::~Sensor ( )
inlinevirtualnoexcept

Definition at line 58 of file Sensor.hpp.

Member Function Documentation

◆ operator=() [1/2]

Sensor & ob::Sensor::operator= ( Sensor && sensor)
inlinenoexcept

Definition at line 44 of file Sensor.hpp.

◆ operator=() [2/2]

Sensor & ob::Sensor::operator= ( const Sensor & sensor)
delete

◆ getType()

OBSensorType ob::Sensor::getType ( ) const
inline

Get the sensor type.

Returns
OBSensorType The sensor type.

Definition at line 69 of file Sensor.hpp.

Referenced by type().

◆ getStreamProfileList()

std::shared_ptr< StreamProfileList > ob::Sensor::getStreamProfileList ( ) const
inline

Get the list of stream profiles.

Returns
std::shared_ptr<StreamProfileList> The stream profile list.

Definition at line 81 of file Sensor.hpp.

◆ createRecommendedFilters()

std::vector< std::shared_ptr< Filter > > ob::Sensor::createRecommendedFilters ( ) const
inline

Create a list of recommended filters for the sensor.

Returns
OBFilterList list of frame processing block

Definition at line 93 of file Sensor.hpp.

Referenced by getRecommendedFilters().

◆ start()

void ob::Sensor::start ( std::shared_ptr< StreamProfile > streamProfile,
FrameCallback callback )
inline

Open a frame data stream and set up a callback.

Parameters
streamProfileThe stream configuration.
callbackThe callback to set when frame data arrives.

Definition at line 116 of file Sensor.hpp.

◆ stop()

void ob::Sensor::stop ( ) const
inline

Stop the stream.

Definition at line 126 of file Sensor.hpp.

◆ switchProfile()

void ob::Sensor::switchProfile ( std::shared_ptr< StreamProfile > streamProfile)
inline

Dynamically switch resolutions.

Parameters
streamProfileThe resolution to switch to.

Definition at line 137 of file Sensor.hpp.

◆ type()

OBSensorType ob::Sensor::type ( ) const
inline

Definition at line 151 of file Sensor.hpp.

Referenced by getType().

◆ getRecommendedFilters()

std::vector< std::shared_ptr< Filter > > ob::Sensor::getRecommendedFilters ( ) const
inline

Definition at line 155 of file Sensor.hpp.

Member Data Documentation

◆ impl_

ob_sensor_t* ob::Sensor::impl_
protected

◆ callback_

FrameCallback ob::Sensor::callback_
protected

Definition at line 35 of file Sensor.hpp.

Referenced by start().


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