OrbbecSDK 2.10.6
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
TypeHelper.hpp
Go to the documentation of this file.
1// Copyright (c) Orbbec Inc. All Rights Reserved.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include <string>
7#include <iostream>
10
11#include <functional>
12
13namespace ob {
15public:
23 static std::string convertOBFormatTypeToString(const OBFormat &type) {
24 return ob_format_type_to_string(type);
25 }
26
34 static std::string convertOBFrameTypeToString(const OBFrameType &type) {
35 return ob_frame_type_to_string(type);
36 }
37
45 static std::string convertOBStreamTypeToString(const OBStreamType &type) {
46 return ob_stream_type_to_string(type);
47 }
48
56 static std::string convertOBSensorTypeToString(const OBSensorType &type) {
57 return ob_sensor_type_to_string(type);
58 }
59
67 static std::string convertOBIMUSampleRateTypeToString(const OBIMUSampleRate &type) {
68 return ob_imu_rate_type_to_string(type);
69 }
70
79 return ob_imu_rate_type_to_value(type);
80 }
81
92
101 return ob_gyro_range_type_to_string(type);
102 }
103
114
121 static std::string convertOBLiDARScanRateTypeToString(const OBLiDARScanRate &type) {
123 }
124
133 return ob_meta_data_type_to_string(type);
134 }
135
146
157
168
179
190
208 static bool isVideoSensorType(OBSensorType type) {
209 return ob_is_video_sensor_type(type);
210 }
211
230 static bool isVideoStreamType(OBStreamType type) {
231 return ob_is_video_stream_type(type);
232 }
233};
234} // namespace ob
Provide structs commonly used in the SDK, enumerating constant definitions.
#define ob_is_video_stream_type(stream_type)
check if the stream_type is a video stream
Definition ObTypes.h:2235
OBLiDARScanRate
Data structures for LiDAR scan rate.
Definition ObTypes.h:726
OBSensorType
Enumeration value describing the sensor type.
Definition ObTypes.h:182
OBIMUSampleRate
Enumeration of IMU sample rate values (gyroscope or accelerometer).
Definition ObTypes.h:658
OBGyroFullScaleRange
Enumeration of gyroscope ranges.
Definition ObTypes.h:683
OBFormat
Enumeration value describing the pixel format.
Definition ObTypes.h:262
enum ob_frame_metadata_type OBFrameMetadataType
OBFrameType
Enumeration value describing the type of frame.
Definition ObTypes.h:225
OBStreamType
Enumeration value describing the type of data stream.
Definition ObTypes.h:203
OBAccelFullScaleRange
Enumeration of accelerometer ranges.
Definition ObTypes.h:701
#define ob_is_video_sensor_type(sensor_type)
Check if the sensor_type is a video sensor.
Definition ObTypes.h:2225
OB_EXPORT const char * ob_gyro_range_type_to_string(OBGyroFullScaleRange type)
Convert OBGyroFullScaleRange to " char* " type and then return.
OB_EXPORT OBSensorType ob_stream_type_to_sensor_type(OBStreamType type)
Convert OBStreamType to OBSensorType.
OB_EXPORT OBIMUSampleRate ob_imu_rate_value_to_type(float value)
Convert a numeric IMU sample rate value in Hz to OBIMUSampleRate.
OB_EXPORT const char * ob_sensor_type_to_string(OBSensorType type)
Convert OBSensorType to " char* " type and then return.
OB_EXPORT const char * ob_meta_data_type_to_string(OBFrameMetadataType type)
Convert OBFrameMetadataType to " char* " type and then return.
OB_EXPORT float ob_imu_rate_type_to_value(OBIMUSampleRate type)
Convert OBIMUSampleRate to its numeric frequency value in Hz.
OB_EXPORT OBFrameType ob_stream_type_to_frame_type(OBStreamType type)
Convert OBStreamType to OBFrameType.
OBStreamType ob_frame_type_to_stream_type(OBFrameType type)
Convert OBFrameType to OBStreamType.
OB_EXPORT OBSensorType ob_frame_type_to_sensor_type(OBFrameType type)
Convert OBFrameType to OBSensorType.
OB_EXPORT const char * ob_format_type_to_string(OBFormat type)
Convert OBFormat to " char* " type and then return.
OB_EXPORT const char * ob_imu_rate_type_to_string(OBIMUSampleRate type)
Convert OBIMUSampleRate to " char* " type and then return.
OB_EXPORT const char * ob_accel_range_type_to_string(OBAccelFullScaleRange type)
Convert OBAccelFullScaleRange to " char* " type and then return.
OB_EXPORT const char * ob_frame_type_to_string(OBFrameType type)
Convert OBFrameType to " char* " type and then return.
OB_EXPORT const char * ob_lidar_scan_rate_type_to_string(OBLiDARScanRate type)
Convert OBLiDARScanRate to " char* " type and then return.
OB_EXPORT OBStreamType ob_sensor_type_to_stream_type(OBSensorType type)
Convert OBSensorType to OBStreamType.
OB_EXPORT const char * ob_stream_type_to_string(OBStreamType type)
Convert OBStreamType to " char* " type and then return.
static OBIMUSampleRate convertOBIMUSampleRateValueToType(float value)
Convert a numeric IMU sample rate value in Hz to OBIMUSampleRate.
static std::string convertOBAccelFullScaleRangeTypeToString(const OBAccelFullScaleRange &type)
Convert OBAccelFullScaleRange to " string " type and then return.
static std::string convertOBStreamTypeToString(const OBStreamType &type)
Convert OBStreamType to " string " type and then return.
static std::string convertOBGyroFullScaleRangeTypeToString(const OBGyroFullScaleRange &type)
Convert OBGyroFullScaleRange to " string " type and then return.
static bool isVideoStreamType(OBStreamType type)
Check if the given stream type is a video stream.
static OBSensorType convertFrameTypeToSensorType(OBFrameType type)
Convert OBFrameType to OBSensorType and then return.
static float convertOBIMUSampleRateTypeToValue(const OBIMUSampleRate &type)
Convert OBIMUSampleRate to its numeric frequency value in Hz.
static bool isVideoSensorType(OBSensorType type)
Check if the given sensor type is a video sensor.
static std::string convertOBSensorTypeToString(const OBSensorType &type)
Convert OBSensorType to " string " type and then return.
static std::string convertOBFormatTypeToString(const OBFormat &type)
Convert OBFormat to " string " type and then return.
static OBStreamType convertFrameTypeToStreamType(OBFrameType type)
Convert OBFrameType to OBStreamType and then return.
static OBSensorType convertStreamTypeToSensorType(OBStreamType type)
Convert OBStreamType to OBSensorType and then return.
static std::string convertOBFrameMetadataTypeToString(const OBFrameMetadataType &type)
Convert OBFrameMetadataType to " string " type and then return.
static OBFrameType convertStreamTypeToFrameType(OBStreamType type)
Convert OBStreamType to OBFrameType and then return.
static std::string convertOBLiDARScanRateTypeToString(const OBLiDARScanRate &type)
Convert OBLiDARScanRate to " string " type and then return.
static std::string convertOBFrameTypeToString(const OBFrameType &type)
Convert OBFrameType to " string " type and then return.
static std::string convertOBIMUSampleRateTypeToString(const OBIMUSampleRate &type)
Convert OBIMUSampleRate to " string " type and then return.
static OBStreamType convertSensorTypeToStreamType(OBSensorType type)
Convert OBSensorType to OBStreamType type and then return.