OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Sensor.hpp
Go to the documentation of this file.
1
5#pragma once
6
7#include "Types.hpp"
9
10#include <functional>
11#include <memory>
12
13struct SensorImpl;
14struct SensorListImpl;
15
16namespace ob {
17class StreamProfile;
18class StreamProfileList;
19class Device;
20class Frame;
21class ImuFrame;
22class OBFilterList;
23
29using FrameCallback = std::function<void(std::shared_ptr<Frame> frame)>;
30
32protected:
33 std::unique_ptr<SensorImpl> impl_;
34
35public:
36 Sensor(std::unique_ptr<SensorImpl> impl);
37 virtual ~Sensor() noexcept;
38
45
51 const std::shared_ptr<StreamProfileList> getStreamProfileList();
52
57 const std::shared_ptr<OBFilterList> getRecommendedFilters();
58
65 void start(std::shared_ptr<StreamProfile> streamProfile, FrameCallback callback);
66
70 void stop();
71
77 void switchProfile(std::shared_ptr<StreamProfile> streamProfile);
78};
79
81private:
82 std::unique_ptr<SensorListImpl> impl_;
83
84public:
85 SensorList(std::unique_ptr<SensorListImpl> impl);
86
87 virtual ~SensorList() noexcept;
88
94 uint32_t count();
95
102 OBSensorType type(uint32_t index);
103
110 std::shared_ptr<Sensor> getSensor(uint32_t index);
111
118 std::shared_ptr<Sensor> getSensor(OBSensorType sensorType);
119};
120
121
126private:
127 std::unique_ptr<OBFilterListImpl> impl_;
128
129public:
130 OBFilterList(std::unique_ptr<OBFilterListImpl> impl_);
131 ~OBFilterList() noexcept;
132
138 uint32_t count();
139
146 std::shared_ptr<Filter> getFilter(uint32_t index);
147};
148
149} // namespace ob
This file contains the Filter class, which is the processing unit of the SDK that can perform point c...
OBSensorType
Enumeration value describing the sensor type.
Definition ObTypes.h:162
#define OB_EXTENSION_API
Definition ObTypes.h:28
Provides SDK structure and enumeration constant definitions (depending on libobsensor/h/ObTypes....
The Filter class is the base class for all filters in the SDK.
Definition Filter.hpp:27
Class representing a list of FrameProcessingBlock.
Definition Sensor.hpp:125
~OBFilterList() noexcept
OBFilterList(std::unique_ptr< OBFilterListImpl > impl_)
virtual ~SensorList() noexcept
SensorList(std::unique_ptr< SensorListImpl > impl)
std::unique_ptr< SensorImpl > impl_
Definition Sensor.hpp:33
virtual ~Sensor() noexcept
Sensor(std::unique_ptr< SensorImpl > impl)
Definition Context.hpp:16
std::function< void(std::shared_ptr< Frame > frame)> FrameCallback
Callback function for frame data.
Definition Sensor.hpp:29