| 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"
8#include "libobsensor/hpp/Filter.hpp"
9
10#include <functional>
11#include <memory>
12
13 struct SensorImpl;
14 struct SensorListImpl;
15
16 namespace ob {
17 class StreamProfile;
18 class StreamProfileList;
19 class Device;
20 class Frame;
21 class ImuFrame;
22 class OBFilterList;
23
29 using FrameCallback = std::function<void(std::shared_ptr<Frame> frame)>;
30
31 class OB_EXTENSION_API Sensor {
32 protected:
33 std::unique_ptr<SensorImpl> impl_;
34
35 public:
36 Sensor(std::unique_ptr<SensorImpl> impl);
37 virtual ~Sensor() noexcept;
38
44 OBSensorType type();
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
80class OB_EXTENSION_API SensorList {
81 private:
82 std::unique_ptr<SensorListImpl> impl_;
83
84 public:
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
125class OB_EXTENSION_API OBFilterList {
126 private:
127 std::unique_ptr<OBFilterListImpl> impl_;
128
129 public:
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
Filter.hpp
This file contains the Filter class, which is the processing unit of the SDK that can perform point c...
OBSensorType
OBSensorType
Enumeration value describing the sensor type.
Definition ObTypes.h:162
OB_EXTENSION_API
#define OB_EXTENSION_API
Definition ObTypes.h:28
Types.hpp
Provides SDK structure and enumeration constant definitions (depending on libobsensor/h/ObTypes....
ob::Filter
The Filter class is the base class for all filters in the SDK.
Definition Filter.hpp:27
ob::OBFilterList
Class representing a list of FrameProcessingBlock.
Definition Sensor.hpp:125
ob::OBFilterList::~OBFilterList
~OBFilterList() noexcept
ob::OBFilterList::OBFilterList
OBFilterList(std::unique_ptr< OBFilterListImpl > impl_)
ob::SensorList
Definition Sensor.hpp:80
ob::SensorList::~SensorList
virtual ~SensorList() noexcept
ob::SensorList::SensorList
SensorList(std::unique_ptr< SensorListImpl > impl)
ob::Sensor
Definition Sensor.hpp:31
ob::Sensor::impl_
std::unique_ptr< SensorImpl > impl_
Definition Sensor.hpp:33
ob::Sensor::~Sensor
virtual ~Sensor() noexcept
ob::Sensor::Sensor
Sensor(std::unique_ptr< SensorImpl > impl)
ob::StreamProfileList
Definition StreamProfile.hpp:212
ob::StreamProfile
Definition StreamProfile.hpp:22
ob
Definition Context.hpp:16
ob::FrameCallback
std::function< void(std::shared_ptr< Frame > frame)> FrameCallback
Callback function for frame data.
Definition Sensor.hpp:29