| OrbbecSDK 1.5.7 OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Sensor.hpp
Go to the documentation of this file.
1
10 #pragma once
11
12 #include "Types.hpp"
13
14 #include <functional>
15 #include <memory>
16
17 struct SensorImpl;
18 struct SensorListImpl;
19
20 namespace ob {
21 class StreamProfile;
22 class StreamProfileList;
23 class Device;
24 class Frame;
25 class ImuFrame;
26
38 using FrameCallback = std::function<void(std::shared_ptr<Frame> frame)>;
39
40 class OB_EXTENSION_API Sensor {
41 protected:
42 std::unique_ptr<SensorImpl> impl_;
43
44 public:
45 Sensor(std::unique_ptr<SensorImpl> impl);
46 virtual ~Sensor() noexcept;
47
59 OBSensorType type();
60
72 const std::shared_ptr<StreamProfileList> getStreamProfileList();
73
87 void start(std::shared_ptr<StreamProfile> streamProfile, FrameCallback callback);
95 void stop();
96
108 void switchProfile(std::shared_ptr<StreamProfile> streamProfile);
109 };
110
111 class OB_EXTENSION_API SensorList {
112 private:
113 std::unique_ptr<SensorListImpl> impl_;
114
115 public:
116 SensorList(std::unique_ptr<SensorListImpl> impl);
117
118 virtual ~SensorList() noexcept;
119
131 uint32_t count();
132
146 OBSensorType type(uint32_t index);
147
162 std::shared_ptr<Sensor> getSensor(uint32_t index);
163
177 std::shared_ptr<Sensor> getSensor(OBSensorType sensorType);
178 };
179 } // namespace ob
ob
Definition: Context.hpp:20
ob::StreamProfile
Definition: StreamProfile.hpp:27
ob::Sensor
Definition: Sensor.hpp:40
OBSensorType
OBSensorType
Enumeration value describing the sensor type.
Definition: ObTypes.h:159
Types.hpp
Provide SDK structure and enumeration constant definition (depending on libobsensor/h/ObTypes.h)
ob::Sensor::impl_
std::unique_ptr< SensorImpl > impl_
Definition: Sensor.hpp:42
ob::FrameCallback
std::function< void(std::shared_ptr< Frame > frame)> FrameCallback
frame data callback
Definition: Sensor.hpp:38
ob::SensorList
Definition: Sensor.hpp:111
ob::StreamProfileList
Definition: StreamProfile.hpp:227
OB_EXTENSION_API
#define OB_EXTENSION_API
Definition: ObTypes.h:25